Agricultural product quality traceability generation method for production process visualization

By maintaining a visual baseline in parallel at the edge and capturing and verifying image evidence, the problems of data redundancy and retrieval difficulties in the production process are solved, and efficient traceability of agricultural product quality is achieved.

CN120746408BActive Publication Date: 2025-11-21CHENGDU YUANBEN INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511271714.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-11-21
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

In long-term, large-scale production process monitoring, existing technologies suffer from data redundancy due to the mismatch between continuous video recordings and discrete production events. This leads to difficulties in retrieval and high post-analysis costs, and makes it impossible to effectively separate key operational evidence from meaningless images.

Method used

At the edge, environmental visual baseline and dynamic visual baseline are maintained in parallel. Image evidence is captured by triggering the difference threshold and causal spatial proximity and temporal authenticity verification is performed to generate structured traceability units.

Benefits of technology

This technology enables the separation of key operational images at the data generation source, reducing data redundancy, improving retrieval efficiency, ensuring the temporal and physical authenticity of traceability units, and reducing storage pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120746408B_ABST
    Figure CN120746408B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image data processing, and discloses a production process visualized agricultural product quality traceability generation method, which comprises the following steps: maintaining color and dynamic visual baselines in parallel at an edge end, capturing an image evidence pair before and after operation when a physical state of a production scene changes, and compulsorily performing cause-effect adjacent verification aiming at confirming event attribution and physical law arbitration aiming at verifying the authenticity of time stamps on the evidence pair, and only when the double verification passes, a structured traceability unit is generated, the application changes a traditional data processing mode of passive record post-search, information screening and purification are completed at the source of data generation, the generated traceability unit not only has direct visual comparison before and after operation, but also is self-verified through endogenous cause-effect logic and cross-verified through external physical laws, endogenous credibility independent of external systems is obtained, and therefore, image evidence is provided for agricultural product quality traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for generating agricultural product quality traceability that visualizes the production process, belonging to the field of image data processing technology. Background Technology

[0002] Currently, continuously capturing visual information from specific scenes using camera equipment and using the acquired continuous video streams as the original basis for subsequent analysis, verification, or tracing is a widely accepted technical approach. Its core value lies in theoretically preserving continuous visual information records of the scene over time, providing a basis for post-event analysis. However, when this technical approach is applied to production process monitoring scenarios requiring long-term, large-scale deployment, an inherent contradiction in its data processing becomes increasingly prominent: the act of continuous recording itself leads to a mismatch between information and the carrier. Specifically, critical operations with high traceability value in the production process, such as fertilization and spraying, are discrete and sporadic in time, but the video carriers recording them are temporally continuous and homogeneous in information density. As a result, in order to capture critical events lasting only a few minutes, the system has to record and store mostly meaningless static or micro-dynamic images lasting for days. This not only brings a huge burden to data storage and management but also turns post-event information retrieval into a process of searching for information islands in a sea of ​​data, with high retrieval costs, affecting the feasibility of applying video information in certain scenarios.

[0003] To address this challenge, the industry has also explored post-processing of video streams, such as introducing AI-based target recognition or behavior analysis algorithms to automatically filter out key operation segments from massive amounts of video data. However, such approaches do not address the root cause of the problem. They still follow a technical logic of first passively recording everything and then painstakingly analyzing it. Essentially, this transforms the original storage and manual retrieval pressures into a continuous consumption of expensive computing resources, without changing the fundamental reason for the redundancy of front-end data.

[0004] Specifically, existing technologies generally suffer from the following limitations: 1. There is an inherent structural mismatch between the continuity of video as an information carrier and the discreteness of key production events, leading to data redundancy; 2. The "record first, retrieve later" approach places information filtering and purification entirely at the back end of data processing, making it impossible to avoid the generation and storage of massive amounts of irrelevant data at the front end; 3. Post-event analysis, whether through manual review or algorithmic analysis, is constrained in terms of retrieval efficiency and cost by the massive data base generated at the front end. Therefore, how to design an image data processing method that can proactively separate and structure images containing key operational evidence from meaningless everyday images at the source of data generation—the front end of image acquisition—and thus change the passive recording and post-event retrieval data processing method, becomes the technical problem to be solved by this invention. Summary of the Invention

[0005] This invention provides a method for generating agricultural product quality traceability that visualizes the production process. Its main purpose is to solve the problems in the existing technology, which is difficult to retrieve due to data redundancy caused by the use of continuous video recording of discrete production events, and the fact that the technical path of post-event analysis cannot change the front-end data generation method.

[0006] To achieve the above objectives, the present invention provides a method for generating agricultural product quality traceability with visualization of the production process, comprising:

[0007] The acquired image streams are processed in parallel at the edge to maintain an environmental visual baseline that describes the static color features of the scene and a dynamic visual baseline that describes the dynamic temporal features of the scene.

