An on-chain trusted verification method for off-chain encrypted traceability data
By generating migration acceptance certificates and state epoch roots, the problems of migration causality and query integrity verification in off-chain encrypted traceability data are solved, and the clear data source and version boundary of on-chain verification results are achieved.
Patent Information
- Application Number
- CN202611451152.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies struggle to determine whether multiple input objects meet predetermined migration rules in off-chain encrypted traceability data, making it impossible to verify the completeness of query results and the consistency of data relationships. This results in on-chain verification failing to form a unified verification that covers migration causality and the current state.
By obtaining the migration rule identifier and the set of input encrypted state tokens, a migration acceptance certificate is generated. The historical migration root, the current state root, and the authentication index root are updated in conjunction with these updates. A state epoch root is generated, and an intersection query is performed to verify the integrity of the query, ensuring the consistency of the on-chain verification results.
It achieves joint verification of migration causality, current state, and query integrity under the same state epoch, ensuring the clear data source and version boundary of on-chain verification results, and solving the problem of inconsistent data relationships in existing technologies.
Smart Images

Figure CN123122968A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to an on-chain trusted verification method for off-chain encrypted traceability data. Background Technology
[0002] Off-chain encrypted traceability data typically stores the encrypted content off-chain and records digests, index commitments, or query proofs on-chain to verify whether the data has been tampered with. Existing technologies often rely on the existence of digests of individual encrypted objects, time sequence, or operation logs as the basis for migration, recording state changes such as object updates, derivations, and merges separately; historical records, current states, and query indexes are also often updated independently by different processing chains. This approach makes it difficult to determine whether multiple input objects meet established migration rules, and it also makes it difficult to distinguish between legitimate causal evolution and the reuse of old versions, concurrent branch conflicts, or cross-version splicing.
[0003] Because historical commitments, current state commitments, and index commitments lack a unified epoch binding, off-chain service nodes may combine index entries, state tokens, and migration credentials from different update points during queries, resulting in individual proofs passing while the overall data relationship remains inconsistent. For multi-label intersection queries, existing solutions typically only provide membership proofs for returned hit entries, failing to provide continuous proofs for cursor skipped intervals, entries with inconsistent digest or credential positions under the same object identifier, and query termination positions. Consequently, it is impossible to verify whether the result set has selective omissions, and it is also difficult to confirm whether the ciphertext state token pointed to by the index entry and its generated credential belong to the same state version. These mechanism gaps cause on-chain verification to remain at the level of partial digest checking, failing to form a unified verification chain covering migration causality, current state, and query integrity. Summary of the Invention
[0004] This invention provides an on-chain trusted verification method for off-chain encrypted traceability data, which at least solves the problem of how to jointly verify the causal relationship of the migration, the current state, and the integrity of the query under the same state epoch when the off-chain encrypted traceability data undergoes state transition and multi-label query.
[0005] This invention provides an on-chain trusted verification method for off-chain encrypted traceability data. The method includes: obtaining a migration request carrying a migration rule identifier and an input encrypted state token set; performing causal migration verification on the migration request based on the migration rule corresponding to the migration rule identifier, the current state root, and the version vector of the input encrypted state token set, generating a migration acceptance certificate containing a digest of the encrypted state tokens before and after migration, a cumulative traceability digest, and an index change; updating the historical migration root, the current state root, and the authentication index root in conjunction with the migration acceptance certificate to generate a state epoch root; responding to a query request, performing an intersection query in the authentication index based on a blinded query label set and a query cursor to generate a query integrity proof; and verifying the consistency between the index entries in the query integrity proof and the encrypted state tokens and migration acceptance certificates based on the state epoch root to obtain an on-chain verification result.
[0006] In one possible implementation, each input ciphertext state token in the set of input ciphertext state tokens includes an object identifier, a ciphertext hash, an object state, a version vector, a summary of the blinded query tag set, a cumulative tracing summary, and the location of the migration acceptance credential for generating the current object state. A digest is calculated for each input ciphertext state token to obtain an input ciphertext state token digest, which is used to compare with the ciphertext state token digest under the same object identifier promised by the current state root.
[0007] In one possible implementation, the migration request also carries the execution entity identifier and a set of candidate output objects; the migration rules include the input object type, input object state, number of input objects, output object type, number of output objects, execution entity role, input object state change method, version vector update method, and index update method. The migration rules are used to limit the input encrypted state token set, the candidate output object set, the execution entity identifier, and the index change amount.
[0008] In one possible implementation, causal migration verification of the migration request includes: calculating the digest of each input ciphertext state token in the input ciphertext state token set to obtain a digest of each input ciphertext state token, and verifying whether each digest of the input ciphertext state token is consistent with the digest of the ciphertext state token under the same object identifier promised by the current state root; if all digests of the input ciphertext state tokens pass the verification, verifying the input object type determined by the object identifier of each input ciphertext state token, the object state of each input ciphertext state token, the number of objects of each input object type in the input ciphertext state token set, the output object type and the number of output objects in the candidate output object set, and the execution subject role determined by the execution subject identifier according to the migration rules; updating the component corresponding to the execution subject identifier based on the maximum value of each component of the version vector to obtain the migrated version vector; updating the object state of each input ciphertext state token according to the input object state change method, and generating an output ciphertext state token based on the candidate output object set and the migrated version vector, and determining the input ciphertext state token and the output ciphertext state token after updating the object state as the migrated ciphertext state token set.
[0009] In one possible implementation, for each output ciphertext state token, a cumulative source digest is generated based on the migration rule identifier, the ciphertext state token digest in the input ciphertext state token set, the cumulative source digest in the input ciphertext state token set, and the ciphertext hash of the candidate output object corresponding to the output ciphertext state token; the cumulative source digest is written to the output ciphertext state token, and the digest of the output ciphertext state token and the cumulative source digest are written to the migration acceptance credential.
[0010] In one possible implementation, the index change amount is determined based on the input object state change method, the index update method, the input ciphertext state token set, and the output ciphertext state token. The index change amount includes deleting index relationships and adding index relationships. Deleting index relationships is used to delete the index relationship between the input ciphertext state token that exits the queryable state and the blinded query label. Adding index relationships is used to add the index relationship between the output ciphertext state token that enters the queryable state and the blinded query label.
[0011] In one possible implementation, the historical migration root, current state root, and authentication index root are updated in conjunction with the migration acceptance certificate, including: appending the migration acceptance certificate to the historical migration structure to obtain the updated historical migration root; updating the current state structure based on the set of encrypted state tokens after migration to obtain the updated current state root; and updating the authentication index structure based on the index change to obtain the updated authentication index root.
[0012] In one possible implementation, a digest is calculated from the updated historical migration root, the updated current state root, the updated authentication index root, and the previous state epoch root to obtain the state epoch root.
[0013] In one possible implementation, an intersection query is performed in the authentication index based on a blinded query label set and a query cursor to generate a query integrity certificate. This includes: determining multiple ordered authentication sets based on the blinded query label set; determining, based on the query cursor, lower bound index entries and authentication paths of the lower bound index entries in each ordered authentication set that are not less than the query cursor, where each lower bound index entry includes an object identifier, a encrypted state token digest, and a migration acceptance credential position; if the object identifier, encrypted state token digest, and migration acceptance credential position are all the same in all lower bound index entries, determining the query hit object and advancing the query cursor after the object identifier; and then, in each lower bound index entry, determining the object hit object. If the object identifiers are different, generate a skip interval proof based on the largest object identifier and advance the query cursor to the largest object identifier. If the object identifiers of all lower bound index entries are the same, and the positions of any ciphertext state token digest or migration acceptance certificate are different, write each lower bound index entry and its corresponding authentication path into the query integrity proof and advance the query cursor after the object identifier. If there is no lower bound index entry not less than the query cursor in any ordered authentication set, generate a query termination proof. Generate a query integrity proof based on the query hit object and its corresponding authentication path, the skip interval proof, the written lower bound index entries and their corresponding authentication paths, and the query termination proof.
[0014] In one possible implementation, the consistency between the index entries in the query integrity proof and the ciphertext state token and migration acceptance certificate is verified based on the state epoch root. This includes: verifying the binding relationship between the state epoch root and the historical migration root, the current state root, and the authentication index root; verifying the lower bound index entries in the query integrity proof and their corresponding authentication paths, skip interval proofs, and query termination proofs based on the authentication index root, and replaying the progress of the query cursor based on the verification results; verifying the ciphertext state token digest in the index entries corresponding to the query hit object based on the current state root; verifying the migration acceptance certificate pointed to by the migration acceptance certificate position corresponding to the query hit object based on the historical migration root, and verifying whether the migration acceptance certificate is bound to the ciphertext state token digest; and obtaining an on-chain verification result indicating that the verification has passed if the binding relationship of the state epoch root, the query integrity proof, the ciphertext state token digest, and the migration acceptance certificate all pass the verification.
[0015] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows: By using the version vector of the migration rule identifier, the current state root, and the input ciphertext state token set together for causal migration verification, joint constraints are achieved on the current validity of the input object, migration conditions, and version evolution relationships. By generating a migration acceptance credential that simultaneously contains the digests of the ciphertext state tokens before and after the migration, the cumulative source traceability digest, and the index change, object state changes, source traceability relationships, and index updates can be bound to the same credential.
[0016] By updating the historical migration root, current state root, and authentication index root in conjunction with the migration acceptance certificate, and generating a state epoch root, on-chain verification can be restricted to using historical records, current states, and index commitments under the same state epoch. By performing an authentication index intersection query using a blinded query tag set and query cursor, a query integrity proof covering hit entries, skipped intervals, and query termination positions can be generated, verifying whether the query results are missing. By jointly verifying the consistency of index entries, encrypted state tokens, and migration acceptance certificates using the state epoch root, on-chain verification results have a clear data source, version boundaries, and causal basis. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating an on-chain trusted verification method for off-chain encrypted traceability data in an embodiment of the present invention. Figure 2 This is an incremental diagram of version vector merging and execution entity components in an embodiment of the present invention; Figure 3 This is a diagram illustrating the binding relationship between migration acceptance certificates in an embodiment of the present invention. Figure 4 This is a diagram showing the relationship between the generation of state epoch roots in an embodiment of the present invention. Figure 5 This is a query trajectory diagram of the intersection of the authenticated ordered sets in an embodiment of the present invention. Detailed Implementation
[0018] The embodiments of the present invention will be described below with reference to the accompanying drawings. These embodiments are used to illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adaptive adjustments to the relevant processing order, data structure, or parameter values without changing the technical concept of the present invention.
[0019] In this embodiment, off-chain ciphertext refers to the encrypted content of business data stored on off-chain storage nodes. The traceability data is a data set formed around the object state, version evolution, and migration relationships of the off-chain ciphertext, specifically organized through ciphertext state tokens, migration acceptance certificates, and authentication index entries. The ciphertext state token records the object identifier, ciphertext hash, object state, version vector, blinded query tag set summary, cumulative traceability summary, and the location of the migration acceptance certificate that generated the current object state. It is used to establish the correspondence between off-chain ciphertext and on-chain commitments. On-chain commitments include historical migration roots, current state roots, authentication index roots, and state epoch roots. Migration requests originate from state change operations generated when off-chain ciphertext is updated, derived, merged, split, or revoked. Query requests originate from traceability queries initiated against the blinded query tag set. On-chain trusted verification uses migration requests and query requests as processing entry points, performs correlation verification on migration causality, current object state, authentication index entries, and migration acceptance certificates, and passes the processing results to subsequent processes such as state epoch root generation, query integrity proof generation, and on-chain verification result output.
[0020] like Figure 1 As shown, an on-chain trusted verification method for off-chain encrypted traceability data includes the following processing steps.
[0021] When off-chain encrypted traceability data is updated, derived, merged, split, or revoked, a migration request is received. The migration request carries a migration rule identifier and an input encrypted state token set. The migration rule identifier is used to locate the migration rule applicable to this migration, and the input encrypted state token set is used to represent the current state of the off-chain encrypted traceability data objects participating in this migration. After parsing the migration rule identifier and the input encrypted state token set, the migration request is passed to the causal migration verification stage.
[0022] In one embodiment, the input ciphertext state token set consists of one or more input ciphertext state tokens, each associated with an off-chain ciphertext traceability data object. An object identifier is used to locate the ciphertext state token digest of the same off-chain ciphertext traceability data object in the current state root; the object identifier is also used to read the uniquely corresponding object type from the object registration record; the object registration record is established when the object identifier is generated and maintains the association between the object identifier and the object type during the existence of the corresponding off-chain ciphertext traceability data object. A ciphertext hash is used to bind the ciphertext content stored off-chain; the object state is used to record the state of the off-chain ciphertext traceability data object before this migration; the version vector is used to record the version evolution relationship of the off-chain ciphertext traceability data object; the blinded query tag set digest is used to bind the blinded query tag set of the off-chain ciphertext traceability data object that has been written into the authentication index; the cumulative traceability digest is used to associate the input ciphertext state tokens that participated in the migration before generating the current object state; and the migration acceptance credential location for generating the current object state is used to locate the migration acceptance credential for generating the current object state in the historical migration structure.
[0023] Blinded query tags are generated by the tag generation node by encoding the query field name, normalized field value, and query domain identifier in a fixed order, and then calculating the message authentication code using a pre-configured tag generation key. Multiple blinded query tags are arranged in byte order, concatenated, and then a digest is calculated to obtain a blinded query tag set digest. The tag generation node stores the corresponding records between the object identifier, the blinded query tag set, and the blinded query tag set digest. Before generating index changes, the blinded query tag set digest is recalculated and compared with the blinded query tag set digest in the corresponding encrypted state token.
[0024] Upon receiving the input encrypted status token, each field is encoded in a fixed order: object identifier, encrypted hash, object status, version vector, blinded query tag set digest, cumulative tracing digest, and the location of the migration acceptance credential for generating the current object status. The version vector is written into the encoding result according to a predetermined component order. Each field is encoded sequentially using type identifier, field length, and field value; integers are encoded with a fixed byte width. For version vectors, the number of components is written first, followed by the components in the order of the executing entity identifier. For set-type fields, the number of elements is written first, followed by the elements in a predetermined order. The digest inputs for migration acceptance credentials, authentication index entries, and state epoch roots use the same unambiguous encoding method. If an input encrypted status token has missing fields, a field length that does not conform to the encoding rules, or the component order of the version vector cannot be determined, the generation of the input encrypted status token digest is stopped, and the corresponding migration request is prevented from entering the causal migration verification phase.
[0025] After the field encoding is completed, a digest algorithm consistent with the current state structure is used to calculate the digest of the encoded result, forming the input ciphertext state token digest. Using the object identifier as the query key, the ciphertext state token digest under the same object identifier is obtained from the current state structure corresponding to the current state root, and the two ciphertext state token digests are compared.
[0026] If the comparison is successful, the object state reflected by the input ciphertext state token matches the object state promised by the current state root, and the input ciphertext state token proceeds to the causal transition verification phase. If the comparison is unsuccessful or the same object identifier does not exist in the current state structure, processing of the corresponding input ciphertext state token is stopped, and the current transition is rejected using the corresponding input ciphertext state token. If any input ciphertext state token in the set fails the comparison, the transition request will not proceed to the subsequent causal transition verification phase.
[0027] After a migration request enters the causal migration verification phase, the corresponding migration rule is read from the migration rule set according to the migration rule identifier, and the object state promised by the current state root is also read. Causal migration verification simultaneously uses the version vector from the input ciphertext state token set to verify the current validity, migration conditions, and causal relationship of the input object. Upon successful verification, a digest of the migrated ciphertext state token, a cumulative source digest, and an index change are generated, and these three results are correlated and written into the migration acceptance certificate. The migration acceptance certificate serves as the unified processing basis for subsequent linked updates of historical migration roots, the current state root, and the authentication index root.
[0028] In one embodiment, the migration request carries, in addition to a migration rule identifier and a set of input encrypted status tokens, an execution entity identifier and a set of candidate output objects. The execution entity identifier determines the role of the entity initiating the migration request. The set of candidate output objects carries the expected object identifiers, object types, encrypted hashes, object counts, and blinded query tag sets to be generated during this migration. The blinded query tag set is generated from the fields in the candidate output objects that participate in the authentication index, according to the index update method in the migration rule. Before the migration request enters the causal migration verification phase, the migration rule identifier, execution entity identifier, set of input encrypted status tokens, and set of candidate output objects undergo structural parsing. If any necessary field is missing, the object identifier is duplicated, or the encrypted hash of a candidate output object cannot be parsed, the migration request is terminated, and no migration acceptance certificate is generated.
[0029] After the migration request is parsed, the blockchain node determines and locks the position to be appended to the current migration acceptance credential based on the current end position of the historical migration structure. For input ciphertext state tokens where the object state has changed and newly generated output ciphertext state tokens, the position to be appended is used as the position for generating the migration acceptance credential for the current object state, and is written before the digest calculation is performed on the relevant ciphertext state tokens; input ciphertext state tokens where the object state remains unchanged retain the original migration acceptance credential position.
[0030] Migration rules are uniquely identified by a migration rule identifier. Each migration rule identifier corresponds to only one migration rule with fixed content. When any field of a migration rule changes, a new migration rule identifier is generated, while the original migration rule is retained for verification of migration acceptance credentials. Each migration rule records the input object type, input object status, number of input objects, output object type, number of output objects, execution entity role, input object status change method, version vector update method, and index update method. The input object type and input object status are used to limit the input encrypted status tokens that can participate in this migration, and the number of input objects is used to limit the number of times each input object type is allowed to appear. The output object type and number of output objects are used to verify whether the candidate output object set conforms to the output structure of this migration.
[0031] The execution entity role is determined through a pre-registered association between the execution entity identifier and the execution entity role. The execution entity role recorded in the migration rule can be a single execution entity role or a set of execution entity roles that are allowed to perform the same migration operation. If the determined execution entity role is not within the allowed range, the migration request is rejected.
[0032] The input object state change method determines whether, after migration, each input ciphertext state token retains its original object state or is changed to a historical, frozen, consumed, or revoked object state. The version vector update method constrains how multiple input version vectors are merged and how the corresponding component of the executing entity identifier is updated. The index update method determines which input ciphertext state tokens exit the queryable state and which output ciphertext state tokens enter the queryable state. After completing the migration rule parsing, all rule constraints and migration requests are passed to the current state verification, object condition verification, version vector update, and index change generation processes.
[0033] In one embodiment, the causal transition check reads the ciphertext state token digest from the current state structure corresponding to the current state root, according to the object identifier of each input ciphertext state token. The read ciphertext state token digest is compared with the ciphertext state token digests in the input ciphertext state token set. Only when all ciphertext state token digests match is the input ciphertext state token set confirmed to reflect the current valid object state. The causal transition check terminates if any object identifier is missing, the ciphertext state token digests are inconsistent, or the object state in the current state structure is not allowed to participate in the transition.
[0034] After the validity check passes, the number of different input object types and input object states in the input ciphertext state token set is counted according to the migration rules, and compared with the total number of input objects. Simultaneously, the output object types and output object counts are counted in the candidate output object set. If the input object type, input object state, input object count, output object type, output object count, and execution entity role all conform to the migration rules, the version vector update process begins.
[0035] The order of the components in the version vector is determined according to the registered execution entity identifier order, and remains unchanged within the same state epoch. Let the set of input ciphertext state tokens contain a total of... The version vector after migration, the version vector of the _ ... Each component is determined according to the following formula:
[0036] in, For the migrated version vector of the first One portion, For the first The version vector of the input ciphertext state token is the first... One portion, Enter the number of ciphertext state tokens. This represents the component position corresponding to the execution entity identifier. The maximum value for each component is used to retain the causal progress already recorded for all input ciphertext status tokens. The component corresponding to the execution entity identifier is incremented by one to record this migration operation.
[0037] After the migrated version vector is generated, the object state of each input ciphertext state token is updated according to the input object state change method, and the migrated version vector is written into the output ciphertext state token corresponding to the candidate output object set. The input ciphertext state tokens with updated object states and the generated output ciphertext state tokens together constitute the migrated ciphertext state token set, which is used for generating migration acceptance credentials and updating the current state structure.
[0038] For each ciphertext state token in the migrated ciphertext state token set, the digest calculation is re-performed according to the fixed field order of the ciphertext state tokens to obtain the migrated ciphertext state token digest set. The migrated ciphertext state token digest in the migration acceptance certificate includes the input ciphertext state token digest and the output ciphertext state token digest when the object state changes.
[0039] In one embodiment, each output ciphertext state token generates a cumulative source digest, which binds the migration rule used in this migration, the state of the input objects participating in the migration, the existing source relationships of the input objects, and the ciphertext content of the candidate output objects into a single digest result. Before generation, the ciphertext state token digests in the set of input ciphertext state tokens are sorted according to the object identifier, and the cumulative source digests in each input ciphertext state token are arranged in the same object identifier order to avoid different digest results for the same migration due to changes in the input arrangement order.
[0040] The cumulative source summary is generated according to the following formula:
[0041] in, To output the cumulative source digest of the ciphertext state token, The function is used to calculate the summary. For migration rule identification, The input is a set of ciphertext state token digests from the ciphertext state token set. The input is the cumulative source digest set from the set of ciphertext state tokens. The ciphertext hash of the candidate output object corresponding to the output ciphertext state token. To arrange operations in a fixed order according to object identifiers. This is for joining according to a fixed field order.
[0042] After the cumulative source traceability digest is generated, it is written to the corresponding output encrypted status token. The output encrypted status token completes field encoding and digest calculation to form the output encrypted status token digest. The output encrypted status token digest and the cumulative source traceability digest are written together to the migration acceptance certificate, so that the migration acceptance certificate can simultaneously point to the object status generated by this migration and the source traceability relationship formed by the input objects.
[0043] If the candidate output object set is empty and the migration rule allows only the input object state to be changed, no output ciphertext state token is generated; the digest of the input ciphertext state token after the object state has changed and the existing cumulative traceability digest in the corresponding input ciphertext state token are written into the migration acceptance certificate.
[0044] The input ciphertext status token set must contain at least one input ciphertext status token; if the input ciphertext status token set is empty, the migration request is terminated. If a candidate output object lacks a ciphertext hash, the input ciphertext status token digest cannot be sorted by object identifier, or the number of accumulated traceability digests is inconsistent with the number of input ciphertext status tokens, the corresponding output ciphertext status token digest is not generated, and the generation of migration acceptance credentials is terminated.
[0045] In one embodiment, the index change amount is generated after the set of migrated encrypted state tokens is formed. The processing reads the input object state change method and index update method from the migration rules, and checks one by one whether the input encrypted state token and the output encrypted state token are in a queryable state. The queryable state is pre-configured according to the migration rules and is used to limit the encrypted state tokens of valid object states to be written to the authentication index. Whether a historical, frozen, consumed, or revoked object state leaves the queryable state is determined by the index update method in the corresponding migration rule.
[0046] For input encrypted status tokens that exit the queryable state according to the input object state change method, delete index relationships are generated from the blinded query tag relationships corresponding to the blinded query tag set digest. Each delete index relationship is associated with the object identifier of the input encrypted status token, the encrypted status token digest, and the blinded query tag to be deleted. If the input encrypted status token remains in the queryable state, no corresponding delete index relationship is generated to avoid erroneous deletion of the original authentication index record during derivation migration or allowing the input object to continue to be valid.
[0047] For output encrypted status tokens that enter the queryable state according to the index update method, an indexing relationship is generated based on the set of blinded query tags bound to the output encrypted status token. Each indexing relationship is associated with the object identifier of the output encrypted status token, the digest of the output encrypted status token, and the blinded query tags to be written. If the output encrypted status token is not in the queryable state or the set of blinded query tags is empty, no corresponding indexing relationship is generated.
[0048] Deleting and adding index relationships together constitute the index change amount. When generating the index change amount, duplicate relationships with the same object identifier and blinded query label are merged; when the same object identifier and the same blinded query label appear in both deleted and added index relationships, the encrypted state token digests before and after the migration are compared, and only the index update results that can reflect the encrypted state token digest after the migration are retained.
[0049] After the index changes are generated, they are written into the migration acceptance certificate and passed to the certified index structure update stage. If the input object state change method, index update method and the actual generated index changes are inconsistent, the migration acceptance certificate will fail the acceptance, and the historical migration root, current state root and certified index root will not be updated.
[0050] After the migration acceptance certificate is generated, the blockchain node responsible for state submission reads the encrypted state token digest before and after migration, the cumulative traceability digest, and the index change bound to the migration acceptance certificate, and uses the same migration acceptance certificate as the common basis for the three state updates.
[0051] Blockchain nodes write the migration acceptance certificate into the historical migration structure, update the current state structure according to the set of encrypted state tokens after migration, and update the authentication index structure according to the index change. The results of these three updates form the historical migration root, the current state root, and the authentication index root, respectively. After all three updates are completed, the updated three roots are bound to the previous state epoch root to generate a state epoch root, which is then used for on-chain verification of integrity proofs in subsequent queries.
[0052] In one embodiment, when the migration acceptance certificate enters the linkage update phase, the blockchain node checks whether the encrypted state token digest recorded in the migration acceptance certificate before migration is consistent with the existing record in the current state structure, and checks whether the encrypted state token digest after migration, the cumulative traceability digest, and the index change amount have all been written into the migration acceptance certificate.
[0053] After the check passes, a digest is calculated for the migration acceptance certificate, and the certificate is appended to a pre-locked append location. The append operation is only submitted if the append location is still the next available location in the historical migration structure; if the append location is occupied or the historical migration root changes, the current update is terminated. The pre-locked append location is used for reference by index entries in the encrypted status token and authentication index. After appending, only the affected digest paths between the newly added migration acceptance certificate digest and the historical migration root are updated, forming the updated historical migration root.
[0054] The current state structure uses object identifiers as retrieval keys and encrypted state token digests as state values under each object identifier. Blockchain nodes read the migrated encrypted state token set, replace the state value of input encrypted state tokens where the object state has changed, write the state value to newly generated output encrypted state tokens, and verify that the migration acceptance credential position for generating the current object state in the corresponding encrypted state token matches the pre-locked position to be appended. After updating the state of all object identifiers, the digests of the affected paths are recalculated to form the updated current state root.
[0055] The authentication index structure performs deletion and addition of index relationships based on the amount of index change. Deleting an index relationship removes the index relationship between the input encrypted status token exiting the queryable state and the blinded query label. Adding an index relationship writes the index relationship between the output encrypted status token entering the queryable state and the blinded query label. Each index entry simultaneously stores the object identifier, encrypted status token digest, and migration acceptance credential location.
[0056] After the authentication index structure is updated, the updated authentication index root is formed. If any update is inconsistent with the migration acceptance certificate, none of the three updates will be committed, and the historical migration root, current status root, and authentication index root will remain in their pre-update state.
[0057] In one embodiment, after the updated historical migration root, updated current state root, and updated authentication index root are generated, the blockchain node reads the previous state epoch root and encodes the four roots according to a fixed field order. This fixed field order is determined during state epoch initialization and remains unchanged throughout the on-chain trusted verification process, preventing changes in the root value arrangement from causing different state epoch roots for the same state. The state epoch root is calculated according to the following formula:
[0058] in, This is the root of the state epoch for the current state epoch. For the updated historical migration root, This is the updated root state. For the updated authentication index root, This is the root of the previous state epoch. H represents the sequential identifier of the current state epoch, and H is the digest calculation function. This is a join operation performed in a fixed field order.
[0059] By including the root of the previous state epoch in the digest calculation, the root of the current state epoch is continuously bound to the previous state epoch. Subsequent query requests can read the historical migration root, current state root, and authentication index root under the same state epoch according to the specified state epoch, avoiding the use of root values from different state epochs during query integrity proof verification.
[0060] After the state epoch root is generated, the blockchain node associates and saves the state epoch root with the sequence identifier of the current state epoch, and retains the reading relationship of the updated historical migration root, the updated current state root, and the updated authentication index root. When a query request arrives, the state epoch root is read according to the state epoch specified in the query request. The intersection query in the authentication index, the encrypted state token verification in the current state structure, and the migration acceptance certificate verification in the historical migration structure all use the three roots under this state epoch.
[0061] If any of the four roots is missing, the encoding length does not conform to the digest calculation rules, or the previous state epoch root is inconsistent with the saved state epoch chain, then the generation of state epoch roots will stop, and the previous state epoch will be kept as the current valid state epoch.
[0062] Upon receiving a query request, the query processing node reads the state epoch identifier, the blinded query tag set, and the query cursor from the request. The blinded query tag set is generated by the tag generation node using the same field encoding method and tag generation key as in the authentication index writing phase, based on the query conditions. The query processing node reads the authentication index root under the corresponding state epoch based on the state epoch identifier and locates multiple authenticated ordered sets in the authentication index according to the blinded query tag set. The query processing node uses the query cursor as the common retrieval starting point for each authenticated ordered set, successively determines the lower bound index entries, and judges whether the query has hit, interval skipped, or index is inconsistent based on the object identifier, encrypted state token digest, and migration acceptance certificate position of each lower bound index entry, and continues to advance the query cursor. When the query terminates, the authentication path, skipped interval proof, and query termination proof formed during the query process are combined into a query integrity proof and transmitted to the on-chain verification phase.
[0063] In one embodiment, the query processing node reads the tag roots in the authentication index one by one according to the blinded query tag set, and locates the authentication ordered set arranged in ascending order of object identifiers by each tag root. The authentication index structure includes an upper-level tag mapping and a lower-level authentication ordered set. The upper-level tag mapping stores the corresponding tag roots using the blinded query tags as search keys, and generates the authentication index root from all tag roots. Each authentication ordered set uses an authentication search tree sorted by object identifiers. Leaf nodes store index entries, and internal nodes store the lower bound of the subtree object identifiers, the upper bound of the object identifiers, and the subtree summary. The query cursor is initialized with the starting position of the object identifier value space, or determined by the lower bound of the object identifiers carried in the query request. Each authentication ordered set uses the same query cursor as the retrieval starting point.
[0064] For each authenticated ordered set, the query processing node performs a lower bound lookup to obtain the first index entry whose object identifier is not less than the query cursor, and reads the authentication path from this index entry to the corresponding tag root. This index entry serves as the lower bound index entry, recording the object identifier, encrypted status token digest, and migration acceptance credential position. The authentication path of the lower bound index entry also carries interval boundary and adjacent boundary entries on the retrieval path, used to prove that the lower bound index entry is the first index entry in the corresponding authenticated ordered set that is not less than the query cursor. The authentication path is used to prove that the lower bound index entry belongs to the corresponding authenticated ordered set and to prove that there is no smaller index entry between the query cursor and the object identifier. If the authentication path is missing, the tag root is inconsistent, or a field cannot be parsed, the current query is stopped.
[0065] When the object identifier, encrypted status token digest, and migration acceptance credential positions of all lower bound index entries are the same, the corresponding object is identified as the query hit object, the query hit object and authentication path are saved, and the query cursor is advanced to the next search position greater than the object identifier. When the object identifiers of all lower bound index entries are different, the largest object identifier is taken as the new query cursor, and a skip interval proof is generated using the lower bound index entry corresponding to the largest object identifier, the authentication path, and the interval boundary. This proof is used to demonstrate that between the query cursor before the update and the largest object identifier, at least one authenticated ordered set does not contain an index entry, thus proving that there is no object in this interval that simultaneously belongs to all authenticated ordered sets.
[0066] If the object identifiers of all lower bound index entries are the same, but the positions of any encrypted status token digest or migration acceptance certificate are different, the object hit by the query is uncertain. Each lower bound index entry and its corresponding authentication path are written into the query integrity certificate, and the query cursor is advanced to the next search position greater than the object identifier.
[0067] When no lower bound index entry of at least the query cursor exists in any ordered authentication set, a query termination proof is generated based on the final authentication path of that ordered authentication set. The query hit object and its corresponding authentication path, the skipped interval proof, the written lower bound index entries and their corresponding authentication paths, and the query termination proof are combined in the order of query cursor advancement. The state epoch identifier and the combined result are then written into the query integrity proof, which is subsequently passed to the state epoch root verification stage.
[0068] After the query integrity proof is submitted to the blockchain, the blockchain nodes read the state epoch root associated with the state epoch specified in the query request and verify the binding relationship between the state epoch root and the historical migration root, the current state root, and the authentication index root. Once the binding relationship is verified, the authentication index content in the query integrity proof, the encrypted state token digest corresponding to the query hit object, and the migration acceptance certificate are verified sequentially. When all verification results are consistent, an on-chain verification result indicating successful verification is generated and returned to the query request initiator as the basis for determining the credibility of the off-chain encrypted traceability data.
[0069] In one embodiment, at the start of on-chain verification, the blockchain node reads the state epoch root from the state epoch identifier carried in the query integrity proof, and reads the historical migration root, current state root, and authentication index root under that state epoch. The blockchain node reconnects the three roots with the previous state epoch root according to the field order used when generating the state epoch root, performs a digest calculation on the connection result, and compares the calculation result with the state epoch root. If the comparison is inconsistent, subsequent verification stops.
[0070] After the binding relationship is established, the lower bound index entries and their corresponding authentication paths in the query integrity proof are verified item by item using the authentication index root to confirm that each lower bound index entry belongs to the authentication ordered set determined by the blinded query label set. For the skipped interval proof, the lower bound index entry, authentication path, and interval boundary corresponding to the maximum object identifier are verified to confirm that at least one authentication ordered set between the query cursor before the update and the maximum object identifier does not contain any index entries. For the query termination proof, it is checked that there are no lower bound index entries not smaller than the query cursor after the termination position.
[0071] After verifying the content of the authenticated index, the query cursor's progression is replayed according to the order of the query integrity proof records. If the object identifier, encrypted status token digest, and migration acceptance certificate positions of all lower bound index entries are the same, the corresponding object identifier is identified as the query hit object. If the object identifiers are different, the query cursor is advanced to the largest object identifier. If the object identifiers are the same but the encrypted status token digest or migration acceptance certificate positions are different, the query cursor is advanced to after that object identifier. If the replayed set of query hit objects and the termination position are inconsistent with the query integrity proof, the query integrity proof is deemed to have failed verification.
[0072] For each query-matched object, the encrypted state token digest is read from the current state structure corresponding to the current state root, using the object identifier, and compared with the encrypted state token digest in the index entry. If they match, the migration acceptance credential is read from the historical migration structure corresponding to the historical migration root, according to the migration acceptance credential location. The authentication path of the migration acceptance credential is verified, and it is checked whether the migration acceptance credential is bound to the encrypted state token digest in the index entry.
[0073] When all validations pass, an on-chain validation result is generated. If any validation fails, the on-chain validation result records the validation failure and the corresponding validation stage, and stops treating the corresponding query hit object as a trusted query result.
[0074] In one embodiment, an on-chain trusted verification method for off-chain encrypted traceability data is applied to quality record traceability in the industrial valve manufacturing process. The raw material management system generates raw material batch records, the inspection management system generates non-destructive testing records, and the quality audit system generates assembly release records based on the raw material batch records and non-destructive testing records. Each business record is encrypted and stored on an off-chain storage node. The blockchain stores the encrypted state token digest, migration acceptance certificate, and root values corresponding to the historical migration structure, current state structure, and authentication index structure.
[0075] For ease of illustration, this embodiment uses the first twelve characters of the digest as the short digest value in the accompanying drawings. The complete digest is used in the digest calculation, root value update, and on-chain verification processes; the short digest value is only used to identify different data objects and verification results.
[0076] The migration request number processed in this case is REQ-20260426-009, the migration rule identifier is DERIVE-VALVE-07, and the executing entity identifier is QA-02. The executing entity identifier QA-02 corresponds to the quality audit entity in the executing entity registration record.
[0077] The input encrypted status token set consists of input encrypted status token A and input encrypted status token B. Input encrypted status token A corresponds to raw material batch record MAT-20260426-17, which originates from the warehousing data of 316L material batch B240426 provided by supplier S17. The object status of input encrypted status token A is valid, the version vector is [4, 2, 1], the short value of the encrypted status token digest is 14e80d7ef50d, and the location of the migration acceptance certificate for generating the current object status is HIST-000184.
[0078] The input encrypted status token B corresponds to the non-destructive testing record NDT-20260426-03. This NDT record originates from the qualified record generated after ultrasonic testing was performed on material batch B240426 by the testing line NDT-03. The object status of the input encrypted status token B is valid, the version vector is [3, 5, 1], the short value of the encrypted status token digest is fd474bd8ff07, and the location of the migration acceptance certificate for the current object status is HIST-000191.
[0079] When the migration request enters the causal migration verification phase, using MAT-20260426-17 and NDT-20260426-03 as search keys, the encrypted state token digests under the two object identifiers are read from the current state structure corresponding to the current state root. The read results are compared with the encrypted state token digests carried by the input encrypted state token A and the input encrypted state token B, respectively. Both comparison results are consistent, therefore the set of input encrypted state tokens is determined to be the current valid state.
[0080] Migration rule DERIVE-VALVE-07 limits the input object types to one raw material batch record and one non-destructive testing record, with both input object statuses being valid. The output object type is an assembly release record, and the executing entity role is the quality audit entity. The input object type, input object status, input object quantity, output object type, output object quantity, and the executing entity role corresponding to the executing entity identifier QA-02 all comply with the migration rule.
[0081] like Figure 2 As shown, the three components of the version vector correspond to the raw material management entity, the testing entity, and the quality audit entity, respectively. The version vector of the input encrypted status token A is [4, 2, 1], and the version vector of the input encrypted status token B is [3, 5, 1].
[0082] For the raw material management component, the maximum value between 4 and 3 is taken to obtain the first component 4; for the detection component, the maximum value between 2 and 5 is taken to obtain the second component 5; for the quality audit component, the maximum value between two 1 values is taken to obtain the third component 1. After completing the calculation of the maximum value of each component, an intermediate version vector [4, 5, 1] is formed.
[0083] The execution entity identifier QA-02 corresponds to the quality audit entity component. The third component of the intermediate version vector is incremented by one to obtain the migrated version vector [4, 5, 2]. This process ensures that the migrated version vector retains the causal progress already recorded by the two input ciphertext status tokens, and records the migration operation performed by the quality audit entity.
[0084] The candidate output object is assembly release record REL-20260426-09, corresponding to valve model VQ-80 and material batch B240426. An output encrypted status token is generated based on the candidate output object and the migrated version vector. The object status of the output encrypted status token is valid, the version vector is [4, 5, 2], and the blinded query tag set corresponds to batch B240426, valve model VQ-80, and a valid release status.
[0085] The migration rule identifier DERIVE-VALVE-07, the ciphertext state token digest of the input ciphertext state token A, the ciphertext state token digest of the input ciphertext state token B, the existing cumulative source digests of the two input ciphertext state tokens, and the ciphertext hash of the candidate output object are concatenated in a fixed field order and digest calculation is performed to obtain the short value of the cumulative source digest 4c7ab73a8e2e.
[0086] Write the cumulative source digest into the output ciphertext state token, and perform digest calculation on the output ciphertext state token to obtain the short value of the digest of the migrated ciphertext state token: 4eb8f62b37ae.
[0087] This migration uses a derivation method to generate assembly release records, and the input object status change method is set to "remain valid." Therefore, existing index relationships in raw material batch records and non-destructive testing records are not deleted. The assembly release record enters a queryable state, generating three new index relationships, corresponding to batch B240426, valve model VQ-80, and the release status being valid, respectively.
[0088] like Figure 3 As shown, the migration acceptance certificate HIST-000192 is simultaneously bound to the migration rule identifier DERIVE-VALVE-07, the encrypted status token digest A before migration, the encrypted status token digest B before migration, the encrypted status token digest after migration, the cumulative traceability digest, the index change amount, and the execution entity identifier QA-02.
[0089] The short digest value of the encrypted status token digest A before migration is 14e80d7ef50d, the short digest value of the encrypted status token digest B before migration is fd474bd8ff07, the short digest value of the encrypted status token digest after migration is 4eb8f62b37ae, the short digest value of the cumulative traceability digest is 4c7ab73a8e2e, and three index relationship records are added to the index change record. After the above data is encoded in a fixed order and the digest is calculated, the short digest value of the migration acceptance certificate is obtained as 629922d4ec63.
[0090] The migration acceptance certificate is not merely used to record whether the migration operation is complete, but serves as the common basis for the linked updates of the historical migration structure, the current state structure, and the authentication index structure. If any of the following—the encrypted state token digest before migration, the encrypted state token digest after migration, the cumulative traceability digest, or the index change—is inconsistent with the actual processing result, the migration acceptance certificate will not enter the linked update phase.
[0091] The migration acceptance credential HIST-000192 is appended to the historical migration structure, forming the updated historical migration root with a short root value of 1d9564c16de0. The encrypted state token digest is output and written to the current state structure using the object identifier REL-20260426-09 as the search key, forming the updated current state root with a short root value of bbb40782edc4. Three additional index relationships are written to the authentication index structure, forming the updated authentication index root with a short root value of 397445276a97.
[0092] The state epoch identifier of the previous state epoch is E-0051, and the root value of the root of the previous state epoch is 35e9a1b6ade5.
[0093] like Figure 4 As shown, the updated historical migration root, the updated current state root, the updated authentication index root, and the previous state epoch root are connected in a fixed order and a digest is calculated to obtain the state epoch root. The state epoch identifier of the current state epoch is E-0052, and the short root value of the state epoch root is 7e928220c6e2.
[0094] The fixed connection order is: updated historical migration root, updated current state root, updated authentication index root, and previous state epoch root. Subsequent queries and on-chain verifications read the three updated roots under the same state epoch according to the state epoch identifier E-0052, to avoid the authentication index entry, encrypted state token, and migration acceptance certificate coming from different state epochs.
[0095] After the quality audit is completed, the querying entity submits query request QRY-20260426-021. The query request carries the status epoch identifier E-0052, batch B240426, valve model VQ-80, and the set of blinded query tags corresponding to the valid release status, as well as a query cursor; Figure 5 In the sorting representation shown, the initial position of the query cursor corresponds to the sorting value 100.
[0096] To better illustrate the progress of the query cursor, Figure 5 The graphic sorting value represents the order of each complete object identifier in the authentication ordered set. The graphic sorting value does not replace the complete object identifier stored in the index entry; the graphic sorting value 205 corresponds to the complete object identifier REL-20260426-09.
[0097] like Figure 5 As shown, the three ordered sets of authentication are arranged along a unified graphical sorting axis. Circles represent ordinary index entries, squares represent index entries with the same object identifier but different positions of the encrypted status token digest or migration acceptance certificate, and diamonds represent query hit objects with the same object identifier, encrypted status token digest, and migration acceptance certificate position.
[0098] The ordered set of certifications corresponding to batch B240426 includes the sequence values 101, 190, 205, and 260 as shown in the diagram; the ordered set of certifications corresponding to valve model VQ-80 includes the sequence values 143, 190, 205, and 270 as shown in the diagram; and the ordered set of certifications corresponding to valid release status includes the sequence values 121, 190, 205, and 281 as shown in the diagram. A successful query still requires comparing the object identifier, encrypted status token digest, and migration acceptance certificate location simultaneously.
[0099] exist Figure 5 In the sorting representation shown, when the graphical sorting value corresponding to the query cursor is 100, the graphical sorting values of the lower bound index entries corresponding to batch B240426, valve model VQ-80, and valid release status are 101, 143, and 121, respectively. Among the complete object identifiers corresponding to the three lower bound index entries, the graphical sorting value of the largest object identifier is 143. Based on this, a skip interval proof P1 is generated, and the query cursor is advanced to this largest object identifier.
[0100] exist Figure 5 In the sorting representation shown, when the graph sort value corresponding to the query cursor is 143, the graph sort values of the lower bound index entries corresponding to the three certified ordered sets are 190, 143, and 190, respectively. Among the complete object identifiers corresponding to the three lower bound index entries, the graph sort value of the largest object identifier is 190. Based on this, a skip interval proof P2 is generated, and the query cursor is advanced to the largest object identifier.
[0101] exist Figure 5 In the sorting representation shown, when the graphical sort value corresponding to the query cursor is 190, the complete object identifiers of the three lower bound index entries are the same, but the location of the encrypted status token digest or migration acceptance certificate in at least one lower bound index entry is inconsistent with the other lower bound index entries. Therefore, the lower bound index entries with three graphical sort values of 190 and their corresponding authentication paths are written into the query integrity proof, and the corresponding objects are not determined as query hit objects.
[0102] After completing the record for the inconsistent index entry, the query cursor advances to the corresponding complete object identifier. Figure 5 The advancement result is represented by the graphical sort value 205 of the common lower bound index entry that was subsequently obtained; no separate graphical sort value corresponding to the next search position is plotted.
[0103] At sort value 205 in the diagram, the complete object identifier corresponding to the lower bound index entry in all three authenticated ordered sets is REL-20260426-09, the encrypted state token digest is 4eb8f62b37ae, and the migration acceptance credential location is HIST-000192. Therefore, REL-20260426-09 is identified as the query hit object.
[0104] After the query finds a matching record, the query cursor advances to the full object identifier REL-20260426-09. Figure 5 In the sorting representation shown, the graphical sorting values of the lower bound index entries corresponding to the three certified ordered sets are 260, 270, and 281, respectively. Among the complete object identifiers corresponding to the three lower bound index entries, the graphical sorting value of the largest object identifier is 281. Based on this, the skip interval proof P3 is generated, and the query cursor is advanced to the largest object identifier.
[0105] exist Figure 5 In the illustrated sorting representation, when the sorting value corresponding to the query cursor reaches 281, at least one certified ordered set does not contain a lower bound index entry not less than the query cursor, thereby generating a query termination proof. The query integrity proof consists of skip interval proof P1, skip interval proof P2, the inconsistent index entry and certification path corresponding to the illustrated sorting value 190, the query hit object REL-20260426-09 and its certification path, skip interval proof P3, and the query termination proof.
[0106] The blockchain node reads state epoch E-0052 and verifies the binding relationship between the state epoch root and the updated historical migration root, the updated current state root, and the updated authentication index root. After the binding relationship is verified, the progress of the query cursor is replayed using the updated authentication index root. The query hit object obtained from the replay is REL-20260426-09, which is consistent with the query hit object in the query integrity proof record.
[0107] Based on the updated current state root, the encrypted state token digest corresponding to the object identifier REL-20260426-09 is read, and the result is 4eb8f62b37ae, which is consistent with the encrypted state token digest of the index entry record. Based on the updated historical migration root, the migration acceptance credential pointed to by the migration acceptance credential location HIST-000192 is read, and the encrypted state token digest bound to the migration acceptance credential is also 4eb8f62b37ae.
[0108] The binding relationship of the state epoch root, the query integrity proof, the encrypted state token digest, and the migration acceptance credential all pass verification, generating an on-chain verification result. The on-chain verification result records the query request number QRY-20260426-021, the state epoch identifier E-0052, the query hit object REL-20260426-09, the migration acceptance credential location HIST-000192, and the verification status "passed".
[0109] Although the three lower bound index entries corresponding to sort value 190 in the diagram have the same complete object identifier, they were not identified as query hit objects due to inconsistencies in the location of the encrypted state token digest or migration acceptance certificate. Assembly release record REL-20260426-09 is only output when the authentication index entries, current state structure, and historical migration structure are consistent within the same state epoch, thereby completing the joint verification of the migration causality, current object state, and query integrity of off-chain encrypted traceability data.
[0110] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for on-chain trusted verification of off-chain encrypted traceability data, characterized in that, The method includes: Obtain a migration request carrying a migration rule identifier and a set of input ciphertext state tokens; Based on the migration rule corresponding to the migration rule identifier, the current state root, and the version vector of the input ciphertext state token set, the migration request is subjected to causal migration verification to generate a migration acceptance certificate containing the ciphertext state token digest before and after migration, the cumulative source digest, and the index change. Based on the migration acceptance certificate, the historical migration root, the current state root, and the authentication index root are updated in a linked manner to generate the state epoch root; In response to the query request, an intersection query is performed in the authentication index based on the blinded query tag set and the query cursor to generate a query integrity certificate; Based on the state epoch root verification, the consistency between the index entry in the query integrity proof and the ciphertext state token and the migration acceptance certificate is obtained, and the on-chain verification result is obtained.
2. The method according to claim 1, characterized in that, Each input ciphertext state token in the set of input ciphertext state tokens includes an object identifier, a ciphertext hash, an object state, a version vector, a summary of the blinded query tag set, a cumulative traceability summary, and the location of the migration acceptance credential for generating the current object state. A digest is calculated for each of the input ciphertext state tokens to obtain an input ciphertext state token digest, which is then compared with the ciphertext state token digest of the same object identifier committed to by the current state root.
3. The method according to claim 1, characterized in that, The migration request also carries an execution entity identifier and a set of candidate output objects; The migration rules include input object type, input object state, number of input objects, output object type, number of output objects, execution subject role, input object state change method, version vector update method, and index update method. The migration rules are used to limit the input ciphertext state token set, the candidate output object set, the execution subject identifier, and the index change amount.
4. The method according to claim 3, characterized in that, The causal migration verification of the migration request includes: Digest calculation is performed on each input ciphertext state token in the set of input ciphertext state tokens to obtain the digest of each input ciphertext state token. The digest of each input ciphertext state token is then verified against the current state root to determine whether it is consistent with the digest of the ciphertext state token under the same object identifier committed by the current state root. If all input ciphertext state token digests pass the verification, the following verifications are performed according to the migration rules: the input object type determined by the object identifier of each input ciphertext state token, the object state of each input ciphertext state token, the number of objects of each input object type in the input ciphertext state token set, the output object type and the number of output objects in the candidate output object set, and the execution entity role determined by the execution entity identifier. The component corresponding to the execution entity identifier is updated based on the maximum value of each component of the version vector to obtain the migrated version vector. Update the object state of each input ciphertext state token according to the input object state change method, and generate an output ciphertext state token based on the candidate output object set and the migrated version vector. The input ciphertext state tokens with updated object states and the output ciphertext state tokens are determined as the migrated ciphertext state token set.
5. The method according to claim 4, characterized in that, For each of the output ciphertext state tokens, a cumulative source digest is generated based on the migration rule identifier, the ciphertext state token digest in the input ciphertext state token set, the cumulative source digest in the input ciphertext state token set, and the ciphertext hash of the candidate output object corresponding to the output ciphertext state token. Write the cumulative traceability digest into the output ciphertext status token, and write the digest of the output ciphertext status token and the cumulative traceability digest into the migration acceptance credential.
6. The method according to claim 4, characterized in that, The index change amount is determined based on the input object state change method, the index update method, the input ciphertext state token set, and the output ciphertext state token. The index changes include deleting index relationships and adding index relationships. The deletion of index relationships is used to delete the index relationship between the input ciphertext status token that exits the queryable state and the blinded query label. The addition of index relationships is used to add the index relationship between the output ciphertext status token that enters the queryable state and the blinded query label.
7. The method according to claim 6, characterized in that, The step of updating the historical migration root, the current status root, and the authentication index root in conjunction with the migration acceptance certificate includes: The migration acceptance certificate is appended to the historical migration structure to obtain the updated historical migration root; The current state structure is updated based on the migrated set of ciphertext state tokens to obtain the updated current state root. The authentication index structure is updated based on the index change to obtain the updated authentication index root.
8. The method according to claim 7, characterized in that, The updated historical migration root, the updated current state root, the updated authentication index root, and the previous state epoch root are used to calculate a digest to obtain the state epoch root.
9. The method according to claim 1, characterized in that, The step of performing an intersection query in the authentication index based on the blinded query label set and the query cursor to generate a query integrity certificate includes: Multiple ordered sets of authentications are determined based on the blinded query tag set; Based on the query cursor, a lower bound index entry and an authentication path of the lower bound index entry are determined in each of the ordered authentication sets. The lower bound index entry includes an object identifier, a ciphertext status token digest, and a migration acceptance credential location. If the positions of the object identifier, encrypted status token digest, and migration acceptance certificate are all the same in all lower bound index entries, the query hit object is determined, and the query cursor is advanced to after the object identifier. When the object identifiers of the lower bound index entries are different, a skip interval proof is generated based on the largest object identifier, and the query cursor is advanced to the largest object identifier; If the object identifiers of all lower bound index entries are the same, and the positions of any encrypted state token digest or migration acceptance certificate are different, write each lower bound index entry and its corresponding authentication path into the query integrity certificate, and advance the query cursor to after the object identifier; If there is no lower bound index entry of the query cursor in any ordered set of authentications, a query termination proof is generated. The query integrity proof is generated based on the query hit object and its corresponding authentication path, the skipped interval proof, the written lower bound index entries and their corresponding authentication paths, and the query termination proof.
10. The method according to claim 9, characterized in that, The process of verifying the consistency between the index entries in the query integrity proof and the ciphertext state token and the migration acceptance certificate based on the state epoch root includes: Verify the binding relationship between the state epoch root and the historical migration root, the current state root, and the authentication index root; The lower bound index entries and corresponding authentication paths in the query integrity proof, the skip interval proof, and the query termination proof are verified according to the authentication index root, and the query cursor advancement process is replayed according to the verification results. Based on the current state root, verify the encrypted state token digest in the index entry corresponding to the query hit object; According to the historical migration root, the migration acceptance certificate pointed to by the location of the migration acceptance certificate corresponding to the query hit object is verified, and it is verified whether the migration acceptance certificate is bound to the encrypted status token digest. If the binding relationship of the state epoch root, the query integrity proof, the ciphertext state token digest, and the migration acceptance certificate all pass verification, an on-chain verification result indicating that the verification has passed is obtained.
