Agricultural product detection whole-process intelligent management and control method and system based on digital twinning
By using digital twin technology to construct an intelligent management and control method for the entire process of agricultural product testing, the problem of inaccuracy in the selection of supplementary testing objects and actions has been solved, and precise supplementary testing and control of agricultural product batches has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN ZHONGAN TESTING CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-19
AI Technical Summary
In the process of testing agricultural products throughout the entire process, it is difficult to accurately determine the objects to be tested and to choose the right actions for testing. This results in the testing content not matching the actual situation, expanding the scope of testing or missing abnormal individuals.
The intelligent management and control method for the entire process of agricultural product testing based on digital twins generates batch context state and candidate state bifurcation set by constructing batch flow event chain and node semantic skeleton, determines supplementary inspection actions, performs counterfactual supplementary inspection, and generates target supplementary inspection action set and node control instructions.
This enables accurate screening of individual agricultural products within the same batch and rational selection of supplementary testing actions, reducing the need for unified supplementary testing of the entire batch of agricultural products and improving the accuracy and efficiency of testing.
Smart Images

Figure CN122243073A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin data processing technology, specifically to a method and system for intelligent control of the entire process of agricultural product testing based on digital twins. Background Technology
[0002] After harvesting, agricultural products typically go through multiple process nodes in the circulation and testing stages, including temporary storage, sorting, packaging, warehousing, transportation, and arrival re-inspection. Different process nodes correspond to different testing tasks, data sources, and processing requirements. The relevant data includes not only node testing results but also event records, processing records, and status records during the circulation process. As the circulation chain of agricultural products extends and the number of testing stages increases, it is no longer sufficient to make judgments based solely on the partial testing results of a single node to meet the needs of full-process testing management. Related technologies have begun to adopt digital modeling methods to uniformly associate batch information, individual information, node information, and circulation information, and to use digital twin technology to map, record, and update the status of agricultural products at different process nodes to support testing and judgment, supplementary testing arrangements, and node control. In the process of whole-process testing of agricultural products, there are still problems such as difficulty in accurately identifying the objects to be retested and difficulty in rationally selecting retest actions. Specifically, as follows: On the one hand, the same individual agricultural product is affected by previous circulation events, node processing, changes in packaging status, and historical test results at the current testing node. Abnormal phenomena or unclear states that appear in on-site testing often cannot be directly correlated with a unique state. Existing methods usually arrange retesting directly based on current test results or human experience, which easily leads to situations where the retest content does not correspond to the actual state and it is still difficult to distinguish the true state after retesting. On the other hand, although different agricultural products in the same batch are under the same circulation link, the nodes experienced, event impacts, and state changes of each individual are not completely consistent. Existing methods cannot unify the overall circulation background of the batch with the current test performance of the individual for continuous judgment, making it difficult to accurately screen out individuals that really need further judgment. This easily leads to situations where the scope of retesting is expanded, retesting resources are not concentrated, and abnormal individuals are missed. Summary of the Invention
[0003] The purpose of this invention is to provide a method and system for intelligent management and control of the entire process of agricultural product testing based on digital twins, so as to solve the problems mentioned in the background art, such as the difficulty in accurately determining the objects to be tested and the difficulty in rationally selecting the actions to be tested.
[0004] To achieve the above objectives, the technical solution of the present invention is: an intelligent management and control method for the entire process of agricultural product testing based on digital twins, comprising: S1. Obtain process node data and circulation event data of the target agricultural product batch, construct the batch circulation event chain according to the batch identifier, individual identifier and process node sequence, and construct a batch digital twin based on the batch circulation event chain and process node data, and configure the node semantic skeleton of each process node in the batch digital twin. Among them, the node semantic skeleton is a set of rules associated with the corresponding process node. The set of rules includes state parsing rules, state fork rules, supplementary inspection action adaptation rules, and state convergence determination rules. S2. Based on the node semantic skeleton of the target detection node, the process node data and batch flow event chain are parsed to generate the batch context state and determine the set of individuals to be judged. Individual digital twins are constructed for each agricultural product in the set of individuals to be judged, and candidate state bifurcation sets corresponding to each individual digital twin are generated based on the node semantic skeleton. Among them, the batch context state is a state representation that records the batch status, circulation background and associated constraints of the target agricultural product batch under the target detection node; the candidate state branch set is a state set consisting of multiple candidate state branches corresponding to the same agricultural product under the current detection node. S3. For each individual digital twin, based on the semantic skeleton of the node corresponding to the target detection node, determine the candidate set of supplementary inspection actions from the preset supplementary inspection action library, and distinguish and match the candidate set of supplementary inspection actions with the candidate state bifurcation set to generate the distinction relationship between supplementary inspection actions and candidate state bifurcation. Based on the distinction relationship, determine the counterfactual supplementary inspection actions for each individual digital twin and generate the target supplementary inspection action set. Among them, the distinguishing relationship is the relationship representation that records the identification and distinguishing relationships between the supplementary inspection action and different candidate state branches; the counterfactual supplementary inspection action is the supplementary inspection action that distinguishes and judges different candidate state branches in the candidate state bifurcation set. S4. Perform supplementary inspections on each agricultural product in the set of individuals to be judged according to the target supplementary inspection action set, obtain the supplementary inspection results and write them back to the individual digital twin, update the candidate state bifurcation set according to the supplementary inspection results and node semantic skeleton, determine the convergence state code of the candidate state bifurcation set, write the convergence state code back to the batch digital twin, and output the node control instruction structure. Among them, the node control instruction structure is a structured instruction data that records the control results of the batch and individual objects under the target detection node.
[0005] Preferably, in step S1, the node semantic skeleton is a node semantic configuration body loaded into the batch digital twin and associated with the corresponding process node. It is used to uniformly constrain the semantic interpretation method, candidate state bifurcation generation method, supplementary inspection action screening method, and convergence state determination method of the process node data under the corresponding process node. The node semantic skeleton and the process node are pre-configured in a one-to-one correspondence relationship. The same process node corresponds to a unique node semantic skeleton, and different process nodes correspond to different node semantic skeletons. The node semantic skeleton is switched and called as the target agricultural product batch flows between process nodes.
[0006] Preferably, in step S1, the batch digital twin is a batch-level digital mapping body that corresponds to the target agricultural product batch and carries the node semantic skeleton. The batch digital twin calls the corresponding node semantic skeleton according to the current process node of the target agricultural product batch, and uses different semantic interpretation benchmarks for the process node data of the same batch under different process nodes. The batch digital twin is configured with a node semantic skeleton index relationship, which records the correspondence between process node identifiers and node semantic skeletons, and is used to perform node semantic skeleton switching when the process node of the target agricultural product batch changes, so as to maintain the semantic consistency of the batch flow event chain, batch context state, candidate state bifurcation set, counterfactual supplementary inspection action and convergence state encoding under the corresponding process node.
[0007] Preferably, in step S2, the batch context state is a batch state representation loaded onto the target detection node and corresponding to the current flow context of the target agricultural product batch, used as the basis for determining the set of individuals to be judged; the composition dimensions of the batch context state include node state dimension, flow sequence dimension, event association dimension, and node constraint dimension; the set of individuals to be judged is the set of agricultural product individuals in the target agricultural product batch that need to enter the individual digital twin discrimination processing, used to carry the determination of candidate state bifurcation discrimination and counterfactual supplementary inspection actions; when determining the set of individuals to be judged based on the batch context state, the process node data associated with the individual identifier and the batch flow event chain are mapped to the batch context state, and agricultural product individuals that are inconsistent with the current node constraints, have non-unique state interpretations, or need further supplementary inspection are screened out to obtain the set of individuals to be judged; each agricultural product in the set of individuals to be judged maintains a one-to-one correspondence with the individual identifier and maintains association with the corresponding event record in the batch flow event chain.
[0008] Preferably, in step S2, the candidate state bifurcation set is a set of bifurcation states loaded onto the individual digital twin and corresponding to the same agricultural product individual. It is used to retain multiple candidate state branches in parallel before the re-inspection result is written back, so as to support the subsequent generation of distinguishing relationships and the determination of counterfactual re-inspection actions. The generation rule of the candidate state bifurcation set is: based on the node semantic skeleton of the target detection node, combined with the batch context state and the process node data associated with the individual identifier, multiple mutually distinguishable candidate state branches are formed for the same agricultural product individual. The state branch organization form of the candidate state bifurcation set is: each candidate state branch is organized according to the bifurcation identifier and state code, and maintains a unique connection relationship with the corresponding individual digital twin. The individual digital twin is an individual-level digital mapping body that corresponds one-to-one with each agricultural product in the set of individuals to be judged and retains the candidate state bifurcation set. Before the re-inspection result is written back, multiple candidate state branches are stored in parallel. After the re-inspection result is written back, consistent state branches are retained and inconsistent state branches are deleted according to the re-inspection result and the node semantic skeleton. The individual digital twin maintains the correspondence between the candidate state bifurcation set, the distinguishing relationship and the counterfactual re-inspection action under the same individual identifier.
[0009] Preferably, in step S3, the candidate set of supplementary inspection actions is a set of node-related actions screened from a preset supplementary inspection action library based on the semantic skeleton of the node corresponding to the target detection node, serving as the basis for generating the distinction relationship; the method for distinguishing and matching the candidate set of supplementary inspection actions with the candidate state branch set is as follows: under the same individual identifier, each candidate of supplementary inspection action is mapped to each candidate state branch in the candidate state branch set, the distinction result of each candidate of supplementary inspection action on different candidate state branches is judged, and the correspondence between the candidate of supplementary inspection action and the candidate state branch is established based on the distinction result; the expression structure of the distinction relationship includes the supplementary inspection action identifier, the branch identifier, and the distinction result; each agricultural product in the set of individuals to be distinguished corresponds to a set of candidate sets of supplementary inspection actions and a set of distinction relationships, and each set of distinction relationships is uniquely associated with the corresponding individual digital twin.
[0010] Preferably, in step S3, the rule for determining the counterfactual supplementary inspection action is: under the same individual identifier, supplementary inspection actions that form a distinction result for different candidate state branches in the candidate state bifurcation set are selected from the supplementary inspection action candidate set as counterfactual supplementary inspection actions; the rule for generating the target supplementary inspection action set is: determine the corresponding counterfactual supplementary inspection actions according to the individual identifiers in the set of individuals to be judged, and aggregate them according to the correspondence between the individual identifiers and the counterfactual supplementary inspection actions to generate a target supplementary inspection action set that corresponds one-to-one with the set of individuals to be judged; each counterfactual supplementary inspection action in the target supplementary inspection action set maintains the correspondence with the corresponding individual digital twin, the candidate state bifurcation set, and the distinction relationship.
[0011] Preferably, in step S4, the convergence state code is a state code corresponding to the update result of the candidate state bifurcation set, used as the basis for writing the state of the node control instruction structure; the generation rule of the convergence state code is as follows: after writing the supplementary inspection result back to the corresponding individual digital twin, according to the convergence judgment rule in the node semantic skeleton, perform consistency judgment on each candidate state branch in the candidate state bifurcation set, retain the candidate state branch consistent with the supplementary inspection result, and generate the corresponding convergence state code according to the retention result; wherein, the convergence judgment rule includes the consistency judgment rule between the supplementary inspection result and the candidate state branch and the retention and deletion rule of the candidate state branch; the node control instruction structure includes batch identifier, individual identifier, target detection node identifier, convergence state code and control action identifier, the convergence state code is written into the node control instruction structure according to the individual identifier and the target detection node identifier, and an association relationship is established with the corresponding control action identifier.
[0012] On the other hand, the present invention provides an intelligent management and control system for the entire process of agricultural product testing based on digital twins, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the aforementioned intelligent management and control method for the entire process of agricultural product testing based on digital twins.
[0013] Compared with the prior art, the above-mentioned technical solution of the present invention has the following beneficial technical effects: 1. In this invention, based on the joint analysis of batch digital twins, node semantic skeletons and batch context states, the overall circulation background in the same batch can be correlated with the actual state of each individual agricultural product at the current detection node. The individual agricultural products that truly need further judgment are first screened out from the whole batch of agricultural products, and then enter the subsequent supplementary inspection process, reducing the situation of uniform supplementary inspection of the whole batch of agricultural products, and making the determination of supplementary inspection objects more accurate. 2. In this invention, by constructing individual digital twins, candidate state bifurcation sets, and counterfactual supplementary inspection action determination processes, corresponding supplementary inspection actions are given to different individual agricultural products. After supplementary inspection, the candidate states are converged and the state codes are output, so that the supplementary inspection process no longer relies on human experience for selection, can distinguish the true state of the current individual more quickly, and facilitates the generation of control instructions corresponding to the current detection node. Attached Figure Description
[0014] Figure 1 This is a flowchart of an embodiment of the present invention. Detailed Implementation
[0015] Example 1, as Figure 1 As shown, the specific implementation steps of the intelligent management and control method for the entire process of agricultural product testing based on digital twins proposed in this invention are as follows: S1. Obtain process node data and circulation event data of the target agricultural product batch, construct the batch circulation event chain according to the batch identifier, individual identifier and process node sequence, and construct a batch digital twin based on the batch circulation event chain and process node data, and configure the node semantic skeleton of each process node in the batch digital twin. Among them, the node semantic skeleton is a set of rules associated with the corresponding process node. The set of rules includes state parsing rules, state fork rules, supplementary inspection action adaptation rules, and state convergence determination rules. S2. Based on the node semantic skeleton of the target detection node, the process node data and batch flow event chain are parsed to generate the batch context state and determine the set of individuals to be judged. Individual digital twins are constructed for each agricultural product in the set of individuals to be judged, and candidate state bifurcation sets corresponding to each individual digital twin are generated based on the node semantic skeleton. Among them, the batch context state is a state representation that records the batch status, circulation background and associated constraints of the target agricultural product batch under the target detection node; the candidate state branch set is a state set consisting of multiple candidate state branches corresponding to the same agricultural product under the current detection node. S3. For each individual digital twin, based on the semantic skeleton of the node corresponding to the target detection node, determine the candidate set of supplementary inspection actions from the preset supplementary inspection action library, and distinguish and match the candidate set of supplementary inspection actions with the candidate state bifurcation set to generate the distinction relationship between supplementary inspection actions and candidate state bifurcation. Based on the distinction relationship, determine the counterfactual supplementary inspection actions for each individual digital twin and generate the target supplementary inspection action set. Among them, the distinguishing relationship is the relationship representation that records the identification and distinguishing relationships between the supplementary inspection action and different candidate state branches; the counterfactual supplementary inspection action is the supplementary inspection action that distinguishes and judges different candidate state branches in the candidate state bifurcation set. S4. Perform supplementary inspections on each agricultural product in the set of individuals to be judged according to the target supplementary inspection action set, obtain the supplementary inspection results and write them back to the individual digital twin, update the candidate state bifurcation set according to the supplementary inspection results and node semantic skeleton, determine the convergence state code of the candidate state bifurcation set, write the convergence state code back to the batch digital twin, and output the node control instruction structure. Among them, the node control instruction structure is a structured instruction data that records the control results of the batch and individual objects under the target detection node.
[0016] In this embodiment S1, the node semantic skeleton is a node semantic configuration body loaded into the batch digital twin and associated with the corresponding process node. It is used to uniformly constrain the semantic interpretation method, candidate state bifurcation generation method, supplementary inspection action screening method, and convergence state determination method of the process node data under the corresponding process node. The node semantic skeleton and the process node are pre-configured in a one-to-one correspondence relationship. The same process node corresponds to a unique node semantic skeleton, and different process nodes correspond to different node semantic skeletons. The node semantic skeleton is switched and called as the target agricultural product batch flows between process nodes.
[0017] In this embodiment S1, process node data refers to the node business data formed by the target agricultural product batch at the post-harvest temporary storage node, sorting and testing node, packaging node, warehousing node, transportation node, and arrival re-inspection node. Flow event data refers to the event record data formed by the target agricultural product batch during node switching, packaging status change, spatial location change, operation processing, and flow status change. Batch identifier is used to uniquely identify the same target agricultural product batch, and individual identifier is used to uniquely identify each agricultural product individual within the batch. A one-to-many correspondence is established between batch identifier and individual identifier. Process node data, flow event data, batch flow event chain, and batch digital twin are all uniformly associated according to batch identifier and individual identifier. The batch flow event chain connects each event record into a continuous event sequence according to the process node sequence. Each event record in the event sequence contains the corresponding process node identifier, event occurrence order, batch identifier, and individual identifier associated with the event, so that the node experience, event sequence relationship, and individual relationship of the same target agricultural product batch in the whole process are continuously recorded.
[0018] In this embodiment S1, the node semantic skeleton is not a static mapping relationship for a single field, but a node semantic configuration body embedded in the batch digital twin and bound to specific process nodes. The node semantic configuration body adopts a unified interpretation standard for process node data and flow event data under the corresponding process node. Node field mapping rules are used to define the correspondence between data fields from different sources and node semantic fields. Event association rules are used to define the association between event records and process node status records, batch identifiers, and individual identifiers. State constraint rules are used to define the establishment boundaries, state conflict boundaries, and state coexistence boundaries of batch states under the same process node. Action output rules are used to define the types of processing actions that can be invoked under the corresponding process node and their output formats. This allows for the data interpretation relationship, event association relationship, and state status of the same target agricultural product batch under different process nodes. The organizational structure maintains node exclusivity; node semantic skeletons and process nodes are pre-configured in a one-to-one correspondence, with only one node semantic skeleton corresponding to the same process node, and different process nodes corresponding to different node semantic skeletons. Node semantic skeletons are registered within the batch digital twin using the process node identifier as the retrieval key. When the event record in the batch flow event chain drives the process node identifier to switch, the batch digital twin synchronously switches the node semantic skeleton corresponding to the current process node identifier. The data interpretation results formed under the node semantic skeleton before the switch are retained in the event record and status record of the corresponding process node. After the switch, the node semantic skeleton performs a new semantic interpretation on the process node data and flow event data that newly enter the process node, so that the same target agricultural product batch always records the status and events according to the rule set corresponding to the process node under different process nodes.
[0019] In this embodiment S1, there is a bidirectional constraint relationship between the batch flow event chain and the node semantic skeleton. The batch flow event chain provides the current process node and historical event order for the node semantic skeleton, while the node semantic skeleton provides node-based interpretation rules and field merging rules for event records in the batch flow event chain. After the same event record enters the batch digital twin, it first completes the attribution positioning according to the batch identifier and individual identifier, and then writes the event semantic category, node status association information and constraint boundary information according to the node semantic skeleton corresponding to the current process node. This ensures that the batch flow event chain not only maintains the continuity of event sequence, but also maintains the continuity of event semantics. As a result, the event records, status records and node records of the same target agricultural product batch within the batch digital twin are in a unified node semantic organization system.
[0020] In this embodiment S1, the rule set includes state parsing rules, state bifurcation rules, supplementary inspection action adaptation rules, and state convergence judgment rules. The state parsing rules are used to interpret the process node data and flow event data entering the batch digital twin in a node-based manner, clarifying the field meaning, state affiliation, event affiliation, and constraint boundaries of each data item under the current process node, and forming a node state record corresponding to the current node of the target agricultural product batch. The state bifurcation rules are used to separate and organize different state interpretations that may be valid for the same agricultural product individual under the current process node within the state interpretation boundaries defined by the node semantic skeleton, determining the formation conditions, branch boundaries, and branch coexistence relationships of candidate state branches, and enabling subsequent individual digital twins to retain multiple candidate state branches under the same individual identifier. The supplementary inspection action adaptation rules are used to establish node association relationships between supplementary inspection actions in the preset supplementary inspection action library and candidate state branches under the current process node. This limits which supplementary inspection actions can enter the candidate set of supplementary inspection actions for the current node, which supplementary inspection actions can correspond to candidate state branches under the current node, and which supplementary inspection actions can participate in the generation of distinguishing relationships and the determination of counterfactual supplementary inspection actions. The state convergence judgment rules are used to judge the consistency between candidate state branches and supplementary inspection results after the supplementary inspection results are written back. This limits the retention conditions, deletion conditions, and unique convergence conditions of candidate state branches, and determines the generation basis of convergence state codes after the consistency judgment is completed. This ensures that the node semantic skeleton completes the continuous rule constraints of data interpretation, state bifurcation, action filtering, and state convergence in the same process node.
[0021] In this embodiment S1, the batch digital twin is a batch-level digital mapping body that corresponds to the target agricultural product batch and carries the node semantic skeleton. The batch digital twin calls the corresponding node semantic skeleton according to the current process node of the target agricultural product batch, and uses different semantic interpretation benchmarks for the process node data of the same batch under different process nodes. The batch digital twin is configured with a node semantic skeleton index relationship, which records the correspondence between the process node identifier and the node semantic skeleton, and is used to perform node semantic skeleton switching when the process node of the target agricultural product batch changes, so as to maintain the semantic consistency of the batch flow event chain, batch context state, candidate state bifurcation set, counterfactual supplementary inspection action and convergence state encoding under the corresponding process node.
[0022] In this embodiment S1, the batch digital twin is a batch-level digital mapping entity that corresponds one-to-one with the target agricultural product batch. The batch digital twin uses the batch identifier as the primary index and the individual identifier as the subordinate index, correspondingly receiving process node data, flow event data, and all event records in the batch flow event chain. The batch digital twin internally sets up a batch basic information area, a process node record area, an event chain record area, and a node semantic skeleton configuration area. The batch basic information area records the attribution relationship between the batch identifier and the individual identifier; the process node record area records the node status records formed under each process node; the event chain record area records event records connected in sequence according to the process nodes; and the node semantic skeleton configuration area records the node semantic skeleton corresponding to each process node and its calling relationship. This gives the batch digital twin the basic carrying structure for a process-wide digital mapping of the target agricultural product batch. The method of loading node semantic skeletons is not to apply a single interpretation rule to the same batch. Instead, the batch digital twin configures node semantic skeleton index relationships according to process node identifiers within the batch digital twin. The node semantic skeleton index relationship records the unique correspondence between process node identifiers and node semantic skeletons. When a target agricultural product batch enters different process nodes, the batch digital twin calls the corresponding node semantic skeleton according to the current process node identifier and performs node-based interpretation on the process node data and flow event data formed under that process node. This allows the data formed under the post-harvest temporary storage node, the sorting and inspection node, the packaging node, the warehousing node, the transportation node, and the arrival re-inspection node to be interpreted and written according to their respective node semantic skeletons. As a result, the same target agricultural product batch uses different semantic interpretation benchmarks under different process nodes.
[0023] In this embodiment S1, the node semantic skeleton index relationship in the batch digital twin is continuously updated with the switching of process nodes. After the process node identifier corresponding to the current event is recorded in the batch flow event chain, the batch digital twin completes index matching and switches to the corresponding node semantic skeleton according to the process node identifier. After the switching action is completed, the process node data under the current process node is written into the node status record and event chain record according to the current node semantic skeleton. The status record and event record already formed under the previous process node retain the original node semantic attributes. The record content under different process nodes does not merge, so that the same target agricultural product batch forms a segmented digital mapping by node and a continuous digital mapping by batch during the cross-node flow process. Structure: The batch digital twin maintains batch-level semantic consistency through node semantic skeleton indexing relationships. Batch-level semantic consistency means that the process node data, flow event data, node status records, and event records formed under any process node for the same target agricultural product batch are all interpreted, recorded, and associated according to the node semantic skeleton corresponding to that process node. Different interpretation benchmarks are allowed for the same type of data under different process nodes, but a unified interpretation benchmark is maintained under the same process node. Based on this, the batch digital twin avoids the confusion of field meanings, event categories, and state boundaries between different process nodes, so that the target agricultural product batch always maintains semantic consistency within nodes and clear switching between nodes during the entire process of digital mapping.
[0024] In this embodiment S2, the batch context state is a batch state representation loaded onto the target detection node and corresponding to the current flow context of the target agricultural product batch, used as the basis for determining the set of individuals to be judged; the composition dimensions of the batch context state include node state dimension, flow sequence dimension, event association dimension, and node constraint dimension; the set of individuals to be judged is the set of agricultural product individuals in the target agricultural product batch that need to enter the individual digital twin discrimination processing, used to carry the determination of candidate state bifurcation discrimination and counterfactual supplementary inspection actions; when determining the set of individuals to be judged based on the batch context state, the process node data associated with the individual identifier and the batch flow event chain are mapped to the batch context state, and agricultural product individuals that are inconsistent with the current node constraints, have non-unique state interpretations, or need further supplementary inspection are screened out to obtain the set of individuals to be judged; each agricultural product in the set of individuals to be judged maintains a one-to-one correspondence with the individual identifier and maintains association with the corresponding event record in the batch flow event chain.
[0025] In this embodiment S2, the target detection node is the process node currently entering the individual discrimination process. The data entering the processing scope of S2 is limited to the process node data corresponding to the target detection node and the batch flow event chain records that have temporal and event associations with the target detection node. When the process node data enters the parsing process, it first completes the attribution location according to the batch identifier and individual identifier, and then completes the node field interpretation, event semantic interpretation, and state constraint interpretation according to the node semantic skeleton corresponding to the target detection node. In this parsing process, the batch flow event chain provides the node experience sequence, event occurrence sequence, and historical event background associated with the individual identifier before the target agricultural product batch arrives at the target detection node. In this parsing process, the node semantic skeleton limits the field meanings that can be accepted, the scope of events that can be associated, the state boundaries that can be established, and the constraint relationships that can be inherited under the current node. Thus, the process node data under the target detection node is no longer processed as an independent data fragment, but enters the node interpretation process together with the event records under the same batch, the same individual, and the same node boundary in the batch flow event chain.
[0026] In this embodiment S2, the batch context state is not a single node state value, nor is it a direct summary of the target detection node data. Instead, it is a batch-level state representation formed after the target agricultural product batch is parsed by the node semantic skeleton under the target detection node. The batch context state consists of node state dimension, flow sequence dimension, event association dimension, and node constraint dimension. The node state dimension records the batch state information of the target agricultural product batch under the current node. The flow sequence dimension records the node sequence relationship and event sequence relationship before the target agricultural product batch arrives at the current node. The event association dimension records the event records associated with the current node state and their associated paths. The node constraint dimension records the constraint content of the batch state establishment boundary, state interpretation boundary, and individual selection boundary under the current node. Each dimension enters the batch context state in parallel, but they all act on the same batch object during interpretation. This ensures that the batch context state not only maintains the meaning of the current state under the target detection node, but also maintains the coherent relationship between the state and the flow background, event background, and node constraints.
[0027] In this embodiment S2, the set of individuals to be judged is not a mechanical merging of all agricultural product individuals in the target agricultural product batch, but rather a set of agricultural product individuals that have entered the scope of individual digital twin judgment processing based on the batch context state. The batch context state is determined by mapping the process node data corresponding to the individual identifier and the corresponding event record in the batch flow event chain to the batch context state. The consistency between the current state of the individual and the node constraint is checked according to the node constraint dimension. The uniqueness of the explanation of the current state of the individual and the historical event background is checked according to the event association dimension. The current state of the individual forms a single explanation result according to the node state dimension and the flow sequence dimension. Agricultural product individuals that are inconsistent with the current node constraint, whose state explanation is not unique, or that need further judgment are screened out and included in the set of individuals to be judged. Each agricultural product in the resulting set of individuals to be judged is one-to-one with the individual identifier and one-to-one with the corresponding event record in the batch flow event chain, so that the objects entering the scope of individual judgment processing maintain a unified source in the identifier layer, event layer, and state layer.
[0028] In this embodiment S2, the relationship between the batch context state and the set of individuals to be judged is not a one-way reference, but a constraint relationship between the batch-level interpretation result and the individual-level processing range. The batch context state provides the screening boundary that can enter the individual judgment processing under the target detection node. The set of individuals to be judged maintains the specific landing point of this screening boundary at the individual level. Each agricultural product individual entering the set of individuals to be judged neither deviates from the current interpretation boundary of the target detection node, nor deviates from the historical background boundary of the corresponding event record in the batch flow event chain. Thus, the individual-level processing is based on the batch-level interpretation result and uses the batch context state as the source basis, avoiding the separation of the individual digital twin judgment processing from the overall state, flow background and constraint relationship of the target agricultural product batch under the current node.
[0029] In this embodiment S2, the candidate state bifurcation set is a set of bifurcation states loaded onto the individual digital twin and corresponding to the same agricultural product individual. It is used to retain multiple candidate state branches in parallel before the re-inspection result is written back, so as to support the subsequent generation of distinguishing relationships and the determination of counterfactual re-inspection actions. The generation rule of the candidate state bifurcation set is: based on the node semantic skeleton of the target detection node, combined with the batch context state and the process node data associated with the individual identifier, multiple mutually distinguishable candidate state branches are formed for the same agricultural product individual. The state branch organization form of the candidate state bifurcation set is: each candidate state branch is organized according to the bifurcation identifier and state code, and maintains a unique connection relationship with the corresponding individual digital twin. The individual digital twin is an individual-level digital mapping body that corresponds one-to-one with each agricultural product in the set of individuals to be judged and retains the candidate state bifurcation set. Before the re-inspection result is written back, multiple candidate state branches are stored in parallel. After the re-inspection result is written back, consistent state branches are retained and inconsistent state branches are deleted according to the re-inspection result and the node semantic skeleton. The individual digital twin maintains the correspondence between the candidate state bifurcation set, the distinguishing relationship and the counterfactual re-inspection action under the same individual identifier.
[0030] In this embodiment S2, the individual digital twin is an individual-level digital mapping body established in a one-to-one correspondence with each agricultural product in the set of individuals to be judged. The individual digital twin uses the individual identifier as a unique index and carries the process node data related to the individual under the target detection node, the individual association interpretation results in the batch context state, and the event records corresponding to the individual in the batch flow event chain. After the individual digital twin is established, it does not directly give a single state conclusion, but forms a branching state carrying space for the agricultural product individual under the constraint of the individual identifier. The individual digital twin maintains a mapping relationship with the batch digital twin. The batch digital twin provides the batch-level interpretation boundary and node semantic boundary of the current node. The individual digital twin undertakes individual-level state retention and individual-level state discrimination within this boundary, so that different individuals under the same target agricultural product batch form mutually independent individual-level digital mapping records.
[0031] In this embodiment S2, the candidate state bifurcation set is not a regular list of candidate states, but rather a set of bifurcation states of the same individual retained within the individual digital twin. The candidate state bifurcation set exists as follows: before the supplementary inspection result enters the individual digital twin, multiple candidate state branches corresponding to the same individual identifier are simultaneously retained within the individual digital twin. These multiple candidate state branches represent different possible state interpretations for the same agricultural product individual under the current detection node. Therefore, the candidate state bifurcation set constitutes the bifurcation state retention result for that individual under the current node. This bifurcation state retention result is not an arbitrary selection of states, but... This approach maintains multiple candidate state branches simultaneously in parallel, ensuring that the individual digital twin retains a multi-state structure at the current node. This state structure serves as the basis for distinguishing between relation generation and counterfactual supplementary checks. The generation rules for candidate state bifurcation sets are based on the joint interpretation of node semantic skeleton, batch context state, and individual process node data. The node semantic skeleton provides the allowed state interpretation criteria and state bifurcation rules at the current target detection node, while the batch context state provides the overall state, event background, and constraint boundaries of the batch to which the agricultural product belongs at the current node. The process node data associated with the individual identifier provides an individual-level state representation of the agricultural product at the current node. After all three enter the candidate state bifurcation generation process, multiple distinct candidate state branches are formed for the same agricultural product. The distinction is reflected in the fact that each candidate state branch corresponds to a different state interpretation path, a different event association path, or a different node constraint matching path. This ensures that each state branch in the candidate state bifurcation set has both a common individual affiliation basis and distinct state boundaries. The state branches in the candidate state bifurcation set are organized according to the bifurcation identifier and the state code. The bifurcation identifier is used to distinguish the identity boundaries of different candidate state branches within the same individual digital twin, and the state code is used to mark the state content boundaries of each candidate state branch. After organization, each candidate state branch maintains a unique association with the corresponding individual digital twin. All candidate state branches in the same candidate state bifurcation set belong only to the individual digital twin corresponding to the same individual identifier. The candidate state bifurcation sets between different individual digital twins are independent of each other. This ensures that the candidate state bifurcation sets do not mix at the state organization level, identifier affiliation level, and digital mapping level, so that the individual-level state retention always revolves around the same agricultural product.
[0032] In this embodiment S2, the individual digital twin not only retains the candidate state bifurcation set, but also maintains the correspondence between the candidate state bifurcation set, the distinguishing relationship, and the counterfactual supplementary inspection action under the same individual identifier. This correspondence is maintained as follows: after each candidate state branch is formed, the corresponding bifurcation identifier and state code are saved using the individual identifier as the primary index. Within the individual digital twin, a position is reserved for writing the distinguishing relationship and the counterfactual supplementary inspection action for each candidate state branch. This ensures that the state retention, relationship retention, and action retention within the same individual digital twin always revolve around the same individual identifier, thereby guaranteeing that the state bifurcation, state distinguishing, and supplementary inspection actions formed by the same agricultural product individual under the current detection node belong to the same object boundary. The individual digital twin maintains the state... In terms of processing relationships, it manifests as a pre-retention and post-screening organizational approach. Pre-retention refers to the fact that before the supplementary inspection results enter the individual digital twin, multiple candidate state branches in the candidate state bifurcation set are simultaneously in a retained state and together constitute the current individual's bifurcation state set. Post-screening refers to the fact that after the supplementary inspection results enter the individual digital twin and interact with the node semantic skeleton, consistency screening is performed on the candidate state branches in the candidate state bifurcation set. State branches that are inconsistent with the supplementary inspection results are deleted from the individual digital twin, while state branches that are consistent with the supplementary inspection results are retained as the unique retained result of the individual's current state. This pre-retention and post-screening state processing relationship enables the individual digital twin to have both the ability to have multiple states coexist and the ability to converge states under the current detection node.
[0033] In this embodiment S2, the fork identifier is an identifier field set in the candidate state fork set to distinguish different candidate state branches in the same individual digital twin. The state code is the state record code written corresponding to each candidate state branch. The fork identifier and the state code together constitute the organizational basis of the candidate state branches. The fork identifier is used to maintain the boundary independence of different candidate state branches under the same individual identifier. The state code is used to record the state content boundary and state attribution result corresponding to each candidate state branch. When the candidate state fork set is written into the individual digital twin, each candidate state branch is registered in the combination of the fork identifier and the state code, and maintains a continuous correspondence with the same individual identifier in the subsequent process of generating the distinguishing relationship, determining the counterfactual supplementary check action, and forming the convergent state code.
[0034] In this embodiment S3, the candidate set of supplementary inspection actions is a set of node-related actions screened from a preset supplementary inspection action library based on the semantic skeleton of the node corresponding to the target detection node, which serves as the basis for generating the distinction relationship. The method of distinguishing and matching the candidate set of supplementary inspection actions with the candidate state branch set is as follows: under the same individual identifier, each candidate supplementary inspection action is mapped to each candidate state branch in the candidate state branch set, the distinction result of each candidate supplementary inspection action on different candidate state branches is judged, and the correspondence between the candidate supplementary inspection action and the candidate state branch is established based on the distinction result. The expression structure of the distinction relationship includes the supplementary inspection action identifier, the branch identifier, and the distinction result. Each agricultural product in the set of individuals to be distinguished corresponds to a set of candidate supplementary inspection actions and a set of distinction relationships, and each set of distinction relationships is uniquely associated with the corresponding individual digital twin.
[0035] In this embodiment S3, the preset supplementary inspection action library is a set of action records pre-established according to the supplementary inspection processing actions that can be executed by the target detection node. Each supplementary inspection action in the action record set maintains a node association relationship with the node semantic skeleton of the target detection node. The supplementary inspection action adaptation rules in the node semantic skeleton perform node-based constraints on the action type, action application boundary, action target, and action output form in the supplementary inspection action library. The supplementary inspection action candidate set is not all the results after directly calling the actions in the supplementary inspection action library, but rather a set of node-related actions screened from the preset supplementary inspection action library under the node semantic skeleton constraints corresponding to the target detection node, according to the node interpretation boundary of the current target detection node, the state branch composition of the candidate state bifurcation set, and the individual identifier affiliation relationship of the individual digital twin. This ensures that the supplementary inspection action maintains semantic consistency with the current target detection node and object consistency with the current individual digital twin discrimination boundary.
[0036] In this embodiment S3, the processing boundary is established on individual digital twins rather than the entire batch. Each agricultural product in the set of individuals to be judged corresponds to an independent individual digital twin. Each individual digital twin, under the same individual identifier, undertakes the candidate set of supplementary inspection actions, the candidate state branch set, and the distinguishing relationship. The determination of the candidate set of supplementary inspection actions, the execution of distinguishing matching, and the generation of distinguishing relationships are all carried out one by one with individual digital twins as the object. The batch digital twin maintains the batch-level semantic boundary and the node-level interpretation boundary. Within this boundary, the individual digital twin performs individual-level supplementary inspection action screening and state distinguishing processing, so that the source of supplementary inspection actions, the range of state branches, and the distinguishing results of different agricultural product individuals under the same target detection node always belong to the corresponding individual identifier, thereby avoiding the mixing of state branches and action relationships between different individuals.
[0037] In this embodiment S3, the distinction matching between the candidate set of supplementary inspection actions and the candidate set of candidate state bifurcations is not a simple action correspondence, nor is it a mechanical traversal of the candidate set of candidate state bifurcations. Instead, within the same individual identifier boundary, each candidate state branch in the candidate set of candidate state bifurcations is used as the state distinction object, and each supplementary inspection action candidate in the candidate set of supplementary inspection actions is used as the action discrimination object. For each supplementary inspection action candidate, it is determined whether it forms a distinction result for different candidate state branches. The distinction result records the distinguishable and indistinguishable situations of the supplementary inspection action candidate when facing different candidate state branches, as well as the corresponding state branch boundary. After the distinction matching is completed, the supplementary inspection action identifier, bifurcation identifier, and distinction result are jointly written into the distinction relationship to form the supplementary inspection action. The relationship between the candidate state branches is represented in a way that maintains both the action source boundary and the state branch boundary, and is uniquely associated with the corresponding candidate state bifurcation set within the same individual digital twin. Both the supplementary inspection action candidate set and the differentiation relationship are grouped according to individual identifiers. Each agricultural product in the set of individuals to be judged corresponds to a set of supplementary inspection action candidate sets and a set of differentiation relationships. The same set of supplementary inspection action candidate sets only performs differentiation matching on the candidate state bifurcation set in the corresponding individual digital twin. The same set of differentiation relationships only records the relationship results between the supplementary inspection action candidates and the candidate state branches within the corresponding individual digital twin. The supplementary inspection action candidate sets and differentiation relationships between different individuals are grouped and maintained independently and respectively attached to the corresponding individual digital twin.
[0038] In this embodiment S3, the distinction result is the judgment result record formed after the candidate supplementary inspection action performs distinction matching on the candidate state branch. The distinction result does not correspond to the execution state of the supplementary inspection action itself, but corresponds to the judgment conclusion of whether the supplementary inspection action forms a distinguishable state boundary for different candidate state branches. When the distinction result is written into the distinction relationship, it together with the supplementary inspection action identifier and the fork identifier constitutes a complete relationship record, so that each candidate state branch in the same individual digital twin corresponds to the distinction judgment result under the specific supplementary inspection action. The subsequent screening of counterfactual supplementary inspection actions is carried out based on the distinction result. Supplementary inspection actions that form a distinction result are retained, and supplementary inspection actions that cannot form a distinction result are excluded.
[0039] In this embodiment S3, the rule for determining the counterfactual supplementary inspection action is: under the same individual identifier, supplementary inspection actions that form a distinction result for different candidate state branches in the candidate state bifurcation set are selected from the supplementary inspection action candidate set as counterfactual supplementary inspection actions; the rule for generating the target supplementary inspection action set is: determine the corresponding counterfactual supplementary inspection actions according to the individual identifiers in the set of individuals to be judged, and aggregate them according to the correspondence between the individual identifiers and the counterfactual supplementary inspection actions to generate a target supplementary inspection action set that corresponds one-to-one with the set of individuals to be judged; each counterfactual supplementary inspection action in the target supplementary inspection action set maintains the correspondence with the corresponding individual digital twin, the candidate state bifurcation set, and the distinction relationship.
[0040] In this embodiment S3, the counterfactual supplementary inspection action is not an arbitrary supplementary inspection action that enters the candidate set of supplementary inspection actions, nor is it all supplementary inspection actions that can be executed under the current node. Instead, it is a supplementary inspection action that is retained after being filtered by the differentiation relationship under the same individual identifier. The difference between the counterfactual supplementary inspection action and the general supplementary inspection action is that it is not based on the fact that the action itself can be executed, but on whether the action forms a differentiation result for different candidate state branches in the candidate state bifurcation set. Only supplementary inspection actions that can form a differentiation result for different candidate state branches within the corresponding individual digital twin enter the scope of the counterfactual supplementary inspection action. This makes the counterfactual supplementary inspection action correspond to the individual digital twin at the object boundary and at the state boundary. The corresponding candidate state bifurcation set corresponds to the distinction relationship on the relation boundary; the determination rule of counterfactual supplementary inspection action is expanded with the individual identifier as the organizational boundary. After the distinction relationship is formed in the same individual digital twin, each supplementary inspection action candidate in the supplementary inspection action candidate set is screened according to the distinction result corresponding to the supplementary inspection action identifier. During the screening process, whether different candidate state branches can be distinguished by the current supplementary inspection action is used as the criterion. Supplementary inspection action candidates that cannot form a distinction result are not included in the counterfactual supplementary inspection action, and supplementary inspection action candidates that can form a distinction result are retained as counterfactual supplementary inspection actions. Thus, the counterfactual supplementary inspection action is not given by the action library, but is the individual-level supplementary inspection action result formed by the distinction relationship screening.
[0041] In this embodiment S3, the target supplementary inspection action set is an action set formed by aggregating counterfactual supplementary inspection actions one by one according to the individual identifiers in the set of individuals to be judged. The generation of the target supplementary inspection action set is not a simple splicing of all counterfactual supplementary inspection actions, but is organized according to the correspondence between individual identifiers and counterfactual supplementary inspection actions. During aggregation, the counterfactual supplementary inspection actions selected under each individual digital twin are written into the action record position of the corresponding individual identifier, and a set structure is formed according to the order of individual identifiers in the set of individuals to be judged, so that the target supplementary inspection action set and the set of individuals to be judged maintain a one-to-one correspondence, and each agricultural product individual obtains a candidate state score under the target detection node. The results of the supplementary inspection actions matched by the cross set; after the formation of each counterfactual supplementary inspection action in the target supplementary inspection action set, the correspondence between the individual digital twin, the candidate state bifurcation set, and the distinguishing relation continues. The individual digital twin provides the individual affiliation boundary of the counterfactual supplementary inspection action, the candidate state bifurcation set provides the state distinguishing boundary of the counterfactual supplementary inspection action, and the distinguishing relation provides the screening source boundary of the counterfactual supplementary inspection action. The three, together with the counterfactual supplementary inspection action, are organized around the same individual identifier, so that the action source, state branch, and relation result of the same agricultural product individual are always within the same object chain, thereby ensuring that the target supplementary inspection action set maintains clear individual boundaries, clear action affiliation, and clear state distinguishing basis when outputting.
[0042] In this embodiment S4, the convergence state code is the state code corresponding to the update result of the candidate state bifurcation set, and is used as the basis for writing the state of the node control instruction structure. The generation rule of the convergence state code is as follows: after writing the supplementary inspection result back to the corresponding individual digital twin, according to the convergence judgment rule in the node semantic skeleton, the consistency judgment is performed on each candidate state branch in the candidate state bifurcation set, the candidate state branch consistent with the supplementary inspection result is retained, and the corresponding convergence state code is generated according to the retention result. Among them, the convergence judgment rule includes the consistency judgment rule between the supplementary inspection result and the candidate state branch and the retention and deletion rule of the candidate state branch. The node control instruction structure includes batch identifier, individual identifier, target detection node identifier, convergence state code and control action identifier. The convergence state code is written into the node control instruction structure according to the individual identifier and the target detection node identifier, and an association relationship is established with the corresponding control action identifier.
[0043] In this embodiment S4, the convergence state code is a state code formed based on the update result of the candidate state bifurcation set after the supplementary inspection result is written back to the corresponding individual digital twin. The convergence state code does not correspond to the original detection value, nor to a single event record, but corresponds to the unique retained state of the same agricultural product individual after the supplementary inspection result screening under the current target detection node. The convergence state code corresponds one-to-one with the individual identifier on the object boundary, one-to-one with the target detection node on the node boundary, and one-to-one with the update result of the candidate state bifurcation set on the state boundary. Thus, the convergence state code becomes the state writing result after the individual digital twin completes the state screening, and becomes the direct writing basis for the state field in the subsequent node control instruction structure; The generation of convergence state codes is based on the combined effects of writing back the supplementary inspection results, updating the candidate state bifurcation set, and determining the node semantic skeleton. After the supplementary inspection results enter the corresponding individual digital twin, all candidate state branches are no longer retained in parallel. Instead, the supplementary inspection results are matched one by one with each candidate state branch retained in the current individual digital twin. State screening is performed according to the convergence determination rules in the node semantic skeleton. After screening, the candidate state branch that is consistent with the supplementary inspection results is taken as the retained state of the current individual under the target detection node. A unique convergence state code is generated based on the retained state. The convergence state code is not a preset label or an arbitrary assignment result, but a coded state result after the candidate state bifurcation set has been screened.
[0044] In this embodiment S4, the convergence determination rules include consistency determination rules between the supplementary inspection results and candidate state branches, and retention and deletion rules for candidate state branches. The consistency determination rules are used to check whether the supplementary inspection results and each candidate state branch satisfy the same state interpretation boundary, the same node constraint boundary, and the same state encoding boundary. The retention and deletion rules are used to perform retention processing on candidate state branches that are consistent with the supplementary inspection results and to perform deletion processing on candidate state branches that are inconsistent with the supplementary inspection results after the consistency determination is completed, so that the multiple candidate state branches that were originally retained in parallel in the same digital twin converge into a unique retention result. The convergence state encoding is written according to the unique retention result, thereby transforming the candidate state bifurcation set from the bifurcation retention state to the convergence retention state.
[0045] In this embodiment S4, the node control instruction structure is a structured instruction data organized around batch identifier, individual identifier, target detection node identifier, convergence status code, and control action identifier. The convergence status code is used as a status writing field in the node control instruction structure. Together with the individual identifier, it determines the status belonging object; together with the target detection node identifier, it determines the status belonging node; and together with the control action identifier, it determines the processing result corresponding to the status. When the node control instruction structure is generated, the corresponding individual digital twin is first located based on the individual identifier, and then the current node boundary is located based on the target detection node identifier. The convergence status code generated under the current node is written into the corresponding field, and the structured instruction record is completed according to the correspondence between the convergence status code and the control action identifier, so that the same agricultural product individual is at the current target detection node. The convergence results and control results formed under the same structure maintain a unified writing relationship. The batch identifier in the node control instruction structure is used to identify the target agricultural product batch to which the structured instruction data belongs, the individual identifier is used to identify the specific agricultural product individual corresponding to the structured instruction data, the target detection node identifier is used to identify the node position where the current state convergence and result writing are completed, the convergence state code is used to record the unique state result of the current agricultural product individual after supplementary inspection and screening under this node, and the control action identifier is used to record the processing action result corresponding to the convergence state code. The batch identifier, individual identifier, target detection node identifier, convergence state code, and control action identifier coexist in the same structured record, so that the node control instruction structure simultaneously has object ownership information, node ownership information, state ownership information, and action ownership information.
[0046] In this embodiment S4, the control action identifier is an action field written into the node control instruction structure corresponding to the convergence state code. The control action identifier, batch identifier, individual identifier, target detection node identifier, and convergence state code together constitute the instruction record content in the node control instruction structure. After the convergence state code is formed, the matching control action identifier is written according to the state result corresponding to the convergence state code, so that the state field and action field in the node control instruction structure maintain a one-to-one correspondence. The control action identifier thus becomes the action expression field when the convergence state code is converted into the node processing result, and it is consistent with the boundary of the target detection node and the boundary of the individual identifier.
[0047] In this embodiment S4, a direct generation association is maintained between the convergence state code and the node control instruction structure. This generation association is manifested as follows: after each convergence state code is generated, it is written into the node control instruction structure according to the corresponding individual identifier and target detection node identifier. The state field in the node control instruction structure does not accept the original state result that has not been screened by the candidate state bifurcation set, but only accepts the convergence state code generated according to the convergence judgment rule. This ensures that the state result in the node control instruction structure always corresponds to the individual-level result that has completed the state screening, thereby ensuring that the convergence result in the node control instruction structure is consistent with the convergence result in the individual digital twin at the object boundary, node boundary, and state boundary.
[0048] Example 2: The intelligent management and control system for the entire process of agricultural product testing based on digital twins proposed in this invention is applied to the intelligent management and control method for the entire process of agricultural product testing based on digital twins proposed in Example 1. It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the intelligent management and control method for the entire process of agricultural product testing based on digital twins in Example 1.
[0049] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A digital-twin-based intelligent management and control method for the whole process of agricultural product detection, characterized in that, Includes the following steps: S1. Obtain process node data and circulation event data of the target agricultural product batch, construct the batch circulation event chain according to the batch identifier, individual identifier and process node sequence, and construct a batch digital twin based on the batch circulation event chain and process node data, and configure the node semantic skeleton of each process node in the batch digital twin. Among them, the node semantic skeleton is a set of rules associated with the corresponding process node. The set of rules includes state parsing rules, state fork rules, supplementary inspection action adaptation rules, and state convergence determination rules. S2. Based on the node semantic skeleton of the target detection node, the process node data and batch flow event chain are parsed to generate the batch context state and determine the set of individuals to be judged. Individual digital twins are constructed for each agricultural product in the set of individuals to be judged, and candidate state bifurcation sets corresponding to each individual digital twin are generated based on the node semantic skeleton. Among them, the batch context state is a state representation that records the batch status, circulation background and associated constraints of the target agricultural product batch under the target detection node; the candidate state branch set is a state set consisting of multiple candidate state branches corresponding to the same agricultural product under the current detection node. S3. For each individual digital twin, based on the semantic skeleton of the node corresponding to the target detection node, determine the candidate set of supplementary inspection actions from the preset supplementary inspection action library, and distinguish and match the candidate set of supplementary inspection actions with the candidate state bifurcation set to generate the distinction relationship between supplementary inspection actions and candidate state bifurcation. Based on the distinction relationship, determine the counterfactual supplementary inspection actions for each individual digital twin and generate the target supplementary inspection action set. Among them, the distinguishing relationship is the relationship representation that records the identification and distinguishing relationships between the supplementary inspection action and different candidate state branches; the counterfactual supplementary inspection action is the supplementary inspection action that distinguishes and judges different candidate state branches in the candidate state bifurcation set. S4. Perform supplementary inspections on each agricultural product in the set of individuals to be judged according to the target supplementary inspection action set, obtain the supplementary inspection results and write them back to the individual digital twin, update the candidate state bifurcation set according to the supplementary inspection results and node semantic skeleton, determine the convergence state code of the candidate state bifurcation set, write the convergence state code back to the batch digital twin, and output the node control instruction structure. Among them, the node control instruction structure is a structured instruction data that records the control results of the batch and individual objects under the target detection node.
2. The digital-twin-based intelligent management and control method for the whole process of agricultural product detection according to claim 1, characterized in that: In S1, the node semantic skeleton is a node semantic configuration body loaded into the batch digital twin and associated with the corresponding process node. It is used to uniformly constrain the semantic interpretation method, candidate state bifurcation generation method, supplementary inspection action screening method, and convergence state determination method of the process node data under the corresponding process node. The node semantic skeleton and the process node are pre-configured in a one-to-one correspondence relationship. The same process node corresponds to a unique node semantic skeleton, and different process nodes correspond to different node semantic skeletons. The node semantic skeleton is switched and called as the target agricultural product batch flows between process nodes.
3. The digital-twin-based intelligent management and control method for the whole process of agricultural product detection according to claim 2, characterized in that: In step S1, the batch digital twin is a batch-level digital mapping body that corresponds to the target agricultural product batch and carries the node semantic skeleton. The batch digital twin calls the corresponding node semantic skeleton according to the current process node of the target agricultural product batch, and uses different semantic interpretation benchmarks for the process node data of the same batch under different process nodes. The batch digital twin is configured with a node semantic skeleton index relationship, which records the correspondence between process node identifiers and node semantic skeletons, and is used to perform node semantic skeleton switching when the process node of the target agricultural product batch changes, so as to maintain the semantic consistency of the batch flow event chain, batch context state, candidate state bifurcation set, counterfactual supplementary inspection action and convergence state encoding under the corresponding process node.
4. The digital-twin-based intelligent management and control method for the whole process of agricultural product detection according to claim 3, characterized in that: In step S2, the batch context state is a batch state representation loaded onto the target detection node and corresponding to the current flow context of the target agricultural product batch, used as the basis for determining the set of individuals to be judged. The composition dimensions of the batch context state include node state dimension, flow sequence dimension, event association dimension, and node constraint dimension. The set of individuals to be judged is the set of agricultural product individuals in the target agricultural product batch that need to enter the individual digital twin discrimination processing, used to carry the determination of candidate state bifurcation discrimination and counterfactual supplementary inspection actions. When determining the set of individuals to be judged based on the batch context state, the process node data associated with the individual identifier and the batch flow event chain are mapped to the batch context state, and agricultural product individuals that are inconsistent with the current node constraints, have non-unique state interpretations, or need further supplementary inspection are screened out to obtain the set of individuals to be judged. Each agricultural product in the set of individuals to be judged maintains a one-to-one correspondence with the individual identifier and maintains association with the corresponding event record in the batch flow event chain.
5. The digital-twin-based intelligent management and control method for the whole process of agricultural product detection according to claim 4, characterized in that: In S2, the candidate state bifurcation set is a set of bifurcation states loaded onto the individual digital twin and corresponding to the same agricultural product individual. It is used to retain multiple candidate state branches in parallel before the supplementary inspection results are written back, so as to support the subsequent generation of distinguishing relationships and the determination of counterfactual supplementary inspection actions. The generation rule for candidate state bifurcation sets is as follows: based on the node semantic skeleton of the target detection node, combined with the batch context state and process node data associated with the individual identifier, multiple mutually distinguishable candidate state branches are formed for the same agricultural product individual. The state branch organization of the candidate state fork set is as follows: each candidate state branch is organized according to the fork identifier and state code, and maintains a unique connection with the corresponding individual digital twin. An individual digital twin is an individual-level digital mapping that corresponds one-to-one with each agricultural product in the set of individuals to be judged and retains the candidate state branch set. Before the supplementary inspection result is written back, multiple candidate state branches are stored in parallel. After the supplementary inspection result is written back, consistent state branches are retained and inconsistent state branches are deleted based on the supplementary inspection result and the node semantic skeleton. Individual digital twins maintain the correspondence between candidate state bifurcation sets, distinguishing relationships, and counterfactual supplementary checks under the same individual identifier.
6. The digital-twin-based intelligent management and control method for the whole process of agricultural product detection according to claim 5, characterized in that: In S3, the candidate set of supplementary inspection actions is a set of node-related actions screened from the preset supplementary inspection action library based on the semantic skeleton of the node corresponding to the target detection node, which serves as the basis for generating the distinction relationship. The method of distinguishing and matching the candidate set of supplementary inspection actions with the candidate state branch set is as follows: under the same individual identifier, each candidate of supplementary inspection action is mapped to each candidate state branch in the candidate state branch set, the distinction result of each candidate of supplementary inspection action on different candidate state branches is judged, and the correspondence between the candidate of supplementary inspection action and the candidate state branch is established based on the distinction result. The structure of the distinguishing relation includes the supplementary inspection action identifier, the bifurcation identifier, and the distinguishing result; each agricultural product in the set of individuals to be distinguished corresponds to a set of supplementary inspection action candidates and a set of distinguishing relations, and each set of distinguishing relations is uniquely associated with the corresponding individual digital twin.
7. The digital-twin-based intelligent management and control method for the whole process of agricultural product detection according to claim 6, characterized in that: In S3, the rule for determining counterfactual supplementary inspection actions is as follows: under the same individual identifier, supplementary inspection actions that form a distinction result between different candidate state branches in the candidate state bifurcation set are selected from the supplementary inspection action candidate set as counterfactual supplementary inspection actions; the rule for generating the target supplementary inspection action set is as follows: the corresponding counterfactual supplementary inspection actions are determined according to the individual identifiers in the set of individuals to be judged, and the corresponding relationships between individual identifiers and counterfactual supplementary inspection actions are aggregated to generate a target supplementary inspection action set that corresponds one-to-one with the set of individuals to be judged; each counterfactual supplementary inspection action in the target supplementary inspection action set maintains a correspondence with the corresponding individual digital twin, candidate state bifurcation set, and distinction relationship.
8. The digital-twin-based intelligent management and control method for the whole process of agricultural product detection according to claim 7, characterized in that: In step S4, the convergence state code is the state code corresponding to the update result of the candidate state bifurcation set, used as the basis for writing the state of the node control instruction structure. The generation rule of the convergence state code is as follows: after writing the supplementary inspection result back to the corresponding individual digital twin, according to the convergence judgment rule in the node semantic skeleton, the consistency judgment is performed on each candidate state branch in the candidate state bifurcation set, the candidate state branch consistent with the supplementary inspection result is retained, and the corresponding convergence state code is generated according to the retention result. The convergence judgment rule includes the consistency judgment rule between the supplementary inspection result and the candidate state branch and the retention and deletion rule of the candidate state branch. The node control instruction structure includes batch identifier, individual identifier, target detection node identifier, convergence state code and control action identifier. The convergence state code is written into the node control instruction structure according to the individual identifier and the target detection node identifier, and an association relationship is established with the corresponding control action identifier. 9.A digital-twin-based intelligent management and control system for the whole process of agricultural product detection, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and characterized in that: The processor executes a computer program to implement the intelligent control method for the entire process of agricultural product testing based on digital twins as described in any one of claims 1-8.