[0008] If the color feature difference between the current frame image and the environmental visual baseline exceeds the first trigger threshold, or the temporal feature difference between the current frame image and the dynamic visual baseline exceeds the second trigger threshold, the following steps are performed: capture the pre-operation image and the post-operation image from the image buffer to generate a temporary image evidence pair; perform inter-frame difference processing on the temporary image evidence pair to determine a change region; perform local comparison between the pre-operation image and the post-operation image within the spatially adjacent region of the change region to generate a cause verification result; identify a fixed reference object and its cast shadow in the post-operation image, measure the actual image features of the shadow, and compare them with the theoretical shadow features calculated based on the associated time and geographical information from the temporary image evidence to generate a time authenticity verification mark; only when both the cause verification result and the time authenticity verification mark indicate that the verification has passed are the pre-operation image, the post-operation image, the difference image generated by inter-frame difference, and the verification mark encapsulated together into a structured traceability unit and stored.

[0009] Preferably, maintaining the environmental visual baseline and the dynamic visual baseline in parallel includes: maintaining the environmental visual baseline by continuously calculating the statistical summary of the color histogram of the images in the image stream; and maintaining the dynamic visual baseline by dividing the images in the image stream into gridded macroblocks and continuously calculating the short-term temporal variance of the pixel brightness values ​​within each macroblock; wherein the first trigger threshold and the second trigger threshold are values ​​determined based on statistical analysis of the normal fluctuation range of the baseline in the production scene within a preset learning period.

[0010] Preferably, generating a cause verification result specifically includes: setting a cause detection window around the boundary of the changed area; performing local inter-frame difference processing on the image before and after the operation within the area corresponding to the cause detection window to obtain a local difference value; comparing the local difference value with a subject existence judgment threshold; if the local difference value is higher than the subject existence judgment threshold, generating a cause verification result indicating that the verification passed; if the local difference value is not higher than the subject existence judgment threshold, generating a cause verification result indicating that the verification failed.

[0011] Preferably, generating a time authenticity verification mark specifically includes: in the post-operation image, automatically identifying fixed reference objects and shadows through edge detection and linear Hough transform; performing image measurements on the identified shadows to calculate their length and azimuth in the image coordinate system as actual image features; extracting temporary image evidence with its own timestamp and GPS geographic location coordinates, and calling the solar position algorithm to calculate the theoretical shadow length and azimuth as theoretical shadow features; calculating the deviation between the actual image features and the theoretical shadow features, and if the deviation is within an error tolerance, generating a time authenticity verification mark indicating that the verification has passed.

[0012] Preferably, before encapsulating it into a structured tracing unit, the method further includes: capturing a continuous image sequence from the image cache, including the sequence before and after the triggering time, when the capture of a temporary image evidence pair is triggered; generating a differential evolution sequence based on the continuous image sequence, and calculating the maximum connected component area growth rate (AGR) and the connected component number growth rate (CCR) in parallel for the differential evolution sequence; and following the following judgment rules. Generate a physical label representing the physical form of the manipulated object for the structured traceability unit: ,in, and The material state discrimination threshold is calibrated based on the spatiotemporal evolution characteristics of images that distinguish between liquid wetting processes and solid scattering processes; and the material state label is encapsulated into the structured traceability unit.

[0013] Preferably, maintaining the environmental visual baseline and the dynamic visual baseline further includes: setting a baseline update cycle, during which image data is continuously acquired to update the baseline values ​​of the color histogram statistical summary and the short-term time variance of the pixel brightness values ​​within the macroblock, so that the environmental visual baseline and the dynamic visual baseline can adapt to the slow changes in lighting and environment in the production scene.

[0014] Preferably, the cause detection window is set as an annular region with a width of ten to thirty pixels surrounding the outer edge of the change region; the subject existence judgment threshold is a quantifiable average change in pixel grayscale value caused when an operator's limb or the tool he holds enters the annular region.

[0015] Preferably, the determination of the error tolerance is also related to the accuracy of the geographic location information and the pixel size of the fixed reference object in the image. When the accuracy of the geographic location information decreases or the pixel size of the fixed reference object decreases, the range of the error tolerance value is widened accordingly.

[0016] Preferably, the time span of the continuous image sequence is from two frames before the trigger time to three frames after the trigger time, for a total of six frames; the differential evolution sequence consists of five differential images generated by sequentially performing inter-frame differential processing on two adjacent frames in the continuous image sequence.

[0017] Preferably, the encapsulation into a structured traceability unit further includes: generating a unique identifier for the structured traceability unit; and associating and storing the unique identifier with agricultural operation information related to the trigger time obtained from the production management system, the agricultural operation information including the operation batch number, operator identity information and applied material information, so as to build a traceable link between image evidence and management data.

[0018] Compared with the prior art, the beneficial effects of the present invention are:

[0019] 1. This invention acquires production scene images in real time and dynamically maintains an environmental visual baseline model describing the static features of the scene. It continuously compares the current image features with this baseline and triggers the capture of an image evidence pair when the difference exceeds a threshold. This evidence pair includes images before and after the operation. This processing method transforms the generation of image data from a non-differentiated continuous time record to a discrete event-responsive generation driven by changes in the physical state of the scene itself. The system output is no longer a raw video stream that needs to be interpreted afterward, but a structured image data unit with change as its core that has been initially purified. The juxtaposition of the states before and after the operation provides a direct visual reference system for subsequent traceability analysis.

