Blockchain raw material traceability and right confirmation system and method suitable for food processing whole process

CN122596966APending Publication Date: 2026-08-18TIANJIN FUXIA FOOD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610765116.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

但在巧克力类等食品加工原料的指定产地、有机认证、地理标志或合同限定用途原料进入切分、混合、杀菌、复配、分装及外协预处理的连续加工场景中,原料一经混同、替代投料或跨用途调拨,其物理边界和用途边界即随加工动作发生改变,后续难以再从成品或半成品中还原加工前的原料权属状态;此时,即使链上能够查验投料单、加工单和检验记录未被改写,也只能说明相关记录已经形成,不能说明相应加工动作在执行前已取得原料提供方、品牌方或监管限制所要求的使用授权,容易使未经授权的混同加工、替代投料或外协共用暂存结果凭借事后补录记录进入正常确权流程;

Benefits of technology

1、 通过将授权范围与加工事实按顺位对位,并将未落入授权范围的加工结果分流为待确权记录后上链,使链上记录不再仅证明事后单据存在,而能在加工承接前阻断未经授权混同、替代投料和跨用途流转,相对降低未授权加工结果进入正常确权流程的风险;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122596966A_ABST
    Figure CN122596966A_ABST
Patent Text Reader

Abstract

This invention discloses a blockchain-based raw material traceability and rights confirmation system and method adapted to the entire food processing process, specifically involving food processing data management and blockchain rights confirmation. The system includes receiving authorization records and processing records under the same raw material identifier at end-to-end collaborative nodes, combining the authorized actions, authorized objects, and authorized destinations in the authorization records into an authorization scope, and combining the implemented actions, actual objects, and actual destinations in the processing records into processing facts, and generating a raw material action sequence according to the processing occurrence order. This invention addresses the problem in existing technologies where unauthorized mixed processing, substitute feeding, or cross-purpose transfer results enter the normal rights confirmation process through post-event supplementary records by aligning the authorization scope and processing facts according to the processing occurrence order at end-to-end collaborative nodes, and generating acceptance records or rights confirmation records based on acceptance, deviation, and pending confirmation states before writing them into the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food processing data management and blockchain-based rights confirmation technology. More specifically, this invention relates to a blockchain-based raw material traceability and rights confirmation system and method adapted to the entire food processing process. Background Technology

[0002] In the traceability and ownership management of raw materials for food processing such as chocolate, existing processes mainly revolve around leaving traces of the source of raw materials, recording the processing process, and solidifying responsibility certificates. Generally, the supply end, processing end, outsourcing end, quality inspection end, and sales end each form records of warehousing, feeding, processing, inspection, and outbound. Through end-to-end collaboration, relevant business records or summaries are written into the blockchain to prove the immutability of the records after they are formed. However, in continuous processing scenarios where raw materials for food processing, such as chocolate, are from designated origins, have organic certifications, geographical indications, or contractually restricted uses, and are involved in cutting, mixing, sterilization, compounding, packaging, and outsourced pre-processing, once the raw materials are mixed, substituted, or transferred across uses, their physical and usage boundaries change with the processing actions. It is difficult to restore the original ownership status of the raw materials from the finished or semi-finished products. At this time, even if the feeding order, processing order, and inspection record can be verified on the chain and have not been rewritten, it can only indicate that the relevant records have been formed. It cannot indicate that the corresponding processing actions have obtained the authorization for use required by the raw material supplier, brand owner, or regulatory restrictions before execution. This makes it easy for unauthorized mixed processing, substituted feeding, or outsourced shared temporary storage results to enter the normal ownership confirmation process by supplementing the records afterward. Therefore, the technical problem to be solved by this application is: how to advance the control of raw material ownership to before the execution of key processing actions in the end-to-end collaborative process of food processing, so that the processing results that do not fall within the scope of authorization cannot automatically inherit the ownership of raw materials. Summary of the Invention

