Digital contract behavior tracing method based on block chain
By constructing a sequence of contract behavior events and an evidence-aware neural Hawkes process, the problem of unstable contract behavior tracing results in existing technologies is solved, enabling quantitative characterization and reliable tracing of contract behavior, and improving the integrity and verifiability of the tracing process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies struggle to effectively integrate on-chain and off-chain evidence in contract behavior tracing, lacking detailed modeling of event time dependence and trigger strength, resulting in insufficient stability and credibility of tracing results. Furthermore, they lack a unified, structured expression of tracing paths and an immutable evidence storage mechanism.
By constructing a sequence of contract behavior events, utilizing blockchain data processing technology and evidence-aware neural Hawkes processes, unified modeling and analysis of on-chain and off-chain evidence are performed. This generates a contract behavior trigger graph and performs reverse tracing of the source path. Combined with on-chain evidence storage and consistency verification, a quantitative characterization and reliable backtracking of the trigger source of contract behavior are achieved.
It improves the integrity and continuity of the contract behavior tracing process, enhances the stability and verifiability of the tracing results, and ensures the consistency and immutability of the tracing results in the event of inconsistencies or absence of multi-source evidence.
Smart Images

Figure CN121764973A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain and intelligent traceability technology, and in particular to a blockchain-based method for tracing digital contract behavior. Background Technology
[0002] As blockchain technology is increasingly applied in financial contracts, supply chain collaboration, and digital asset management, automated business execution based on smart contracts is gradually becoming mainstream. Existing technologies typically achieve querying and auditing of the contract execution process by recording on-chain transaction data and contract event logs. Some solutions combine log indexing, timestamps, or rule matching mechanisms to perform post-event analysis of contract behavior for anomaly detection or accountability. Other technologies attempt to introduce graph structures or statistical models to perform correlation analysis on contract call relationships, characterizing the sequential and dependent relationships between contract actions.
[0003] However, existing technologies often focus on single on-chain data sources, making it difficult to effectively integrate off-chain evidence generated by business or auditing systems. This results in insufficient stability and reliability of tracing results when contract behavior is missing, evidence is incomplete, or data quality is inconsistent. Furthermore, most existing contract behavior analysis methods are based on rules or static relationships, lacking fine-grained modeling of event time dependencies and trigger strength, making it difficult to quantify the actual triggering contribution of different preceding behaviors to the target contract behavior. In addition, existing tracing results are mostly presented in log or list format, lacking a unified structured tracing path expression and an immutable result storage mechanism, making it difficult to guarantee consistency of tracing results during cross-system verification and subsequent auditing.
[0004] Therefore, how to provide a blockchain-based method for tracing the behavior of digital contracts is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a blockchain-based method for tracing the behavior of digital contracts. This invention utilizes blockchain data processing technology, multi-source evidence fusion technology, and an evidence-aware neural Hawkes process to uniformly model and analyze the contract behavior of digital contracts in both on-chain and off-chain environments. By constructing a sequence of contract behavior events and inputting on-chain evidence events, off-chain evidence events, corresponding credibility vectors, and evidence missing markers into the evidence-aware neural Hawkes process, the temporal triggering relationships and triggering strengths between contract behaviors are modeled. This generates a contract behavior trigger graph and further backtracks to obtain the contract behavior tracing path. Simultaneously, the tracing results are stored on-chain and verified for consistency. This invention enables the quantitative characterization and reliable backtracking of the triggering sources of contract behaviors, possessing advantages such as strong evidence fusion capabilities, detailed time-dependent modeling, and high verifiability of tracing results.
[0006] A method for tracing the behavior of digital contracts based on blockchain according to an embodiment of the present invention includes the following steps: Acquire contract interaction data related to the target digital contract and perform preprocessing to generate a sequence of contract behavior events; Based on the contract behavior event sequence, on-chain evidence data and off-chain evidence data are obtained and structured encoding processing is performed to generate on-chain evidence event sequence and off-chain evidence event sequence; Calculate the on-chain credibility vector based on the on-chain evidence event sequence, calculate the off-chain credibility vector based on the off-chain evidence event sequence, and generate a sequence of missing evidence markers; The on-chain evidence event sequence, off-chain evidence event sequence, on-chain credibility vector, off-chain credibility vector, and evidence missing marker sequence are input into the evidence-aware neural Hawkes process to generate the evidence-aware conditional strength sequence. Based on the evidence perception condition strength sequence, the triggering source of contract behavior events is determined, and a set of triggering source contribution is generated; Construct contract behavior trigger relationships based on the set of trigger source contributions, generate a contract behavior trigger graph, and perform edge pruning on the contract behavior trigger graph; Perform reverse backtracking on the pruned contract behavior trigger graph to generate a contract behavior tracing path, and generate a tracing and evidence storage record based on the contract behavior tracing path; Upon receiving a traceability request, the traceability record is read, and traceability summary data and on-chain evidence commitment are regenerated based on the traceability path of contract behavior, thus generating the traceability result of contract behavior.
[0007] Optionally, the preprocessing includes field parsing, time alignment, and event normalization.
[0008] Optionally, the step of acquiring on-chain and off-chain evidence data based on the contract behavior event sequence and performing structured encoding processing to generate the on-chain and off-chain evidence event sequences specifically includes: Based on the contract behavior event sequence, the event index is determined, the event index set is constructed, and an evidence query key is generated for each event index in the event index set to obtain the evidence query key set. Send the evidence query key set to the blockchain node, call the blockchain node's transaction receipt query interface and event log query interface to obtain the on-chain evidence data set; The on-chain evidence data set is subjected to structured encoding processing to form an on-chain evidence event sequence; Based on the evidence query key set, the business log retrieval interface and audit record query interface are called to obtain off-chain evidence data and form an off-chain evidence data set. The off-chain evidence data set is subjected to structured encoding processing to form an off-chain evidence event sequence.
[0009] Optionally, the step of calculating the on-chain credibility vector based on the on-chain evidence event sequence, calculating the off-chain credibility vector based on the off-chain evidence event sequence, and generating the evidence missing marker sequence specifically includes: From the on-chain evidence event sequence, extract the transaction receipt status marker, block confirmation number, and block reorganization risk marker to form an on-chain credibility triplet set; Normalize the number of block confirmations, and perform numerical mapping on the transaction receipt status marker and the block reorganization risk marker respectively to obtain the normalized number of block confirmations, the numericalized transaction receipt status marker, and the numericalized block reorganization risk marker. Based on the normalized block confirmation count, the numerical transaction receipt status marker, and the numerical block reorganization risk marker, an on-chain trust vector is generated. Extract log digital signature verification markers, log hash chain verification markers, and timestamp drift from the off-chain evidence event sequence to form a set of off-chain trust triples; Normalize the timestamp drift, and perform numerical mapping on the log digital signature verification flag and the log hash chain verification flag respectively to obtain the normalized timestamp drift, the numericalized log digital signature verification flag, and the numericalized log hash chain verification flag. An off-chain trust vector is generated based on the normalized timestamp drift, the numerical log digital signature verification flag, and the numerical log hash chain verification flag. Based on the on-chain evidence event sequence and the off-chain evidence event sequence, a sequence of missing evidence markers is generated.
[0010] Optionally, the step of inputting the on-chain evidence event sequence, the off-chain evidence event sequence, the on-chain credibility vector, the off-chain credibility vector, and the evidence missing marker sequence into the evidence-aware neural Hawkes process to generate the evidence-aware conditional strength sequence specifically includes: Input the on-chain evidence event sequence, the off-chain evidence event sequence, the on-chain credibility vector, the off-chain credibility vector, and the evidence missing marker sequence into the evidence-aware neural Hawkes process; Input the on-chain evidence event sequence into the on-chain Hawkes history encoder, and perform event embedding and time recursion processing on each on-chain evidence event in the order of event index to generate an on-chain historical state sequence. Input the off-chain evidence event sequence into the off-chain Hawkes history encoder, and perform event embedding and time recursion processing on each off-chain evidence event in the order of event index to generate an off-chain historical state sequence. Based on the on-chain credibility vector set, the off-chain credibility vector set, and the evidence missing marker sequence, an evidence gating input vector is constructed; The evidence gating input vector is input into the evidence gating fusion unit, the gating intermediate value is calculated based on linear transformation, and an S-shaped mapping is performed on the gating intermediate value to obtain the evidence gating weight. Based on evidence gating weights, gating fusion processing is performed on on-chain and off-chain historical states to generate fused historical states and form a fused historical state sequence. The fused historical state sequence is input into the evidence perception strength calculation unit. Based on the fused historical state, on-chain credibility vector, and off-chain credibility vector, the evidence perception condition strength is calculated, and an evidence perception condition strength sequence is generated.
[0011] Optionally, the step of determining the triggering source of contract behavior events based on the evidence-aware condition strength sequence and generating a set of triggering source contribution values specifically includes: Based on the sequence of contract behavior events, the target contract behavior events are identified, forming a target event index set; For the target event index, determine the candidate preceding event index set, and determine the contract behavior event set corresponding to the candidate preceding event index set as the candidate preceding contract behavior event set; Based on the evidence-aware condition strength sequence, calculate the inter-event trigger strength increment for each candidate preceding event index in the candidate preceding event index set; The inter-event trigger intensity increments corresponding to all candidate preceding event indices in the candidate preceding event index set are combined into an increment vector, and the increment vector is normalized to obtain the contribution weight vector. Based on the candidate preceding contract behavior event set and contribution weight vector, a set of trigger source contribution pairs is generated, and the set of trigger source contribution pairs corresponding to all target contract behavior events in the target event index set is aggregated to generate a set of trigger source contribution pairs.
[0012] Optionally, the step of constructing contract behavior triggering relationships based on the set of triggering source contributions, generating a contract behavior triggering graph, and performing edge pruning on the contract behavior triggering graph specifically includes: Based on the set of contribution of trigger sources, the set of trigger edges, and the sequence of contract behavior events, a set of nodes is constructed. The set of nodes and the set of trigger edges are combined to generate a contract behavior trigger graph. Determine the set of incoming edges for each target node in the contract behavior trigger graph, and sort the set of incoming edges in descending order according to their contribution weight to generate a sorted sequence of incoming edges; For each target node, the sorted incoming edge sequence is truncated to obtain the set of retained incoming edges; Perform threshold filtering on the retained inbound edge set, and delete inbound edges whose contribution weight is less than the threshold to obtain the pruned inbound edge set. Replace the set of incoming edges of the corresponding target node in the contract behavior trigger graph with the set of incoming edges of each target node after pruning, and obtain the pruned contract behavior trigger graph.
[0013] Optionally, the step of performing reverse backtracking processing on the pruned contract behavior trigger graph to generate a contract behavior tracing path, and generating a tracing and evidence storage record based on the contract behavior tracing path, specifically includes: On the pruned contract behavior trigger graph, perform reverse backtracking to generate a contract behavior tracing path; For each contract behavior tracing path, perform path encoding processing to form a path node identifier sequence; Extract the contribution weights of the triggering edges between adjacent contract behavior event nodes in the contract behavior tracing path to form an edge weight sequence; The path node identifier sequence is combined with the edge weight sequence to generate traceability summary data corresponding to the contract behavior traceability path; The on-chain evidence commitment is calculated based on the traceability summary data, and then written into the blockchain distributed ledger to generate traceability evidence records.
[0014] Optionally, upon receiving a tracing request, reading the tracing evidence record, regenerating the tracing summary data and on-chain evidence commitment based on the contract behavior tracing path, and generating the contract behavior tracing result specifically includes: Upon receiving a source tracing request, the source tracing request is parsed, the target contract behavior event identifier or target contract behavior event index is extracted, and the target contract behavior event to be verified is determined. Based on the target contract behavior event, retrieve and read the traceability and evidence preservation records associated with the target contract behavior event from the blockchain distributed ledger, and obtain the on-chain evidence preservation commitment stored in the traceability and evidence preservation records; Obtain the contract behavior tracing path corresponding to the target contract behavior event, and regenerate the tracing summary data based on the contract behavior tracing path; Perform deterministic mapping processing on the source traceability summary data, recalculate the on-chain evidence preservation commitment, and obtain the recalculated on-chain evidence preservation commitment; Perform consistency verification processing, compare the recalculated on-chain evidence commitment with the on-chain evidence commitment in the traceability evidence record, and generate a consistency verification result record; Generate and output contract behavior tracing results based on the consistency verification results. When the consistency verification result is marked as passed, output the contract behavior tracing path and the corresponding tracing summary data as the contract behavior tracing results. When the consistency check result is marked as "failed", the output will include the contract behavior tracing result with the "failed check" mark.
[0015] The beneficial effects of this invention are: This invention constructs a sequence of contract behavior events and uniformly inputs on-chain evidence events, off-chain evidence events, corresponding credibility vectors, and evidence missing markers into an evidence-aware neural Hawkes process to model the temporal triggering relationships of digital contract behaviors. This allows for a continuous characterization of the causal relationships between contract behaviors over time. Compared to existing technologies based solely on static rules or simple correlations, this approach can form a structured expression in terms of event occurrence sequence and trigger intensity, thereby improving the completeness and continuity of the contract behavior tracing process.
[0016] By introducing on-chain and off-chain credibility vectors and evidence missing markers, and dynamically fusing on-chain and off-chain historical states in an evidence gating fusion mechanism, this invention can still generate stable contract behavior triggering relationships even when the quality of multi-source evidence is inconsistent or evidence is missing. This mechanism allows the influence of evidence from different sources on the tracing results to be explicitly modeled, avoiding over-reliance on a single data source and improving the consistency of tracing analysis results in complex business scenarios.
[0017] Based on generating a contract behavior trigger graph and performing edge pruning and reverse backtracking, this invention can form a clearly structured contract behavior tracing path and generate summary data for the tracing path before on-chain notarization. When a tracing request occurs, by recalculating the notarization commitment and performing consistency verification, the integrity of the tracing result during the generation, storage, and invocation process can be verified, thus giving the contract behavior tracing result verifiability and immutability, facilitating subsequent auditing and cross-system verification. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0019] Figure 1 This is a flowchart of a blockchain-based digital contract behavior tracing method proposed in this invention; Figure 2 This is a schematic diagram of the evidence-aware neural Hawkes process in a blockchain-based digital contract behavior tracing method proposed in this invention. Figure 3 This is a schematic diagram of the pruning mechanism in a blockchain-based digital contract behavior tracing method proposed in this invention. Detailed Implementation
[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0021] refer to Figures 1-3 A blockchain-based method for tracing the behavior of digital contracts includes the following steps: Acquire contract interaction data related to the target digital contract and perform preprocessing to generate a sequence of contract behavior events; Based on the contract behavior event sequence, on-chain evidence data and off-chain evidence data are obtained and structured encoding processing is performed to generate on-chain evidence event sequence and off-chain evidence event sequence; Calculate the on-chain credibility vector based on the on-chain evidence event sequence, calculate the off-chain credibility vector based on the off-chain evidence event sequence, and generate a sequence of missing evidence markers; The on-chain evidence event sequence, off-chain evidence event sequence, on-chain credibility vector, off-chain credibility vector, and evidence missing marker sequence are input into the evidence-aware neural Hawkes process to generate the evidence-aware conditional strength sequence. Based on the evidence perception condition strength sequence, the triggering source of contract behavior events is determined, and a set of triggering source contribution is generated; Construct contract behavior trigger relationships based on the set of trigger source contributions, generate a contract behavior trigger graph, and perform edge pruning on the contract behavior trigger graph; Perform reverse backtracking on the pruned contract behavior trigger graph to generate a contract behavior tracing path, and generate a tracing and evidence storage record based on the contract behavior tracing path; Upon receiving a traceability request, the traceability record is read, and traceability summary data and on-chain evidence commitment are regenerated based on the traceability path of contract behavior, thus generating the traceability result of contract behavior.
[0022] In this embodiment, the step of acquiring contract interaction data related to the target digital contract and performing preprocessing to generate a contract behavior event sequence specifically includes: Acquire contract interaction data related to the target digital contract, the contract interaction data including on-chain transaction data generated by the target digital contract in the blockchain network and contract event log data corresponding to the on-chain transaction data; The on-chain transaction data is used to record transaction execution information involving the target digital contract, and the contract event log data is used to record event information triggered by the target digital contract during transaction execution. The on-chain transaction data and the contract event log data together constitute the original data set used to describe the interactive behavior of the target digital contract. The on-chain transaction data set is parsed, and each on-chain transaction data is split and extracted according to the transaction field rules to generate a transaction field set. The transaction fields corresponding to each transaction data include a transaction hash field for uniquely identifying the transaction, a block height field for identifying the block position of the transaction, a block time field for representing the time when the transaction occurred, a sender address field for identifying the initiator of the transaction, a receiver address field for identifying the receiver of the transaction, and a transaction receipt status field for representing the transaction execution result, thus obtaining a structured transaction field set. The on-chain contract event log set is parsed, and each contract event log is split and extracted according to the log field rules to generate a log field set. The log fields corresponding to each contract event log include a transaction hash field for associating with the transaction, a log index field for distinguishing different log orders within the same transaction, a contract address field for identifying the triggering event, an event topic field for identifying the event type, and an event data field for recording the specific parameters of the event, thus obtaining a structured contract event log field set. Time alignment processing is performed on the transaction field set and the log field set. The time alignment processing includes associating and matching the transaction data in the transaction field set with the contract event logs in the log field set one by one based on the transaction hash field, so that each contract event log establishes an association relationship with its corresponding transaction data, and using the block time field in the transaction data as a unified time base, generating a corresponding event timestamp for each associated interaction record, thereby forming a set of interaction records aligned with a unified time base. Event normalization processing is performed on the time-aligned set of interaction records. The event normalization processing includes encapsulating the time information, behavior type information, subject information and state change information in the same interaction record based on the transaction field information and contract event log field information contained in each interaction record, forming a standardized contract behavior event, thereby generating a contract behavior event sequence. Each contract behavior event includes a corresponding event timestamp, event type identifier, contract address identifier, calling entity identifier, function identifier, and state change summary, which are used to fully describe the single behavior event generated by the target digital contract during an interaction. The contract behavior event sequence is sorted and deduplicated. The sorting process uses the event timestamp corresponding to each contract behavior event as the primary sorting basis, and when the event timestamps are the same, the log index order in the contract event log is used as the secondary sorting basis to arrange the contract behavior events in order. After sorting, duplicate contract behavior events in the sorting results are deduplicated, and unique contract behavior event records are retained, thereby generating a sequence of contract behavior events arranged in chronological order without duplicate events.
[0023] In this embodiment, the step of obtaining on-chain and off-chain evidence data based on the contract behavior event sequence and performing structured encoding processing to generate the on-chain and off-chain evidence event sequences specifically includes: Based on the contract behavior event sequence, determine the event index corresponding to each contract behavior event in the contract behavior event sequence, and construct an event index set containing all event indexes; For each event index in the event index set, extract the transaction hash information, contract address identifier, and event timestamp information from the contract behavior event corresponding to the event index, and combine the transaction hash information, contract address identifier, and event timestamp information to generate an evidence query key; The evidence query key set is sent to the blockchain node. Based on the evidence query key set, the transaction receipt query interface and contract event log query interface provided by the blockchain node are called one by one to obtain the on-chain evidence data corresponding to each evidence query key. The obtained on-chain evidence data is then collected to form an on-chain evidence data set. Each piece of on-chain evidence data includes a transaction receipt status flag to characterize the execution result of the corresponding transaction, a block confirmation number to characterize the degree of confirmation of the transaction in the block, and a block reorganization risk flag to characterize whether the corresponding block has a reorganization risk. The on-chain evidence data set is subjected to structured encoding processing. The structured encoding processing includes mapping and uniformly encapsulating fields for each piece of on-chain evidence data. The event timestamp, event type identifier, contract address identifier, calling entity identifier, function identifier, and state change summary of the corresponding contract behavior event are combined with the transaction receipt status marker, block confirmation number, and block reorganization risk marker contained in the on-chain evidence data to generate on-chain evidence events that correspond one-to-one with each contract behavior event. All on-chain evidence events are arranged in order of event index to form an on-chain evidence event sequence. The evidence query key set is sent to the business system or audit system. Based on the evidence query key set, the business log retrieval interface and audit record query interface are called one by one to obtain the off-chain evidence data corresponding to each evidence query key. The obtained off-chain evidence data is then aggregated to form an off-chain evidence data set. Each piece of off-chain evidence data includes the log digital signature verification result used to characterize log integrity, the log hash chain verification result used to characterize log association consistency, and the timestamp drift amount used to characterize the difference between the log recording time and the on-chain event time. The off-chain evidence data set is subjected to structured encoding processing. The structured encoding processing includes mapping and uniformly encapsulating fields for each piece of off-chain evidence data. The event timestamp, event type identifier, contract address identifier, calling entity identifier, function identifier, and state change summary of the corresponding contract behavior event are combined with the log digital signature verification mark, log hash chain verification mark, and timestamp drift contained in the off-chain evidence data to generate off-chain evidence events that correspond one-to-one with each contract behavior event. All off-chain evidence events are arranged in order of event index to form the off-chain evidence event sequence.
[0024] In this embodiment, the step of calculating the on-chain credibility vector based on the on-chain evidence event sequence, calculating the off-chain credibility vector based on the off-chain evidence event sequence, and generating the evidence missing marker sequence specifically includes: From the on-chain evidence event sequence, the transaction receipt status flag, block confirmation number, and block reorganization risk flag corresponding to each on-chain evidence event are extracted one by one. Then, according to the event index order of each on-chain evidence event in the on-chain evidence event sequence, the extracted transaction receipt status flag, block confirmation number, and block reorganization risk flag are combined one by one to form an on-chain credibility triplet set corresponding to each contract behavior event. Normalization is performed on the block confirmation number extracted from the on-chain credibility triple set. The normalization process includes calculating the minimum and maximum values of all block confirmation numbers in the on-chain evidence event sequence, and performing range scaling on the block confirmation number corresponding to each contract behavior event based on the minimum and maximum values, so that the normalized block confirmation number falls within a uniform numerical range, thereby obtaining the normalized block confirmation number corresponding to each contract behavior event. Numerical mapping processing is performed on the transaction receipt status marker and block reorganization risk marker in the on-chain trust triple set. The numerical mapping processing includes mapping the transaction receipt status marker corresponding to each contract behavior event to the corresponding status value, and mapping the block reorganization risk marker corresponding to each contract behavior event to the corresponding risk value, thereby obtaining numerical transaction receipt status marker and numerical block reorganization risk marker that correspond one-to-one with each contract behavior event. Based on the numerical transaction receipt status marker, normalized block confirmation number, and numerical block reorganization risk marker, a corresponding on-chain credibility vector is generated for each contract behavior event. The on-chain credibility vector is composed of the numerical transaction receipt status marker, normalized block confirmation number, and numerical block reorganization risk marker in sequence. All generated on-chain credibility vectors are arranged according to the event index order of each contract behavior event in the on-chain evidence event sequence to form an on-chain credibility vector set. From the sequence of off-chain evidence events, the log digital signature verification mark, log hash chain verification mark, and timestamp drift amount corresponding to each off-chain evidence event are extracted one by one. Then, according to the event index order of each off-chain evidence event in the sequence of off-chain evidence events, the extracted log digital signature verification mark, log hash chain verification mark, and timestamp drift amount are combined one by one to form a set of off-chain credibility triples corresponding to each contract behavior event. Normalization is performed on the timestamp drift extracted from the off-chain credibility triplet set. The normalization process includes calculating the minimum and maximum values of all timestamp drifts in the off-chain evidence event sequence, and then performing range scaling on the timestamp drift corresponding to each contract behavior event based on the minimum and maximum values, so that the normalized timestamp drift falls within a uniform numerical range, thereby obtaining the normalized timestamp drift corresponding to each contract behavior event. Numerical mapping processing is performed on the log digital signature verification mark and log hash chain verification mark in the off-chain trust triple set. The numerical mapping processing includes mapping the log digital signature verification mark corresponding to each contract behavior event to the corresponding signature verification value according to the signature verification mapping rule, and mapping the log hash chain verification mark corresponding to each contract behavior event to the corresponding hash chain verification value according to the hash chain verification mapping rule, so as to obtain the numerical log digital signature verification mark and numerical log hash chain verification mark corresponding to each contract behavior event. Based on the numerical log digital signature verification mark, the numerical log hash chain verification mark, and the normalized timestamp drift, a corresponding off-chain credibility vector is generated for each contract behavior event. The off-chain credibility vector is composed of the numerical log digital signature verification mark, the numerical log hash chain verification mark, and the normalized timestamp drift in sequence. All generated off-chain credibility vectors are arranged according to the event index order of each contract behavior event in the off-chain evidence event sequence to form an off-chain credibility vector set. Based on the on-chain evidence event sequence and the off-chain evidence event sequence, it is determined whether each contract behavior event has corresponding on-chain evidence events and off-chain evidence events at the same time, and an evidence missing marker sequence is generated accordingly. Specifically, for each contract behavior event, when there is an on-chain evidence event corresponding to the contract behavior event, the on-chain evidence missing flag is set to the first preset value; when there is no corresponding on-chain evidence event, the on-chain evidence missing flag is set to the second preset value. When there is an off-chain evidence event corresponding to the contract behavior event, the off-chain evidence missing flag is set to the first preset value; when there is no corresponding off-chain evidence event, the off-chain evidence missing flag is set to the second preset value. The on-chain evidence missing markers and off-chain evidence missing markers corresponding to each contract behavior event are combined in the order of event index to form an evidence missing marker sequence.
[0025] In this embodiment, the step of inputting the on-chain evidence event sequence, the off-chain evidence event sequence, the on-chain confidence vector, the off-chain confidence vector, and the evidence missing marker sequence into the evidence-aware neural Hawkes process to generate the evidence-aware conditional strength sequence specifically includes: The on-chain evidence event sequence, off-chain evidence event sequence, on-chain credibility vector, off-chain credibility vector, and evidence missing marker sequence are input into the evidence-aware neural Hawkes process, wherein the evidence-aware neural Hawkes process includes an on-chain Hawkes history encoder, an off-chain Hawkes history encoder, an evidence gating fusion unit, and an evidence-awareness intensity calculation unit. The on-chain evidence event sequence is input into the on-chain Hawkes history encoder. According to the event index order of each on-chain evidence event in the on-chain evidence event sequence, event embedding processing and time-interval-based historical state recursion processing are performed on each on-chain evidence event in turn to generate on-chain historical states that correspond one-to-one with each on-chain evidence event. All the generated on-chain historical states are arranged in the order of event index to form an on-chain historical state sequence. Each on-chain historical state is determined by the corresponding current on-chain evidence event and all previous on-chain evidence events. The off-chain evidence event sequence is input into the off-chain Hawkes history encoder. According to the event index order of each off-chain evidence event in the off-chain evidence event sequence, event embedding processing and time-interval-based historical state recursion processing are performed on each off-chain evidence event in turn to generate off-chain historical states that correspond one-to-one with each off-chain evidence event. All generated off-chain historical states are arranged in the order of event index to form an off-chain historical state sequence. Each off-chain historical state is determined by the corresponding current off-chain evidence event and all off-chain evidence events before the event. Based on the on-chain credibility vector set, the off-chain credibility vector set, and the evidence missing marker sequence, a corresponding evidence gating input vector is constructed for each contract behavior event. The evidence gating input vector is obtained by concatenating the on-chain credibility vector, the off-chain credibility vector, and the evidence missing marker corresponding to the contract behavior event, and is arranged according to the event index order of the contract behavior event in the contract behavior event sequence to form an evidence gating input vector set. The evidence gating input vectors are input one by one into the evidence gating fusion unit. A linear transformation is performed on each evidence gating input vector to obtain the corresponding gating intermediate result. The gating intermediate result is then further processed by an S-shaped mapping to generate evidence gating weights that correspond one-to-one with each contract behavior event. Based on the evidence gating weights, a gating fusion process is performed on the on-chain and off-chain historical states corresponding to each contract behavior event. The gating fusion process includes: for each contract behavior event, the on-chain historical state is weighted according to the evidence gating weights corresponding to the contract behavior event, and the off-chain historical state is weighted according to a weight value complementary to the evidence gating weights; the weighted on-chain and off-chain historical states are merged according to their corresponding elements to obtain the fused historical state corresponding to the contract behavior event. The fused historical state is composed of the results of the on-chain historical state under the effect of the evidence gating weight and the results of the off-chain historical state under the effect of the complementary weight. All the generated fused historical states are arranged according to the event index order of each contract behavior event in the contract behavior event sequence to form a fused historical state sequence. The fused historical state sequence is input into the evidence perception strength calculation unit. For each contract behavior event in the contract behavior event sequence, the evidence perception condition strength is calculated based on the fused historical state, on-chain credibility vector, and off-chain credibility vector corresponding to the contract behavior event. The calculation of the evidence perception condition strength includes performing a linear transformation on the fused historical state to obtain a first intermediate result, performing a linear transformation on the on-chain confidence vector to obtain a second intermediate result, performing a linear transformation on the off-chain confidence vector to obtain a third intermediate result, summing the first, second, and third intermediate results and adding a bias term to obtain the strength calculation result, and performing a non-negative activation mapping on the strength calculation result to ensure that the obtained evidence perception condition strength is a non-negative value. Based on the event index order of the contract behavior events in the contract behavior event sequence, the evidence perception condition strength corresponding to each contract behavior event is arranged to generate an evidence perception condition strength sequence.
[0026] In this embodiment, determining the triggering source of the contract behavior event based on the evidence-aware condition strength sequence and generating a set of triggering source contribution values specifically includes: Based on the contract behavior event sequence, target contract behavior events for trigger source analysis are determined. The determination process includes using the order of each contract behavior event in the sequence as the event index basis, filtering out event indexes that meet preset analysis conditions from all event indexes, and forming a target event index set. Then, select any target event index from the target event index set, and determine the contract behavior event corresponding to the target event index as the target contract behavior event; For a target contract behavior event, determine its corresponding event index position in the contract behavior event sequence, and use the event index position as the time sequence boundary to select all contract behavior events that appear before the event index as candidate preceding events; The rule for determining the candidate preceding events is as follows: any contract behavior event that precedes the target contract behavior event in the event sequence and whose event index is less than the target event index is included in the candidate preceding event range; the set of contract behavior events corresponding to all candidate preceding events obtained by the above rule is determined as the candidate preceding contract behavior event set. Based on the evidence-aware condition strength sequence, the triggering effect of candidate preceding contract behavior events on target contract behavior events is quantitatively calculated. The quantitative calculation includes, for each candidate preceding contract behavior event in the set of candidate preceding contract behavior events, calculating the condition strength value corresponding to the target contract behavior event when the candidate preceding contract behavior event occurs, and the baseline condition strength value corresponding to the target contract behavior event when the influence of candidate preceding contract behavior events is not considered. The difference between the two is used as the inter-event trigger strength increment of the candidate preceding contract behavior event on the target contract behavior event. The inter-event trigger strength increment is used to characterize the contribution of the candidate preceding contract behavior event to the increase in the probability of the target contract behavior event. The trigger intensity increments between events corresponding to each candidate preceding contract behavior event in the candidate preceding contract behavior event set are summarized to form a trigger intensity increment set for the target contract behavior event. Based on the trigger strength increment set, the trigger strength increment corresponding to each candidate preceding contract behavior event is normalized. The normalization method is as follows: Divide the trigger intensity increment corresponding to the candidate preceding contract behavior event by the sum of the trigger intensity increments of all candidate preceding contract behavior events to obtain the contribution weight of the candidate preceding contract behavior event to the target contract behavior event. Then make the sum of the contribution weights corresponding to all candidate preceding contract behavior events equal to one, thereby generating a set of contribution weights corresponding to the target contract behavior event, which is used to characterize the relative triggering contribution degree of each candidate preceding contract behavior event to the target contract behavior event. Based on the set of candidate preceding contract behavior events and the set of contribution weights, the triggering sources of the target contract behavior event are combined and generated. The combined generation process includes: pairing each candidate preceding contract behavior event with its corresponding contribution weight to form a set of triggering source contribution pairs that represent the correspondence between "candidate preceding contract behavior event and contribution weight". Each triggering source contribution pair is used to characterize the magnitude of the triggering contribution of the corresponding candidate preceding contract behavior event to the target contract behavior event. For all target contract behavior events in the target event index set, generate corresponding trigger source contribution pairs. Then, aggregate the trigger source contribution pairs corresponding to each target contract behavior event to form a trigger source contribution set.
[0027] In this embodiment, the step of constructing contract behavior triggering relationships based on the set of trigger source contributions, generating a contract behavior triggering graph, and performing edge pruning on the contract behavior triggering graph specifically includes: Based on the set of trigger source contribution, a set of trigger edges is determined for constructing contract behavior triggering relationships. The set of trigger source contribution includes trigger source contribution pairs formed for each target contract behavior event. For any trigger source contribution pair, it includes a candidate preceding contract behavior event and the contribution weight of the candidate preceding contract behavior event to the corresponding target contract behavior event. For each trigger source contribution pair, the candidate preceding contract behavior event is mapped to the corresponding preceding event node, the target contract behavior event is mapped to the corresponding target event node, and the directed connection from the preceding event node to the target event node is used as a trigger edge. The direction of the triggering edge is from the candidate preceding event to the target event, and the edge weight of the triggering edge is the contribution weight of the candidate preceding contract behavior event to the target contract behavior event. All trigger source contributions are aggregated to form a trigger edge set generated according to the above rules; Based on the contract behavior event sequence, a set of nodes is constructed to represent contract behavior, wherein each node in the set corresponds one-to-one with a contract behavior event in the contract behavior event sequence; By combining the set of nodes and the set of trigger edges, nodes serve as endpoints of contract behavior triggering relationships, and trigger edges serve as directed connections between nodes, thereby generating a contract behavior triggering graph that contains all contract behavior nodes and triggering relationships, which is used to represent the triggering structure relationships between various contract behavior events. For each target contract behavior event node in the contract behavior triggering graph, determine all triggering edges pointing to the target contract behavior event node, forming the set of incoming edges corresponding to the target contract behavior event node; Based on this, according to the contribution weight of each incoming edge, all incoming edges in the incoming edge set are sorted in descending order of contribution weight, thus obtaining the sorted incoming edge sequence corresponding to the target contract behavior event node. For each target contract behavior event node, after sorting the contribution weight of the corresponding incoming edges, incoming edges are selected sequentially from the sorted incoming edge sequence of the target contract behavior event node in descending order of contribution weight, and only a preset number of incoming edges with the highest contribution weight are retained as retained incoming edges. The preset number is a pre-set positive integer. Through the above processing, each target contract behavior event node retains only a limited number of incoming edges with high contribution, thereby forming a corresponding set of retained incoming edges; A threshold filtering process is performed on the retained inbound edge set. The threshold filtering process includes: for each target contract behavior event node, checking the contribution weight of each inbound edge in its corresponding retained inbound edge set one by one, deleting inbound edges with contribution weight less than a preset threshold from the retained inbound edge set, and only retaining inbound edges with contribution weight not less than the preset threshold. By using the above threshold filtering, the retained inbound edges simultaneously satisfy the requirements of ranking high in contribution weight and reaching the preset lower limit of contribution weight, thereby forming the pruned inbound edge set of the corresponding target contract behavior event node. Replace the original set of incoming edges in the contract behavior trigger graph with the pruned set of incoming edges corresponding to each target contract behavior event node, so that each target contract behavior event node retains only the incoming edges after sorting, truncation and threshold filtering. The pruned inbound edges of all target contract behavior event nodes are collected to form a new set of trigger edges, which together with the original set of contract behavior event nodes constitute the pruned contract behavior trigger graph.
[0028] In this embodiment, the step of performing reverse backtracking processing on the pruned contract behavior trigger graph to generate a contract behavior tracing path, and generating a tracing and evidence storage record based on the contract behavior tracing path, specifically includes: On the pruned contract behavior trigger graph, for each target contract behavior event node, the target contract behavior event node is used as the backtracking starting point. Along the incoming edge pointing to the target contract behavior event node, the preceding contract behavior event nodes are traversed layer by layer in the reverse direction of the edge until the starting contract behavior event node with no preceding incoming edge is reached. This generates a contract behavior tracing path that extends backward from the target contract behavior event node. Each contract behavior tracing path consists of several contract behavior event nodes connected in reverse chronological order. For each contract behavior tracing path, path encoding processing is performed. The path encoding processing includes: extracting the node identifiers corresponding to each contract behavior event node in the contract behavior tracing path in the backtracking order, forming a path node identifier sequence arranged in the backtracking order, and extracting the contribution weights corresponding to the triggering edges between adjacent contract behavior event nodes in the path, forming an edge weight sequence that corresponds one-to-one with the path node identifier sequence. The path node identifier sequence and the edge weight sequence are combined to generate traceability summary data corresponding to the traceability path of contract behavior. The traceability summary data includes the path node identifier sequence and the edge weight sequence corresponding to the path node identifier sequence, which is used to characterize the backtracking structure of the contract behavior triggering relationship. The on-chain evidence preservation commitment is calculated based on the source traceability summary data. The on-chain evidence preservation commitment generates a summary commitment value by performing a deterministic mapping on the source traceability summary data. The summary commitment value is obtained by performing a hash operation after concatenating the path node identifier sequence and the edge weight sequence. The output result of the hash operation serves as the on-chain evidence preservation commitment. The on-chain evidence commitment is written into the blockchain distributed ledger to generate a traceability evidence record corresponding to the traceability path of contract behavior. The traceability evidence record includes at least the on-chain evidence commitment and the target contract behavior event identifier associated with the on-chain evidence commitment, which is used to achieve tamper-proof evidence of the traceability result of contract behavior.
[0029] In this embodiment, upon receiving a tracing request, reading the tracing evidence record, regenerating the tracing summary data and on-chain evidence commitment based on the contract behavior tracing path, and generating the contract behavior tracing result specifically includes: Upon receiving a tracing request, the tracing request is parsed, the target contract behavior event identifier or target contract behavior event index carried in the tracing request is extracted, and the target contract behavior event to be verified is determined accordingly. Based on the target contract behavior event, a record retrieval operation is performed in the blockchain distributed ledger. The retrieval operation uses the event identifier or event index of the target contract behavior event as the retrieval basis to locate and read the traceability record corresponding to the target contract behavior event, and extracts the on-chain evidence commitment used to characterize the integrity of the traceability result of the contract behavior from the traceability record. Obtain the contract behavior tracing path corresponding to the target contract behavior event, and regenerate the tracing summary data based on the contract behavior tracing path. The tracing summary data includes a path node identifier sequence arranged in backtracking order and an edge weight sequence corresponding to the path node identifier sequence. A deterministic mapping process is performed on the traceability summary data to recalculate the on-chain evidence commitment, resulting in a recalculated on-chain evidence commitment. The deterministic mapping process includes forming a summary input string by combining the path node identifier sequence and the edge weight sequence according to a preset concatenation rule, and performing a hash operation on the summary input string. The output of the hash operation is used as the recalculated on-chain evidence commitment. A consistency verification process is performed, which compares the recalculated on-chain evidence commitment with the on-chain evidence commitment in the traceability record to generate a consistency verification result. If the recalculated on-chain evidence commitment is the same as the on-chain evidence commitment in the traceability record, the consistency verification result is marked as passed; if the recalculated on-chain evidence commitment is different from the on-chain evidence commitment in the traceability record, the consistency verification result is marked as failed. Generate and output contract behavior tracing results based on the consistency verification results. When the consistency verification result is marked as passed, output the contract behavior tracing path and the corresponding tracing summary data as the contract behavior tracing results. When the consistency check result is marked as "failed", the output will include the contract behavior tracing result with the "failed check" mark.
[0030] Example 1: To verify the feasibility of this invention in practice, it was applied to the source tracing analysis of digital contract behavior in a multi-party collaborative business scenario. In this scenario, multiple business systems achieve automated collaboration through blockchain smart contracts. During contract execution, a large number of on-chain transaction records and contract event logs are generated. Simultaneously, corresponding off-chain operation logs and audit records are also generated in the business systems and audit systems. Due to the complexity of the business processes and the frequency of calls, when abnormal execution results or controversial behaviors occur, traditional methods based on log retrieval or manual rule analysis are difficult to accurately locate the key triggering source that caused the target contract behavior, especially when there is a lack of off-chain evidence or inconsistent evidence quality, the source tracing results are prone to deviation.
[0031] In this application scenario, the on-chain transaction data and contract event logs generated by the target digital contract during its runtime are first collected and correlated with off-chain log data recorded in the business system and audit system to construct a unified sequence of contract behavior events. Subsequently, transaction receipt status, block confirmation count, and block reorganization risk information are obtained from blockchain nodes, and log signature verification results, hash chain verification results, and timestamp offset information are obtained from the business system and audit system. On-chain and off-chain evidence event sequences are generated respectively, and further, on-chain credibility vectors, off-chain credibility vectors, and evidence missing marker sequences are calculated.
[0032] Building upon this foundation, the aforementioned multi-source evidence is input into an evidence-aware neural Hawkes process to model the temporal triggering relationships between contract behaviors. On-chain and off-chain Hawkes history encoders are used to model the historical states of on-chain and off-chain evidence, respectively. Then, an evidence gating fusion mechanism dynamically fuses evidence from different sources, generating a fused historical state sequence and an evidence-aware conditional strength sequence. Based on the conditional strength sequence, trigger source analysis is performed on the target contract behavior, quantifying the contribution of different preceding contract behaviors to the triggering of the target contract behavior. This constructs a contract behavior trigger graph, and through contribution ranking and threshold pruning, a well-structured and scaled triggering relationship network is obtained.
[0033] In practical applications, when abnormal contract execution results occur in the business system, the system uses the abnormal contract behavior as the target event, performs reverse backtracking on the pruned contract behavior trigger graph, generates a contract behavior tracing path, and encodes the path nodes and their edge weights to form tracing summary data. Subsequently, the notarized commitment calculated from this tracing summary data is written into the blockchain distributed ledger. In subsequent auditing or dispute resolution processes, the system can recalculate the tracing summary data based on the tracing request and perform consistency verification with the on-chain notarized commitment, thereby verifying the integrity of the tracing results during the generation and storage process.
[0034] Comparative experimental data shows that, under the same business data scale, the method of this invention significantly reduces the average number of nodes in the contract behavior tracing path, resulting in more concentrated tracing results. Furthermore, it maintains a stable trigger source ranking even in the presence of missing off-chain logs. Statistical results demonstrate that in high-concurrency contract call scenarios, this invention can keep tracing analysis time at a low level while significantly improving the consistency and verifiability of trigger source identification. It effectively solves the problems of existing technologies, such as reliance on a single source of evidence, difficulty in quantifying trigger contributions, and difficulty in verifying results.
[0035] Table 1 Comparison of Experimental Data on Contract Behavior Tracing Effects
[0036] As can be seen from the table above, this invention significantly improves upon traditional methods in several key performance indicators for tracing digital contract behavior. Firstly, regarding the scale of the tracing path, traditional log association methods average 14.2 tracing path nodes, and rule-driven tracing methods maintain around 11.6, while this invention reduces this number to 6.3. This result demonstrates that by introducing an evidence-aware neural Hawkes process to quantitatively model the triggering relationships between contract behaviors, and combining contribution ranking and pruning strategies, this invention effectively suppresses the interference of irrelevant or weakly correlated behaviors on the tracing results, making the tracing path more focused and clear.
[0037] Regarding the efficiency of source tracing analysis, with the total number of contract behavior events reaching 8500, the average source tracing analysis time of traditional log association methods reached 920 milliseconds. Although the rule-driven method improved upon this, it still required 610 milliseconds. In contrast, the method of this invention reduced the average time to 280 milliseconds. This difference indicates that after constructing the contract behavior trigger graph, this invention reduces the backtracking search space through structured backtracking and controlled pruning mechanisms, enabling source tracing analysis to maintain high processing efficiency even with large data volumes.
[0038] Regarding the stability of trigger source identification, the method of this invention achieves a trigger source ranking stability consistency rate of 94.6%, significantly higher than the 72.5% of traditional log association methods and the 81.3% of rule-driven methods. This metric reflects that even with a 18.4% missing off-chain evidence ratio, this invention can still maintain relatively consistent trigger source judgment results. This demonstrates that by introducing on-chain credibility, off-chain credibility, and evidence missing information into the evidence gating fusion mechanism, the impact of incomplete evidence on the tracing results can be effectively reduced, improving the reliability of tracing analysis in complex scenarios.
[0039] Furthermore, regarding the verifiability of tracing results, traditional log association methods and rule-driven methods do not support independent verification of tracing results. However, the method of this invention achieves a 100% verifiability success rate by storing the tracing summary data on-chain. This result demonstrates that this invention not only focuses on the generation of tracing paths but also ensures the consistency of tracing results during generation, storage, and retrieval through the blockchain distributed ledger, providing a reliable basis for subsequent auditing and cross-system verification. In summary, the above indicators show that this invention exhibits significant technical advantages in tracing accuracy, efficiency, and reliability.
[0040] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1.A blockchain-based digital contract behavior traceability method, characterized in that, The method comprises the following steps: obtaining contract interaction data related to a target digital contract and performing preprocessing to generate a contract behavior event sequence; based on the contract behavior event sequence, obtaining on-chain evidence data and off-chain evidence data and performing structured coding processing to generate an on-chain evidence event sequence and an off-chain evidence event sequence; based on the on-chain evidence event sequence, calculating an on-chain credibility vector, based on the off-chain evidence event sequence, calculating an off-chain credibility vector, and generating an evidence missing marker sequence; inputting the on-chain evidence event sequence, the off-chain evidence event sequence, the on-chain credibility vector, the off-chain credibility vector, and the evidence missing marker sequence into an evidence-aware neural Hox process to generate an evidence-aware condition strength sequence; based on the evidence-aware condition strength sequence, determining the trigger source of the contract behavior event, and generating a trigger source contribution set; based on the trigger source contribution set, constructing a contract behavior trigger relationship, generating a contract behavior trigger graph, and performing edge pruning processing on the contract behavior trigger graph; performing backtracking processing on the pruned contract behavior trigger graph to generate a contract behavior traceability path, and generating a traceability record based on the contract behavior traceability path; when receiving a traceability request, reading the traceability record, regenerating traceability summary data and on-chain record commitment based on the contract behavior traceability path, and generating a contract behavior traceability result. 2.The blockchain-based digital contract behavior traceability method of claim 1, wherein, The preprocessing includes field parsing processing, time alignment processing, and event regularization processing. 3.The blockchain-based digital contract behavior traceability method of claim 1, wherein, Based on the contract behavior event sequence, obtaining on-chain evidence data and off-chain evidence data and performing structured coding processing to generate an on-chain evidence event sequence and an off-chain evidence event sequence specifically includes: based on the contract behavior event sequence, determining an event index, constructing an event index set, and generating an evidence query key for each event index in the event index set to obtain an evidence query key set; sending the evidence query key set to a blockchain node, calling a transaction receipt query interface and an event log query interface of the blockchain node, and obtaining an on-chain evidence data set; performing structured coding processing on the on-chain evidence data set to form an on-chain evidence event sequence; based on the evidence query key set, calling a business log retrieval interface and an audit record query interface to obtain off-chain evidence data to form an off-chain evidence data set; performing structured coding processing on the off-chain evidence data set to form an off-chain evidence event sequence. 4.The blockchain-based digital contract behavior traceability method of claim 1, wherein, Based on the on-chain evidence event sequence, calculating an on-chain credibility vector, based on the off-chain evidence event sequence, calculating an off-chain credibility vector, and generating an evidence missing marker sequence specifically includes: extracting transaction receipt status markers, block confirmation numbers, and block reorganization risk markers from the on-chain evidence event sequence to form an on-chain credibility triplet set; performing normalization processing on the block confirmation number, and performing numerical mapping processing on the transaction receipt status marker and the block reorganization risk marker, respectively, to obtain a normalized block confirmation number, a numerical transaction receipt status marker, and a numerical block reorganization risk marker; based on the normalized block confirmation number, the numerical transaction receipt status marker, and the numerical block reorganization risk marker, generating an on-chain credibility vector; Extract a log digital signature verification mark, a log hash chain verification mark, and a timestamp drift from the off-chain evidence event sequence to form a set of off-chain credibility triplets; Perform normalization processing on the timestamp drift, and perform numerical mapping processing on the log digital signature verification mark and the log hash chain verification mark, respectively, to obtain a normalized timestamp drift, a numerical log digital signature verification mark, and a numerical log hash chain verification mark; Generate an off-chain credibility vector based on the normalized timestamp drift, the numerical log digital signature verification mark, and the numerical log hash chain verification mark; Generate an evidence missing mark sequence based on the on-chain evidence event sequence and the off-chain evidence event sequence. 5.The blockchain-based digital contract behavior traceability method of claim 1, wherein, The inputting the on-chain evidence event sequence, the off-chain evidence event sequence, the on-chain credibility vector, the off-chain credibility vector, and the evidence missing mark sequence into the evidence-aware neural hox process to generate an evidence-aware condition strength sequence specifically includes: Inputting the on-chain evidence event sequence, the off-chain evidence event sequence, the on-chain credibility vector, the off-chain credibility vector, and the evidence missing mark sequence into the evidence-aware neural hox process; Inputting the on-chain evidence event sequence into the on-chain hox history encoder, and sequentially performing event embedding and time recursion processing on each on-chain evidence event in the order of event index to generate an on-chain history state sequence; Inputting the off-chain evidence event sequence into the off-chain hox history encoder, and sequentially performing event embedding and time recursion processing on each off-chain evidence event in the order of event index to generate an off-chain history state sequence; Generating an evidence gate input vector based on the on-chain credibility vector set, the off-chain credibility vector set, and the evidence missing mark sequence; Inputting the evidence gate input vector into the evidence gate fusion unit, calculating a gate intermediate value based on linear transformation, and performing S-shaped mapping on the gate intermediate value to obtain an evidence gate weight; Performing gate fusion processing on the on-chain history state and the off-chain history state based on the evidence gate weight to generate a fused history state, forming a fused history state sequence; Inputting the fused history state sequence into the evidence-aware strength calculation unit, calculating evidence-aware condition strength based on the fused history state, the on-chain credibility vector, and the off-chain credibility vector, and generating an evidence-aware condition strength sequence. 6.The blockchain-based digital contract behavior traceability method of claim 1, wherein, The determining a trigger source of a contract behavior event based on the evidence-aware condition strength sequence and generating a trigger source contribution set specifically includes: Determining a target contract behavior event based on the contract behavior event sequence, forming a target event index set; For the target event index, determining a candidate predecessor event index set, and determining a candidate predecessor contract behavior event set corresponding to the candidate predecessor event index set as the candidate predecessor contract behavior event set; Calculating an inter-event trigger strength increment for each candidate predecessor event index in the candidate predecessor event index set based on the evidence-aware condition strength sequence; Assembling the inter-event trigger strength increments corresponding to all candidate predecessor event indexes in the candidate predecessor event index set into an increment vector, and performing normalization processing on the increment vector to obtain a contribution weight vector; Based on the candidate pre-contract behavior event set and the contribution weight vector, a trigger source contribution pair set is generated, and the trigger source contribution pair sets corresponding to all target contract behavior event pairs in the target event index set are collected to generate a trigger source contribution set. 7.The blockchain-based digital contract behavior traceability method of claim 1, wherein, The contract behavior trigger relationship is constructed based on the trigger source contribution set to generate a contract behavior trigger graph, and the edge pruning processing of the contract behavior trigger graph is specifically as follows: Based on the trigger source contribution set and the trigger edge set, the node set is constructed based on the contract behavior event sequence, the node set and the trigger edge set are combined, and the contract behavior trigger graph is generated; The in-edge set of each target node in the contract behavior trigger graph is determined, and the in-edge set is sorted in descending order according to the contribution weight to generate a sorted in-edge sequence; The sorted in-edge sequence of each target node is subjected to truncation processing to obtain a retained in-edge set; The retained in-edge set is subjected to threshold filtering processing to delete the in-edges with a contribution weight less than a threshold to obtain a pruned in-edge set; The pruned in-edge set of each target node is used to replace the in-edge set of the corresponding target node in the contract behavior trigger graph to obtain a pruned contract behavior trigger graph. 8.The blockchain-based digital contract behavior traceability method of claim 1, wherein, The reverse backtracking processing is performed on the pruned contract behavior trigger graph to generate a contract behavior trace path, and the trace storage record is generated based on the contract behavior trace path, and the reverse backtracking processing on the pruned contract behavior trigger graph to generate a contract behavior trace path specifically includes: The reverse backtracking processing is performed on the pruned contract behavior trigger graph to generate a contract behavior trace path; The path coding processing is performed on each contract behavior trace path to form a path node identifier sequence; The contribution weight corresponding to the trigger edge between adjacent contract behavior event nodes in the contract behavior trace path is extracted to form an edge weight sequence; The path node identifier sequence and the edge weight sequence are combined to generate a trace summary data corresponding to the contract behavior trace path; The on-chain storage commitment is calculated based on the trace summary data, the on-chain storage commitment is written into the blockchain distributed ledger, and the trace storage record is generated. 9.The blockchain-based digital contract behavior traceability method of claim 1, wherein, When the trace request is received, the trace storage record is read, the trace summary data and the on-chain storage commitment are regenerated based on the contract behavior trace path, and the contract behavior trace result is generated, and the reverse backtracking processing on the pruned contract behavior trigger graph to generate a contract behavior trace path specifically includes: When the trace request is received, the trace request is parsed, the target contract behavior event identifier or the target contract behavior event index is extracted, and the target contract behavior event to be verified is determined; Based on the target contract behavior event, the trace storage record associated with the target contract behavior event is retrieved and read from the blockchain distributed ledger to obtain the on-chain storage commitment stored in the trace storage record; The contract behavior trace path corresponding to the target contract behavior event is obtained, and the trace summary data is regenerated based on the contract behavior trace path; The deterministic mapping processing is performed on the trace summary data, the on-chain storage commitment is recalculated, and the recalculated on-chain storage commitment is obtained; The consistency verification processing is performed, the recalculated on-chain storage commitment is compared with the on-chain storage commitment in the trace storage record, and the consistency verification result is generated. The contract behavior trace result is generated and outputted based on the consistency check result. When the consistency check result is a pass mark, the contract behavior trace path and the corresponding trace summary data are outputted as the contract behavior trace result. When the consistency check result is a fail mark, the contract behavior trace result containing the fail mark is outputted.