[0020] 2. After generating a difference image through inter-frame difference, this invention further identifies the changed region on the difference image and performs a local comparison of the spatially adjacent regions of the changed region to verify whether there is an operation subject associated with the change. This coupling of global environmental change monitoring with local operation subject existence verification; global difference is used to identify the occurrence of the event, while local verification is used to confirm the cause of the event. The two work together to enable the system to have inherent identification ability when facing image changes caused by non-human factors, such as changes in lighting or wind disturbances, avoiding the encapsulation of such unrelated environmental changes as effective traceability units.

[0021] 3. After capturing a continuous image sequence including the time before and after a key event trigger, this invention generates a differential evolution sequence based on this sequence. It then analyzes the spatiotemporal evolution characteristics of the changing regions to determine the physical form of the applied substance. This process extends the analysis of the event from spatial morphology judgment of a single time segment to dynamic process analysis within a small time window. The system identifies whether the changing region exhibits a continuous increase in the area of ​​connected regions or an instantaneous increase in the number of discrete connected regions between consecutive frames, providing image processing basis for distinguishing between liquid infiltration and solid scattering processes. Based on this, semantic tags are generated, and visualizations are created. After tracing the unit, fixed reference objects and their shadows are identified in the post-operation image, their actual image features are measured, and theoretical shadow features are calculated based on the time and geographic information associated with the tracing unit. The authenticity of the time is verified by comparing the two. This verification step cross-verifies the visual features of the image content itself with a stable physical law independent of the image system, namely the law of celestial motion. The shape of the shadow in the image becomes an internal evidence of the authenticity of its timestamp, so that the time attribute of the tracing unit no longer depends solely on the record of the external clock system, but is also subject to the logical constraints from the image content itself. Attached Figure Description

[0022] Figure 1 This is an event processing flowchart generated by the traceability unit of the present invention;

[0023] Figure 2 This is a schematic diagram illustrating the relationship between the diurnal fluctuation of visual features and the trigger threshold of this invention;

[0024] Figure 3 This is a schematic diagram illustrating the data flow and system deployment of the present invention;

[0025] Figure 4 This is a diagram showing the internal functional architecture of the edge processing unit of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be described in detail below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] The present invention discloses a method for generating agricultural product quality traceability through visualization of the production process. This method can be implemented using a system deployed at the edge. The system architecture, deployed at the edge, mainly consists of an event triggering module based on dual-channel parallel monitoring, a module for capturing instantaneous image evidence pairs, a dual verification module based on the cross-arbitration of causal spatial proximity and physical laws, and a conditional encapsulation and storage module for structured traceability units. The data stream passes through each of the aforementioned modules sequentially. The passability judgment of the dual verification module is the control gate that determines whether the original image data is purified and transformed into the final structured traceability unit. In the specific image data processing flow, to address the uncertainty that may exist in monitoring a single visual feature under specific working conditions in the production scenario, the system is configured to process the acquired image stream in parallel at the edge to maintain an environmental visual baseline describing the static color features of the scene and a dynamic visual baseline describing the dynamic temporal features of the scene. The maintenance of the environmental visual baseline is specifically achieved by continuously calculating the color histogram statistical summary of each frame in the input image stream. For example, the system can quantize the color space of the image into 16 main regions and calculate in real time a normalized vector composed of the pixel proportions of these 16 color regions as a baseline model representing the global color distribution of the scene. The maintenance of the dynamic visual baseline is achieved by dividing the image into gridded macroblocks, such as dividing it into a 16x16 macroblock matrix, and continuously calculating the short-term time variance of the brightness values ​​of all pixels in each macroblock unit. The statistical average of this variance constitutes a dynamic baseline representing the normal dynamic level of the scene. To ensure that the two baselines can adapt to the slow lighting and environmental changes in the production scene, the system also sets a baseline update cycle, such as every 10 minutes. During this cycle, image data is collected continuously to update the aforementioned color histogram statistical summary and the baseline values ​​of the short-term time variance of the brightness values ​​of pixels in the macroblock.

[0028] When it is necessary to determine whether a critical event has been triggered, the system performs a parallel comparison of the features of the current frame image with two baseline models. If the vector cosine similarity between the color histogram statistical summary of the current frame image and the environmental visual baseline is lower than the first trigger threshold, the system will determine whether a critical event has been triggered. Alternatively, when the mean short-term temporal variance of multiple macroblocks within a spatially contiguous region of an image exceeds the second trigger threshold of the dynamic visual baseline value. At that time, either of the two conditions must be met to determine if the critical event has been triggered; here... and Instead of fixed values, these are set through a deterministic calibration procedure. For example, during the initial deployment phase, the system learns the baseline normal fluctuation range over a complete lighting cycle over 24 hours, and sets 1.5 times the historical maximum fluctuation values ​​of both color and dynamic features as... and This distinguishes between natural environmental fluctuations and sudden changes in image features caused by external intervention; once an event is triggered, the system immediately captures the previous moment from the onboard image cache. Image before operation and trigger time () After the operation, a temporary image evidence pair is generated.

