Active living object-oriented fresh food weighing data edge calculation optimization method
By collecting time-series weighing data of active animals, establishing a machine learning rule base and combining it with weight fluctuation patterns, the problems of accuracy and efficiency in weighing active animals were solved, and the accuracy of species identification and the reliability of calculation results were achieved.
Patent Information
- Application Number
- CN202511188630.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-12-05
AI Technical Summary
Traditional weighing methods fail to account for the differences in movement and fluctuations in freshness of active animals, resulting in low weighing accuracy and efficiency. Furthermore, single-modality camera recognition is susceptible to environmental interference, leading to misjudgments.
By collecting time-series weighing data of fresh species under different vitality states, a machine learning rule base is established. Combined with camera data and weight fluctuation patterns, species classification and filtering strategies are implemented, and multi-dimensional confidence assessments are calculated and assigned in real time.
It improves the accuracy and efficiency of weighing active living animals, reduces the impact of differences in species movement characteristics and environmental disturbances, and ensures the accuracy of species identification and the reliability of calculation results.
Smart Images

Figure CN121074871A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of fresh weight technology, in particular to a fresh weight data edge computing optimization method for active animals. BACKGROUND
[0002] In the fresh circulation and transaction link, the accuracy of live animal weighing directly affects the pricing fairness and supply chain efficiency, but the dynamic characteristics of active animals bring many challenges to weighing; traditional weighing methods use a unified data processing mode, without considering the movement differences of different species, at the same time, the movement intensity of the same species in different fresh states has significant differences, and the interference degree of the vigorous activity of high-vigor individuals and the flat state of low-vigor individuals to data is completely different, and the unified calculation method not only has low processing efficiency, but also further reduces the weighing accuracy due to the failure to adapt to the fluctuation characteristics corresponding to different freshness. These problems jointly restrict the accuracy and efficiency of active animal weighing, and urgent technical solutions are needed to solve them; in addition, when the existing species identification relies on a single camera mode, it is easy to be affected by environmental light, shielding or morphological similarity, thereby causing subsequent weighing calculation errors.
[0003] At present, there is no effective solution to the problems in the related art. SUMMARY
[0004] In view of the problems in the related art, the present application proposes a fresh weight data edge computing optimization method for active animals to overcome the technical problems of large weighing error, misjudgment of identification and low processing efficiency existing in the prior art.
[0005] To this end, the specific technical solutions adopted by the present application are as follows:
[0006] The fresh weight data edge computing optimization method for active animals comprises the following steps:
[0007] S1, collect the weighing time series data of fresh species in high, medium and low vigor states, extract quantitative features, and train freshness classification rules and species classification rules through machine learning to establish a rule base, and then set filtering and calculation strategies according to the freshness rules;
[0008] S2, judge the type of live animals through image acquisition by camera, load the corresponding rule base from the edge device species feature base, and when the classification confidence is lower than 90%, match the species classification rules through secondary inference of weight fluctuation mode;
[0009] S3, judge the freshness level by comparing the rule base with real-time high-frequency weight data stream, and then match the filtering and calculation strategies and complete the weight calculation in combination with the species type and fine freshness;
[0010] S4, real-time multi-dimensional confidence evaluation is given to the calculation result, and the result is output.
[0011] As a preferred embodiment, the weight time series data of the collected fresh species in high, medium and low activity states are extracted, and the freshness classification rule and species classification rule are trained by machine learning to establish a rule base, and then the filtering and calculation strategy is set according to the freshness rule, including the following steps:
[0012] S11, collecting weight time series data of different fresh species in high, medium and low activity states;
[0013] S12, processing and analyzing the collected weight time series data of different species and different activity states, extracting quantified feature parameters representing motion mode and weight fluctuation characteristics;
[0014] S13, based on the extracted quantified features, using machine learning algorithm for training, constructing freshness grade and species classification model, and converting the key feature threshold of the model into explicit classification rule to form a rule base;
[0015] S14, for different freshness grades, based on the aforementioned established freshness classification rule, setting the best filtering algorithm and weight calculation strategy.
[0016] As a preferred embodiment, the weight time series data of the collected fresh species in high, medium and low activity states are extracted, and the freshness classification rule and species classification rule are trained by machine learning to establish a rule base, and then the filtering and calculation strategy is set according to the freshness rule, including the following steps:
[0017] S131, importance evaluation is performed on the extracted quantified features, and a key feature subset with the highest discriminant for distinguishing species types and judging freshness grades is selected, and the fresh species includes fish, poultry and crustacean;
[0018] S132, using the labeled data set, using machine learning algorithm to train freshness grade classification model and species classification model, wherein the formula is respectively:
[0019]
[0020] k∈{fish, poultry, crustacean}
[0021] Wherein, X is the input feature vector, including weight fluctuation frequency, amplitude ratio, motion energy and other time series characteristics, W k is the weight vector of the kth species, b k is the bias term of the kth species, and S is the final determined species category;
[0022]
[0023] wherein x is the input feature vector, including acceleration variance, motion duration ratio, weight fluctuation entropy, silence period ratio, w is the weight vector, w t x is a scalar, i.e. vitality comprehensive score, and the larger the value, the stronger the vitality, the smaller the value, the weaker the vitality, g is the grade threshold, P(freshness ≥ g | x) is the probability value of the vitality reaching g grade output;
[0024] S133, calculate the mutual information value of each feature with the species and freshness label, and retain the features with mutual information value exceeding the preset threshold and low calculation complexity, including fish features, fluctuation frequency ∈ (2.5-5.0Hz), vertical acceleration variance threshold >0.3, bird features, wing beating period <0.4s, weight mutation frequency ≥3 times / s, crustacean side shift distance ratio >0.6, shell collision frequency ≥5 times / s, silence ratio >75%; based on the feature threshold, a three-dimensional vitality determination matrix is established, specifically, motion energy score > species-specific threshold, fish: 4.2, bird: 3.8, crustacean: 3.5, determined as high vitality; fish motion energy in the interval of 2.2-4.2, bird wing beating frequency reduced to 1-2Hz, crustacean side shift distance ratio in the interval of 0.4-0.6, determined as medium vitality; fish, bird continuous stationary >5s, crustacean silence ratio >80% and shell collision <2 times, determined as low vitality; and these data are used to establish a rule base.
[0025] As a preferred embodiment, the best filtering algorithm and weight calculation strategy are set based on the aforementioned established freshness classification rule for different freshness grades, including the following steps:
[0026] S141, when the freshness classification rule determines high vitality: use median filtering, the window size is fixed at 1.0s, filter transient noise caused by struggling of live animals, and capture continuous local minimum value sequence in the filtered data stream, and remove false peaks caused by muscle contraction; in addition, when the weight fluctuation standard deviation is >5g within 3s, the sampling window is automatically reduced to 0.5s to improve sensitivity; when the freshness classification rule determines medium vitality: use dynamic weighted moving average filtering, the window length is set according to species difference, fish: 1.5s, bird: 1.2s, crustacean: 2.0s, and the proximal data is given a higher weight, the mean value in the calculation window is calculated every 0.2s, and if the fluctuation is <3% for 5 times in a row, the final value is locked; when the freshness classification rule determines low vitality, no active filtering is used, and for fish and birds, the average value of the last 3s of continuous stationary period is taken, and for crustacean: the stable value when the silence is more than 5s is taken; in addition, if the weight drift is >2g / s, it is determined that the organism escapes and the detection is reactivated.
[0027] As a preferred embodiment, the method of judging the type of living things by capturing images through a camera, loading corresponding rule base from edge device species feature library, and when the classification confidence is lower than 90%, includes the following steps:
[0028] S21, capturing live images through the camera of the edge device in real time, inputting the preset lightweight convolutional neural network model for species classification, the model extracting morphological features from the images, including fish streamlined profile, bird feather texture, and crustacean shell geometric features, and outputting preliminary species label and confidence;
[0029] S22, verifying the output confidence, when the confidence meets the standard, directly calling the freshness grading rules and weight calculation strategy of the species, when the confidence is insufficient, activating the weight fluctuation mode secondary inference process, and freezing the image sampling module in parallel to reduce energy consumption, in addition, when the image is blurred, the living thing is blocked or the environmental light interference causes the confidence to be <20%, skipping the preliminary screening and directly entering the secondary inference;
[0030] S23, calculating the weight fluctuation frequency spectrum peak value, comparing the real-time fluctuation waveform with the pre-stored species feature library, loading the pre-stored three types of species basic rule set in the edge storage, when the matching degree is >85%, outputting the species label and covering the image preliminary screening result, when the matching degree is <40%, determining it as an unknown species and triggering manual review.
[0031] S24, generating a multi-dimensional confidence report and outputting the report.
[0032] As a preferred embodiment, the method of generating a multi-dimensional confidence report and outputting the report includes the following steps:
[0033] S241, when the weight fluctuation inference confidence is higher than the image confidence, taking the weight data result as the final judgment basis, loading the corresponding freshness rule according to the final judgment species, and forcibly setting the image and weighing data time stamp deviation <50ms;
[0034] S242, setting the image confidence weight to 0.6×original confidence, setting the fluctuation mode confidence to 0.8×matching degree-0.2×noise interference coefficient, the final confidence value after weighted fusion, when the final confidence value is >90%, outputting the species label and associated strategy, when the confidence is continuously <90%, storing the original data and uploading to the cloud for analysis.
[0035] As a preferred embodiment, the method of judging the type of living things by capturing images through a camera, loading corresponding rule base from edge device species feature library, and when the classification confidence is lower than 90%, includes the following steps:
[0036] S31. Continuously collect weight time-series data streams above 100Hz through the weighing sensor, and perform real-time noise filtering and feature extraction.
[0037] S32. Match the preprocessed data with the species feature library to determine the freshness. Specifically, first, output the initial judgment level based on the species-specific threshold, and then maintain the judgment if the current level is met 9 out of 10 consecutive feature calculations.
[0038] S33. Based on a dual-dimensional label including species category and freshness level plus a calculation strategy;
[0039] S34. Dynamically generate calculation results based on matching strategies.
[0040] In a preferred embodiment, the step of assigning multi-dimensional confidence assessment to the calculation results in real time and outputting the results includes the following steps:
[0041] S41. Generate species-dimensional confidence scores based on classification rule matching degree and multi-source data consistency; calculate confidence scores based on the grade probability differences of the freshness classification model; analyze the fluctuation characteristics of the weight calculation results and generate confidence scores; bind the triple confidence scores with the original data into structured output.
[0042] S42. Processing results are pushed in real time through the edge device hardware interface via separate channels.
[0043] The system assigns multi-dimensional confidence assessments to the calculation results in real time and outputs them, enabling the structured binding of the three confidence levels of species, freshness, and weight calculation, thereby reflecting the reliability of the results more intuitively.
[0044] The beneficial effects of this invention are as follows:
[0045] 1. This invention classifies live animals into fish, birds, and crustaceans for weighing, enabling precise adaptation to the movement patterns of different species. Fish possess unique characteristics such as a fluctuation frequency of 2.5-5.0 Hz and a vertical acceleration variance threshold; birds have unique movement parameters such as wing flapping cycles and the number of weight abrupt changes; and crustaceans exhibit characteristics such as lateral displacement ratio and the number of shell collisions. By selectively extracting these quantitative features and establishing a rule base, interference in weighing data caused by differences in species movement characteristics can be reduced from the source, improving the adaptability and basic accuracy of weighing across different species.
[0046] 2. When the confidence level of the camera device in identifying the type of item is low, the present invention can significantly improve the accuracy of species identification by combining live animal weighing data for secondary inference. When the confidence level of the camera identification is less than 90%, the species classification rules can be matched by weight fluctuation patterns. Furthermore, the confidence level of the image and the fluctuation pattern is reduced by weighted fusion. This step effectively makes up for the shortcomings of image recognition under conditions of similar shape, poor angle, or environmental interference, ensuring more accurate species identification and providing a reliable foundation for the matching of subsequent weighing strategies.
[0047] 3. This invention further determines the freshness of known live organisms and employs differentiated calculation methods for different freshness levels. This not only accelerates the weighing process but also improves data accuracy. For high-vitality organisms, median filtering is used with dynamically adjusted window sizes to filter out drastic fluctuations; for medium-vitality organisms, dynamic weighted moving average filtering is used with differentiated window durations; and for low-vitality organisms, the processing is simplified. This targeted strategy avoids redundant calculations in uniform processing and speeds up data processing. At the same time, by matching the motion characteristics corresponding to freshness, the calculation results are closer to the actual weight, significantly improving accuracy. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart of an edge computing optimization method for fresh produce weighing data of live animals according to an embodiment of the present invention. Detailed Implementation
[0050] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0051] According to an embodiment of the present invention, an edge computing optimization method for fresh produce weighing data of active and live animals is provided.
[0052] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, the edge computing optimization method for fresh produce weighing data of live animals according to an embodiment of the present invention includes the following steps:
[0053] S1. Collect time-series weighing data of fresh species under high, medium and low viability conditions, extract quantitative features, and simultaneously train viability classification rules and species classification rules through machine learning to establish a rule base. Then, set filtering and calculation strategies according to the viability rules.
[0054] Furthermore, time-series weighing data of fresh species under high, medium, and low viability states are collected, quantitative features are extracted, and machine learning is used to train viability classification rules and species classification rules to establish a rule base. Then, filtering and calculation strategies are set according to the viability rules, including the following steps:
[0055] S11. Collect weighing time-series data of different fresh species under high, medium and low vitality conditions;
[0056] S12. Process and analyze the collected weighing time series data of different species and different activity states, and extract quantitative characteristic parameters that characterize the movement pattern and weight fluctuation characteristics.
[0057] S13. Based on the extracted quantitative features, machine learning algorithms are used for training to construct a freshness level and species differentiation model, and the key feature thresholds of the model are transformed into explicit classification rules to form a rule base.
[0058] Furthermore, based on the extracted quantitative features, machine learning algorithms are used for training to construct a freshness level and species differentiation model. The key feature thresholds of the model are then transformed into explicit classification rules, forming a rule base, including the following steps:
[0059] S131. The importance of the extracted quantitative features is assessed, and the subset of key features that are most discriminative in distinguishing species types and judging freshness levels is selected. Fresh species include the three major categories of fish, poultry and crustaceans.
[0060] S132. Using the labeled dataset, train a freshness grading classification model and a species differentiation model using machine learning algorithms, where the formulas are as follows:
[0061]
[0062] k∈{fish, birds, crustaceans}
[0063] Where X is the input feature vector, containing temporal features such as weight fluctuation frequency, amplitude ratio, and kinetic energy, and W... k Let b be the weight vector of the k-th species. k The bias term for the k-th species, where S is the final determined species category;
[0064]
[0065] Where x is the input feature vector, including acceleration variance, motion duration ratio, weight fluctuation entropy, and quiescent period proportion, and w is the weight vector. t x is a scalar, representing the overall vitality score. A larger value indicates stronger vitality, and a smaller value indicates weaker vitality. P(freshness ≥ g|x) is the probability value that the vitality reaches the g level output, which is the level threshold.
[0066] S133. Calculate the mutual information value between each feature and the species and viability label. Retain features with mutual information values exceeding a preset threshold and low computational complexity, including fish features (fluctuation frequency ∈ (2.5-5.0Hz), vertical acceleration variance threshold > 0.3), and poultry features (wing flapping period < 0.4s, weight mutation number ≥ 3 times / second), crustacean lateral displacement ratio > 0.6, shell collision number ≥ 5 times / second, and silent percentage > 75%). Establish a three-dimensional viability judgment matrix based on feature thresholds. Specifically, if the movement energy score > species-specific threshold (fish: 4.2, poultry: 3.8, crustaceans: 3.5), it is judged as high viability; if the movement energy of fish is in the range of 2.2-4.2, the wing flapping frequency of poultry drops to 1-2Hz, and the lateral displacement ratio of crustaceans is in the range of 0.4-0.6, it is judged as medium viability; if fish and poultry remain still for more than 5 seconds, the silent percentage of crustaceans is > 80%, and the shell collision is < 2 times, it is judged as low viability. And establish a rule base based on these data.
[0067] S14. Based on the established freshness classification rules, set the optimal filtering algorithm and weight calculation strategy for different freshness levels.
[0068] Furthermore, based on the aforementioned freshness classification rules, the optimal filtering algorithm and weight calculation strategy are set for different freshness levels, including the following steps:
[0069] S141. When the freshness classification rule determines high vitality: Median filtering is used with a fixed window size of 1.0 second to filter transient noise caused by the animal's violent struggle and capture continuous local minima in the filtered data stream, eliminating false peaks caused by muscle contraction. In addition, if the standard deviation of weight fluctuation is >5g within 3 consecutive seconds, the sampling window is automatically reduced to 0.5 seconds to improve sensitivity. When the freshness classification rule determines medium vitality: Dynamic weighted moving average filtering is used with the window duration set according to species differences: fish: 1.5s, poultry: 1.2s, crustaceans: 2.0s. Near-end data are given higher weights, and the mean within the window is calculated every 0.2 seconds. If the fluctuation is <3% for 5 consecutive times, the final value is locked. When the freshness classification rule determines low vitality, active filtering is not used. For fish and poultry, the average value of the last 3 seconds of the continuous rest period is taken. For crustaceans, the stable value after more than 5 seconds of silence is taken. In addition, if the weight drift is >2g / second, it is determined as an animal escape and the detection is reactivated.
[0070] It should be noted that by collecting weighing time-series data of fish, poultry, and crustaceans under different vitality states and extracting quantitative features, using machine learning to train classification rules to establish a rule base, and then setting filtering and calculation strategies based on freshness rules, the weighing system can accurately adapt to the movement characteristics of different species and freshness levels, reducing weighing errors caused by species differences and vitality fluctuations from the source. At the same time, the rule-based filtering and calculation strategies improve the real-time processing efficiency of edge devices, achieving high precision and high stability in dynamic weighing, and providing reliable data support for scenarios such as accurate measurement and graded pricing of fresh and live animals.
[0071] S2. Determine the type of living creature by capturing images through the camera, load the corresponding rule library from the species feature library of the edge device, and when the classification confidence is lower than 90%, infer the matching species classification rules through the weight fluctuation pattern.
[0072] Furthermore, the type of living organism is determined by capturing images through a camera, and the corresponding rule base is loaded from the species feature database of the edge device. When the classification confidence is below 90%, the species classification rule is matched by secondary inference through weight fluctuation patterns, including the following steps:
[0073] S21. Real-time capture of live animal images using the camera of the edge device, input into a pre-set lightweight convolutional neural network model for species classification, the model extracts morphological features from the images, including streamlined outlines of fish, feather textures of birds, and geometric features of crustaceans, and outputs preliminary species labels and confidence scores.
[0074] S22. Verify the confidence level of the output. If the confidence level meets the standard, directly call the freshness grading rules and weight calculation strategy of the species. If the confidence level is insufficient, activate the weight fluctuation mode secondary inference process and freeze the image sampling module in parallel to reduce energy consumption. In addition, when the confidence level is less than 20% due to image blurring, live animal occlusion or ambient light interference, skip the initial screening and directly enter the secondary inference.
[0075] S23. Calculate the peak value of the weight fluctuation spectrum and compare the real-time fluctuation waveform with the pre-stored species feature library. At the same time, load the three types of basic rule sets of species in the edge storage. If the matching degree is >85%, output the species label and cover the image initial screening result. If the matching degree is <40%, it is determined to be an unknown species and triggers manual review.
[0076] It should be noted that by using images captured by a camera to determine the type of living creature and loading the corresponding rule base, and using the weight fluctuation mode for secondary inference when the classification confidence is less than 90%, the system can quickly identify the species by image recognition to improve processing efficiency, and supplement the verification by weight features, effectively reducing the misjudgment rate of a single recognition method. In particular, for living creatures with similar shapes or poor camera angles, the system can significantly improve the accuracy of species classification, laying the foundation for accurate matching of subsequent filtering and calculation strategies.
[0077] S24. Generate a multi-dimensional confidence report and output the report.
[0078] Furthermore, a multi-dimensional confidence report is generated, and the report output includes the following steps:
[0079] S241. When the confidence level of weight fluctuation inference is higher than that of image confidence level, the weight data result shall be used as the final judgment basis, and the corresponding freshness rule shall be loaded according to the final judgment species. At the same time, the time stamp deviation between image and weight data shall be forced to be <50ms.
[0080] S242. Set the image confidence weight to 0.6 × original confidence, and the fluctuation mode confidence to 0.8 × matching degree - 0.2 × noise interference coefficient. After weighted fusion, output species labels and association strategies when the final confidence value exceeds 90%. Store the original data and upload it to the cloud for analysis when the confidence value remains below 90%.
[0081] S3. Determine the freshness level by comparing the real-time high-frequency weight data stream with the rule base, and then combine the species type and fine freshness to match filtering and calculation strategies and complete the weight calculation.
[0082] Furthermore, the freshness level is determined by comparing real-time high-frequency weight data streams with a rule base. Then, combined with species type and refined freshness, matching filtering and calculation strategies are applied to complete the weight calculation, including the following steps:
[0083] S31. Continuously collect weight time-series data streams above 100Hz through the weighing sensor, and perform real-time noise filtering and feature extraction.
[0084] S32. Match the preprocessed data with the species feature library to determine the freshness. Specifically, first, output the initial judgment level based on the species-specific threshold, and then maintain the judgment if the current level is met 9 out of 10 consecutive feature calculations.
[0085] S33. Based on a dual-dimensional label including species category and freshness level plus a calculation strategy;
[0086] S34. Dynamically generate calculation results based on matching strategies.
[0087] It should be noted that the steps for weighing specific fish are as follows:
[0088] When weighing live fish, vigorous struggling indicates high vitality.
[0089] Initially, the live fish struggled violently, with kinetic energy of 5.8, which is greater than the threshold of 4.2. Therefore, the strategy implemented was: median filtering with a 1.0-second window to filter transient noise. The original data fluctuation range was [1200g, 1850g].
[0090] Simultaneously, local minimum value capture is performed. The local minimum value sequence is extracted from the filtered data. The sequence is [1423g, 1421g, 1418g]. Then, it is dynamically adjusted. The standard deviation of the fluctuation in the second second is 6.3g (>5g). The window is narrowed to 0.5 seconds, and the median of the minimum value sequence, 1421g, is taken as the output.
[0091] When weighing live fish, moderate struggling indicates moderate vitality;
[0092] The kinetic energy drop falls within the 2.2-4.2 range. A 1.5-second window specifically for fish is used, and the weight of the last 50% of the data is multiplied by 1.8.
[0093] The data stream is processed, and the data stream is shown in Table 1 below:
[0094] Table 1
[0095]
[0096] It was also learned that the fluctuation was less than 2.1% for 5 consecutive times, so the final stable value of the output was 1436g;
[0097] S4. Assign multi-dimensional confidence assessments to the calculation results in real time and output the results.
[0098] Furthermore, the calculation results are assigned multi-dimensional confidence assessments in real time, and the output of the results includes the following steps:
[0099] S41. Generate species-dimensional confidence scores based on classification rule matching degree and multi-source data consistency; calculate confidence scores based on the grade probability differences of the freshness classification model; analyze the fluctuation characteristics of the weight calculation results and generate confidence scores; bind the triple confidence scores with the original data into structured output.
[0100] S42. Processing results are pushed in real time through the edge device hardware interface via separate channels.
[0101] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for edge computing optimization of live weight data of live animals, characterized in that, The method comprises the following steps: S1, collecting weight time series data of fresh species in high, medium and low activity states, extracting quantitative features, training freshness classification rules and species classification rules through machine learning to establish a rule base, and setting filtering and calculation strategies according to the freshness rules; S2, judging the type of living things through image acquisition by a camera, loading the corresponding rule base from the edge device species feature library, and when the classification confidence is lower than 90%, matching the species classification rule through secondary inference of weight fluctuation mode; S3, judging the freshness level by comparing the rule base with real-time high-frequency weight data flow, combining the species type and fine freshness, matching the filtering and calculation strategy, and completing weight calculation; S4, giving multi-dimensional confidence evaluation to the calculation result in real time, and outputting the result.
2. The edge computing optimization method for live weight data of fresh food for active animals according to claim 1, characterized in that, The method comprises the following steps: S11, collecting weight time series data of different fresh species in high, medium and low activity states; S12, processing and analyzing the collected weight time series data of different species and different activity states, extracting quantitative feature parameters representing motion mode and weight fluctuation characteristics; S13, based on the extracted quantitative features, using machine learning algorithm for training, constructing freshness level and species differentiation model, and converting the key feature threshold of the model into explicit classification rules to form a rule base; S14, for different freshness levels, setting the best filtering algorithm and weight calculation strategy based on the freshness classification rules established in the foregoing.
3. The edge computing optimization method for live weight data of fresh food for active animals according to claim 2, characterized in that, The method comprises the following steps: S131, evaluating the importance of the extracted quantitative features, and selecting the key feature subset that is most discriminative for distinguishing species type and judging freshness level, and the fresh species include fish, poultry and crustacean; S132, using the labeled data set, using machine learning algorithm to train freshness level classification model and species differentiation model, and the formulas are respectively: k∈{fish, poultry, crustacean} wherein X is an input feature vector, containing time series features such as weight fluctuation frequency, amplitude ratio, motion energy, W k is a weight vector of the kth species, b k is a bias term of the kth species, and S is the final determined species category. Wherein, x is an input feature vector, including acceleration variance, motion duration ratio, weight fluctuation entropy, and silent period ratio, w is a weight vector, w t x is a scalar, i.e., a vitality comprehensive score, and the larger the value, the stronger the vitality, and the smaller the value, the weaker the vitality, θ g is a grade threshold value, and P(freshness≥g|x) is a probability value of the vitality reaching the g-grade output. S133, calculate the mutual information value of each feature with the species and freshness label, and retain the features with mutual information value exceeding the preset threshold and low calculation complexity, including fish features, fluctuation frequency ∈ (2.5-5.0 Hz), vertical acceleration variance threshold >0.3, poultry features, wing beating cycle <0.4 s, weight mutation frequency ≥3 times / s, crustacean side shift distance ratio >0.6, shell collision frequency ≥5 times / s, and silence ratio >75%; a three-dimensional vitality determination matrix is established based on the feature threshold, specifically, the motion energy score > species-specific threshold, fish: 4.2, poultry: 3.8, and crustacean: 3.5, and the high vitality is determined; the motion energy of fish is in the interval of 2.2-4.2, the wing beating frequency of poultry is reduced to 1-2 Hz, and the side shift distance ratio of crustacean is in the interval of 0.4-0.6, and the medium vitality is determined; the fish and poultry are continuously stationary for >5 seconds, the silence ratio of crustacean is >80% and the shell collision is <2 times, and the low vitality is determined; and the data is used to establish a rule base.
4. The edge computing optimization method for live weight data of fresh food for active animals according to claim 2, characterized in that, The best filtering algorithm and weight calculation strategy are set based on the freshness classification rule established in the foregoing for different freshness grades, including the following steps: S141, when the freshness classification rule determines high vitality: using median filtering, the window size is fixed to 1.0 second, filtering the transient noise caused by the violent struggle of the live animal, and capturing the continuous local minimum value sequence in the filtered data stream, eliminating the false peak value caused by muscle contraction, in addition, when the weight fluctuation standard deviation is >5 g in 3 seconds, the sampling window is automatically reduced to 0.5 seconds to improve the sensitivity; when the freshness classification rule determines medium vitality: using dynamic weighted moving average filtering, the window length is set according to the species difference, fish: 1.5 s, poultry: 1.2 s, and crustacean: 2.0 s, and the near-end data is given a higher weight, the mean value in the calculation window is calculated every 0.2 seconds, and if the fluctuation is <3% for 5 times in a row, the final value is locked; when the freshness classification rule determines low vitality, no active filtering is used, and for fish and poultry, the average value of the last 3 seconds of the continuous stationary period is taken, and for crustacean: the stable value when the silence is more than 5 seconds is taken; in addition, if the weight drift is >2 g / s, it is determined that the organism escapes and the detection is reactivated.
5. The edge computing optimization method for live weight data of fresh produce facing the active living things according to claim 1, characterized in that, The type of live animal is determined by image acquisition through a camera, the corresponding rule base is loaded from the edge device species feature base, and when the classification confidence is lower than 90%, the weight fluctuation mode is used to infer the matching species classification rule, including the following steps: S21, the camera of the edge device captures live animal images in real time, inputs a pre-set lightweight convolutional neural network model for species classification, the model extracts morphological features from the image, including fish streamlined profile, poultry feather texture, and crustacean shell geometric features, and outputs the preliminary species label and confidence; S22, the output confidence is verified, when the confidence meets the standard, the freshness grading rule and weight calculation strategy of the species are directly called, when the confidence is insufficient, the weight fluctuation mode secondary inference process is activated, and the image sampling module is frozen in parallel to reduce energy consumption, in addition, when the image is blurred, the live animal is blocked or the environmental light interference causes the confidence to be <20%, the primary screening is skipped and the secondary inference is directly entered. S23, calculate the weight fluctuation spectrum peak, and compare the real-time fluctuation waveform with the pre-stored species characteristic library, load the three types of species basic rule set preset in the edge storage, the matching degree is greater than 85%, output the species label, and cover the image preliminary screening result, when the matching degree is less than 40%, it is determined as an unknown species and triggers manual review; S24, generate a multi-dimensional confidence report, and output the report.
6. The edge computing optimization method for live weight data of fresh produce facing the active living things according to claim 1, characterized in that, The multi-dimensional confidence report is generated and output, including the following steps: S241, when the weight fluctuation inference confidence is higher than the image confidence, the weight data result is used as the final judgment basis, and the corresponding freshness degree rule is loaded according to the final judgment species, and the image and weighing data timestamp deviation is forced to be less than 50ms; S242, set the image confidence weight to 0.6x original confidence, set the fluctuation mode confidence to 0.8x matching degree-0.2x noise interference coefficient, and the final confidence value after weighted fusion, when the value is greater than 90%, output the species label and associated strategy, and when the confidence is less than 90%, store the original data and upload to the cloud for analysis.
7. The edge computing optimization method for live fresh weighing data of a lively creature according to claim 1, characterized in that, The freshness level is judged by comparing the real-time high-frequency weight data stream with the rule library, and the species type and fine freshness degree are combined to complete the weight calculation, including the following steps: S31, continuously collect weight time series data stream above 100Hz through the weighing sensor, and perform real-time noise filtering and feature extraction; S32, match the preprocessed data with the species characteristic library to determine the freshness degree, specifically: first, output the preliminary judgment level according to the species exclusive threshold, and then maintain the judgment if 9 out of 10 times of feature calculation meet the current level; S33, according to the double-dimensional label including species category and freshness degree level and calculation strategy; S34, dynamically generate calculation results based on matching strategy.
8. The edge computing optimization method for live weight data of fresh produce facing mobile animals according to claim 1, characterized in that, The multi-dimensional confidence evaluation is given to the calculation results in real time, and the results are output, including the following steps: S41, generate species dimension confidence based on classification rule matching degree and multi-source data consistency; calculate the confidence according to the probability difference of the freshness degree classification model; analyze the fluctuation characteristics of the weight calculation result and generate the confidence; bind the three confidences with the original data as a structured output; S42, push the processing results in real time through the edge device hardware interface.