[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a blockchain-based raw material traceability and rights confirmation system and method adapted to the entire food processing process. By aligning the authorized scope with the processing facts in the end-to-end collaborative nodes according to the order of processing occurrence, and generating acceptance records or rights confirmation records based on acceptance state, deviation state, and pending confirmation state, the system writes them into the blockchain, thereby solving the problems mentioned in the background art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process, comprising: S1. Receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative node, combine the authorized actions, authorized objects and authorized destinations in the authorization records into the authorization scope, combine the executed actions, actual objects and actual destinations in the processing records into the processing facts, and generate a raw material action sequence according to the order of processing occurrence. S2. Based on the raw material action sequence, the authorized scope of each sequence is aligned with the processing facts to generate an action observation table containing hit items, out-of-bounds items, and missing items. S3. Using the action observation table as input, the maximum entropy Markov algorithm is used to map the hit items, out-of-bounds items and missing items to the transition features of the receiving state, the deviation state and the pending confirmation state, respectively. The transition weights between adjacent confirmation states are calculated according to the order of processing occurrence, and the authorization transition map is generated. S4. Based on the authorization transfer graph, execute the forward-backward algorithm to calculate the path occupancy of each processing order entering the acceptance state, deviation state, and pending confirmation state. Then, use the Baum-Welch update algorithm to reverse the transfer weights corresponding to the hit items, out-of-bounds items, and missing items according to the path occupancy to generate the authorization diversion table. S5. Input the authorization diversion table into the transfer entropy causal detection algorithm to calculate the contribution of the processed facts to the directional information of the deviation state or the state to be confirmed. Take the first field of the directional information contribution as the main cause of authorization deviation. When the first state of the path occupancy is the acceptance state, generate the acceptance record and write it into the blockchain. When the first state of the path occupancy is the deviation state or the state to be confirmed, generate the record to be confirmed and write it into the blockchain.

[0005] In a preferred embodiment, S1 includes: S1-1. Receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative node, read the authorized action, authorized object and authorized destination in the authorization record, read the executed action, actual object and actual destination in the processing record, and write them into the authorization field table and fact field table respectively. S1-2. Based on the authorization field table, combine the authorized action, authorized object, and authorized destination into an authorization scope according to the field position order. Based on the fact field table, combine the executed action, actual object, and actual destination into a processing fact according to the same field position order, and generate a corresponding field table. S1-3. Sort the corresponding field table according to the processing occurrence order in the processing record, merge the authorization scope and processing facts under each order into sequence nodes, and connect the sequence nodes according to order to generate the raw material action sequence.

[0006] In a preferred embodiment, S2 includes: S2-1. Based on the raw material action sequence, read the authorized scope and processing facts in each sequence in turn, write the authorized action and the executed action into the action bit, write the authorized object and the actual object into the object bit, write the authorized destination and the actual destination into the destination bit, and generate a sequence alignment table. S2-2. Perform field comparison on the action bit, object bit, and destination bit in the sequence alignment table. Write the field bit whose value matches the processing fact field into the hit item, write the field bit whose value exists in the authorization range field but does not match the processing fact field into the out-of-bounds item, and write the field bit whose value is empty in the authorization range field but exists in the processing fact field into the missing item, and generate the sequence observation item. S2-3. Collect the sequence observation items according to the processing occurrence sequence, and write the raw material identifier, sequence number, authorized scope, processing facts, hit items, out-of-bounds items and missing items into the action observation table.

[0007] In a preferred embodiment, S3 includes: S3-1. Using the action observation table as input, read the hit, out-of-bounds, and missing items in each sequence bit according to the action bit, object bit, and destination bit. Write the hit item as the continuation bit, the out-of-bounds item as the deviation bit, and the missing item as the pending confirmation bit, and combine them into a sequence status code according to the bit order. S3-2. Based on the sequential status code, combine the previous sequential confirmation status, the current sequential status code, and the candidate confirmation status into a status feature pair. Calculate the number of fields occupied by the status feature pair in the acceptance state, deviation state, and pending confirmation state, and generate a maximum entropy constraint table.

[0008] In a preferred embodiment, S3 further includes: S3-3. Perform the maximum entropy Markov algorithm on the maximum entropy constraint table. Set the transition weights of the receiving state, the deviating state and the unconfirmed state under the same state feature pair as the variables to be determined. Take the sum of the three types of transition weights as one and the sum of the products of each transition weight and the corresponding field occupancy as equal to the total number of fields occupied by the state feature pair as the operation constraints to obtain the order transition weight table. S3-4. Take the previous transfer weight in the priority transfer weight table as the reference weight, take the current transfer weight as the candidate weight, use the relative entropy strategy search algorithm to calculate the relative entropy reduction of the candidate weight relative to the reference weight, and generate the state transition weight by subtracting the relative entropy reduction from the candidate weight. Then connect the adjacent confirmation states, priority status codes and state transition weights according to the processing occurrence priority to form the authorization transfer diagram.

[0009] In a preferred embodiment, S4 includes: S4-1. Read the sequence status code, previous confirmation status, candidate confirmation status and status transition weight of each position in the authorization transfer diagram. Write the accepting position into the accepting field, the deviation position into the deviation field, and the pending confirmation position into the pending confirmation field. Multiply the status transition weight with the accepting field, deviation field and pending confirmation field respectively to generate a bidirectional transfer table. S4-2. For the bidirectional transfer table, the forward rule of the forward-backward update algorithm with absorption proof by contradiction is adopted. The cumulative amount of the acceptance field to the acceptance state is recursively calculated according to the processing occurrence order. The last order of the deviation position and the position to be confirmed in the previous order is recorded respectively to generate the forward acceptance table.

[0010] In a preferred embodiment, S4 further includes: S4-3. By absorbing the backward rules of the forward-backward update algorithm of the proof by contradiction, the cumulative amount of the deviation field to the deviation state and the cumulative amount of the pending confirmation field to the pending confirmation state are recursively calculated in the reverse order of the processing occurrence order. The deviation absorption order of the receiving state in the subsequent order and the pending confirmation absorption order of the receiving state are recorded respectively to generate the backward proof by contradiction table. S4-4. Input the forward acceptance table and the backward proof table into the Baum-Welch correction rule of the forward-backward update algorithm for absorption proof. Subtract the cumulative amount of the deviation state from the cumulative amount of the acceptance state in the same order to obtain the path occupancy of the acceptance state. Subtract the cumulative amount of the acceptance state from the cumulative amount of the deviation state to obtain the path occupancy of the deviation state. Subtract the cumulative amount of the acceptance state from the cumulative amount of the pending confirmation state to obtain the path occupancy of the pending confirmation state. Perform reverse correction only on the state transition weights that have deviation absorption order or pending confirmation absorption order to generate the authorization distribution table.

[0011] In a preferred embodiment, S5 includes: S5-1. Write the processing facts, acceptance path occupancy, deviation path occupancy, pending confirmation path occupancy, and corrected transfer weight under the same priority in the authorization distribution table into the causal sample table, and split the processing facts into the action field, actual object field, and actual destination field to generate the priority causal sample. S5-2. For sequential causal samples, the action field, actual object field, and actual destination field are used as cause fields, and the deviation path occupancy and unconfirmed path occupancy are used as result fields. Construct retained samples with retained cause fields and culling samples with removed cause fields to generate cause culling sample groups. S5-3. Input the cause-hidden sample group into the transfer entropy causal detection algorithm, calculate the conditional entropy of the result field in the retained sample and the conditional entropy of the result field in the hidden sample respectively, and use the difference between the two as the directional entropy difference of the cause field to the result field to generate a directional entropy difference table. S5-4. Based on the directional entropy difference table, multiply the directional entropy difference of the cause field on the deviation state path occupancy by the deviation state path occupancy to obtain the directional information contribution of the cause field to the deviation state. Multiply the directional entropy difference of the cause field on the path occupancy to be confirmed by the path occupancy to be confirmed to obtain the directional information contribution of the cause field to the state to be confirmed, and generate the directional information contribution table.

[0012] In a preferred embodiment, S5 further includes: S5-5. Based on the corrected transfer weight, read the deviation absorption order of the accepting state to the deviation state, and the pending confirmation absorption order of the accepting state to the pending confirmation state. Deduct the path occupancy of the accepting state corresponding to the deviation absorption order from the directional information contribution of the cause field to the deviation state, and deduct the path occupancy of the accepting state corresponding to the pending confirmation absorption order from the directional information contribution of the cause field to the pending confirmation state, and generate a corrected directional information contribution table. S5-6. Input the first and first states of path occupancy, the corrected orientation information contribution table, and the corrected transfer weight into the cross-determination chain. If the first and first states of path occupancy are in the acceptance state, and the path occupancy in the acceptance state is greater than both the path occupancy in the deviation state and the path occupancy in the pending confirmation state, and the first and first fields of the orientation information contribution in the deviation state and the orientation information contribution in the pending confirmation state do not point to the same cause field, then an acceptance determination item is generated; otherwise, a pending determination item is generated. S5-7. When generating the determination item to be confirmed, if the occupancy of the deviation path is greater than the occupancy of the path to be confirmed, then generate the deviation cause table according to the contribution of the cause field to the directional information of the deviation state, and read the first field of the deviation cause table as the authorized deviation cause; otherwise, generate the confirmation cause table according to the contribution of the cause field to the directional information of the state to be confirmed, and read the first field of the confirmation cause table as the authorized deviation cause. S5-8. Generate acceptance records based on acceptance criteria and write them to the blockchain. Generate rights-to-be-confirmed records based on rights-to-be-confirmed criteria and authorization deviation main causes and write them to the blockchain.

[0013] In a preferred embodiment, a blockchain-based raw material traceability and rights confirmation system adapted to the entire food processing process includes: The record receiving module is used to receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative nodes. It combines the authorized actions, authorized objects and authorized destinations in the authorization records into the authorization scope, and combines the executed actions, actual objects and actual destinations in the processing records into the processing facts, and generates a raw material action sequence according to the order of processing occurrence. The alignment observation module, based on the raw material action sequence, aligns the authorized scope of each sequence with the processing facts, generating an action observation table that includes hit items, out-of-bounds items, and missing items. The transfer mapping module takes the action observation table as input and uses the maximum entropy Markov algorithm to map hit items, out-of-bounds items, and missing items to the transfer features of the receiving state, deviation state, and pending confirmation state, respectively. It also calculates the transfer weights between adjacent confirmation states according to the order of processing occurrence and generates an authorization transfer map. The path splitting module executes a forward-backward algorithm based on the authorization transfer graph to calculate the path occupancy of each processing order entering the acceptance state, deviation state, and pending confirmation state. It then uses the Baum-Welch update algorithm to reverse-correct the transfer weights corresponding to the hit items, out-of-bounds items, and missing items according to the path occupancy, and generates an authorization splitting table. The causal confirmation module is used to input the authorization diversion table into the transfer entropy causal detection algorithm, calculate the contribution of the processed facts to the directional information of the deviation state or the state to be confirmed, and take the first field of the directional information contribution as the main cause of authorization deviation; when the first state of the path occupancy is the acceptance state, an acceptance record is generated and written to the blockchain; when the first state of the path occupancy is the deviation state or the state to be confirmed, a record to be confirmed is generated and written to the blockchain.

[0014] The technical effects and advantages of this invention are as follows: 1. By aligning the scope of authorization with the processing facts in order, and diverting processing results that do not fall within the scope of authorization into records pending confirmation before being uploaded to the blockchain, the records on the blockchain no longer merely prove the existence of subsequent documents, but can prevent unauthorized commingling, substitution of materials, and cross-purpose transfer before processing is undertaken, thereby relatively reducing the risk of unauthorized processing results entering the normal confirmation process. 2. By generating hit items, out-of-bounds items, and missing items through action bits, object bits, and destination bits, the permitted action, permitted object, and permitted destination are compared with the executed action, actual object, and actual destination item by item, thereby relatively improving the granularity of the judgment between the scope of authorization and the processing facts. 3. The maximum entropy Markov algorithm is used to map hit items, out-of-bounds items and missing items to acceptance state, deviation state and pending confirmation state, and an authorization transfer diagram is generated according to the processing order, so that the authorization state in continuous processing can be recursively deduced with the processing order, reducing the mis-diversion caused by single-point record judgment. 4. By using the forward-backward update algorithm to absorb proof by contradiction to record the deviation from the absorption order and the absorption order to be confirmed, the previous over-boundary or vacancy will not be directly covered by the subsequent acceptance action, thus relatively preserving the abnormal acceptance traces in the mixing, transfer or external cooperation temporary storage. 5. Calculate the contribution of processed facts to the directional information of the deviation state or the state to be confirmed by the transfer entropy causal detection algorithm, and take the first field as the main cause of authorization deviation, so that the record to be confirmed can carry the cause field of object replacement, out-of-bounds destination or action deviation, thereby improving the basis for subsequent responsibility confirmation. Attached Figure Description

[0015] Figure 1 This is a flowchart of the method steps of the present invention.

[0016] Figure 2 This is a schematic diagram of the system modules of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Refer to the instruction manual appendix Figure 1-2 The present invention provides a blockchain-based method for tracing and confirming the source of raw materials, adapted to the entire food processing process, comprising: S1. Receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative node, combine the authorized actions, authorized objects and authorized destinations in the authorization records into the authorization scope, combine the executed actions, actual objects and actual destinations in the processing records into the processing facts, and generate a raw material action sequence according to the order of processing occurrence. To ensure that authorization records and processing records form a readable, sortable, and traceable data foundation before subsequent alignment calculations, this implementation first aggregates the two types of records in the end-to-end collaborative nodes according to the same raw material identifier. Then, the authorization-side fields and processing-side fields are split into the same field positions, and subsequently connected according to the order in which processing occurred to form a raw material action sequence. This process ensures that subsequent hit items, out-of-bounds items, and missing items all have a field source, allowing for a sequential determination of whether the processing fact falls within the authorization scope. This implementation process includes the following steps: In S1-1, end-to-end collaborative nodes receive authorization records and processing records uploaded by suppliers, processors, outsourcing partners, or quality inspection partners, and use the same raw material identifier as the aggregation index. The raw material identifier is generated by the raw material batch number, supplier number, factory receipt number, and on-chain registration summary. When the same raw material is processed in batches, returned from outsourcing, or reworked, the raw material identifier is used, and the processing order is added to the processing record. The authorization record includes the authorized action, the authorized object, and the authorized destination. The authorized action indicates the processing behavior that is allowed to be performed, the authorized object indicates the raw materials, semi-finished products, or mixed objects that are allowed to participate in the processing behavior, and the authorized destination indicates the product category, semi-finished product container, or outsourcing that is allowed to flow in. The node or downstream receiving object; the processing record includes the executed action, the actual object, and the actual destination. The executed action represents the processing behavior actually performed by the equipment or work order, the actual object represents the object that actually enters the processing action, and the actual destination represents the object that actually flows into the processing after processing. After reading the above fields, the end-to-end collaborative node writes the authorized action, authorized object, and authorized destination into the action bit, object bit, and destination bit of the authorization field table in sequence, and writes the executed action, actual object, and actual destination into the action bit, object bit, and destination bit of the fact field table in sequence. Each field is written using standard encoding. Unauthorized or unfilled field bits are marked with null values ​​and do not directly participate in subsequent calculations as natural language text. In S1-2, the end-to-end collaborative node reads the authorization field table and combines the permitted action in the action bit, the permitted object in the object bit, and the permitted destination in the destination bit according to the field order of the action bit, object bit, and destination bit to form the authorization scope. The authorization scope is not text concatenation, but a field group composed of three field bits. The end-to-end collaborative node reads the fact field table and combines the executed action in the action bit, the actual object in the object bit, and the actual destination in the destination bit according to the same field order to form the processing fact. The processing fact is also composed of the action bit, object bit, and destination bit. Subsequently, the end-to-end collaborative node writes the authorization scope and processing fact under the same raw material identifier and the same processing occurrence sequence into the corresponding field table, so that each row in the corresponding field table includes the raw material identifier, processing occurrence sequence, authorization scope action bit, authorization scope object bit, authorization scope destination bit, processing fact action bit, processing fact object bit, and processing fact destination bit. Through this processing, the authorization scope and processing fact form a one-to-one relative structure in terms of field bits, and subsequent field comparison can be directly performed according to the action bit, object bit, and destination bit. In S1-3, the end-to-end collaborative nodes sort the corresponding field table according to the processing occurrence order in the processing records. The processing occurrence order is determined first by the processing action occurrence time. When multiple processing records exist at the same time, the one with the earlier equipment action generation time is prioritized. If the equipment action generation times are the same, the one with the earlier end-to-end collaborative node reception time is prioritized. If they are still the same, the order is determined by the lexicographical order of the processing record summary. After sorting, the end-to-end collaborative nodes merge the authorization scope and processing facts under each order into a sequence node. The sequence node includes the raw material identifier, the current order number, the previous order number, the authorization scope, and the processing facts. The previous order number of the first sequence node is written with a null flag, and the previous order number of the remaining sequence nodes is written with the order number immediately adjacent to the previous processing occurrence order. The sequence nodes are connected sequentially according to the current order number to generate the raw material action sequence. This step does not generate hit items, out-of-bounds items, and missing items. These three types of results are generated separately by the subsequent alignment steps based on the raw material action sequence. Through the above processing, the authorization record and processing record are first split into the same field position, and then the raw material action sequence is formed according to the order of processing occurrence. This allows the subsequent action observation table, authorization transfer diagram and authorization distribution table to read fields from the same data link, avoiding the authorization scope from being disconnected from the processing facts in terms of field position, order or raw material identification.

[0019] S2. Based on the raw material action sequence, the authorized scope of each sequence is aligned with the processing facts to generate an action observation table containing hit items, out-of-bounds items, and missing items. To enable the raw material action sequence to enter subsequent authorized transfer calculations, this implementation method performs field alignment of the authorized range and processing facts in each sequence, forming readable observation results for the action bit, object bit, and destination bit respectively. This processing does not change the raw material action sequence generated in S1, but only extracts the authorized range field and processing fact field at the same field bit from the sequence node, and writes their relationship as hit item, out-of-bounds item, and missing item. This implementation process includes the following steps: In S2-1, the end-to-end collaborative nodes take the raw material action sequence generated in S1 as input and read the sequence nodes one by one according to the processing occurrence sequence. Each sequence node already contains the authorization scope and processing facts. The authorization scope consists of the authorized action, the authorized object, and the authorized destination. The processing facts consist of the executed action, the actual object, and the actual destination. The end-to-end collaborative nodes write the authorized action and the executed action into the action bit, the authorized object and the actual object into the object bit, and the authorized destination and the actual destination into the destination bit. Each field bit retains two field values: the authorization scope field and the processing fact field. After writing is completed, a sequence alignment table is generated. The sequence alignment table includes raw material identifier, sequence number, action bit, object bit, and destination bit. The action bit is used to record whether the processing behavior falls into the authorized action, the object bit is used to record whether the processing object falls into the authorized object, and the destination bit is used to record whether the flow after processing falls into the authorized destination. In S2-2, the end-to-end collaborative nodes perform field comparisons on the action bit, object bit, and destination bit in the sequence alignment table. The field comparison is based on standard codes, not natural language descriptions. When both the authorization range field and the processing fact field are written with the same standard code, the end-to-end collaborative node writes this field bit into the hit item. When the authorization range field has a non-empty standard code and the processing fact field has another standard code, the end-to-end collaborative node writes this field bit into the out-of-bounds item. When the authorization range field is marked as null and the processing fact field has a non-empty standard code, the end-to-end collaborative node writes this field bit into the missing item. If the processing fact field is marked as null, this field bit is not written into the hit item, out-of-bounds item, or missing item, and the original field bit is retained in the sequence observation item. After completing the comparison of the three field bits, the end-to-end collaborative node generates a sequence observation item, which records whether the action bit, object bit, and destination bit under each sequence belong to the hit item, out-of-bounds item, missing item, or non-participating item, respectively. In S2-3, the end-to-end collaborative nodes collect all sequential observation items according to the processing occurrence sequence, and write the raw material identifier, sequence number, authorized scope, processing fact, hit item, out-of-bounds item, and missing item into the action observation table. The hit item, out-of-bounds item, and missing item in the action observation table record the field bit number and field bit value. The hit item records the standard code that is common to the authorized scope field and the processing fact field. The out-of-bounds item records the standard code of the authorized scope field and the standard code of the processing fact field. The missing item records the null value mark and the standard code of the processing fact field. The action observation table does not change the sequential connection relationship of the raw material action sequence, but only adds the field comparison result at each sequence, so that the subsequent S3 can directly read the hit item, out-of-bounds item, and missing item, and write them into the acceptance bit, deviation bit, and pending confirmation bit, respectively. Through the above processing, the authorization scope and processing facts are transformed from the field group in the raw material action sequence into the field comparison result in the action observation table. Subsequently, the maximum entropy Markov algorithm no longer directly processes the original record, but processes the observation results composed of hit items, out-of-bounds items and missing items, thereby transforming "whether processing is allowed" into a recursive state input.

[0020] S3. Using the action observation table as input, the maximum entropy Markov algorithm is used to map the hit items, out-of-bounds items and missing items to the transition features of the receiving state, the deviation state and the pending confirmation state, respectively. The transition weights between adjacent confirmation states are calculated according to the order of processing occurrence, and the authorization transition map is generated. To enable the action observation table to be included in the authorization transfer calculation, this implementation method first converts the hit items, out-of-bounds items, and missing items in each priority into three types of state bits, and then constructs state feature pairs based on the state succession relationship between adjacent priorities; subsequently, it calculates the three types of transfer weights based on the field occupancy number, and uses the relative entropy deduction method to suppress abrupt changes between adjacent priorities, so that the authorization transfer graph retains both the field differences of the current processing facts and the influence of the previous priority's authorization status on the current priority. This implementation process includes the following steps: In S3-1, the end-to-end collaborative node takes the action observation table as input, reads the action bit, object bit, and destination bit for each sequence according to the processing occurrence sequence, and reads the hit, out-of-bounds, and missing items in each field bit respectively. The hit item corresponds to the processing fact falling within the authorized range. The end-to-end collaborative node writes 1 to the accept bit of the field bit and writes zero to the deviation bit and pending confirmation bit. The out-of-bounds item corresponds to the authorized range field existing but the processing fact field exceeding the authorized range. The end-to-end collaborative node writes 1 to the deviation bit of the field bit and writes zero to the accept bit and pending confirmation bit. The missing item corresponds to the processing fact field existing but the authorized range field being empty. The end-to-end collaborative node writes 1 to the pending confirmation bit of the field bit and writes zero to the accept bit and deviation bit. If a certain field bit is not included in the comparison, all three types of status bits are written to zero, and the field bit is not counted in the field occupancy count. The end-to-end collaborative node writes three sets of status bits according to the bit order of action bit, object bit, and destination bit to generate a sequence status code. In S3-2, the end-to-end collaborative nodes construct state feature pairs based on the sequential status codes. For the first sequential position, the confirmation status of the previous sequential position is written into the pre-authorization state, which only serves as the starting state in the calculation. For non-first sequential positions, the confirmation status of the previous sequential position reads the candidate confirmation status generated by the previous sequential position. The candidate confirmation status is limited to the acceptance state, deviation state, and pending confirmation state. The end-to-end collaborative nodes combine the confirmation status of the previous sequential position, the current sequential status code, and a candidate confirmation state into a state feature pair, and count the number of field bits of the acceptance bit, deviation bit, and pending confirmation bit under this state feature pair, respectively, to obtain the number of field occupancy in the acceptance state, the number of field occupancy in the deviation state, and the number of field occupancy in the pending confirmation state. The total number of field occupancy is obtained by adding the three types of field occupancy. The end-to-end collaborative nodes write the state feature pair, the number of field occupancy in the three types, and the total number of field occupancy into the maximum entropy constraint table. In S3-3, the end-to-end collaborative nodes execute the maximum entropy Markov algorithm on the maximum entropy constraint table. For the same state feature pair, the number of fields occupied in the accepting state, the number of fields occupied in the deviating state, and the number of fields occupied in the pending confirmation state are first divided by the total number of fields occupied to obtain the field occupancy ratios of the three types. When the total number of fields occupied is zero, the three types of transition weights for the corresponding state feature pair in the previous order are read. When the total number of fields occupied in the first order is zero, the three types of transition weights are written to the same initial value. Subsequently, the transition weights of the accepting state, the deviating state, and the pending confirmation state are set as variables to be determined. The operation constraints are that the sum of the three types of transition weights is one, each transition weight is close to the corresponding field occupancy ratio, and the information entropy of the three types of transition weights is the maximum. The three types of transition weights for the state feature pair pointing to the accepting state, the deviating state, and the pending confirmation state are obtained. The end-to-end collaborative nodes write the order number, the state feature pair, and the three types of transition weights into the order transition weight table. In S3-4, the end-to-end collaborative nodes read the sequential transfer weight table, taking the three types of transfer weights under the same previous confirmation state in the previous sequence as reference weights, and the three types of transfer weights under the same state feature pair in the current sequence as candidate weights. The end-to-end collaborative nodes use a relative entropy strategy search algorithm to calculate the relative entropy component of the candidate weights relative to the reference weights for each of the acceptance state, deviation state, and pending confirmation state. Then, each relative entropy component is divided by the sum of the three types of relative entropy components to obtain the deduction ratio of the corresponding state. The relative entropy deduction amount is obtained by multiplying the candidate weight by the deduction ratio, and the state transfer weight is obtained by deducting the relative entropy deduction amount from the candidate weight. If the sum of the three types of state transfer weights after deduction is not one, the end-to-end collaborative nodes normalize the three types of state transfer weights to one according to their sum. Finally, the end-to-end collaborative nodes write the adjacent confirmation states, sequence state codes, and state transfer weights into the transfer edges, and connect each transfer edge according to the processing occurrence sequence to generate the authorization transfer graph. Through the above processing, the field comparison results in the action observation table are converted into an authorization transfer graph that can participate in the sequential recursion; the hit items, out-of-bounds items and missing items no longer exist as isolated records, but enter the transfer calculation of the acceptance state, deviation state and pending confirmation state respectively. The previous sequential confirmation state also participates in the generation of the current sequential weight, thus providing a data basis for the subsequent path occupancy calculation. In practical applications: In a certain sequence of raw material identifier R001, if both the action bit and the object bit are hit items, and the destination bit is an out-of-bounds item, then the end-to-end collaborative node writes two acceptance bits and one deviation bit into the status code of that sequence. If the previous sequence is an acceptance state, the end-to-end collaborative node constructs three state feature pairs respectively: "acceptance state - current sequence status code - acceptance state", "acceptance state - current sequence status code - deviation state", and "acceptance state - current sequence status code - pending confirmation state", and generates three types of field occupancy numbers based on the two acceptance bits and one deviation bit. After the maximum entropy Markov algorithm and relative entropy deduction, both the acceptance state and the deviation state enter the authorization transition graph, but the deviation state retains the corresponding transition edge because the destination bit is out of bounds, so that subsequent steps can continue to determine whether the out-of-bounds behavior is absorbed by the subsequent acceptance action.

[0021] S4. Based on the authorization transfer graph, execute the forward-backward algorithm to calculate the path occupancy of each processing order entering the acceptance state, deviation state, and pending confirmation state. Then, use the Baum-Welch update algorithm to reverse the transfer weights corresponding to the hit items, out-of-bounds items, and missing items according to the path occupancy to generate the authorization diversion table. To further transform the state transition results in the authorization transfer diagram into divisible weighting results, this implementation method reads the acceptance position, deviation position, and pending confirmation position in each sequence, and combines the three types of state positions with state transition weights to form a bidirectional transfer table that can be forward-progressed and backward-tracked along the sequence. Forward progression is used to calculate the cumulative acceptance degree of the acceptance state in the continuous processing process, while backward tracking is used to calculate whether the deviation state and pending confirmation state are absorbed by the acceptance state in subsequent sequences. Then, the occupancy of the three types of paths and the corrected transfer weights are obtained through correction rules. This implementation process includes the following steps: In S4-1, the end-to-end collaborative nodes read the sequence status code, previous confirmation status, candidate confirmation status, and state transition weight of each transfer edge in the authorization transfer graph according to the processing occurrence sequence. In the sequence status code, the accepting bit, deviation bit, and pending confirmation bit are all converted from the action bit, object bit, and destination bit in S3, and take values ​​of one or zero. The end-to-end collaborative nodes write the accepting bit into the accepting field, the deviation bit into the deviation field, and the pending confirmation bit into the pending confirmation field, and calculate the accepting observation transfer amount, the deviation observation transfer amount, and the pending confirmation observation transfer amount, respectively. Among these, the accepting... The observed transition quantity is the product of the state transition weight and the receiving field; the deviation observed transition quantity is the product of the state transition weight and the deviation field; and the pending confirmation observed transition quantity is the product of the state transition weight and the pending confirmation field. Subsequently, the sequence number, the previous confirmation state, the candidate confirmation state, the receiving field, the deviation field, the pending confirmation field, the receiving observed transition quantity, the deviation observed transition quantity, and the pending confirmation observed transition quantity are written into the bidirectional transition table. The bidirectional transition table does not change the transition edges in the authorization transition graph, but only provides the three types of observed transition quantities under the same sequence for forward recursion and backward backtracking. In S4-2, the end-to-end collaborative nodes execute the forward rule of the forward-backward update algorithm with absorption proof of contradiction on the bidirectional transfer table, and recursively calculate the cumulative amount of the receiving field for the receiving state according to the processing occurrence order; the forward starting point of the first order is obtained from the receiving observation transfer amount from the authorized forward state to the receiving state; in non-first order orders, the cumulative amount of the receiving state of the current order is equal to the sum of the cumulative amount of the receiving state of the previous order, the cumulative amount of the deviation state, and the cumulative amount of the unconfirmed state multiplied by the current order receiving observation transfer amount; at the same time, the end-to-end collaborative nodes recursively calculate the cumulative amount of the receiving field for the receiving state according to the processing occurrence order. Bit scan offset bit and unconfirmed bit: If the current order offset bit is 1, then the current order number is written as the last offset bit; if the current order offset bit is zero, then the last offset bit of the previous order is used; if the current order unconfirmed bit is 1, then the current order number is written as the last unconfirmed bit; if the current order unconfirmed bit is zero, then the last unconfirmed bit of the previous order is used; after the recursion is completed, a forward acceptance table is generated, which includes the order number, the cumulative amount of acceptance state, the last offset bit, and the last unconfirmed bit; In S4-3, the end-to-end collaborative nodes execute the backward rules of the forward-backward update algorithm using a bidirectional transfer table, and recursively calculate the cumulative amount of the deviation field for the deviation state and the cumulative amount of the unconfirmed state for the unconfirmed field according to the processing occurrence order. The backward starting point of the last order is obtained from the deviation observation transfer amount and the unconfirmed observation transfer amount of that order, respectively. In non-last orders, the cumulative amount of the deviation state of the current order is equal to the sum of the cumulative amount of the receiving state, the cumulative amount of the deviation state, and the cumulative amount of the unconfirmed state of the next order multiplied by the current order's deviation observation transfer amount, respectively. The cumulative amount of the unconfirmed state of the current order is equal to the cumulative amount of the receiving state, the cumulative amount of the deviation state, and the cumulative amount of the unconfirmed state of the next order. The measurement is the sum of the values ​​after multiplying each value by the current order of observations to be confirmed; the end-to-end collaborative nodes simultaneously read the successor position of the subsequent order during the reverse scan; when a successor position of the same field appears after a certain deviation position, the order of the successor position is written as the deviation absorption order; when a successor position of the same field appears after a certain order of the position to be confirmed, the order of the successor position is written as the absorption order to be confirmed; when there is no subsequent successor position, the corresponding absorption order is marked with a null value; after completing the reverse recursion, a backward reversal table is generated, which includes the order number, the cumulative amount of the deviation state, the cumulative amount of the state to be confirmed, the deviation absorption order, and the absorption order to be confirmed; In S4-4, the end-to-end collaborative nodes input the forward acceptance table and the backward proof table into the Baum-Welch correction rule of the forward-backward update algorithm for absorbing proofs of disproof, and calculate the occupancy of the three types of paths under the same order. The occupancy of the acceptance state path is obtained by subtracting the cumulative amount of the deviation state from the cumulative amount of the acceptance state path; if the subtraction result is less than zero, it is recorded as zero. The occupancy of the deviation state path is obtained by subtracting the cumulative amount of the acceptance state path from the cumulative amount of the deviation state path; if the subtraction result is less than zero, it is recorded as zero. The occupancy of the pending confirmation state path is obtained by subtracting the cumulative amount of the acceptance state path from the cumulative amount of the pending confirmation state path; if the subtraction result is less than zero, it is recorded as zero. After the three types of path occupancy are generated, the end-to-end collaborative nodes normalize the sum of the three types of path occupancy under the same order; if the sum is zero, the order correction is read. The three types of state transition weights are used as the three types of path occupancy. For the reverse correction of state transition weights, when there is a deviation from the absorption priority, the end-to-end coordination node corrects the state transition weight from the deviation state to the acceptance state; when there is an absorption priority to be confirmed, the end-to-end coordination node corrects the state transition weight from the pending confirmation state to the acceptance state; when both the deviation from the absorption priority and the pending confirmation absorption priority exist, the two types of state transition weights are corrected respectively, and the three types of state transition weights pointing to the acceptance state, deviation state, and pending confirmation state from the same previous confirmation state are summed and normalized; the end-to-end coordination node writes the priority number, the path occupancy of the acceptance state, the path occupancy of the deviation state, the path occupancy of the pending confirmation state, the deviation from the absorption priority, the pending confirmation absorption priority, and the corrected transition weights into the authorization distribution table. Through the above processing, the state transition weights in the authorization transfer graph are further converted into the occupancy of the three types of paths in the authorization diversion table. The deviation and pending confirmation bits do not disappear directly due to the appearance of subsequent acceptance bits. Instead, they retain their order positions for absorption by subsequent acceptance actions through the deviation absorption order and pending confirmation absorption order. This processing enables subsequent steps to distinguish between three situations: normal acceptance, absorption after deviation, and absorption after pending confirmation, and generate acceptance records or pending confirmation records accordingly. In practical applications: A batch of raw materials is authorized to enter the organic product line in the first priority, the actual destination in the second priority is written as the ordinary product temporary storage tank, and the third priority is written back to the organic product line; the destination of the second priority forms an out-of-bounds item in S2, and is written as a deviation in S3. When the reverse scan is performed in S4, it is found that the same destination field of the third priority has a receiving position, so the third priority is recorded as the deviation absorption priority of the second priority; the system will not erase the deviation of the second priority just because the third priority is re-received, but will retain the deviation path occupancy and deviation absorption priority in the authorization diversion table for subsequent transfer entropy causal detection to determine the main cause of authorization deviation.

[0022] S5. Input the authorization diversion table into the transfer entropy causal detection algorithm to calculate the contribution of the processing facts to the directional information of the deviation state or the state to be confirmed. Take the first field of the directional information contribution as the main cause of authorization deviation. When the first state of the path occupancy is the acceptance state, generate the acceptance record and write it to the blockchain. When the first state of the path occupancy is the deviation state or the state to be confirmed, generate the record to be confirmed and write it to the blockchain. To convert the authorization distribution table into on-chain rights confirmation results, this implementation first establishes causal samples between processing facts and path occupancy within the same priority. Then, by retaining and eliminating the cause field, it calculates the directional entropy difference for the deviation state and the state to be confirmed, and converts the directional entropy difference into directional information contribution. Subsequently, it performs deduction by combining the deviation absorption priority and the state to be confirmed absorption priority to prevent subsequent acceptance actions from obscuring the source of previous deviations or the state to be confirmed. Finally, it generates acceptance records or records to be confirmed through cross-determination chains. This implementation process includes the following steps: In S5-1, the end-to-end collaborative nodes read the authorized distribution table and extract the processing facts, the occupancy of the receiving path, the occupancy of the deviating path, the occupancy of the path awaiting confirmation, and the corrected transfer weight according to the same raw material identifier and the same priority number. The processing facts adopt the three-field bit structure in S1, which is divided into the action field, the actual object field, and the actual destination field. The action field reads the action bit standard code in the processing facts, the actual object field reads the object bit standard code in the processing facts, and the actual destination field reads the destination bit standard code in the processing facts. The end-to-end collaborative nodes write the priority number, the occupancy of the three types of paths, the corrected transfer weight, the action field, the actual object field, and the actual destination field into the causal sample table, and form a priority causal sample with the above fields under the same priority, so that the subsequent directional entropy difference calculation is directly based on the three types of fields in the processing facts. In S5-2, the end-to-end collaborative node selects the action field, actual object field, and actual destination field as cause fields for each causal sample, and uses the deviation path occupancy and the unconfirmed path occupancy as result fields. For any cause field, the end-to-end collaborative node constructs one retained sample and one hidden sample. In the retained sample, the current cause field retains the original standard code, and the other two cause fields also retain the original standard code. In the hidden sample, only the current cause field is written with a null value marker, and the other two cause fields still retain the original standard code. After completing the retention and hidden sample of the three cause fields, the end-to-end collaborative node generates a cause hidden sample group. Each sample group retains the order number, result field, and corrected transfer weight, which facilitates subsequent comparison of the result changes when the cause field is present and missing according to the same order. In S5-3, the end-to-end collaborative nodes input the cause-to-hidden-field sample group into the transfer entropy causality detection algorithm. For the same cause field and the same result field, the end-to-end collaborative nodes first calculate the distribution change of the result field between adjacent positions in the retained samples, then calculate the distribution change of the result field between adjacent positions in the hidden-field samples, and calculate the conditional entropy of the retained samples and the conditional entropy of the hidden-field samples respectively. The statistical object of the conditional entropy is the normalized distribution of the deviation path occupancy or the path occupancy to be confirmed in the adjacent positions, and the condition item is the standard code or null value mark of the cause field. If the conditional entropy of the hidden-field sample is greater than the conditional entropy of the retained samples, the difference between the two is written as the directional entropy difference between the cause field and the result field. If the conditional entropy of the hidden-field sample is not greater than the conditional entropy of the retained samples, the directional entropy difference is written as zero. The end-to-end collaborative nodes write the cause field, the result field, and the directional entropy difference into the directional entropy difference table. In S5-4, the end-to-end collaborative nodes read the orientation entropy difference table and calculate the orientation information contribution of the cause field to the deviation state and the state to be confirmed, respectively. For the deviation state, the end-to-end collaborative nodes multiply the orientation entropy difference of the cause field on the deviation state path occupancy by the path occupancy of the deviation state in the same order to obtain the orientation information contribution of the cause field to the deviation state. For the state to be confirmed, the end-to-end collaborative nodes multiply the orientation entropy difference of the cause field on the state to be confirmed by the path occupancy of the state to be confirmed by the state to be confirmed by the path occupancy of the state to be confirmed in the same order to obtain the orientation information contribution of the cause field to the state to be confirmed. The end-to-end collaborative nodes write the orientation information contribution of the cause field, the deviation state, and the state to be confirmed into the orientation information contribution table. If the orientation information contribution is less than zero, it is not written. If the cause field has no orientation entropy difference in the corresponding state, it is written as zero. In S5-5, the end-to-end collaborative nodes read the deviation absorption priority and the pending absorption priority based on the corrected transfer weights. When a deviation absorption priority exists, the end-to-end collaborative nodes read the occupancy of the receiving state path corresponding to the deviation absorption priority, and multiply this receiving state path occupancy by the directional entropy difference of the same cause field on the deviation state path occupancy to obtain the deviation absorption deduction amount, which is then deducted from the directional information contribution of the cause field to the deviation state. If the deduction result is less than zero, zero is written. When a pending absorption priority exists, the end-to-end collaborative nodes read the occupancy of the receiving state path corresponding to the pending absorption priority, and multiply this receiving state path occupancy by the directional entropy difference of the same cause field on the pending state path occupancy to obtain the pending absorption deduction amount, which is then deducted from the directional information contribution of the cause field on the pending state. If the deduction result is less than zero, zero is written. The end-to-end collaborative nodes write the two types of directional information contributions after deduction into the corrected directional information contribution table. In S5-6, the end-to-end collaborative nodes input the first-level status of path occupancy, the corrected orientation information contribution table, and the corrected transfer weight into the cross-decision chain. The end-to-end collaborative nodes first read the three types of path occupancy. If the path occupancy in the accepting state is greater than the path occupancy in the deviated state and greater than the path occupancy in the pending confirmation state, then the first-level status of the path occupancy is written as accepting state. If the path occupancy in the pending confirmation state and the path occupancy in the deviated state are listed first, then the first-level status of the path occupancy is written as pending confirmation state. If the path occupancy in the deviated state and the path occupancy in the accepting state are listed first, then the first-level status of the path occupancy is written as deviated state. If all three are listed first, then the first-level status of the path occupancy is written as pending confirmation state. Subsequently, the end-to-end collaborative nodes read the first-level field of the orientation information contribution for the deviated state and the first-level field of the orientation information contribution for the pending confirmation state, respectively. If the two are different cause fields and the first-level status of the path occupancy is accepting state, an accepting decision item is generated. If the first-level status of the path occupancy is not accepting state, or the two are the same cause field, or the path occupancy in the accepting state is not listed first, a pending confirmation decision item is generated. In S5-7, after generating the items to be confirmed, the end-to-end collaborative nodes determine the authorization deviation cause. If the deviation path occupancy is greater than the path occupancy of the state to be confirmed, the deviation cause table is generated by sorting the contribution of the cause field to the directional information of the deviation state from high to low, and the first field of the deviation cause table is read as the authorization deviation cause. If the path occupancy of the state to be confirmed is greater than the deviation path occupancy, the path occupancy of the state to be confirmed is generated by sorting the contribution of the cause field to the directional information of the state to be confirmed from high to low, and the first field of the first field of the first field of the first field is read as the authorization deviation cause. If the deviation path occupancy is equal to the path occupancy of the state to be confirmed, the first field of the first field is generated first. When the directional information contribution of the cause field is equal, the end-to-end collaborative nodes determine the first field in the order of actual object field, actual destination field, and action field to prevent object replacement and out-of-bounds destination from being covered by the action field. In S5-8, end-to-end collaborative nodes generate acceptance records based on acceptance criteria. These records include raw material identifier, priority number, processing facts, path occupancy in the acceptance state, corrected transfer weight, and on-chain summary, and are then written to the blockchain. End-to-end collaborative nodes also generate pending rights records based on pending rights determination criteria and authorization deviation causes. These pending rights records include raw material identifier, priority number, processing facts, path occupancy in the deviation state or pending confirmation state, authorization deviation cause, corrected directional information contribution, and on-chain summary, and are also written to the blockchain. When written to the blockchain, acceptance records indicate that the processing result can accept raw material ownership, while pending rights records indicate that the processing result requires further confirmation and are not directly entered into the acceptance chain. Through the above processing, the authorization distribution table is not directly written to the chain record in a single state. Instead, it first determines the branch to be accepted or to be confirmed by means of cause field culling, directional entropy difference, directional information contribution, absorption deduction and cross-determination chain. This allows the fields in the processing facts that lead to the deviation state or the state to be confirmed to be retained and written as the main cause of authorization deviation to the record to be confirmed.

[0023] Furthermore, a blockchain-based raw material traceability and rights confirmation system adapted to the entire food processing process includes: The record receiving module is used to receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative nodes. It combines the authorized actions, authorized objects and authorized destinations in the authorization records into the authorization scope, and combines the executed actions, actual objects and actual destinations in the processing records into the processing facts, and generates a raw material action sequence according to the order of processing occurrence. The alignment observation module, based on the raw material action sequence, aligns the authorized scope of each sequence with the processing facts, generating an action observation table that includes hit items, out-of-bounds items, and missing items. The transfer mapping module takes the action observation table as input and uses the maximum entropy Markov algorithm to map hit items, out-of-bounds items, and missing items to the transfer features of the receiving state, deviation state, and pending confirmation state, respectively. It also calculates the transfer weights between adjacent confirmation states according to the order of processing occurrence and generates an authorization transfer map. The path splitting module executes a forward-backward algorithm based on the authorization transfer graph to calculate the path occupancy of each processing order entering the acceptance state, deviation state, and pending confirmation state. It then uses the Baum-Welch update algorithm to reverse-correct the transfer weights corresponding to the hit items, out-of-bounds items, and missing items according to the path occupancy, and generates an authorization splitting table. The causal confirmation module is used to input the authorization diversion table into the transfer entropy causal detection algorithm, calculate the contribution of the processed facts to the directional information of the deviation state or the state to be confirmed, and take the first field of the directional information contribution as the main cause of authorization deviation; when the first state of the path occupancy is the acceptance state, an acceptance record is generated and written to the blockchain; when the first state of the path occupancy is the deviation state or the state to be confirmed, a record to be confirmed is generated and written to the blockchain.

[0024] The working principle of this scheme is as follows: In the end-to-end collaborative nodes, the authorization records and processing records under the same raw material identifier are first placed on the same data chain. The "how to process, what objects to process, and where to flow" are combined into the authorization scope, and the "how to process, what objects to process, and where to flow" are combined into the processing facts. Then, the processing is compared item by item according to the order of occurrence to form hit items, out-of-bounds items, and missing items, and further converted into acceptance state, deviation state, and pending confirmation state. The system then uses maximum entropy Markov, forward-backward update, and transition entropy causal detection to determine whether the processing result of each order can accept the raw material ownership, and the key fields that cause deviation or pending confirmation. Finally, the processing results that meet the authorization scope are written into the acceptance record, and the processing results that do not fall into the authorization scope or whose reasons need to be confirmed are written into the pending confirmation record and saved on the chain.

[0025] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A blockchain-based method for tracing and confirming the source of raw materials, adapted to the entire food processing process, characterized in that: include: S1. Receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative node, combine the authorized actions, authorized objects and authorized destinations in the authorization records into the authorization scope, combine the executed actions, actual objects and actual destinations in the processing records into the processing facts, and generate a raw material action sequence according to the order of processing occurrence. S2. Based on the raw material action sequence, the authorized scope of each sequence is aligned with the processing facts to generate an action observation table containing hit items, out-of-bounds items, and missing items. S3. Using the action observation table as input, the maximum entropy Markov algorithm is used to map the hit items, out-of-bounds items and missing items to the transition features of the receiving state, the deviation state and the pending confirmation state, respectively. The transition weights between adjacent confirmation states are calculated according to the order of processing occurrence, and the authorization transition map is generated. S4. Based on the authorization transfer graph, execute the forward-backward algorithm to calculate the path occupancy of each processing order entering the acceptance state, deviation state, and pending confirmation state. Then, use the Baum-Welch update algorithm to reverse the transfer weights corresponding to the hit items, out-of-bounds items, and missing items according to the path occupancy to generate the authorization diversion table. S5. Input the authorization diversion table into the transfer entropy causal detection algorithm, calculate the contribution of the processing facts to the directional information of the deviation state or the state to be confirmed, and take the first field of the directional information contribution as the main cause of authorization deviation; When the first state of path occupancy is in the accepting state, an accepting record is generated and written to the blockchain; When the first state of path occupancy is in a deviated state or a pending confirmation state, a pending confirmation record is generated and written to the blockchain.

2. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process as described in claim 1, characterized in that: S1 includes: S1-1. Receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative node, read the authorized action, authorized object and authorized destination in the authorization record, read the executed action, actual object and actual destination in the processing record, and write them into the authorization field table and fact field table respectively. S1-2. Based on the authorization field table, combine the authorized action, authorized object, and authorized destination into an authorization scope according to the field position order. Based on the fact field table, combine the executed action, actual object, and actual destination into a processing fact according to the same field position order, and generate a corresponding field table. S1-3. Sort the corresponding field table according to the processing occurrence order in the processing record, merge the authorization scope and processing facts under each order into sequence nodes, and connect the sequence nodes according to order to generate the raw material action sequence.

3. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process according to claim 2, characterized in that: S2 includes: S2-1. Based on the raw material action sequence, read the authorized scope and processing facts in each sequence in turn, write the authorized action and the executed action into the action bit, write the authorized object and the actual object into the object bit, write the authorized destination and the actual destination into the destination bit, and generate a sequence alignment table. S2-2. Perform field comparison on the action bit, object bit, and destination bit in the sequence alignment table. Write the field bit whose value matches the processing fact field into the hit item, write the field bit whose value exists in the authorization range field but does not match the processing fact field into the out-of-bounds item, and write the field bit whose value is empty in the authorization range field but exists in the processing fact field into the missing item, and generate the sequence observation item. S2-3. Collect the sequence observation items according to the processing occurrence sequence, and write the raw material identifier, sequence number, authorized scope, processing facts, hit items, out-of-bounds items and missing items into the action observation table.

4. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process according to claim 3, characterized in that: S3 includes: S3-1. Using the action observation table as input, read the hit, out-of-bounds, and missing items in each sequence bit according to the action bit, object bit, and destination bit. Write the hit item as the continuation bit, the out-of-bounds item as the deviation bit, and the missing item as the pending confirmation bit, and combine them into a sequence status code according to the bit order. S3-2. Based on the sequential status code, combine the previous sequential confirmation status, the current sequential status code, and the candidate confirmation status into a status feature pair. Calculate the number of fields occupied by the status feature pair in the acceptance state, deviation state, and pending confirmation state, and generate a maximum entropy constraint table.

5. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process according to claim 4, characterized in that: S3 further includes: S3-3. Perform the maximum entropy Markov algorithm on the maximum entropy constraint table. Set the transition weights of the receiving state, the deviating state and the unconfirmed state under the same state feature pair as the variables to be determined. Take the sum of the three types of transition weights as one and the sum of the products of each transition weight and the corresponding field occupancy as equal to the total number of fields occupied by the state feature pair as the operation constraints to obtain the order transition weight table. S3-4. Take the previous transfer weight in the priority transfer weight table as the reference weight, take the current transfer weight as the candidate weight, use the relative entropy strategy search algorithm to calculate the relative entropy reduction of the candidate weight relative to the reference weight, and generate the state transition weight by subtracting the relative entropy reduction from the candidate weight. Then connect the adjacent confirmation states, priority status codes and state transition weights according to the processing occurrence priority to form the authorization transfer diagram.

6. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process according to claim 5, characterized in that: S4 includes: S4-1. Read the sequence status code, previous confirmation status, candidate confirmation status and status transition weight of each position in the authorization transfer diagram. Write the accepting position into the accepting field, the deviation position into the deviation field, and the pending confirmation position into the pending confirmation field. Multiply the status transition weight with the accepting field, deviation field and pending confirmation field respectively to generate a bidirectional transfer table. S4-2. For the bidirectional transfer table, the forward rule of the forward-backward update algorithm with absorption proof by contradiction is adopted. The cumulative amount of the acceptance field to the acceptance state is recursively calculated according to the processing occurrence order. The last order of the deviation position and the position to be confirmed in the previous order is recorded respectively to generate the forward acceptance table.

7. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process as described in claim 6, characterized in that: S4 further includes: S4-3. By absorbing the backward rules of the forward-backward update algorithm of the proof by contradiction, the cumulative amount of the deviation field to the deviation state and the cumulative amount of the pending confirmation field to the pending confirmation state are recursively calculated in the reverse order of the processing occurrence order. The deviation absorption order of the receiving state in the subsequent order and the pending confirmation absorption order of the receiving state are recorded respectively to generate the backward proof by contradiction table. S4-4. Input the forward acceptance table and the backward proof table into the Baum-Welch correction rule of the forward-backward update algorithm for absorption proof. Subtract the cumulative amount of the deviation state from the cumulative amount of the acceptance state in the same order to obtain the path occupancy of the acceptance state. Subtract the cumulative amount of the acceptance state from the cumulative amount of the deviation state to obtain the path occupancy of the deviation state. Subtract the cumulative amount of the acceptance state from the cumulative amount of the pending confirmation state to obtain the path occupancy of the pending confirmation state. Perform reverse correction only on the state transition weights that have deviation absorption order or pending confirmation absorption order to generate the authorization distribution table.

8. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process according to claim 7, characterized in that: S5 includes: S5-1. Write the processing facts, acceptance path occupancy, deviation path occupancy, pending confirmation path occupancy, and corrected transfer weight under the same priority in the authorization distribution table into the causal sample table, and split the processing facts into the action field, actual object field, and actual destination field to generate the priority causal sample. S5-2. For sequential causal samples, the action field, actual object field, and actual destination field are used as cause fields, and the deviation path occupancy and unconfirmed path occupancy are used as result fields. Construct retained samples with retained cause fields and culling samples with removed cause fields to generate cause culling sample groups. S5-3. Input the cause-hidden sample group into the transfer entropy causal detection algorithm, calculate the conditional entropy of the result field in the retained sample and the conditional entropy of the result field in the hidden sample respectively, and use the difference between the two as the directional entropy difference of the cause field to the result field to generate a directional entropy difference table. S5-4. Based on the directional entropy difference table, multiply the directional entropy difference of the cause field on the deviation state path occupancy by the deviation state path occupancy to obtain the directional information contribution of the cause field to the deviation state. Multiply the directional entropy difference of the cause field on the path occupancy to be confirmed by the path occupancy to be confirmed to obtain the directional information contribution of the cause field to the state to be confirmed, and generate the directional information contribution table.

9. The blockchain-based raw material traceability and rights confirmation method adapted to the entire food processing process according to claim 8, characterized in that: The S5 also includes: S5-5. Based on the corrected transfer weight, read the deviation absorption order of the accepting state to the deviation state, and the pending confirmation absorption order of the accepting state to the pending confirmation state. Deduct the path occupancy of the accepting state corresponding to the deviation absorption order from the directional information contribution of the cause field to the deviation state, and deduct the path occupancy of the accepting state corresponding to the pending confirmation absorption order from the directional information contribution of the cause field to the pending confirmation state, and generate a corrected directional information contribution table. S5-6. Input the first and first states of path occupancy, the corrected orientation information contribution table, and the corrected transfer weight into the cross-determination chain. If the first and first states of path occupancy are in the acceptance state, and the path occupancy in the acceptance state is greater than both the path occupancy in the deviation state and the path occupancy in the pending confirmation state, and the first and first fields of the orientation information contribution in the deviation state and the orientation information contribution in the pending confirmation state do not point to the same cause field, then an acceptance determination item is generated; otherwise, a pending determination item is generated. S5-7. When generating the determination item to be confirmed, if the occupancy of the deviation path is greater than the occupancy of the path to be confirmed, then generate the deviation cause table according to the contribution of the cause field to the directional information of the deviation state, and read the first field of the deviation cause table as the authorized deviation cause; otherwise, generate the confirmation cause table according to the contribution of the cause field to the directional information of the state to be confirmed, and read the first field of the confirmation cause table as the authorized deviation cause. S5-8. Generate acceptance records based on acceptance criteria and write them to the blockchain. Generate rights-to-be-confirmed records based on rights-to-be-confirmed criteria and authorization deviation main causes and write them to the blockchain.

10. A blockchain-based raw material traceability and rights confirmation system adapted to the entire food processing process, characterized in that: include: The record receiving module is used to receive authorization records and processing records under the same raw material identifier at the end-to-end collaborative nodes. It combines the authorized actions, authorized objects and authorized destinations in the authorization records into the authorization scope, and combines the executed actions, actual objects and actual destinations in the processing records into the processing facts, and generates a raw material action sequence according to the order of processing occurrence. The alignment observation module, based on the raw material action sequence, aligns the authorized scope of each sequence with the processing facts, generating an action observation table that includes hit items, out-of-bounds items, and missing items. The transfer mapping module takes the action observation table as input and uses the maximum entropy Markov algorithm to map hit items, out-of-bounds items, and missing items to the transfer features of the receiving state, deviation state, and pending confirmation state, respectively. It also calculates the transfer weights between adjacent confirmation states according to the order of processing occurrence and generates an authorization transfer map. The path splitting module executes a forward-backward algorithm based on the authorization transfer graph to calculate the path occupancy of each processing order entering the acceptance state, deviation state, and pending confirmation state. It then uses the Baum-Welch update algorithm to reverse-correct the transfer weights corresponding to the hit items, out-of-bounds items, and missing items according to the path occupancy, and generates an authorization splitting table. The causal confirmation module is used to input the authorization diversion table into the transfer entropy causal detection algorithm, calculate the directional information contribution of the processed facts to the deviated state or the state to be confirmed, and take the first field of the directional information contribution as the main cause of authorization deviation; When the first state of path occupancy is in the accepting state, an accepting record is generated and written to the blockchain; When the first state of path occupancy is in a deviated state or a pending confirmation state, a pending confirmation record is generated and written to the blockchain.