[0029] To filter out false alarms caused by environmental changes triggered by non-target operators, the system performs a causal spatial proximity check after generating temporary image evidence pairs. The specific procedure is as follows: First, the temporary image evidence pair undergoes inter-frame differencing to generate a difference image. Then, using binarization and connected component analysis, the system identifies the region of most drastic pixel change within the difference image, i.e., the result region. Given that the operator causing the environmental change physically exists in the vicinity of this change region, the system uses the boundary of this change region as a reference to define a ring-shaped region, for example, with a width of 10 to 30 pixels. A cause detection window is created, and within the spatial region corresponding to this cause detection window, a local inter-frame difference processing is performed again on the image before and after the operation to obtain a local difference value. If this local difference value is higher than a preset subject existence judgment threshold, a cause verification result indicating that the verification has passed is generated. This threshold is a quantifiable average change in pixel grayscale value caused when the operator's limb or the tool he holds enters the annular region. Its value can be obtained by offline measurement and calibration of sample images of standard operations. For example, when the local difference mean is greater than the grayscale value of 15, it is determined that an operating subject exists.

[0030] Simultaneously, to establish the verifiability of the traceability unit in the time dimension, the system also performs a time authenticity verification based on physical laws. Given that in any outdoor scene with geographical location and time information, the shape of the shadow cast by a fixed object is determined by the laws of celestial motion, the system utilizes this stable physical law as the verification basis. Its deterministic procedure is as follows: in the image after successful verification, image processing techniques such as edge detection and linear Hough transform are used to automatically identify a long-standing, clearly defined fixed reference object in the scene, such as a telephone pole, and its cast shadow. Subsequently, through image measurement, the length and azimuth of the shadow in the image coordinate system are calculated as actual image features. At the same time, the system extracts the... The image evidence is linked to the timestamp and GPS geographic coordinates obtained through the camera's built-in module. A standard solar position algorithm is then used to calculate the theoretical shadow length and azimuth angle that the reference object should form at that specific time and location, which are used as theoretical shadow features. Finally, by comparing the deviation between the actual image features and the theoretical shadow features, if the deviation is within a preset error tolerance, such as an angle deviation of less than 2 degrees and a length ratio deviation of less than 5%, a time authenticity verification mark indicating that the verification has passed is generated. The value of this error tolerance can also be dynamically correlated with the accuracy of the GPS signal. When the positioning accuracy decreases, the tolerance is widened accordingly to adapt to signal fluctuations in the real environment. This makes the authenticity of the timestamp associated with the image content.

[0031] Only when both the aforementioned cause verification result and the time authenticity verification flag indicate that the verification has passed will the system finally encapsulate and store the pre-operation image, the post-operation image, the difference image generated by inter-frame difference, and the two verification flags together into a structured visual traceability unit. Furthermore, to further enhance the semantic information of the traceability unit and distinguish different operation types, the system can also capture a continuous image sequence containing images before and after the trigger time from the image cache when the event is triggered. For example, from... arrive The system generates a sequence of six images. Based on this sequence, by performing inter-frame differencing on adjacent frames, a differential evolution sequence consisting of five differencing images can be generated. The system then calculates two spatiotemporal texture indices in parallel for this differential evolution sequence: the maximum connected component area growth rate. and the growth rate of the number of connected components To transform these two indicators into judgments about physical form, the system follows the following deterministic judgment rules. : ,in, and The material state discrimination threshold is determined based on the spatiotemporal evolution characteristics of images that distinguish between liquid wetting processes and solid scattering processes. The material state tags generated according to this rule, such as liquid application, will also be encapsulated in the structured traceability unit, thereby realizing the generation of visual evidence from attribution and timing of key events to qualitative analysis. Finally, the system can also generate a unique identifier for the structured traceability unit and associate it with agricultural operation information related to the trigger time obtained from the external production management system, such as the operation batch number, to build a traceable link between image evidence and management data.

[0032] To achieve the associated storage between the aforementioned structured traceability units and agricultural operation information, the method of this invention can also be configured with an associated database deployed at the edge or in the cloud during specific implementation. For each structured traceability unit that is finally confirmed and encapsulated, its generated unique identifier, such as the SHA-256 hash value based on the unit's content, is written as a primary key into an image evidence table in the database. The batch number, operator identity information, and applied material information that match the timestamp of the traceability unit within a preset time window, such as five minutes before and after, obtained in real time from the production management system, are stored as foreign keys or associated fields in the corresponding records of the table. By constructing such a relational data structure with a unique identifier as a bridge, a stable and clear traceability link that can be retrieved and verified at any time can be established between the physical storage of image evidence and the logical information of production management.

