An agricultural data collaborative circulation system and method based on a trusted data space
Patent Information
- Application Number
- CN202611117602.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-30
AI Technical Summary
现有技术难以量化闭环内部的复杂程度,无法有效区分简单闭环与高度冗余的闭环,对其中存在的自由度缺乏评估手段
1、本发明通过检测物质循环区块并计算基本环数量、公共边密度及简单有向环总数,量化循环结构的约束自由度指标。
Smart Images

Figure CN123015196A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data collaborative processing technology, specifically to an agricultural data collaborative circulation system and method based on a trusted data space. Background Technology
[0002] In the collaborative flow of agricultural data based on a trusted data space, participating parties perform data operations through identity authentication, data catalogs, and evidence preservation and traceability mechanisms. However, batch merging, splitting, and material recycling and reuse frequently occur in the agricultural product supply chain, leading to closed-loop dependencies between batches.
[0003] Existing technologies typically assume batch flow to be acyclic, which is insufficient when handling closed-loop dependencies. They struggle to quantify the complexity within a closed loop, fail to effectively distinguish between simple and highly redundant loops, and lack methods for assessing the degrees of freedom involved. When establishing material ownership relationships between batches, existing methods often employ fixed assignment methods, making it difficult to adaptively adjust the stringency of constraints based on the complexity of the closed loop. This can lead to situations where sufficient information is not fully utilized, or a single value is imposed when information is insufficient. Traditional methods lack quantifiable indicators and traceability mechanisms for the uncertainty of material ownership, making it difficult to transform ambiguous responsibility into clear flow control instructions, potentially impacting the reliability of compliance audits and the efficiency of data collaborative flow.
[0004] Therefore, a method is needed that can detect closed loops, quantify their complexity, adaptively establish attribution relationships, and control data flow based on uncertainty. Summary of the Invention
[0005] The purpose of this invention is to provide an agricultural data collaborative circulation system and method based on a trusted data space to solve the problems raised in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for collaborative circulation of agricultural data based on a trusted data space, comprising: Obtain the batch identifier of each batch and the component transfer record between batches. The component transfer record includes the source batch, the target batch, and the transfer parameters. Construct a batch attribution graph with the batch identifier as the node and the component transfer record as the directed edge. Detect all strongly connected components in the batch attribution graph and mark each strongly connected component as a material cycle block; analyze the cycle topology of each material cycle block and determine the constraint degree of freedom index of the material cycle block. Based on the constrained degrees of freedom index and the component transfer record, establish the constraint relationship of component attribution among batches within the block; Based on the constraints, the component attribution range of each source batch to each target batch is solved; according to the component attribution range, a non-uniqueness metric is calculated and compared with a preset traceability threshold to generate a traceability determination result. Based on the traceability determination result, the traceability conclusion of the material recycling block is obtained, and the collaborative circulation operation is performed based on the traceability conclusion.
[0007] In conjunction with the first aspect, in the first implementation of the first aspect of this application, the step of obtaining the batch identifier of each batch and the component transfer record between batches, wherein the component transfer record includes the source batch, the target batch, and transfer parameters, includes: Collect the unique number of each batch in the agricultural product supply chain as the batch identifier, and collect the transfer records of each component, which include the source batch, the target batch, and the transfer parameters.
[0008] In conjunction with the first aspect, in the second implementation of the first aspect of this application, the step of constructing a batch attribution graph using the batch identifier as a node and the component transfer record as directed edges includes: The batch identifier is added as a node to the directed graph. For the component transfer record, a directed edge is created from the source batch identifier node to the target batch identifier node, and the transfer parameter is recorded in the attribute of the directed edge. After traversing all the batch identifiers and all the component transfer records, a batch attribution graph consisting of a set of nodes and a set of directed edges is obtained.
[0009] In conjunction with the first aspect, in the third implementation of the first aspect of this application, the step of detecting all strongly connected components in the batch attribution graph and marking each strongly connected component as a material cycle block includes: The Tarjan algorithm is executed on the batch attribution graph to calculate the strongly connected component numbers of the nodes. Nodes with the same strongly connected component number and the directed edges between them are extracted as material cycle blocks. This extraction is repeated until all nodes are assigned to material cycle blocks.
[0010] In conjunction with the first aspect, in the fourth implementation of the first aspect of this application, the step of analyzing the cyclic topology of each material cycling block and determining the constraint degree-of-freedom index of the material cycling block includes: Count the number of nodes N and the number of directed edges E within the current material cycle block, and calculate the number of basic cycles B; The backtracking method is used to enumerate all non-repeating directed cycles in the material cycle block. The enumerated directed cycles are denoted as simple directed cycles, and the total number R of the simple directed cycles is recorded. Count the number of directed edges shared by any two simple directed cycles u and v, denoted as s. uv The formula for calculating the density P of the common edge is: ; Calculate the first degree of freedom index F1 based on the number of basic rings B and the density of common edges P; calculate the second degree of freedom index F2 based on the number of basic rings B and the total number of simple directed rings R; use the first degree of freedom index F1 and the second degree of freedom index F2 as constraint degree of freedom indices.
[0011] In conjunction with the first aspect, in the fifth implementation of the first aspect of this application, the step of establishing the constraint relationship of component attribution among batches within the block based on the constraint degree-of-freedom index and the component transfer record includes: The directed edges within the material cycling block form a set of directed edges Q, and these directed edges correspond to the component transfer records; the transfer parameters t corresponding to the directed edges in the component transfer records are obtained. i,j The constraint degree-of-freedom index; the constraint degree-of-freedom index includes the first degree-of-freedom index F1 and the second degree-of-freedom index F2; when F1 is 0 and F2 is 0, the initial constraint relationship L0 is: ; Among them, w i,j Assign proportional variables; When F1 is greater than 0 and F2 is less than or equal to 1, B basic cycles are extracted using the cycle basis algorithm, and the initial constraint relationship L0 is: ; Where, θ k For independent ring parameters, k=1,2,...,B,d i,j,k To adjust the coefficients, a value of 1 is assigned when the basic cycle k contains directed edges from batch i to batch j and the direction is the same as that of the basic cycle k; a value of -1 is assigned when the direction is opposite; and a value of 0 is assigned in all other cases. Additional constraints are also applied. Less than or equal to 1; When F2 is greater than 1, the initial constraint relationship L0 is: ; Where r is the radius of the interval, calculated using the following formula: ; Where, r max The maximum permissible range radius is preset, and α is the preset basic tolerance; For the batch identifier p within the aforementioned material cycling block, additional material conservation constraints and normalization constraints are applied: ; ; The initial constraint relationship L0, the matter conservation constraint, and the normalization constraint are combined to obtain the extended constraint set L1. The extended constraint set L1 is used as the constraint relationship for the component attribution between batches within the matter cycling block.
[0012] In conjunction with the first aspect, in the sixth implementation of the first aspect of this application, the step of solving the component attribution range of each source batch to each target batch based on the constraint relationship includes: For the source batch s and the target batch t, construct the contribution variable C. s,t The linear expression is obtained; based on the constraint relationship of component attribution among batches within the material cycling block, the contribution variable C is solved respectively. s,t Find the minimum and maximum values to obtain the minimum value L. s,t and maximum value U s,t , the interval [L s,t U s,t The range of components belonging to the target batch t from the source batch s.
[0013] In conjunction with the first aspect, in the seventh implementation of the first aspect of this application, the step of calculating a non-uniqueness measure based on the component attribution range and comparing it with a preset traceability threshold to generate a traceability determination result includes: For source batch s and target batch t, calculate the interval width δ based on the component attribution range. s,t ; Set the width δ of the interval within the current material cycle block as follows s,t The maximum value is used as the non-uniqueness measure D. When the non-uniqueness measure D is less than or equal to the preset traceability threshold, the traceability determination result is uniquely traceable. When the non-uniqueness measure D is greater than the preset traceability threshold, the traceability determination result is non-uniquely traceable.
[0014] In conjunction with the first aspect, in the eighth implementation of the first aspect of this application, the step of obtaining a traceability conclusion for the material recycling block based on the traceability determination result, and performing a collaborative circulation operation based on the traceability conclusion, includes: When the traceability determination result is uniquely traceable, the traceability conclusion of the material cycling block is the component attribution range [L]. s,t U s,t The system allows data within the material recycling block to participate in circulation and use; when the traceability determination result is that it is not uniquely traceable, the traceability conclusion of the material recycling block is that external verification is required, and the data within the material recycling block is prohibited from participating in circulation and use. At the same time, a manual review notice is sent to relevant personnel.
[0015] Secondly, the present invention provides an agricultural data collaborative circulation system based on a trusted data space, comprising: Data acquisition and graph construction module: includes a data acquisition unit and a graph construction unit; the data acquisition unit collects batch identifiers for each batch and component transfer records between batches; the graph construction unit constructs a batch attribution graph using batch identifiers as nodes and component transfer records as directed edges; The cycle detection and topology analysis module includes a cycle detection unit, a topology statistics unit, and a degree of freedom calculation unit. The cycle detection unit detects strongly connected components in the batch attribution graph and marks them as material cycle blocks. The topology statistics unit counts the number of nodes and directed edges within the material cycle blocks, calculates the number of basic cycles, enumerates simple directed cycles and counts their total number, and calculates the common edge density. The degree of freedom calculation unit calculates the first degree of freedom index based on the number of basic cycles and the common edge density, and calculates the second degree of freedom index based on the number of basic cycles and the total number of simple directed cycles, serving as the constraint degree of freedom index. The constraint relationship establishment module includes a proportional variable constraint unit and a conservation and normalization unit. The proportional variable constraint unit determines the constraint form of the proportional variable allocation based on the constraint degree of freedom index and establishes the corresponding constraint relationship. The conservation and normalization unit adds material conservation constraints and normalization constraints to each batch identifier and merges all constraints to obtain an extended constraint set. The attribution range solution and determination module includes a contribution variable construction unit, an extreme value solution unit, and a determination unit. The contribution variable construction unit constructs a linear expression for the contribution variable for each pair of source batches and target batches. The extreme value solution unit solves for the minimum and maximum values of the contribution variable under the extended constraint set to obtain the component attribution range. The determination unit calculates the interval width, takes the maximum value as the non-uniqueness measure, and compares it with the preset traceability threshold to generate a traceability determination result. Collaborative circulation execution module: including circulation control unit; wherein, the circulation control unit generates traceability conclusion based on traceability determination results, allows or prohibits data circulation within the material circulation block, and sends a manual review notification when prohibited.
[0016] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention quantifies the constrained degrees of freedom index of a cyclic structure by detecting material cycling blocks and calculating the number of basic loops, the density of common edges, and the total number of simple directed loops.
[0017] 2. Based on the value of the constraint degree of freedom index, the present invention adaptively adopts different forms of constraints to establish the component attribution relationship between batches, so that the constraint method matches the cyclic complexity.
[0018] 3. This invention solves the component attribution range and uses the maximum value of the interval width as a measure of non-uniqueness. It compares the result with a preset traceability threshold to generate a judgment result. Based on this, it allows or prohibits data flow and notifies the reviewer, thereby realizing the quantitative assessment and flow control of the uncertainty of responsibility attribution. Attached Figure Description
[0019] Figure 1 This is a schematic diagram illustrating the steps of an agricultural data collaborative circulation method based on a trusted data space according to the present invention. Figure 2 This is a flowchart illustrating the steps involved in establishing constraint relationships for a collaborative agricultural data circulation method based on a trusted data space, as described in this invention. Figure 3 This is a system architecture diagram of an agricultural data collaborative circulation system based on a trusted data space, according to the present invention. Detailed Implementation
[0020] 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.
[0021] Example: Figures 1-3 As shown, the present invention provides a technical solution. like Figure 1 A schematic diagram illustrating the steps of an agricultural data collaborative circulation method based on a trusted data space is shown. This invention provides an agricultural data collaborative circulation method based on a trusted data space, comprising: Step S100: Obtain the batch identifier of each batch and the component transfer record between batches. The component transfer record includes the source batch, the target batch, and the transfer parameters. Construct a batch attribution graph with the batch identifier as the node and the component transfer record as the directed edge. Specifically, a unique batch number is collected for each batch in the agricultural product supply chain as a batch identifier, and transfer records for each component are collected. The component transfer records include source batch, target batch, and transfer parameters, where the source batch is the batch identifier of the providing substance, the target batch is the batch identifier of the receiving substance, and the transfer parameters are mass percentages.
[0022] The batch identifier is added as a node to the directed graph. For the component transfer record, a directed edge is created from the source batch identifier node to the target batch identifier node, and the transfer parameter is recorded in the attribute of the directed edge. After traversing all the batch identifiers and all the component transfer records, a batch attribution graph consisting of a set of nodes and a set of directed edges is obtained.
[0023] In one specific embodiment, corn, wheat, mixed feed, chicken, and bone meal from an agricultural product supply chain are used as an example. Batch identifiers are collected: corn batch CR2026001, wheat batch WH2026002, mixed feed batch FD2026003, chicken batch CK2026004, and bone meal batch BM2026005. Component transfer records are collected: Record 1 shows source batch CR2026001, target batch FD2026003, and transfer parameter 0.5, indicating that corn accounts for 50% of the mixed feed mass; Record 2 shows source batch WH2026002, target batch FD2026003, and transfer parameter 0.5, indicating that wheat accounts for 50% of the mixed feed mass; Record 3 shows source batch FD2026003, target batch CK2026004, and transfer parameter 0.5, indicating that 50% of the mixed feed is used for production. Chicken meat; Record 4, source batch FD2026003, target batch BM2026005, transfer parameter 0.5, indicates that 50% of the mixed feed is used to produce bone meal; Record 5, source batch CK2026004, target batch BM2026005, transfer parameter 0.5, indicates that 50% of the chicken bones are processed into bone meal; Record 6, source batch BM2026005, target batch FD2026003, transfer parameter 1.0, indicates that all bone meal is recycled as raw material for mixed feed production. A batch attribution graph is constructed using each batch identifier as a node and each component transfer record as a directed edge, with the corresponding transfer parameter recorded in the attributes of each edge.
[0024] Step S200: Detect all strongly connected components in the batch attribution graph and mark each strongly connected component as a material cycle block; analyze the cycle topology of each material cycle block and determine the constraint degree of freedom index of the material cycle block. Specifically, the Tarjan algorithm is executed on the batch attribution graph to calculate the strongly connected component numbers of the nodes, extract the nodes with the same strongly connected component numbers and the directed edges between them as material cycle blocks, and repeat the extraction until all nodes are assigned to material cycle blocks.
[0025] Count the number of nodes N and the number of directed edges E within the current material cycle block, and calculate the number of basic cycles B using the following formula: ; Wherein, N is the number of batch identifiers contained in the material cycling block, E is the number of component transfer records contained in the material cycling block, and the number of basic loops B represents the minimum number of independent loops within the material cycling block; The backtracking method is used to enumerate all non-repeating directed cycles in the material cycle block. The enumerated directed cycles are denoted as simple directed cycles, and the total number R of the simple directed cycles is recorded. Count the number of directed edges shared by any two simple directed cycles u and v, denoted as s. uv The formula for calculating the density P of the common edge is: ; Based on the number of basic rings B and the density of common edges P, the index F1 of the first degree of freedom is calculated using the following formula: ; Based on the number of basic rings B and the total number of simple directed rings R, the second degree of freedom index F2 is calculated using the following formula: ; The first degree of freedom index F1 and the second degree of freedom index F2 are used as constraint degree of freedom indices, wherein the first degree of freedom index F1 represents the size of the overall adjustable variable space, and the second degree of freedom index F2 represents the redundancy of the loop structure.
[0026] In one specific embodiment, the Tarjan algorithm is executed on the constructed batch attribution graph. Nodes FD2026003, CK2026004, and BM2026005 constitute strongly connected components, marked as the material cycle block R1. The number of nodes in R1 is counted as N=3, the number of directed edges is E=4, and the number of basic cycles is calculated as B=2. A backtracking method is used to enumerate all non-repeating directed cycles in R1, resulting in two simple directed cycles: Cycle 1 is FD→CK→BM→FD, and Cycle 2 is FD→BM→FD. The total number of simple directed cycles is R=2. The number of directed edges shared by the two cycles is counted; the edge shared by Cycle 1 and Cycle 2 is FD→BM, therefore s 12 =1. Calculate the common edge density P=1, calculate the first degree of freedom index F1=4, and calculate the second degree of freedom index F2=0.6667. Use F1=4 and F2=0.6667 as the constraint degree of freedom indices.
[0027] Step S300: Based on the constrained degree of freedom index and the component transfer record, establish the constraint relationship of component attribution among batches within the block; Specifically, the directed edges within the material circulation block constitute a set of directed edges Q, and these directed edges correspond to the component transfer records; the transfer parameters t corresponding to the directed edges in the component transfer records are obtained. i,j and the constrained degrees of freedom index, wherein the transition parameter t i,j The parameter represents the transition parameter from batch i to batch j; the constraint degree of freedom index includes the first degree of freedom index F1 and the second degree of freedom index F2; when F1 is 0 and F2 is 0, the initial constraint relationship L0 is: ; Among them, w i,j Assign proportional variables; When F1 is greater than 0 and F2 is less than or equal to 1, B basic cycles are extracted using the cycle basis algorithm, and the initial constraint relationship L0 is: ; Where, θ k For independent ring parameters, k=1,2,...,B,d i,j,k To adjust the coefficients, a value of 1 is assigned when the basic cycle k contains directed edges from batch i to batch j and the direction is the same as that of the basic cycle k; a value of -1 is assigned when the direction is opposite; and a value of 0 is assigned in all other cases. Additional constraints are also applied. Less than or equal to 1; When F2 is greater than 1, the initial constraint relationship L0 is: ; Where r is the radius of the interval, calculated using the following formula: ; Where, r max The maximum permissible range radius is preset, and α is the preset basic tolerance; For the batch identifier p within the aforementioned material cycling block, additional material conservation constraints and normalization constraints are applied: ; ; The initial constraint relationship L0, the matter conservation constraint, and the normalization constraint are combined to obtain the extended constraint set L1. The extended constraint set L1 is used as the constraint relationship for the component attribution between batches within the matter cycling block.
[0028] In one specific embodiment, the directed edges within the material cycling block R1 form a set Q, containing four edges: FD→CK, FD→BM, CK→BM, and BM→FD. The corresponding transition parameters t are obtained. FD,CK =0.5,t FD,BM =0.5,t CK,BM =0.5,t BM,FD =1.0. Since F1=4>0 and F2=0.6667≤1, it belongs to the second case. Two basic cycles, B=2, are extracted using the cycle basis algorithm, and independent cycle parameters θ1 and θ2 are introduced. For each directed edge, a proportional variable w is assigned. i,j Represented as a linear combination of the transfer parameters plus θ1 and θ2, w FD,CK =0.5+θ1, w FD,BM =0.5+θ2, w CK,BM =0.5+θ1;w BM,FD =1.0 + θ1 + θ2. Additional constraint θ1 2 +θ2 2≤1. For each batch identifier p within the block, an additional material conservation constraint is applied, where w is the FD. BM,FD =w FD,CK +w FD,BM For CK as w FD,CK =w CK,BM For BM as w FD,BM +w CK,BM =w BM,FD At the same time, a normalization constraint is applied, w FD,CK +w FD,BM =1; w CK,BM =1; w BM,FD =1. The initial constraints are combined with the conservation and normalization constraints to obtain the extended constraint set L1. Normalization yields θ1 = 0.5 and θ2 = -0.5.
[0029] Step S400: Based on the constraint relationship, solve the component attribution range of each source batch to each target batch; according to the component attribution range, calculate the non-uniqueness metric and compare it with the preset traceability threshold to generate a traceability determination result; Specifically, for the source batch s and the target batch t, a contribution variable C is constructed. s,t A linear expression, wherein the linear expression is derived from the source batch s along the directed edges within the material cycle block according to the allocation ratio variable w. i,j The product is propagated to the target batch t and summed to obtain the product; Based on the constraints on component attribution among batches within the aforementioned material cycling block, the contribution variable C is solved respectively. s,t Find the minimum and maximum values to obtain the minimum value L. s,t and maximum value U s,t , the interval [L s,t U s,t The range of components belonging to the target batch t from the source batch s.
[0030] For source batch s and target batch t, calculate the interval width δ based on the component attribution range. s,t The formula is: ; Among them, U s,t L is the upper bound of the range to which the component belongs. s,t This is the lower bound of the range to which the component belongs; The interval width δ within the current material cycle block s,tThe maximum value is used as the non-uniqueness measure D. When the non-uniqueness measure D is less than or equal to the preset traceability threshold, the traceability determination result is uniquely traceable. When the non-uniqueness measure D is greater than the preset traceability threshold, the traceability determination result is non-uniquely traceable.
[0031] In one specific embodiment, taking source batch CR2026001 and target batch CK2026004 as examples, the contributing variable C CR,CK =w CR,FD ×w FD,CK , where w CR,FD =0.5 fixed, w FD,CK =0.5+θ1=1.0, therefore C CR,CK =0.5. The component belongs to a single value [0.5, 0.5] with a width of 0. Taking source batch WH2026002 and target batch CK2026004 as examples, C is obtained similarly. WH,CK =0.5. Taking source batch FD2026003 and target batch CK2026004 as an example, C FD,CK =w FD,CK =1.0, range [1,1]. The interval width of all source-target pairs is 0, so the non-uniqueness measure D=0. The preset traceability threshold is 0.2. Since 0≤0.2, a traceability determination result with unique traceability is generated.
[0032] Step S500: Based on the traceability determination result, obtain the traceability conclusion of the material recycling block, and perform collaborative circulation operation based on the traceability conclusion.
[0033] Specifically, when the traceability determination result is uniquely traceable, the traceability conclusion of the material cycling block is the component attribution range [L]. s,t U s,t The system allows data within the material recycling block to participate in circulation and use; when the traceability determination result is that it is not uniquely traceable, the traceability conclusion of the material recycling block is that external verification is required, and the data within the material recycling block is prohibited from participating in circulation and use. At the same time, a manual review notice is sent to relevant personnel.
[0034] In one specific embodiment, based on the uniquely traceable determination result, the traceability conclusion of the material recycling block R1 is the component attribution range [0.5, 0.5]. All data within R1 is allowed to participate in subsequent circulation and use, including transactions, sharing, and compliance audits. Simultaneously, the determination result, the component attribution range, and all intermediate variable records are written into the evidence storage chain.
[0035] like Figure 2The flowchart illustrates the constraint relationship establishment steps of a method for collaborative agricultural data circulation based on a trusted data space. This invention provides a method for collaborative agricultural data circulation based on a trusted data space, comprising: First, determine the set of directed edges Q within the material cycling block, and then obtain the transfer parameter t for each edge from the component transfer record. i,j Simultaneously, it reads the calculated first degree of freedom index F1 and the second degree of freedom index F2; based on the values of F1 and F2, it enters three branches. When F1=0 and F2=0, the initial constraint relationship L0 adopts an exact equation: ; When F1 > 0 and F2 ≤ 1, B basic cycles are extracted using the cycle basis algorithm, and independent cycle parameters θ are introduced. k This yields the parameterized linear expression: ; And add constraints ≤1.
[0036] When F2 > 1, calculate the interval radius r, using interval constraints: ; For each batch identifier p within the material cycling block, apply material conservation constraints and normalization constraints. Merge the initial constraint relationship L0 with the material conservation constraints and normalization constraints to obtain the extended constraint set L1, which serves as the final component attribution constraint relationship.
[0037] like Figure 3 The system architecture diagram of an agricultural data collaborative circulation system based on a trusted data space is shown. This invention provides an agricultural data collaborative circulation system based on a trusted data space, comprising: Data acquisition and graph construction module: includes a data acquisition unit and a graph construction unit; the data acquisition unit collects batch identifiers for each batch and component transfer records between batches; the graph construction unit constructs a batch attribution graph using batch identifiers as nodes and component transfer records as directed edges; The cycle detection and topology analysis module includes a cycle detection unit, a topology statistics unit, and a degree of freedom calculation unit. The cycle detection unit detects strongly connected components in the batch attribution graph and marks them as material cycle blocks. The topology statistics unit counts the number of nodes and directed edges within the material cycle blocks, calculates the number of basic cycles, enumerates simple directed cycles and counts their total number, and calculates the common edge density. The degree of freedom calculation unit calculates the first degree of freedom index based on the number of basic cycles and the common edge density, and calculates the second degree of freedom index based on the number of basic cycles and the total number of simple directed cycles, serving as the constraint degree of freedom index. The constraint relationship establishment module includes a proportional variable constraint unit and a conservation and normalization unit. The proportional variable constraint unit determines the constraint form of the proportional variable allocation based on the constraint degree of freedom index and establishes the corresponding constraint relationship. The conservation and normalization unit adds material conservation constraints and normalization constraints to each batch identifier and merges all constraints to obtain an extended constraint set. The attribution range solution and determination module includes a contribution variable construction unit, an extreme value solution unit, and a determination unit. The contribution variable construction unit constructs a linear expression for the contribution variable for each pair of source batches and target batches. The extreme value solution unit solves for the minimum and maximum values of the contribution variable under the extended constraint set to obtain the component attribution range. The determination unit calculates the interval width, takes the maximum value as the non-uniqueness measure, and compares it with the preset traceability threshold to generate a traceability determination result. Collaborative circulation execution module: including circulation control unit; wherein, the circulation control unit generates traceability conclusion based on traceability determination results, allows or prohibits data circulation within the material circulation block, and sends a manual review notification when prohibited.
[0038] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for collaborative circulation of agricultural data based on a trusted data space, characterized in that, include: Obtain the batch identifier of each batch and the component transfer record between batches, wherein the component transfer record includes the source batch, the target batch and the transfer parameters; A batch attribution graph is constructed using the batch identifier as nodes and the component transfer record as directed edges; Detect all strongly connected components in the batch attribution graph and mark each strongly connected component as a material cycle block; analyze the cycle topology of each material cycle block and determine the constraint degree of freedom index of the material cycle block. Based on the constrained degrees of freedom index and the component transfer record, establish the constraint relationship of component attribution among batches within the block; Based on the constraints, the component attribution range of each source batch to each target batch is solved; according to the component attribution range, a non-uniqueness metric is calculated and compared with a preset traceability threshold to generate a traceability determination result. Based on the traceability determination result, the traceability conclusion of the material recycling block is obtained, and the collaborative circulation operation is performed based on the traceability conclusion.
2. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The step involves obtaining the batch identifiers for each batch and the component transfer records between batches. The component transfer records include the source batch, the target batch, and transfer parameters, including: Collect the unique number of each batch in the agricultural product supply chain as the batch identifier, and collect the transfer records of each component, which include the source batch, the target batch, and the transfer parameters.
3. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The step of constructing a batch attribution graph using the batch identifier as nodes and the component transfer record as directed edges includes: The batch identifier is added as a node to the directed graph. For the component transfer record, a directed edge is created from the source batch identifier node to the target batch identifier node, and the transfer parameter is recorded in the attribute of the directed edge. After traversing all the batch identifiers and all the component transfer records, a batch attribution graph consisting of a set of nodes and a set of directed edges is obtained.
4. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The detection of all strongly connected components in the batch attribution graph, and the marking of each strongly connected component as a material cycling block, includes: The Tarjan algorithm is executed on the batch attribution graph to calculate the strongly connected component numbers of the nodes. Nodes with the same strongly connected component number and the directed edges between them are extracted as material cycle blocks. This extraction is repeated until all nodes are assigned to material cycle blocks.
5. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The analysis of the cyclic topology of each material cycling block and the determination of the constraint degrees of freedom index of the material cycling block include: Count the number of nodes N and the number of directed edges E within the current material cycle block, and calculate the number of basic cycles B; The backtracking method is used to enumerate all non-repeating directed cycles in the material cycle block. The enumerated directed cycles are denoted as simple directed cycles, and the total number R of the simple directed cycles is recorded. Count the number of directed edges shared by any two simple directed cycles u and v, denoted as s. uv The formula for calculating the density P of the common edge is: ; Calculate the first degree of freedom index F1 based on the number of basic rings B and the density of common edges P; calculate the second degree of freedom index F2 based on the number of basic rings B and the total number of simple directed rings R; use the first degree of freedom index F1 and the second degree of freedom index F2 as constraint degree of freedom indices.
6. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The step of establishing the constraint relationship between the component attribution of each batch within the block based on the constraint degree of freedom index and the component transfer record includes: The directed edges within the material cycling block form a set of directed edges Q, and these directed edges correspond to the component transfer records; the transfer parameters t corresponding to the directed edges in the component transfer records are obtained. i,j The constraint degree-of-freedom index; the constraint degree-of-freedom index includes the first degree-of-freedom index F1 and the second degree-of-freedom index F2; when F1 is 0 and F2 is 0, the initial constraint relationship L0 is: ; Among them, w i,j Assign proportional variables; When F1 is greater than 0 and F2 is less than or equal to 1, B basic cycles are extracted using the cycle basis algorithm, and the initial constraint relationship L0 is: ; Where, θ k For independent ring parameters, k=1,2,...,B,d i,j,k To adjust the coefficients, a value of 1 is assigned when the basic cycle k contains directed edges from batch i to batch j and the direction is the same as that of the basic cycle k; a value of -1 is assigned when the direction is opposite; and a value of 0 is assigned in all other cases. Additional constraints are also applied. Less than or equal to 1; When F2 is greater than 1, the initial constraint relationship L0 is: ; Where r is the radius of the interval, calculated using the following formula: ; Where, r max The maximum permissible range radius is preset, and α is the preset basic tolerance; For the batch identifier p within the aforementioned material cycling block, additional material conservation constraints and normalization constraints are applied: ; ; The initial constraint relationship L0, the matter conservation constraint, and the normalization constraint are combined to obtain the extended constraint set L1. The extended constraint set L1 is used as the constraint relationship for the component attribution between batches within the matter cycling block.
7. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The step of solving the component attribution range of each source batch to each target batch based on the constraints includes: For the source batch s and the target batch t, construct the contribution variable C. s,t The linear expression is obtained; based on the constraint relationship of component attribution among batches within the material cycling block, the contribution variable C is solved respectively. s,t Find the minimum and maximum values to obtain the minimum value L. s,t and maximum value U s,t , the interval [L s,t U s,t The range of components belonging to the target batch t from the source batch s.
8. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The step of calculating a non-uniqueness metric based on the component attribution range and comparing it with a preset traceability threshold to generate a traceability determination result includes: For source batch s and target batch t, calculate the interval width δ based on the component attribution range. s,t ; Set the width δ of the interval within the current material cycle block as follows s,t The maximum value is used as the non-uniqueness measure D. When the non-uniqueness measure D is less than or equal to the preset traceability threshold, the traceability determination result is uniquely traceable. When the non-uniqueness measure D is greater than the preset traceability threshold, the traceability determination result is non-uniquely traceable.
9. The method for collaborative circulation of agricultural data based on a trusted data space according to claim 1, characterized in that, The step of obtaining a traceability conclusion for the material recycling block based on the traceability determination result, and performing a collaborative circulation operation based on the traceability conclusion, includes: When the traceability determination result is uniquely traceable, the traceability conclusion of the material cycling block is the component attribution range [L]. s,t U s,t The system allows data within the material recycling block to participate in circulation and use; when the traceability determination result is that it is not uniquely traceable, the traceability conclusion of the material recycling block is that external verification is required, and the data within the material recycling block is prohibited from participating in circulation and use. At the same time, a manual review notice is sent to relevant personnel.
10. An agricultural data collaborative circulation system based on a trusted data space, using the agricultural data collaborative circulation method based on a trusted data space as described in any one of claims 1-9, characterized in that, include: Data acquisition and graph construction module: includes a data acquisition unit and a graph construction unit; the data acquisition unit collects batch identifiers for each batch and component transfer records between batches; the graph construction unit constructs a batch attribution graph using batch identifiers as nodes and component transfer records as directed edges; The cycle detection and topology analysis module includes a cycle detection unit, a topology statistics unit, and a degree of freedom calculation unit. The cycle detection unit detects strongly connected components in the batch attribution graph and marks them as material cycle blocks. The topology statistics unit counts the number of nodes and directed edges within the material cycle blocks, calculates the number of basic cycles, enumerates simple directed cycles and counts their total number, and calculates the common edge density. The degree of freedom calculation unit calculates the first degree of freedom index based on the number of basic cycles and the common edge density, and calculates the second degree of freedom index based on the number of basic cycles and the total number of simple directed cycles, serving as the constraint degree of freedom index. The constraint relationship establishment module includes a proportional variable constraint unit and a conservation and normalization unit. The proportional variable constraint unit determines the constraint form of the proportional variable allocation based on the constraint degree of freedom index and establishes the corresponding constraint relationship. The conservation and normalization unit adds material conservation constraints and normalization constraints to each batch identifier and merges all constraints to obtain an extended constraint set. The attribution range solution and determination module includes a contribution variable construction unit, an extreme value solution unit, and a determination unit. The contribution variable construction unit constructs a linear expression for the contribution variable for each pair of source batches and target batches. The extreme value solution unit solves for the minimum and maximum values of the contribution variable under the extended constraint set to obtain the component attribution range. The determination unit calculates the interval width, takes the maximum value as the non-uniqueness measure, and compares it with the preset traceability threshold to generate a traceability determination result. Collaborative circulation execution module: including circulation control unit; wherein, the circulation control unit generates traceability conclusion based on traceability determination results, allows or prohibits data circulation within the material circulation block, and sends a manual review notification when prohibited.
