A blockchain-based product traceability certification big data management method
Patent Information
- Application Number
- CN202610758810.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-05-29
AI Technical Summary
[0003]然而,现有溯源方案在处理后续流转记录时,普遍仅对数据进行完整性校验或一致性比对,缺乏对语义层面的约束机制
本发明,通过对初始上链记录构建源认证壳层单元,并在此基础上形成认证语义外沿,使后续流转记录在写入区块链时具备明确的语义约束边界;同时,通过语义越沿检测与语义越沿阻断单元的生成,实现对超出语义边界的记录项进行精确识别,从而为后续处理提供结构化依据,提高语义判定的准确性与一致性。
Smart Images

Figure CN122288735B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain data processing technology, and in particular to a blockchain-based product traceability and authentication big data management method. Background Technology
[0002] As product circulation becomes increasingly complex, product traceability systems based on blockchain technology are gradually being applied to production, distribution, and regulatory scenarios. Existing technologies typically achieve data immutability and full-process traceability by recording product production and circulation information on the blockchain. In practical applications, multiple entities continuously write circulation records to the blockchain at different points in time, thus forming a complete traceability chain.
[0003] However, existing traceability solutions generally only perform integrity checks or consistency comparisons on subsequent transaction records, lacking semantic constraints. When subsequent transaction records contain data inconsistent with the initial on-chain record or exceeding the original semantic scope, existing technologies either directly refuse to write, resulting in the loss of valid information, or allow writing without constraints, causing semantic drift in the traceability chain and reducing the credibility of traceability results. Therefore, there is an urgent need for a blockchain-based big data management method for product traceability authentication to improve the availability and reliability of traceability data. Summary of the Invention
[0004] To achieve the above objectives, the present invention provides a blockchain-based product traceability and authentication big data management method.
[0005] A blockchain-based product traceability and authentication big data management method includes the following steps: S1: Encapsulate the initial on-chain record of the traceable product with an authentication shell, generate the source authentication shell unit and write it into the blockchain; S2: When subsequent transfer records are written, detect whether the subsequent transfer records break through the authentication semantic outer edge defined by the source authentication shell unit, and generate a semantic edge-crossing blocking unit. S3: Based on the semantic edge-breaking blocking unit, perform shell-in-shell shrinkage processing on subsequent transfer records to generate a limited-domain attachment unit that retains only the permission authentication semantics; S4: Determine the attachment permissions of subsequent transfer records to the initial on-chain record based on the restricted attachment unit, generate the final authentication output unit and write it into the blockchain.
[0006] Optionally, S1 specifically includes: S11: Extract product identification information, production entity information, batch information, timestamp information, and circulation category information from the initial on-chain record; S12: Construct an authentication semantic set based on product identification information, production entity information, batch information, timestamp information, and circulation category information; S13: Generate authentication boundary description information based on the authentication semantic set, and perform digest calculation on the initial on-chain record to obtain the record digest value; S14: Encapsulate the authentication boundary description information, record digest value, and on-chain index identifier of the initial on-chain record to generate the source authentication shell unit and write it to the blockchain.
[0007] Optionally, the generation of authentication boundary description information specifically includes: The semantic items in the authentication semantic set are divided into core authentication semantic items, restricted extended semantic items, and prohibited out-of-bounds semantic items. Set immutable boundaries for core authentication semantic items, set permitted extension boundaries for restricted extension semantic items, and set prohibited attachment boundaries for prohibited out-of-bounds semantic items; The authentication semantic outer edge is formed based on the immutable boundary, the permitted extension boundary, and the prohibited attachment boundary; The semantic margin of authentication is written into the authentication boundary description information to constrain the semantic range of subsequent transfer records.
[0008] Optionally, S2 specifically includes: S21: Extract the transfer entity information, transfer process information, business attribute information, status information, and additional record information from the subsequent transfer records; S22: Map each record item in the subsequent flow record to the authentication semantic set corresponding to the source authentication shell unit, and determine the semantic position of each record item; S23: Based on the authentication semantic edge, compare each record item one by one to determine whether each record item is within the permitted range defined by the authentication semantic edge; S24: Records that exceed the semantic boundary of authentication are identified as semantic overstepping entries.
[0009] Optionally, the semantic edge-breaking unit specifically includes: Record the position, semantic type, crossing direction, and crossing magnitude of each semantic crossing item; Determine the boundary category to which each semantic border crossing item belongs based on the semantic type; Based on the direction of the edge crossing, the magnitude of the edge crossing, and the boundary category, configure corresponding blocking labels and boundary fallback indicators for each semantic edge crossing item; The above information is structured and encapsulated to generate the semantic edge-breaking blocking unit.
[0010] Optionally, S3 specifically includes: S31: Based on the record item position, blocking label, and boundary backoff indication in the semantic edge-crossing blocking unit, locate the semantic edge-crossing item in the subsequent flow record; S32: Based on the blocking label and boundary fallback instruction, perform shell-in-shell shrinkage processing on semantic overstepping items, including field pruning, field masking, field replacement, or field level downgrading, to eliminate semantic content that exceeds the scope of the authentication semantic outer edge limit; S33: Reorganize the records retained after the shell shrinkage process to obtain the permission authentication semantic set.
[0011] Optionally, the generation of the confined attachment unit specifically includes: A set of retained record items is formed based on the permission and authentication semantic set; Extract semantic overstepping terms processed during the shell shrinkage process to form a set of discarded record terms; Generate a shell consistency label and a shrinkage result summary based on the set of retained records and the set of removed records; The set of retained records, the set of removed records, the shell consistency label, and the shrink result summary are structured and encapsulated to generate the confined domain attachment unit.
[0012] Optionally, S4 specifically includes: S41: Extract the set of retained records, the set of removed records, the shell consistency label, and the summary of the shrinking results from the confined attachment unit; S42: Determine the permission authentication semantic scope of the subsequent circulation records based on the set of retained record items and the set of removed record items; S43: Based on the shell consistency label and the permission authentication semantic scope, determine the attachment permission level of subsequent transfer records to the initial on-chain record.
[0013] Optionally, the determination of the hooking permission level and the generation of the final authentication output unit specifically include: When the shell consistency label indicates that the subsequent transfer record completely matches the source authentication shell unit, and the set of excluded record items is empty, the attachment permission level is determined to be full attachment. When the shell consistency label indicates that the subsequent transfer record partially matches the source authentication shell unit, and the set of excluded record items is not empty, the attachment permission level is determined to be domain-limited attachment. When the shell consistency label indicates that the subsequent transfer record does not match the source authentication shell unit, or when the set of record items to be removed contains a semantic overstepping item corresponding to the prohibited attachment boundary, the attachment permission level will be determined as attachment denied. Based on the attachment permission level, the on-chain index identifier of the initial on-chain record, the on-chain index identifier of the subsequent circulation record, and the shrinking result summary, the final authentication output unit is generated and written into the blockchain.
[0014] Optionally, S4 also includes: Extract the initial on-chain record identifier, current flow record identifier, attached permission level, and shrink result summary from the final authentication output unit to construct an authentication status index; When a traceability verification request for a target product is received, the corresponding certification status index is called according to the product identification information in the traceability verification request to locate the final certification output unit corresponding to the target product. Read the corresponding attachment permission level, shrink result summary and authentication timestamp from the final authentication output unit to generate the traceability authentication result of the target product.
[0015] The beneficial effects of this invention are: This invention constructs a source authentication shell unit for the initial on-chain record and forms an authentication semantic edge on this basis, so that subsequent circulation records have clear semantic constraint boundaries when written to the blockchain; at the same time, through the generation of semantic edge detection and semantic edge blocking units, it realizes the accurate identification of record items that exceed the semantic boundary, thereby providing a structured basis for subsequent processing and improving the accuracy and consistency of semantic judgment.
[0016] This invention maps semantic overriding terms back to the outer edge of authentication semantics through an in-shell shrinkage processing mechanism, forming a permission authentication semantic set, and constructs a limited-domain attachment unit based on this set. On this basis, a hierarchical authentication of the flow record is performed through an attachment permission level determination mechanism, and the authentication results are written to the blockchain. This maximizes the retention of effective information while ensuring semantic consistency, thereby improving the continuity of the traceability chain, data utilization, and the stability and reliability of the overall system. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the product traceability and authentication big data management method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the semantic edge-blocking unit generation process in an embodiment of the present invention. Detailed Implementation
[0019] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should also be noted that, to make the embodiments more comprehensive, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0020] It should be noted that the use of terms such as "an embodiment," "an embodiment," "an exemplary embodiment," and "some embodiments" in the specification indicates that the described embodiment may include a specific feature, structure, or characteristic, but not every embodiment necessarily includes that specific feature, structure, or characteristic. Furthermore, when a specific feature, structure, or characteristic is described in connection with an embodiment, implementing such a feature, structure, or characteristic in conjunction with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the art.
[0021] Generally, terms can be understood at least partly from their use in context. For example, depending at least partly on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in a singular sense, or a combination of features, structures, or characteristics in a plural sense. Additionally, the term "based on" can be understood not necessarily to convey an exclusive set of factors, but rather, alternatively, depending at least partly on the context, to allow for the presence of other factors that are not necessarily explicitly described.
[0022] like Figures 1-2 As shown, a blockchain-based product traceability and authentication big data management method includes the following steps: S1: Encapsulate the initial on-chain record of the traceable product with an authentication shell, generate the source authentication shell unit and write it into the blockchain; S1 specifically includes: S11: Extract product identification information, production entity information, batch information, timestamp information, and circulation category information from the initial on-chain record; S12: Construct an authentication semantic set based on product identification information, production entity information, batch information, timestamp information, and circulation category information; S13: Generate authentication boundary description information based on the authentication semantic set, and perform digest calculation on the initial on-chain record to obtain the record digest value; S14: Encapsulate the authentication boundary description information, record digest value, and on-chain index identifier of the initial on-chain record to generate the source authentication shell unit and write it to the blockchain.
[0023] The specific process of performing authentication shell encapsulation on the initial on-chain record is as follows: First, the initial on-chain record data of the products to be traced is collected, and the key fields in the initial on-chain records are extracted in a structured manner. The key fields include product identification information, production entity information, batch information, timestamp information, and circulation category information. The above fields are uniformly mapped into a standardized field set for subsequent authentication semantic construction. After extracting the fields, semantic encoding is performed on each key field to convert them into a unified semantic expression, thereby constructing an authentication semantic set. The authentication semantic set is represented in a vectorized manner as follows: ,in, Represents the set of authentication semantics; Indicates the semantic meaning of product identification; Indicates the semantics of the production entity; Indicates batch semantics; Represents timestamp semantics; This represents the semantic category of the flow; through the above semantic set construction process, the original on-chain records are transformed from field data into semantic structure data, providing a foundation for subsequent authentication boundary constraints; Subsequently, authentication boundary description information is generated based on the authentication semantic set; specifically, each semantic item in the authentication semantic set is assigned a corresponding semantic identifier code, and all semantic items are combined and encoded to obtain the authentication boundary description vector: ,in, Represents the authentication boundary description vector; Indicates the first The weight coefficients of each semantic item; Indicates the first There are 1 semantic item; where the weight coefficient takes the following values: , , , , By introducing weighting coefficients, the core authentication semantics are made dominant in the overall boundary description, thereby improving the constraint stability of the authentication shell. After generating the authentication boundary description information, a digest calculation is performed on the initial on-chain records to form a data fingerprint for on-chain verification. The digest calculation uses a hash function, the expression of which is: ,in, Indicates the record summary value; The hash function is represented by the SHA-256 algorithm. This represents the initial on-chain record data; Finally, the authentication boundary description information B and the record digest value are... and the on-chain index identifier of the initial on-chain record A unified encapsulation is performed to generate the source authentication shell unit; the encapsulation structure is represented as follows: ,in, Indicates the source authentication shell unit; This indicates the authentication boundary description information; Indicates the record summary value; This process involves: identifying the on-chain index of the initial record; writing the source authentication shell unit into the blockchain to encapsulate the initial record's authentication shell. Through this process, the initial record is transformed from a single data record into a source authentication shell unit containing an authentication semantic set, authentication boundary description information, and digest verification information. This allows subsequent records to be constrained and judged based on a unified semantic boundary, providing a definite reference for semantic edge detection and shell-based retraction processing, thus improving the consistency and controllability of the overall traceability and authentication process.
[0024] The generation of authentication boundary description information specifically includes: The semantic items in the authentication semantic set are divided into core authentication semantic items, restricted extended semantic items, and prohibited out-of-bounds semantic items. Set immutable boundaries for core authentication semantic items, set permitted extension boundaries for restricted extension semantic items, and set prohibited attachment boundaries for prohibited out-of-bounds semantic items; The authentication semantic outer edge is formed based on the immutable boundary, the permitted extension boundary, and the prohibited attachment boundary; The semantic margin of authentication is written into the authentication boundary description information to constrain the semantic range of subsequent transfer records.
[0025] The process of generating the above-mentioned authentication boundary description information involves applying hierarchical constraints to each semantic item based on the authentication semantic set, thereby forming the authentication semantic outer edge that can be used for subsequent semantic edge detection; specifically: First, the authentication semantic set Semantic hierarchical division is performed; based on the constraint strength and variability of each semantic item in source tracing and authentication, they are divided into three categories: core authentication semantic items, restricted extended semantic items, and prohibited out-of-bounds semantic items, and a semantic classification mapping function is constructed: ,in: Indicates the first Category identifier for each semantic item; This represents a semantic classification function; Indicates the first One semantic item; , where 1 represents the core authentication semantic item, 2 represents the restricted extended semantic item, and 3 represents the prohibited out-of-bounds semantic item; After semantic classification, corresponding boundary constraint rules are set for different categories of semantic items. Specifically, an immutable boundary is set for core authentication semantic items; a permitted extension boundary is set for restricted extension semantic items; and a prohibited attachment boundary is set for prohibited out-of-bounds semantic items. To achieve a unified quantitative description of the boundaries, a boundary constraint function is introduced to numerically express the allowable range of change for each semantic item. ,in, Indicates the first The permissible scope of changes for each semantic item; Represents the boundary constraint function; This represents a semantic category identifier; the boundary constraint function above takes values according to the following rules: when hour, This indicates that the semantic item cannot be changed; when hour, This indicates that the semantic item allows in Expand within the range; when hour, This indicates that the semantic item is completely prohibited from going out of bounds; based on this, an authentication semantic outer boundary vector is constructed for the entire authentication semantic set to uniformly represent the constraint state of each semantic item: ,in, Indicates the semantic boundary of authentication; Indicates the first Boundary constraint values for each semantic item.
[0026] Furthermore, to enhance the constraint expression capability of the authentication semantic boundary, the boundary constraints of each semantic item are coupled with their weights to obtain the comprehensive boundary constraint strength: ,in, An indicator representing the constraint strength of the overall authentication semantic boundary; Indicates the first The weight coefficients of each semantic item are: ; Indicates the first The boundary constraint values of each semantic item. Through the above constraint strength calculation, the authentication semantic edge not only has the ability to describe the structured boundary, but also has the ability to quantify the overall constraint, thus providing a unified judgment standard for subsequent semantic edge detection; Finally, the semantic outer edge of authentication will be... and constraint strength indicators The information is written into the authentication boundary description information, so that the authentication boundary description information simultaneously includes semantic classification information, boundary constraint information, and overall constraint strength information, which serves as a unified constraint basis for subsequent semantic edge crossing detection of flow records.
[0027] S2: When subsequent transfer records are written, detect whether the subsequent transfer records break through the authentication semantic outer edge defined by the source authentication shell unit, and generate a semantic edge-breaking blocking unit. S2 specifically includes: S21: Extract the transfer entity information, transfer process information, business attribute information, status information, and additional record information from the subsequent transfer records; S22: Map each record item in the subsequent flow record to the authentication semantic set corresponding to the source authentication shell unit, and determine the semantic position of each record item; S23: Based on the semantic boundary of authentication, compare each record item one by one to determine whether each record item is within the permitted range defined by the semantic boundary of authentication; S24: Records that exceed the semantic boundary of authentication are identified as semantic overstepping entries.
[0028] In this embodiment, the item-by-item comparison and judgment process is based on the above-mentioned authentication semantic edge constraints. Each record item in the subsequent flow record is semantically matched and the boundary consistency is judged one by one to identify whether there are semantic edge-crossing items.
[0029] First, each record item in the subsequent flow record is parsed in a structured manner, and according to the authentication semantic set, each record item is mapped to the corresponding semantic item position to obtain the semantic vector representation of the subsequent flow record: ,in, Indicates the first The semantic set of secondary transfer records; Indicates the first The value of each semantic item in the current flow record; ; Then, a difference calculation is performed on each semantic item, and the current flowing record is semantically compared with the initial on-chain record to obtain the semantic offset: ,in, Indicates the first The semantic offset of each semantic item; This represents the function for calculating semantic dissimilarity. Represents the semantic value of the currently flowing record; This represents the semantic value of the initial on-chain record; the semantic dissimilarity calculation function uses vector distance calculation: ,in, This represents a semantic encoding mapping function that maps semantic terms to numerical vectors. This method represents Euclidean distance calculation; it transforms semantic comparison into a distance metric in numerical space, thereby achieving a unified calculation standard. Next, the semantic offset of each semantic item is... Its corresponding boundary constraint value By comparing the results, we can obtain the following judgments: ;in, Indicates the first Edge crossing flag for each semantic item; when When, it indicates that the semantic item is within the allowed range of the authentication semantic boundary; when When this occurs, it indicates that the semantic item exceeds the scope of the authentication semantic boundary; the judgment results of all semantic items are combined to form a comparison judgment vector: ,in, This represents the set of comparison and judgment results; further, it includes all items that satisfy the criteria... Semantic item extraction, constructing a semantic cross-cutting item set: ,in, This represents the semantically adjacent set of items. Through the above item-by-item comparison mechanism, the following judgment logic is implemented: when... When, it indicates that all semantic items are within the scope of the authentication semantic boundary; when When this occurs, it indicates the presence of a semantic edge-crossing item. The above steps, by calculating the semantic differences between subsequent flow records and the initial on-chain records item by item, and combining the authentication semantic outer edge for boundary constraint determination, achieve quantitative identification of semantic offsets. This enables semantic edge-crossing detection to have a unified and calculable judgment standard, thereby improving the accuracy and stability of edge-crossing identification and providing a clear data foundation for subsequent shell-level shrinkage processing.
[0030] The generation of semantic edge-crossing blocking units specifically includes: Record the position, semantic type, direction of crossing, and magnitude of each semantic crossing item; Determine the boundary category to which each semantic border crossing item belongs based on its semantic type; Based on the direction of the edge crossing, the magnitude of the edge crossing, and the boundary category, configure corresponding blocking labels and boundary fallback indicators for each semantic edge crossing item; The above information is encapsulated in a structured manner to generate semantic edge-breaking blocking units.
[0031] The generation process of the above semantic edge-crossing blocking unit is based on obtaining the set of semantic edge-crossing items. Based on this, each semantic overriding term is subjected to item-by-item structured parsing, thereby forming a set of blocking information that can directly drive subsequent shell-level retraction processing. Specifically: First, we examine the semantic overriding item set. Positioning is performed on each semantic term along the edge; let the first term be... Each semantic term is denoted as Its position in subsequent transfer records is determined by a position mapping function: ,in, Indicates the first The position of each semantically crossed-edge item is represented in binary encoding form. ,in Indicates the field sequence number. This indicates the sequence number of the semantic fragment within the field; this step enables precise location of semantically bordering items, providing a clear operational object for subsequent processing. After location is completed, the semantic type is further identified for each semantically bordering item based on the constructed authentication semantic set, expressed as: ,in, This represents a semantic type identifier, used to indicate the semantic category corresponding to this semantic crossover item.
[0032] Based on this, combined with semantic offset and boundary constraint values We then analyze the offset features of the semantic overstepping term. First, we calculate the overstepping magnitude: ,in, This indicates the degree to which the semantic term exceeds the outer edge of the authentication semantic term, and To facilitate subsequent processing, the amplitude of the crossing edge will be represented in stages: ;in, This indicates the crossing amplitude level. Additionally, to distinguish different types of semantic offset behavior, a crossing direction parameter is introduced, defined as: ; By jointly describing the magnitude and direction of the edge crossing, the offset features of each semantic edge crossing term can be fully characterized.
[0033] Furthermore, based on the classification results of the authentication semantic items, the boundary category to which each semantic border crossing item belongs is determined: ,in, These represent immutable boundaries, permitted extension boundaries, and prohibited attachment boundaries, respectively. After obtaining the traversal magnitude, traversal direction, and boundary category, the blocking strength of the semantic traversal item is determined, generating a blocking label: Among them, blocking tags , respectively representing weak blocking, intermediate blocking and strong blocking.
[0034] After identifying the blocking label, a boundary rollback indication is further generated: ,in, This indicates the fallback strategy, with values defined as follows: 0 indicates maintaining the current semantics; 1 indicates falling back to the initial semantics; 2 indicates falling back to the permitted extension limit; and 3 indicates directly removing the semantic item. This step clarifies the handling of semantic overstepping items, providing a direct execution basis for subsequent shell-level shrinkage processing.
[0035] S3: Based on the semantic edge-breaking blocking unit, perform shell-in-shell shrinkage processing on subsequent flow records to generate a limited-domain attachment unit that retains only the permission authentication semantics; S3 specifically includes: S31: Based on the record item position, blocking label, and boundary backoff indication in the semantic edge-crossing blocking unit, locate the semantic edge-crossing item in the subsequent flow record; S32: Based on the blocking label and boundary fallback instruction, perform shell-in-shell shrinkage processing on semantic overstepping items, including field pruning, field masking, field replacement, or field level downgrading, to eliminate semantic content that exceeds the scope of the authentication semantic outer edge limit; S33: Reorganize the records retained after the shell shrinkage process to obtain the permission authentication semantic set.
[0036] The aforementioned shell-level shrinkage processing, based on the semantic edge-crossing blocking unit, performs targeted correction on semantic content in subsequent flow records that exceeds the authentication semantic boundary, ensuring that the processed semantic result falls back within the scope of the authentication semantic boundary, thereby forming a set of permission-authentication semantics that can participate in the attachment determination. Specifically: based on the aforementioned blocking tag... With boundary backoff indicator Different types of shrinkage processing are performed on semantically extrapolated terms; when At that time, boundary clipping is performed on semantic values to bring them into the permitted expansion range, which is expressed as: ,in, Indicates the initial semantic value; Indicates the permitted scope of change; this processing applies to minor overstepping of the permitted extension boundary. When When this happens, the semantic value will be directly rolled back to the initial semantic value on the previous chain: This processing is suitable for scenarios with immutable boundaries or where the original semantics need to be restored. When At that time, perform masking processing on the semantically crossed-edge item: , where 0 represents a semantically invalid placeholder value. The shell-level shrinkage process is not a simple data deletion or filtering, but rather a controlled correction of the out-of-bounds semantics based on the authentication semantic edge constraints. This correction is performed through a shrinkage mapping function, allowing the out-of-bounds semantics to return to the permitted boundary range while maintaining the maximum amount of semantic information, thereby achieving a balance between semantic constraint consistency and data integrity.
[0037] After shrinking all semantic edge-crossing items, the shrinking results are integrated with the semantic items that did not cross the edge to form a new semantic set: ,in: This represents the retracted semantic set. Subsequently, a consistency check is performed between this semantic set and the outer edge of the authentication semantic set. ,in: This represents the semantic offset after shrinking. When the above conditions are met, it indicates that the semantics after shrinking have completely fallen within the outer edge of the authentication semantics. Finally, semantic items that satisfy the outer edge constraints of the authentication semantics are extracted to construct the permission authentication semantic set. By introducing an in-shell shrinking processing mechanism, the semantic edge-crossing items are transformed from direct removal to shrinking correction based on boundary constraints. This ensures that subsequent flow records retain as much valid information as possible while satisfying the consistency of authentication semantics, thereby improving the availability and continuity of traceability data, and enhancing the stability and fault tolerance of the overall authentication process.
[0038] The generation of the restricted domain attachment unit specifically includes: A set of retained record items is formed based on the permission and authentication semantic set; Extract semantic overstepping terms processed during the shell shrinkage process to form a set of discarded record terms; Generate shell consistency labels and a shrinkage result summary based on the set of retained and removed records; specifically: After obtaining the set of retained records and the set of removed records, the overall semantic consistency is quantitatively evaluated by introducing a shell consistency index, the expression of which is: ,in: Indicates the shell consistency coefficient; Indicates the number of elements in the set; Represents the set of records to be retained; This indicates the set of records to be removed; based on the consistency coefficient, the shell consistency label is defined as: ;in, The label indicates shell consistency; 2 indicates complete consistency; 1 indicates partial consistency; 0 indicates inconsistency. This label is used to characterize the degree of consistency between the retracted semantic set and the source authentication shell unit.
[0039] The set of retained records, the set of removed records, the shell consistency label, and the shrinking result summary are structurally encapsulated to generate a limited-domain attachment unit. The above steps divide the shrunken semantic set into a set of retained records and a set of removed records, and combine the shell consistency label and the shrinking result summary for unified encapsulation. This enables subsequent flow records to have a standardized expression form under the premise of meeting authentication semantic constraints, thereby improving the accuracy and consistency of attachment permission determination, while enhancing the interpretability and traceability of the source data structure.
[0040] S4: Determine the attachment permissions of subsequent transfer records to the initial on-chain record based on the limited-domain attachment unit, generate the final authentication output unit and write it into the blockchain; S4 specifically includes: S41: Extract the set of retained records, the set of removed records, the shell consistency label, and the summary of the shrinking results from the confined attachment unit; S42: Determine the scope of permission authentication semantics for subsequent circulation records based on the set of retained records and the set of removed records; S43: Based on the shell consistency label and the permission authentication semantic scope, determine the attachment permission level of subsequent transfer records to the initial on-chain record.
[0041] The determination of the attachment permission level and the generation of the final authentication output unit specifically include: When the shell consistency label indicates that the subsequent transfer record completely matches the source authentication shell unit, and the set of excluded record items is empty, the attachment permission level is determined to be full attachment. When the shell consistency label indicates that the subsequent transfer record partially matches the source authentication shell unit, and the set of excluded record items is not empty, the attachment permission level is determined to be domain-limited attachment. When the shell consistency label indicates that the subsequent transfer record does not match the source authentication shell unit, or when the set of record items to be removed contains a semantic overstepping item corresponding to the prohibited attachment boundary, the attachment permission level will be determined as attachment denied. Based on the attachment permission level, the on-chain index identifier of the initial on-chain record, the on-chain index identifier of the subsequent circulation record, and the shrinking result summary, the final authentication output unit is generated and written into the blockchain.
[0042] In this embodiment, the process of determining attachment permissions and final authentication output involves classifying the semantic consistency status of the retracted unit based on the generated limited-domain attachment unit, and writing the determination results into the blockchain in a standardized structure to complete the authentication and confirmation of subsequent transaction records. The specific process is as follows: First, from the restricted domain connection unit Extract the set of retained records And this is taken as the permission and authentication semantic scope of the current circulation record, represented as: ,in: Indicates the semantic scope of license and authentication; This represents the set of retained record items; this semantic scope represents the effective semantic expression of the currently circulating record under the authentication shell constraints.
[0043] After determining the semantic scope of the permission authentication, combine it with the shell consistency label. Based on the size of the set of records to be removed, hierarchical determination of attachment permissions is performed; first, the removal ratio coefficient is defined: ,in, Indicates the percentage of semantic removal; Indicates the number of elements in the set. Based on shell consistency tags. With the elimination ratio Define the function to determine the access permission level: ; in, The parameter 2 indicates the attachment permission level; 2 indicates full attachment; 1 indicates restricted attachment; 0 indicates attachment denied. This determination mechanism realizes the mapping from semantic consistency to permission decision, giving the attachment behavior a clear quantitative basis.
[0044] After obtaining the attachment permission level, further confirm the attachment relationship between the current circulation record and the initial on-chain record; let the initial on-chain record be identified as... The current transfer record is identified as The connection relationship is then represented as: ,in, Indicates the tuple representing the connection relationship; This indicates the access permission level; this relationship is used to describe the authentication position of the flow record in the traceability chain; after the permission determination is completed, the relevant information is uniformly encapsulated to generate the final authentication output unit.
[0045] S4 also includes: Extract the initial on-chain record identifier, current flow record identifier, attached permission level, and shrink result summary from the final authentication output unit to construct an authentication status index; When a traceability verification request for a target product is received, the corresponding certification status index is called based on the product identification information in the traceability verification request to locate the final certification output unit corresponding to the target product. Read the corresponding attachment permission level, shrink result summary and authentication timestamp from the final authentication output unit to generate the traceability authentication result of the target product; the traceability authentication result is used to characterize the authentication status of the target product under the current circulation node.
[0046] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0047] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A blockchain-based product traceability and authentication big data management method, characterized in that, Includes the following steps: S1: Encapsulate the initial on-chain record of the traceable product with an authentication shell, generate the source authentication shell unit and write it into the blockchain; S1 specifically includes: S11: Extract product identification information, production entity information, batch information, timestamp information, and circulation category information from the initial on-chain record; S12: Construct an authentication semantic set based on product identification information, production entity information, batch information, timestamp information, and circulation category information; S13: Generate authentication boundary description information based on the authentication semantic set, and perform digest calculation on the initial on-chain record to obtain the record digest value; S14: Encapsulate the authentication boundary description information, record digest value, and on-chain index identifier of the initial on-chain record to generate the source authentication shell unit and write it into the blockchain; S2: When subsequent transfer records are written, detect whether the subsequent transfer records break through the authentication semantic outer edge defined by the source authentication shell unit, and generate a semantic edge-crossing blocking unit. S2 specifically includes: S21: Extract the transfer entity information, transfer process information, business attribute information, status information, and additional record information from the subsequent transfer records; S22: Map each record item in the subsequent flow record to the authentication semantic set corresponding to the source authentication shell unit, and determine the semantic position of each record item; S23: Based on the authentication semantic edge, compare each record item one by one to determine whether each record item is within the permitted range defined by the authentication semantic edge; S24: Records that exceed the semantic boundary of authentication are identified as semantic overstepping entries; The semantic edge-crossing blocking unit specifically includes: Record the position, semantic type, crossing direction, and crossing magnitude of each semantic crossing item; Determine the boundary category to which each semantic border crossing item belongs based on the semantic type; Based on the direction of the edge crossing, the magnitude of the edge crossing, and the boundary category, configure corresponding blocking labels and boundary fallback indicators for each semantic edge crossing item; The above information is structured and encapsulated to generate the semantic edge-blocking unit; S3: Based on the semantic edge-breaking blocking unit, perform shell-in-shell shrinkage processing on subsequent transfer records to generate a limited-domain attachment unit that retains only the permission authentication semantics; S3 specifically includes: S31: Based on the record item position, blocking label, and boundary backoff indication in the semantic edge-crossing blocking unit, locate the semantic edge-crossing item in the subsequent flow record; S32: Based on the blocking label and boundary fallback instruction, perform shell-in-shell shrinkage processing on semantic overstepping items, including field pruning, field masking, field replacement, or field level downgrading, to eliminate semantic content that exceeds the scope of the authentication semantic outer edge limit; S33: Reorganize the record items retained after the shell shrinkage process to obtain the permission authentication semantic set; The generation of the restricted attachment unit specifically includes: A set of retained record items is formed based on the permission and authentication semantic set; Extract semantic overstepping terms processed during the shell shrinkage process to form a set of discarded record terms; Generate a shell consistency label and a shrinkage result summary based on the set of retained records and the set of removed records; The set of retained records, the set of removed records, the shell consistency label, and the shrinkage result summary are structured and encapsulated to generate the confined attachment unit; S4: Determine the attachment permissions of subsequent transfer records to the initial on-chain record based on the restricted attachment unit, generate the final authentication output unit and write it into the blockchain; S4 specifically includes: S41: Extract the set of retained records, the set of removed records, the shell consistency label, and the summary of the shrinking results from the confined attachment unit; S42: Determine the permission authentication semantic scope of the subsequent circulation records based on the set of retained record items and the set of removed record items; S43: Determine the attachment permission level of subsequent transfer records to the initial on-chain record based on the shell consistency label and permission authentication semantic scope; Based on the attachment permission level, the on-chain index identifier of the initial on-chain record, the on-chain index identifier of the subsequent circulation record, and the shrinking result summary, the final authentication output unit is generated and written into the blockchain.
2. The product traceability and authentication big data management method based on blockchain according to claim 1, characterized in that, The generated authentication boundary description information specifically includes: The semantic items in the authentication semantic set are divided into core authentication semantic items, restricted extended semantic items, and prohibited out-of-bounds semantic items. Set immutable boundaries for core authentication semantic items, set permitted extension boundaries for restricted extension semantic items, and set prohibited attachment boundaries for prohibited out-of-bounds semantic items. The authentication semantic outer edge is formed based on the immutable boundary, the permitted extension boundary, and the prohibited attachment boundary; The semantic margin of authentication is written into the authentication boundary description information to constrain the semantic range of subsequent transfer records.
3. The product traceability and authentication big data management method based on blockchain according to claim 1, characterized in that, The determination of the hooking permission level specifically includes: When the shell consistency label indicates that the subsequent transfer record completely matches the source authentication shell unit, and the set of excluded record items is empty, the attachment permission level is determined to be full attachment. When the shell consistency label indicates that the subsequent transfer record partially matches the source authentication shell unit, and the set of excluded record items is not empty, the attachment permission level is determined to be domain-limited attachment. When the shell consistency label indicates that the subsequent transfer record does not match the source authentication shell unit, or when the set of record items to be removed contains a semantic overriding item corresponding to the prohibited attachment boundary, the attachment permission level will be determined as attachment denied.
4. The product traceability and authentication big data management method based on blockchain according to claim 1, characterized in that, S4 further includes: Extract the initial on-chain record identifier, current flow record identifier, attached permission level, and shrink result summary from the final authentication output unit to construct an authentication status index; When a traceability verification request for a target product is received, the corresponding certification status index is called according to the product identification information in the traceability verification request to locate the final certification output unit corresponding to the target product. Read the corresponding attachment permission level, shrink result summary and authentication timestamp from the final authentication output unit to generate the traceability authentication result of the target product.
Citation Information
Patent Citations
Information authentication method based on blockchain financial service and blockchain service system
CN112711753A
Probiotic plant beverage production method and system
CN120678174A