[0033] Example 1: In an application scenario requiring traceability of compliance in agricultural operations, a field equipped with the image processing system of this invention exhibited two types of visual changes simultaneously in its monitoring footage at 3 PM. One type was image disturbance caused by a sudden strong wind blowing a shade cloth, and the other was a worker applying a colorless and transparent liquid fertilizer to the crop leaves using spraying equipment, which only appeared as localized changes in color and reflectivity in the image. Traditional image data processing methods face problems of information redundancy and difficulty in confirming the validity of evidence in this scenario. That is, the system must record all images including a large number of environmental disturbances, and it is impossible to verify the authenticity of the operation time of 3 PM recorded by the worker based solely on the video itself afterward. In this case, the technical solution of this invention, with its dual-channel parallel monitoring module deployed at the edge, detects that the short-term temporal variance of multiple adjacent macroblocks caused by the wind blowing the shade cloth synchronously exceeds the second trigger threshold. The system thus captured a temporary image evidence pair regarding the change in the sunshade cloth. In the subsequent causal spatial proximity verification stage, the system performed inter-frame differential processing on the evidence pair. After determining the area of ​​change where the sunshade cloth was located, it performed a local comparison of its spatial proximity area, i.e., the cause detection window. It was found that the local difference value within the window was lower than the preset subject existence judgment threshold, indicating that there was no nearby operating subject as its cause. The cause verification result was marked as failing, and the temporary image evidence pair was immediately discarded by the system and did not enter the subsequent processing and storage stages. This process means that the capture of highly sensitive dynamic events must pass the subsequent attribution verification of the event source before it can be confirmed as a valid record.

[0034] Almost simultaneously, the spraying activity by the workers, while not causing drastic dynamic disturbances, resulted in the crop leaves becoming wet. This caused the statistically significant deviation of the crop's color statistical summary from the environmental visual baseline, exceeding the first trigger threshold. The system thus captured a second pair of temporary image evidence related to the spraying operation. During the causal spatial proximity check of this evidence pair, after identifying the area of ​​leaf color change, the system detected a local difference value exceeding the subject existence threshold caused by the spraying equipment nozzle within the causal detection window surrounding it. The causal check result was therefore marked as passed. This successful check triggered a second time authenticity check. The system automatically identified a fixed utility pole and its shadow in the post-operation image, measured its actual image features, and compared them with the theoretical shadow features calculated based on the evidence pair's built-in three-hour timestamp and GPS geographic location information. The comparison revealed that the two images were consistent within the set error tolerance, and the time authenticity verification mark was also set to pass. Ultimately, only this one image evidence pair that passed the dual verification was encapsulated into a structured traceability unit and stored. This unit not only included direct visual comparison before and after the operation, but also recorded the dual confirmation results of event attribution and timestamp authenticity through its internal verification mark. This processing method, which introduces physical and logical verification at the front end of data generation, replaces the traceability link that originally required continuous video streams and external clock systems with a discrete data unit whose image content and timestamp have inherent physical consistency.

[0035] Example 2: To objectively verify the effectiveness of the method of the present invention in distinguishing between real human operation and interference from environmental and data forgery, this example constructs an experimental platform for reproducing typical working conditions. The platform consists of an image acquisition device fixed at a height of 2.5 meters overlooking a standard 5m x 5m lawn area, a programmable six-axis robotic arm for simulating human operation, a high-powered fan capable of generating undirected airflow to simulate gusts, and a control system whose time stamp server time can be adjusted via software. The purpose of the experiment is to quantitatively evaluate the dual verification mechanism in the method of the present invention—namely, causal spatial proximity verification and temporal authenticity verification—and its discrimination results under different event types. Before the experiment, key system parameters were calibrated. The threshold for determining the existence of the subject was set to balance the misjudgment of environmental noise with the omission of subtle real operations. To determine this parameter, the experiment was conducted with only the fan turned on. In a background noise environment, 1000 frames of images were continuously acquired and the local difference value within the cause detection window was calculated. The mean value was 3.2 and the standard deviation was 2.8. Subsequently, the robotic arm was controlled to perform a standard spraying action and repeated 100 times. The mean value of the local difference value induced within the cause detection window was measured to be 21.4. Based on this, the threshold for judging the existence of the subject was set as the mean value of the background noise plus three times the standard deviation, i.e., 3.2 + 3 × 2.8 = 11.6, rounded to 12. For the error tolerance of the time authenticity verification, its setting aims to balance the drift of GPS positioning accuracy and the sensitivity to timestamp forgery. Based on the nominal 3-meter positioning error of the GPS module of the device used, the theoretical deviation caused by the shadow length and angle of a fixed reference object, i.e., a vertical pole at the edge of the site, was calculated through a geometric model. The error tolerance was set as follows: the angle deviation is less than 2.0 degrees and the length ratio deviation is less than 5.0%.

[0036] The experiment consisted of three sets of events, each repeated 100 times, to test the system's ability to classify changes in images of different natures. The results showed that the dual-verification process effectively distinguished between valid operations and various types of interference. Specifically, in the 100 valid operation events (i.e., the robotic arm performing standard spraying operations), the system correctly generated 98 structured traceability units. As a control, in the 100 environmental interference events (i.e., only the fan blowing away ground debris), 99 events were identified and discarded by the causal spatial proximity verification step. This was because no operating entity with a local difference value higher than 12 was detected in the neighborhood of the changed area. Furthermore, in the 100 data forgery events (i.e., the robotic arm performing standard operations but its associated timestamp was forged),... After passing the cause verification, 96 events were identified and discarded by the time authenticity verification step. The basis for this judgment was that the shadow features in the image content determined by the actual lighting conditions had a deviation exceeding the aforementioned error tolerance between them and the theoretical shadow features corresponding to the forged timestamp. Experimental data shows that this invention extracts real and valid operation events from environmental and data-level interference through a cascaded verification process based on causal attribution and physical law arbitration. The failure to identify two valid operations was found to be due to the robotic arm end effector being partially obscured at a specific angle, which failed to generate a sufficiently high local difference value within the cause detection window. The passage of a few interference events corresponded to the low-probability situation where random noise happened to fall within the tolerance range in both verification steps.

[0037] Example 3: This example combines Figures 1 to 4 This describes a method for generating agricultural product quality traceability that visualizes the production process, such as... Figure 1 As shown, the image stream is received by a dual-channel parallel processing mechanism. This mechanism maintains an environmental visual baseline to describe the static color features of the scene on the one hand, and a dynamic visual baseline to describe the dynamic temporal features of the scene on the other hand. It compares the current frame image with the dual baselines in real time to perform event trigger judgment. When the event is triggered, the system immediately performs the operation of capturing image evidence, generating a temporary image pair containing the images before and after the operation. Subsequently, the temporary evidence pair enters a dual verification process, which performs causal proximity verification in parallel to confirm the event attribution and eliminate environmental interference, and temporal authenticity verification to cross-verify the physical authenticity of the timestamp. A judgment node for whether the dual verification passes will determine the direction of the data stream. If the verification fails, the temporary data is discarded. If the verification passes, the operation of encapsulating structured traceability units is performed, storing the data units encapsulated with images, difference maps, and verification marks. Furthermore, an optional material label generation module can be used to distinguish between solid / liquid operations. At the same time, the encapsulated units will also be associated with external agricultural operation information through the steps of associated storage and construction of traceability links.

[0038] like Figure 2 As shown, with time as the horizontal axis and feature difference as the vertical axis, the fluctuations of the color feature difference curve and the dynamic feature difference curve within a 24-hour period are depicted, along with a constant trigger threshold reference line. According to the technical solution of this invention, when any value of the color feature difference curve or the dynamic feature difference curve exceeds the trigger threshold line at a certain time point, the trigger condition is met, and the system will initiate the subsequent image evidence capture and dual verification process.

[0039] like Figure 3 As shown, the real-time image stream generated in the production scene is sent to the core image acquisition and event triggering module. This module maintains the baseline by reading and writing baseline data in the visual baseline library and reads image frames from the image cache to generate temporary image evidence pairs when an event is triggered. The evidence pairs are then passed to the image evidence dual verification module. The output of this module is divided into two paths: one is the verification failure data, which is discarded; the other is the verification passed image evidence, which is used to generate structured traceability units. The generated structured traceability units are sent to the traceability data association storage module, which also receives agricultural operation information from the production management system to jointly build the association between the stored traceability units and the management data. On the other hand, the final form of the unit is stored in the structured traceability unit library.

[0040] like Figure 4 As shown, this unit receives image streams from the image acquisition device and first processes them using a dual-channel parallel monitoring module. This module contains an environmental visual baseline for extracting color histogram statistics and a dynamic visual baseline for calculating macroblock temporal variance. The trigger judgment result output by this module determines whether to generate an image evidence pair. This evidence pair is then sent to a dual verification module, which contains two sub-modules: a causal spatial proximity verification module, which determines the change region through inter-frame differencing and establishes a causal detection window for local comparison; and a physical law arbitration verification module, which obtains data through shadow recognition. The system analyzes actual characteristics and uses a solar position algorithm to calculate theoretical characteristics for comparison. In addition, an optional material state recognition module can perform differential evolution analysis on a continuous sequence of 6 frames and calculate the AGR / CCR index to attach liquid or solid state tags to the event according to the material state determination rules. Only the verified image evidence will be structured and encapsulated into a traceability unit containing before / after images, difference images, verification marks and material state tags, and finally stored in the traceability unit. At the same time, it will be associated with the work batch number, operator and material information from the production management system.

[0041] Example 4: In a deployment scenario where it is necessary to distinguish between liquid spraying and solid spreading in agricultural operations, the atomization effects of different spraying equipment and the morphological differences of different granular fertilizers lead to variations in the growth rate of the connected region area representing liquid infiltration in the spatiotemporal evolution features of the image. The growth rate of the number of connected regions characterizing solid scattering The specific numerical distribution is scene-dependent; in order to ensure that the judgment rules used for material state identification in the method of this invention are accurate... To achieve scenario adaptability, a standardized engineering calibration procedure is needed to determine a set of matter discrimination thresholds applicable to the scenario. and To this end, this embodiment discloses an offline calibration method performed before the formal deployment of the system. This method is conducted in a test environment with the same camera model, installation height, and lighting conditions as the actual application scenario. The input for the calibration process uses clean water as the representative liquid material to be used in the actual application, and urea particles with a diameter of 2 to 4 millimeters as the representative solid material. The calibration process first enters the liquid physical characteristic acquisition stage. Using a pressure nozzle, a spraying operation is repeatedly performed 100 times within the test area at a fixed flow rate and angle. For each operation, the system captures a continuous sequence of 6 images, including those before and after the trigger moment, according to the above procedure, and calculates the corresponding 5-frame differential evolution sequence. Then, the system extracts from each differential evolution sequence... Maximum value of time series The maximum value of the time series was determined, and these 100 maximum values ​​were stored in liquid. Sample set and liquid Sample set.

[0042] Subsequently, the calibration process entered the solid state feature acquisition stage. Using a spreading device, the particle spreading operation was repeated 100 times within the test area. The same image sequence capture and feature extraction steps as in the liquid acquisition stage were then employed to obtain 100 sets of solid state features. Sample set and solid Sample set; after collecting data from four sets of samples, the system performed statistical analysis on the data. Calculations showed that the liquid... The sample set has a mean of 5.1 and a standard deviation of 1.5, while the solid... The sample set has a mean of 62.7 and a standard deviation of 8.2; to set a threshold that can distinguish between the two states of matter, a state discrimination threshold is defined. The mean of the sample set plus three standard deviations, i.e. Using the same statistical principles, based on liquid Sample set and solid The statistical distribution of the sample set can be used to calculate the state discrimination threshold. The value here is 0.31. This represents the normalized growth rate of the maximum connected region area per unit time; ultimately, a set of specific state discrimination thresholds is determined through this calibration procedure. The key parameters of the object identification model are written into the configuration file of the edge device. This process transforms the key parameters of the object identification model from a fixed prior value into a posterior value based on sampling and statistical analysis of the physical process of the image in a specific application scenario. This makes the classification basis of the object identification method in specific engineering practice obtain a reproducible calibration process.

[0043] Example 5: When the method of the present invention is deployed in a new farmland environment where the scene features have not been pre-calibrated, to ensure the uniqueness and stability of the identification of fixed reference objects in the time authenticity verification function, the system is configured to execute a standardized on-site deployment pre-calibration procedure upon initial startup. Under this procedure, the system first enters a reference object calibration mode, automatically performs continuous image acquisition of the current scene for one hour, and identifies all objects in the scene that remain statistically stationary by performing inter-frame difference and feature point tracking on the image sequence. Subsequently, among these stationary objects, the system filters out candidate reference objects with stable and clear linear geometric contours through edge detection and linear Hough transform, and sorts these candidate reference objects according to their pixel size contrast and geometric stability in the image. Finally, the system provides the deployment personnel with a list containing the top three candidate reference objects, which the deployment personnel select, in conjunction with the on-site survey, as the only fixed reference object for shadow measurement in the scene and confirm it.

[0044] After confirming the fixed reference, the calibration procedure proceeds to calibrate the error tolerance in the time accuracy verification. The system first measures the pixel size of the confirmed fixed reference in the current image coordinate system and records the value. Simultaneously, the system reads the current horizontal precision factor (HDOP) value from the associated GPS module to quantify the positioning signal quality at the current deployment location. The final value of the error tolerance is determined by a function that integrates the image size of the fixed reference and the positioning signal quality. This function superimposes a visual measurement error term inversely proportional to the pixel size and a positioning error term proportional to the horizontal precision factor, allowing the system to automatically adjust its tolerance for deviations between theoretical shadow features and actual image features when the fixed reference occupies a small portion of the image or when the positioning signal quality deteriorates. This procedure transforms the setting of the error tolerance from a fixed value into a system parameter whose value can be dynamically adjusted based on the quality of key input data.

[0045] Example 6: In a specific system deployment scenario, to ensure that the establishment of the visual baseline and the setting of key verification parameters can accurately adapt to the light-dependent crops and operational characteristics of a specific farmland, this invention provides a standardized pre-calibration and verification procedure. This procedure aims to build a verified scenario-specific baseline reference model for the subsequent online operation of the system. The process first initiates a 24-hour unsupervised baseline data acquisition cycle. During this period, the system segments the acquired image stream in 15-minute increments and independently calculates the statistical summary of color and dynamic features within each segment. After the acquisition cycle ends, the system performs outlier analysis on the statistical results of all segments and identifies those segments whose statistical values ​​deviate from the global median by more than three standard deviations as contaminated data caused by temporary anomalies and removes them.

[0046] After calculating the final environmental visual baseline and dynamic visual baseline using the dataset cleaned in the aforementioned steps, the procedure continues to set event trigger thresholds. The system calculates the complete probability distribution of color feature difference and temporal feature difference in the cleaned dataset over the entire time series, and sets the 99.9th percentile of this distribution as the first trigger threshold and the second trigger threshold, respectively. Next, the procedure proceeds to offline optimization of key geometric parameters in causal spatial proximity verification. The goal is to determine a cause-detection window width that maximizes the signal-to-noise ratio of the verification. The system prompts the deployment personnel to repeatedly perform standardized key operations at representative locations within the field of view. For each operation, after identifying the change area, the system sets a set of concentric annular test windows with widths ranging from 5 to 50 pixels in 1-pixel increments, centered on the boundary of that area. The system calculates the mean local difference within each test window as the signal. Finally, the system determines the pixel width of the cause-detection window that yields the maximum signal-to-background-noise ratio as the cause-detection window width for that scene and fixes it.

[0047] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for generating agricultural product quality traceability with visualization of the production process, characterized in that, The method includes: The acquired image streams are processed in parallel at the edge to maintain an environmental visual baseline that describes the static color features of the scene and a dynamic visual baseline that describes the dynamic temporal features of the scene. If the color feature difference between the current frame image and the environmental visual baseline exceeds the first trigger threshold, or the temporal feature difference between the current frame image and the dynamic visual baseline exceeds the second trigger threshold, the following steps are performed: capture the pre-operation image and the post-operation image from the image buffer to generate a temporary image evidence pair; perform inter-frame difference processing on the temporary image evidence pair to determine a change region; perform local comparison between the pre-operation image and the post-operation image within the spatially adjacent region of the change region to generate a cause verification result; identify a fixed reference object and its cast shadow in the post-operation image, measure the actual image features of the shadow, and compare them with the theoretical shadow features calculated based on the associated time and geographical information from the temporary image evidence to generate a time authenticity verification mark; only when both the cause verification result and the time authenticity verification mark indicate that the verification has passed, encapsulate the pre-operation image, the post-operation image, the difference image generated by inter-frame difference, and the verification mark into a structured traceability unit and store it. Specifically, maintaining the environmental visual baseline and the dynamic visual baseline in parallel includes: maintaining the environmental visual baseline by continuously calculating the statistical summary of the color histogram of the images in the image stream; and maintaining the dynamic visual baseline by dividing the images in the image stream into gridded macroblocks and continuously calculating the short-term temporal variance of the pixel brightness values ​​within each macroblock. The first trigger threshold and the second trigger threshold are values ​​determined based on statistical analysis of the normal fluctuation range of the baseline in the production scene within a preset learning period.

2. The method for generating agricultural product quality traceability with visualization of the production process according to claim 1, characterized in that, Generating a cause verification result specifically includes: setting a cause detection window around the boundary of the changed area; performing local inter-frame difference processing on the image before and after the operation within the area corresponding to the cause detection window to obtain a local difference value; comparing the local difference value with a subject existence judgment threshold; if the local difference value is higher than the subject existence judgment threshold, generating a cause verification result indicating that the verification passed; if the local difference value is not higher than the subject existence judgment threshold, generating a cause verification result indicating that the verification failed.

3. The method for generating agricultural product quality traceability with visualization of the production process according to claim 1, characterized in that, Generating a time authenticity verification marker specifically includes: automatically identifying fixed reference objects and shadows in the post-processed image through edge detection and linear Hough transform; performing image measurements on the identified shadows to calculate their length and azimuth in the image coordinate system as actual image features; extracting temporary image evidence with its built-in timestamp and GPS geographic location coordinates, and calling the solar position algorithm to calculate the theoretical shadow length and azimuth as theoretical shadow features; calculating the deviation between the actual image features and the theoretical shadow features, and if the deviation is within an error tolerance, generating a time authenticity verification marker indicating that the verification has passed.

4. The method for generating agricultural product quality traceability with visualization of the production process according to claim 1, characterized in that, Before being encapsulated into a structured tracing unit, the process also includes: capturing a continuous image sequence from the image cache, including the time before and after the triggering moment, when a temporary image evidence pair is captured; generating a differential evolution sequence based on the continuous image sequence, and calculating the maximum connected component area growth rate (AGR) and the connected component number growth rate (CCR) in parallel for this differential evolution sequence; and following the following decision rules. Generate a physical label representing the physical form of the manipulated object for the structured traceability unit: ,in, and The material state discrimination threshold is calibrated based on the spatiotemporal evolution characteristics of images that distinguish between liquid wetting processes and solid scattering processes; and the material state label is encapsulated into the structured traceability unit.

5. The method for generating agricultural product quality traceability with visualization of the production process according to claim 1, characterized in that, Maintaining environmental and dynamic visual baselines also includes setting a baseline update cycle during which image data is continuously acquired to update the baseline values ​​of the color histogram statistical summary and the short-term time variance of pixel brightness values ​​within macroblocks.

6. The method for generating agricultural product quality traceability with visualization of the production process according to claim 2, characterized in that, The cause detection window is set as a ring-shaped area with a width of ten to thirty pixels surrounding the outer edge of the change area; the subject existence judgment threshold is the average change in pixel grayscale value that can be quantified when an operator's limb or the tool he holds enters the ring-shaped area.

7. The method for generating agricultural product quality traceability with visualization of the production process according to claim 3, characterized in that, The determination of the error tolerance is also related to the accuracy of the geographic location information and the pixel size of the fixed reference object in the image. When the accuracy of the geographic location information decreases or the pixel size of the fixed reference object decreases, the range of the error tolerance value is widened.

8. The method for generating agricultural product quality traceability with visualization of the production process according to claim 4, characterized in that, The time span of the continuous image sequence is from two frames before the trigger time to three frames after the trigger time, for a total of six frames; the differential evolution sequence consists of five differential images generated by sequentially performing inter-frame differential processing on two adjacent frames in the continuous image sequence.

9. The method for generating agricultural product quality traceability with visualization of the production process according to claim 1, characterized in that, Encapsulated as a structured traceability unit, it also includes: generating a unique identifier for the structured traceability unit; and associating and storing the unique identifier with agricultural operation information related to the trigger time obtained from the production management system, the agricultural operation information including the operation batch number, operator identity information and applied material information.

Citation Information

Patent Citations

  • Monitoring system, monitoring sensor apparatus, monitoring method, and program

    US20210368139A1

  • Method and apparatus with scene flow estimation

    US20250157055A1