A portable intelligent analysis method for food ingredients
By establishing a sampling dataset and using a deep learning network for feature recognition, the problem of insufficient comprehensiveness and timeliness in portable food analysis has been solved, achieving efficient and intelligent food detection and ensuring consumer health and safety.
Patent Information
- Application Number
- CN202411217382.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-09-02
AI Technical Summary
Existing food testing technologies are not comprehensive enough for portable food analysis, and their timeliness and intelligence are low, resulting in inaccurate analysis results that affect quality inspection results and consumer health and safety.
A sampling dataset is established, intelligent sensing devices are configured for data sampling, and feature recognition and adaptive updates are performed through deep learning networks to achieve real-time detection and feature focusing of abnormal components, forming a closed-loop system.
It improves the accuracy and efficiency of food composition analysis, ensures the timeliness and intelligence of food quality inspection, and safeguards consumer health and safety.
Smart Images

Figure CN118730932B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food detection, and in particular to a portable intelligent food component analysis method. Background Art
[0002] Portable foods are foods that are easy to carry, store, and eat. Quality monitoring of portable foods is particularly important in the food industry. Due to the special properties of portable foods, such as portability and a short shelf life, their quality stability and safety directly affect consumer health. Existing food safety testing and analysis methods often rely on expensive, complex devices with limited functionality and lack of intelligent and efficient operation. This affects the accuracy and efficiency of food testing, hindering food quality inspection and consumer health and safety. Therefore, there is an urgent need to provide an intelligent, rapid, and high-quality food testing and analysis method.
[0003] In summary, the existing technologies in the food analysis and testing process have the following problems: insufficient comprehensive analysis, low timeliness and intelligence, resulting in inaccurate analysis results, reduced analysis quality and efficiency, and a strong post-analysis result, which affects the quality inspection results and the health and safety of consumers. Summary of the Invention
[0004] The present application provides a portable intelligent food ingredient analysis method, which is used to solve the technical problems in the existing technology of food analysis and detection, such as insufficient analysis coverage, low timeliness and intelligence, resulting in inaccurate analysis results, reduced analysis quality and efficiency, and a strong post-analysis nature of the analysis results, which affects quality inspection results and consumer health and safety.
[0005] In view of the above problems, the present application provides a portable intelligent analysis method for food ingredients.
[0006] The present application provides a portable intelligent food ingredient analysis method, the method comprising:
[0007] Establish a sampling data set, which is a sampling set of portable food from the same batch, and the sampling data set includes a step sampling set and a random sampling set; configure an intelligent sensing device, and use the intelligent sensing device to sample the sampling data set to establish a monitoring data set with sample mapping; perform attention evaluation on the abnormal components of the portable food, and establish a first attention feature set based on the attention evaluation result; sample the portable food under the current batch, and establish a second attention feature set based on the sample sampling result, wherein the second attention feature set is updated through an adaptive update layer; perform feature superposition and fusion based on the first attention feature set and the second attention feature set, and perform feature focusing of a deep learning network based on the feature superposition and fusion result to establish a dynamic feature focusing layer; perform feature recognition of the monitoring data set through the deep learning network constrained by the dynamic feature focusing layer to establish a feature recognition result; feed the feature recognition result back to the adaptive update layer, execute the update of the second attention feature set, and continuously iterate the detection; generate the abnormal component detection result of the portable food based on the continuous iterative detection result.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0009] The present application provides a method for intelligent analysis of portable food ingredients, which establishes a sampling data set, wherein the sampling data set is a sampling set of the same batch of portable food, and the sampling data set includes a step sampling set and a random sampling set; configures an intelligent sensing device, and samples the sampling data set through the intelligent sensing device to establish a monitoring data set with sample mapping; performs an attention evaluation on abnormal ingredients in the portable food, and establishes a first attention feature set based on the attention evaluation result; samples of the current batch of the portable food are sampled, and a second attention feature set is established based on the sample sampling result, wherein the second attention feature set is updated through an adaptive update layer; performs feature superposition and fusion based on the first attention feature set and the second attention feature set, and performs feature focusing of a deep learning network based on the feature superposition and fusion result. , establish a dynamic feature focusing layer; perform monitoring data set feature recognition through the deep learning network constrained by the dynamic feature focusing layer, and establish feature recognition results; feed the feature recognition results back to the adaptive update layer, execute the second focus feature set update, and continuously iterate the detection; generate abnormal component detection results of portable food based on the continuous iterative detection results, which solves the problems of the existing technology in the process of food analysis and detection, such as insufficient analysis, low timeliness and intelligence, resulting in inaccurate analysis results, reduced analysis quality and efficiency, and thus making the analysis results highly post-positioned, affecting quality inspection results and consumer health and safety, and achieves the technical effect of improving the accuracy and efficiency of food component analysis, improving the timeliness and intelligence of food analysis, and thus ensuring high-quality food quality inspection to protect the health and safety of consumers. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 A flow chart of a portable intelligent food ingredient analysis method is provided for this application.
[0011] Figure 2 A schematic diagram of the process of data sampling in a portable intelligent analysis method of food ingredients is provided for this application. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0013] like Figure 1 As shown, the present application provides a portable food ingredient intelligent analysis method, the method comprising:
[0014] Step S100: establishing a sampling data set, where the sampling data set is a sampling set of portable food from the same batch, and the sampling data set includes a step sampling set and a random sampling set.
[0015] Specifically, when conducting food composition analysis, the target portable food is first sampled to obtain sample data for subsequent analysis, laying the foundation for subsequent analysis. The sampling data set includes basic information data (such as sample number, sampling date and time, production batch information, etc.), physical property data (such as color, hardness, weight and volume, etc.), chemical composition data (such as nutritional content), etc. The sampling data set also includes a stepped sampling set and a random sampling set, aiming to comprehensively reflect the quality and composition distribution of portable foods from the same batch. The stepped sampling set is used to simulate food conditions under different conditions or states, while the random sampling set is used to ensure the randomness and representativeness of the data.
[0016] Step S200: configuring an intelligent sensing device, sampling the sampling data set through the intelligent sensing device, and establishing a monitoring data set with sample mapping.
[0017] To ensure the accuracy and efficiency of portable food sampling and analysis, this application utilizes intelligent sensing devices for data sampling. These intelligent sensing devices utilize ultra-high-resolution spectral imaging technology, such as high-resolution spectral imaging (hyperspectral imaging). This technology can capture detailed chemical information on the surface and interior of food, identifying different components. This technology, combined with artificial intelligence algorithms, performs image processing and data analysis to achieve precise component identification and quantitative analysis. Representative sampling points are selected during key stages of food production, processing, and storage. For example, sampling points are set up at different stages and storage areas along the production line to ensure comprehensive coverage of the sampling points, and the distance and location between nodes maximize the diversity and representativeness of the food samples. Furthermore, because food sampling may involve multiple locations and scenarios, communication methods between sensor nodes are configured to obtain a comprehensive sampling set for the entire process. Furthermore, the collected sample data is associated with the corresponding sample food to form a monitoring dataset with sample mapping, meaning each sample is identified by a unique spectral image. For example, assume that 10 sampling points are set up on a food production line, and each sampling point uses an ultra-high-resolution spectral imaging sensor for data collection. These 10 sensors can simultaneously capture the spectral information of food samples at 10 different locations and time points. These spectral data are then associated with the corresponding food samples to form a spectral image dataset containing 10 samples.
[0018] Step S300: performing an attention evaluation on the portable food for abnormal ingredients, and establishing a first attention feature set based on the attention evaluation result.
[0019] Optionally, first identify abnormality targets—that is, which ingredients in portable foods are considered abnormal, such as additives exceeding safety standards, pesticide residues, heavy metals, and pathogenic microorganisms. Next, ultra-high-resolution spectral imaging technology is used to scan the portable food and acquire spectral information. This technology allows for contactless detection of food ingredients, offering the advantages of speed and accuracy. The collected spectral data is preprocessed to identify various ingredients in the food, including potential abnormal ingredients, by comparing them against a known spectral database or using a specific spectral analysis algorithm. This comparison can also be achieved using big data analysis techniques. Furthermore, based on food safety standards and relevant regulations, attention evaluation criteria are established for abnormal ingredients, such as limits for certain additives and maximum allowable levels of pesticide residues. Identified abnormal ingredients are compared against the established evaluation criteria to assess whether they exceed safety limits or pose potential risks, resulting in an attention evaluation result. Finally, based on the attention evaluation results, abnormal ingredients requiring special attention are identified. These ingredients will constitute the first set of attention features. Each attention feature is described in detail, including its chemical name, safety limit, and detection method. For example, suppose that during spectral imaging testing, it is found that the content of a certain additive A in portable food exceeds the safety limit. According to food safety standards, the maximum allowable amount of additive A is X mg / kg. The test results show that the content of additive A in the portable food is Y mg / kg (Y > X). Therefore, additive A becomes an important feature in the first feature set of interest.
[0020] By establishing the first feature set of concern, the source of potential safety hazards in portable food can be efficiently located, laying the foundation for subsequent analysis and improving analysis efficiency.
[0021] Step S400: sampling the portable food in the current batch, and establishing a second feature set of interest based on the sampling results, wherein the second feature set of interest is updated through an adaptive update layer.
[0022] For example, random sampling can be used to sample the current batch of portable food, ensuring that all parts of all food batches have an equal chance of being sampled. Sampling can be done by determining the number of samples to be collected based on the total number of food items or packages. For example, for small packages of food, such as those weighing more than 250g, the number of samples to be collected must be at least 6; for packages weighing less than 250g, the number of samples to be collected must be at least 10. Alternatively, sampling can be conducted based on the spatial location and temporal variation of the food, ensuring that the collected samples represent the composition and quality of the corresponding parts. For example, random sampling can be performed at different locations in the food stack, and selected large packages can be removed. Samples can then be taken from the top, middle, and bottom layers and five points (four points on the periphery and the center) of each package using a sampler.
[0023] Next, the samples are subjected to preliminary analysis to detect key components in the food, such as nutrients, additives, and contaminants. Based on the preliminary analysis results, abnormal or non-compliant components are identified as secondary features of concern. In other words, the primary feature set includes features that are directly related to and crucial to food safety, such as the content of key additives and the detection results of pathogenic bacteria, while the secondary feature set includes features that have a certain impact on food safety but are slightly less important than the primary features of concern, such as nutrient content and packaging integrity.
[0024] Furthermore, the identified second features of interest are organized into a feature set containing these features and related information, such as feature names, test values, and safety limits. The system continuously collects the latest data related to the second features of interest, such as new food safety standards, new test methods, and new test results. This collected data is analyzed to assess the status and trends of the second features of interest. Based on the analysis, a data update strategy is developed. If the status or trends of the second features of interest change, such as if the test value exceeds the safety limit or a new feature of interest emerges, the second feature of interest set is updated. Finally, the update strategy is executed, adding new data or information to the second feature of interest set or modifying or deleting existing data or information. For example, suppose during sampling, the content of Additive B in a batch of portable food is found to exceed the safety limit. Additive B is identified as the second feature of interest. Subsequently, the adaptive update layer system continuously collects the latest data related to Additive B, such as new safety limits and new test methods. If the new safety limit changes, the system updates the relevant information about Additive B in the second feature of interest set, including the new safety limit and test value. In this way, it can be ensured that the second set of focus characteristics always remains consistent with current food safety regulatory requirements, providing timely and accurate information support for food safety supervision.
[0025] Step S500: Perform feature superposition and fusion based on the first focus feature set and the second focus feature set, perform feature focusing of the deep learning network based on the feature superposition and fusion results, and establish a dynamic feature focusing layer.
[0026] Furthermore, the first and second feature sets of interest are superimposed, merging all features from the two feature sets into a new feature set. This can be achieved, for example, through simple feature concatenation, where the two feature vectors are concatenated end-to-end. Next, a suitable deep learning network structure is designed, such as a convolutional neural network (CNN), recurrent neural network (RNN), or fully connected network (DNN). The choice of network structure should be determined based on the specific application scenario and the characteristics of the feature set, and those skilled in the art can customize it based on actual needs. A feature focusing layer is added to the deep learning network to focus on the superimposed features. The feature focusing layer can be implemented using an attention mechanism, enabling the network to automatically learn and focus on features that contribute most to the task. The attention mechanism can be implemented by introducing additional weight vectors or matrices. These weights are automatically learned and adjusted during training to reflect the importance of different features to the task. Furthermore, dynamic performance requirements are imposed on the feature focusing layer. The key to the dynamic feature focusing layer is its ability to dynamically adjust the feature focusing weights as the input data changes. This performance is achieved by adding learnable parameters (such as a weight matrix) to the network. These parameters are updated during training based on the distribution and labels of the input data. Furthermore, a feedback mechanism can be introduced to enable the dynamic feature focusing layer to better adapt to changes in the input data. Finally, the deep learning network is trained and validated using a well-labeled dataset. Through continuous iteration and optimization of the network parameters, the network learns an effective feature focusing strategy and achieves good performance on the validation set.
[0027] By collecting data from food samples in real time and inputting it into the network for prediction and analysis, abnormal ingredients in food can be discovered in a timely manner and corresponding measures can be taken, thereby improving the efficiency and accuracy of ingredient analysis.
[0028] Step S600: performing feature recognition of the monitoring data set through the deep learning network constrained by the dynamic feature focusing layer to establish a feature recognition result.
[0029] For example, a monitoring dataset containing features related to portable food is prepared. This dataset includes multiple samples, each containing a series of features (such as spectral data, chemical analysis results, and physical properties). The monitoring dataset is preprocessed to ensure that the data format, range, and normalization are consistent with network input requirements. A trained deep learning network model with a dynamic feature focusing layer is loaded and set to evaluation mode to ensure that model parameters are not updated during the feature recognition process. Each batch of data is input into the deep learning network, and the network's forward propagation process calculates the output. Because the network includes a dynamic feature focusing layer, it automatically adjusts feature weights during this process to focus on more important features. The network's output for each sample is collected, typically a series of probability values or scores indicating the likelihood that the sample belongs to different categories. A pre-set threshold is used to determine whether the sample belongs to a specific category (such as an abnormal category). Finally, the feature recognition results for each sample (including classification labels, probability values, etc.) are stored for subsequent analysis and processing. By utilizing a deep learning network with a dynamic feature focusing layer to effectively perform feature recognition on the monitoring dataset and establish feature recognition results based on the network output, it helps to promptly detect abnormal ingredients in food and ensure food safety.
[0030] Step S700: Feedback the feature recognition result to the adaptive update layer, perform a second focus feature set update, and continue iterative detection.
[0031] Optionally, feature recognition results are collected from the deep learning network and evaluated to determine their accuracy and whether there is room for improvement. This can be accomplished by comparing the predicted results with the actual labels and calculating performance metrics such as precision, recall, and F1 score. Furthermore, based on the feature recognition results, the importance of different features in the recognition process is analyzed by examining the network's weights in the feature focus layer, attention scores, or other relevant metrics. One or more trigger conditions are set to determine when the second feature set of interest should be updated. These conditions may include a decrease in recognition accuracy, the emergence of new types of abnormal features, or fluctuations in model performance within a specific time period. When the update trigger conditions are met, new data related to the second feature set of interest is collected. This data may come from new food samples, new testing methods, or new research results. The newly collected data is analyzed to identify new features or new variations of existing features that may have a significant impact on food safety. These newly identified features or variations are added to the second feature set of interest, or existing features are adjusted or removed as needed. Finally, the deep learning network is retrained using the updated second feature set of interest. During the training process, new data and feature sets can be used to optimize the model's parameters and structure to improve its recognition capabilities in new or changing scenarios. After the model is retrained, the monitoring dataset is used again for feature recognition and the model's performance is evaluated. If performance improves, the model is used again for iterative testing. If performance does not improve significantly or even deteriorates, further adjustments to the model structure, algorithm optimization, or collection of more data may be necessary to improve the model.
[0032] Through the above steps, a closed-loop system that can continuously learn and optimize can be established for abnormal feature detection of portable food. The system can not only identify abnormal ingredients in food in a timely manner, but also automatically update feature sets and models based on new data and changes to cope with the ever-changing food safety challenges.
[0033] Step S800: Generate abnormal component detection results of portable food based on the continuous iterative detection results.
[0034] Specifically, all results from the iterative testing of the deep learning network are collected. These results include feature recognition results, classification labels, and probability values for each portable food sample. Abnormal component identification (i.e., the threshold comparison process described above) is performed on these test results, and the identified results are output as abnormal component detection results. This output can be a concise and clear abnormal component detection report format, including key information such as sample information (such as name, batch number, production date), abnormal component name, and detection probability or confidence level. Based on the abnormal component identification results, relevant information is entered into the report template. For each sample containing an abnormal component, the abnormal component name, detection probability, or confidence level should be listed in detail. Finally, the generated abnormal component detection report is promptly fed back to the relevant departments or personnel so that they can take appropriate measures. Samples with high levels of abnormal components should be immediately stopped from sale or use, and further testing and analysis should be conducted. Generating abnormal component detection results for portable foods based on continuously iterative testing can provide strong support for the optimization and improvement of food safety testing.
[0035] Furthermore, if Figure 2 As shown, the step S100 of establishing the sampling data set further includes:
[0036] Step S110: Obtain the total amount of food in the current batch of portable food.
[0037] Step S120: determining the sampling amount of the sampling data set according to the total amount of food.
[0038] Step S130: performing proportional division of step sampling and random sampling based on the sampling amount to establish the step sampling quantity and the random sampling quantity.
[0039] Step S140: performing step segmentation of the portable food in the current batch according to the step sampling quantity, and establishing a step sampling set according to the step segmentation result.
[0040] Step S150: excluding the step sampling set from the portable food in the current batch, and randomly selecting a random sampling quantity for the portable food after being eliminated to establish a random sampling set.
[0041] Step S160: establishing a sampling data set according to the step sampling set and the random sampling set.
[0042] For example, the total quantity or weight of the current batch of portable food is determined. This step can be accomplished by counting or weighing. Accurately obtaining the total quantity of food is essential for subsequent sampling. Furthermore, the sampling size of the sampling dataset is determined based on food industry standards and actual needs, taking into account the total quantity of food. The sampling size should take into account factors such as sample representativeness, detection efficiency, and cost. After determining the sampling size, the sample is divided into a stepped sampling quantity and a random sampling quantity according to a certain ratio. The combination of stepped and random sampling can balance sample representativeness and randomness, improving sampling accuracy. Stepped sampling specifically refers to segmenting or grouping food according to certain rules or standards, and then selecting a certain number of samples from each segment or group. This sampling method ensures that samples are selected from each segment or group, thereby improving sample representativeness. Random sampling specifically refers to randomly selecting a certain number of samples from the food. This sampling method ensures randomness and prevents human factors from influencing the sampling results.
[0043] After sampling, the current batch of portable food is segmented into steps according to the requirements of step sampling. The specific method of step segmentation can be determined based on factors such as the characteristics and packaging of the food. After segmentation is completed, a corresponding number of samples are selected from each step or group to establish a step sampling set. Then, after the step sampling set is established, it is removed from the current batch of portable food. Then, a random sampling number is randomly selected for the removed food to ensure that each sample has the opportunity to be selected. After the random selection is completed, a random sampling set is established. Finally, the step sampling set and the random sampling set are merged to form the final sampling data set. This data set will be used for subsequent quality testing and analysis.
[0044] Furthermore, the portable food is evaluated for abnormal ingredients, and a first set of attention features is established based on the evaluation results. Step S300 of this application further includes:
[0045] Step S310: Obtain the occurrence frequency of abnormal components in the big data, perform frequency attention evaluation based on the occurrence frequency, and generate a frequency attention evaluation result.
[0046] Step S320: performing importance analysis on the abnormal components, completing importance attention evaluation based on the importance analysis results, and generating importance attention evaluation results.
[0047] Step S330: Complete the attention evaluation according to the frequency attention evaluation result and the importance attention evaluation result.
[0048] Furthermore, data containing abnormal ingredients is screened from a large dataset related to portable foods. This data may come from various sources, such as food safety monitoring agencies, food production companies, and consumer feedback. Machine learning and pattern recognition techniques are used to identify abnormal ingredients from the collected data. These abnormal ingredients may include additives, contaminants, pathogens, and other substances that do not meet food safety standards. The number of times each abnormal ingredient appears in the dataset is counted, and its frequency of occurrence is calculated. This frequency calculation can be based on the total number of samples in the dataset or segmented by time, region, product category, and other dimensions. One or more frequency thresholds are set based on food safety standards and business requirements to distinguish abnormal ingredients with different frequency levels. The frequency of each abnormal ingredient is compared with the set thresholds, and the ingredient is assigned to a frequency level (e.g., low frequency, medium frequency, or high frequency). Based on the frequency level of the abnormal ingredient, a corresponding attention score or label is assigned. Frequent abnormal ingredients may receive a higher attention score, while infrequent abnormal ingredients may receive a lower attention score.
[0049] Next, key factors influencing the importance of abnormal ingredients are identified, such as their potential health impact, impact on food quality, and regulatory requirements. Each influencing factor is assigned a corresponding weight and scoring criteria, and the abnormal ingredients are quantitatively evaluated. Specific quantitative evaluation methods can be implemented through expert scoring, questionnaires, historical data analysis, and other methods. Finally, an importance score is calculated for each abnormal ingredient based on the quantitative evaluation results. The importance score can reflect the potential impact of the abnormal ingredient on food safety and consumer health. The importance score of the abnormal ingredient is compared with the set threshold and assigned to different importance levels (such as low importance, medium importance, and high importance). Based on the importance level of the abnormal ingredient, a corresponding attention score or label is assigned. High-importance abnormal ingredients may have a higher attention score and require special attention and handling.
[0050] Finally, the frequency and importance attention evaluation results are comprehensively considered, and a final attention score or label can be calculated using methods such as weighted average or weighted summation. Abnormal ingredients are sorted and prioritized based on the final attention score or label, which helps determine which abnormal ingredients require priority treatment or further attention. The attention evaluation results are presented to users or relevant decision-makers in a visual format (such as charts or reports) so that they can take appropriate actions based on the evaluation results. Through the above steps, the frequency and importance of abnormal ingredients in portable foods can be comprehensively and systematically assessed, providing strong support for food safety supervision and consumer health.
[0051] Furthermore, the feature recognition result is fed back to the adaptive update layer, the second feature set of interest is updated, and the iterative detection is continued. Step S700 of the present application also includes:
[0052] Step S710: configuring an iterative monitoring window, and using the iterative monitoring window to monitor the feedback of feature recognition results.
[0053] Step S720: Perform incentive analysis within the iterative monitoring window according to the supervision results and establish window incentives.
[0054] Step S730: performing excitation compensation on the feature recognition result input to the adaptive update layer through the window excitation, and performing a second focus feature set update according to the excitation compensation result.
[0055] Specifically, the iterative monitoring cycle is determined based on system requirements. This cycle can be set based on factors such as detection speed, data volume, and food product change rate. Next, the size of the iterative monitoring window is set. This determines the number of feature recognition results considered during each iteration. A larger window can include more historical data but may include older, irrelevant data; a smaller window focuses more on recent data. Before the iteration begins, the iterative monitoring window is initialized to prepare for receiving feature recognition results.
[0056] During each monitoring cycle, feature recognition results obtained by the deep learning network are collected. These collected feature recognition results are evaluated and compared with known standard data to determine their accuracy, reliability, and other aspects. A supervisory signal is generated based on the evaluation results. This supervisory signal can be binary (e.g., true / false) or continuous (e.g., a confidence score). The supervisory results are analyzed to understand the system's performance under different features and circumstances, and incentive criteria are then set based on the analysis results. For example, a large positive incentive can be given when the system correctly identifies an anomaly, while a small negative incentive can be given when the system falsely identifies an anomaly. Finally, based on the supervisory results and incentive criteria, a window incentive is calculated within the iterative monitoring window. This window incentive can be a single value or a multi-dimensional vector. The calculated window incentive is then applied to the feature recognition results input to the adaptive update layer. This can be achieved by directly adjusting the weights of the feature recognition results or modifying the loss function. The purpose of incentive compensation is to strengthen the system's memory of correct recognition results while correcting incorrect recognitions. The second set of features of interest is updated based on the incentive-compensated feature recognition results, including adding new features, adjusting feature weights, and removing unimportant features. The adaptive update layer dynamically adjusts the feature set to accommodate changes in different food batches. The updated second feature set of interest is re-input into the deep learning network for the next round of feature recognition. Meanwhile, new feature recognition results are collected for the next round of iterative updates. This process is repeated continuously, enabling continuous learning and improvement of the system.
[0057] Through the above steps, the ability and accuracy of identifying abnormal components in portable food can be continuously improved based on the feedback of feature recognition results and the iterative update of the adaptive update layer.
[0058] Furthermore, the incentive analysis within the iterative monitoring window is performed based on the supervision results to establish the window incentive. In this application, step S720 further includes:
[0059] Step S721: Obtain the proportion of data describing the same incentive in the supervision result, and generate a basic incentive factor according to the proportion of data.
[0060] Step S722: Calculate and obtain the incentive mean under the same incentive, and generate an additional incentive factor according to the incentive mean.
[0061] Step S723: establishing a continuous excitation attenuation of the iterative monitoring window, integrating and correcting the basic excitation factor and the additional excitation factor through the continuous excitation attenuation, and establishing the window excitation according to the integrated correction result.
[0062] Optionally, the supervision results are first classified according to different incentive types, such as correct identification, false alarm, missed alarm, etc. Calculate the amount of data under each incentive type, that is, the number of times this type appears in the supervision results. Calculate the proportion of the total data volume of the supervision results based on the amount of data of each incentive type, and this proportion is the data volume proportion of this incentive type. Set a benchmark value for each incentive type, which represents the basic incentive level of this incentive type. Then, calculate the deviation from the benchmark value based on the data volume proportion of each incentive type to obtain the basic incentive factor of this incentive type. The basic incentive factor can reflect the importance of this incentive type in the supervision results.
[0063] Furthermore, data belonging to the same incentive type is filtered from the monitoring results. This data is statistically analyzed to calculate the mean of its incentive values, which represents the average level of system performance under that incentive type. One or more thresholds are set for the incentive mean, which are used to determine system performance. The calculated incentive mean is compared with the set thresholds to determine the system's performance under that incentive type. Based on the system performance judgment, an additional incentive factor is generated. If the system performance is good, the additional incentive factor is positive, enhancing the basic incentive; if the system performance is poor, the additional incentive factor is negative, weakening the basic incentive.
[0064] Next, a continuous excitation decay function is set for the iterative monitoring window. This function simulates the gradual weakening of the incentive effect over time. The base incentive factor and the additional incentive factor are used as inputs, and the decay function is applied to the calculation. This function allows the base incentive factor and the additional incentive factor to be integrated and corrected to better reflect the actual situation. Finally, the integrated and corrected base incentive factor and the additional incentive factor are added together to obtain the final window incentive. This window incentive serves as an important basis for updating the second feature set of interest in the next iteration. By continuously adjusting the size and direction of the window incentive, the system can gradually adapt to different food batches and testing environments, improving the accuracy and efficiency of identifying abnormal components.
[0065] Furthermore, the present application further includes step S900-1, and step S900-1 further includes:
[0066] Step S910 - 1 : Performing a warning level analysis based on the abnormal component detection result to establish a warning level analysis result.
[0067] Step S920-1: Determine whether the warning level analysis result meets the preset warning threshold.
[0068] Step S930 - 1 : If the warning level analysis result meets the preset warning threshold, an abnormality is directly reported according to the warning level analysis result.
[0069] For example, to ensure a timely and accurate response to potential safety risks, an early warning level analysis is required, and the decision on whether to report an anomaly is based on the analysis results. First, the detection results of the abnormal component are obtained. These results typically include key information such as the type, content, and detection time of the abnormal component. Different levels of early warning standards are established based on food safety regulations, industry standards, and actual needs. For example, the early warning levels may include low, medium, and high, or a more detailed grading system. A detailed analysis of the abnormal component detection results is conducted, including information such as the type, content, and historical records of the abnormal component. Based on the abnormal component analysis results and the early warning level standards, the severity of the food safety risk is assessed. The assessment process can comprehensively consider factors such as the type, content, historical records, and potential impact on human health of the abnormal component. Ultimately, the corresponding early warning level is determined based on the risk assessment results. This early warning level accurately reflects the magnitude and urgency of the food safety risk.
[0070] At the same time, preset warning thresholds, one or more of which are set, are set. These thresholds are used to determine whether an anomaly needs to be reported, as well as the urgency of reporting the anomaly. The determined warning level is compared with the preset warning threshold. If the warning level reaches or exceeds a certain threshold, it indicates that the food safety risk has reached a level that requires emergency measures. If the warning level meets the preset warning threshold, an anomaly report is generated. This report should include key information such as the type and content of the abnormal ingredient, the detection time, and the warning level, so that relevant personnel can quickly understand the food safety risk. The anomaly report is sent to relevant personnel, including food safety management personnel and production personnel. Notification methods can include system pop-ups, SMS notifications, email notifications, etc., to ensure that relevant personnel receive anomaly information in a timely manner. Ultimately, based on the content of the anomaly report, relevant personnel need to take appropriate emergency measures, including suspending production, recalling products, and strengthening testing, to minimize the impact of food safety risks on consumer health.
[0071] Through the above steps, the system can conduct early warning level analysis in a timely manner after abnormal components are detected, and decide whether to report the abnormality based on the analysis results, which helps to ensure the timely discovery and effective response to food safety risks and protect the health rights and interests of consumers.
[0072] Furthermore, the step S920-1 of determining whether the warning level analysis result meets the preset warning threshold may further include:
[0073] Step S921 - 1 : If the warning level analysis result cannot meet the preset warning threshold, determine whether the warning level analysis result is within a preset sensitive range.
[0074] Step S922-1: If the warning level analysis result is within the preset sensitive range, an additional collection instruction is generated according to the level of the warning level analysis result.
[0075] Step S923-1: performing additional collection and authentication of portable food in the current batch based on the additional collection instruction.
[0076] Step S924-1: Manage portable food based on the additional collection and authentication results.
[0077] Furthermore, during the process of determining whether the warning level analysis results meet the preset warning threshold, if the warning level does not reach the threshold but is within a preset sensitive range, further measures may be required to ensure food safety. First, the warning level analysis results are compared with the preset warning threshold. If the warning level is below the threshold, the current food safety risk is relatively low. Even if the risk is relatively low, it is still necessary to determine whether the warning level is within the preset sensitive range to ensure the accuracy of the analysis. One or more sensitive ranges are pre-defined, representing areas where food safety risks, while not reaching an emergency level, still require attention. If the warning level does not meet the preset warning threshold but is within the preset sensitive range, further processing is required. Specifically, if the warning level analysis result is within the preset sensitive range, additional collection instructions are generated based on the level of the warning level analysis result. Specifically, the type of additional information to be collected (such as a more detailed ingredient analysis, production batch information, etc.) is determined based on the level of the warning level analysis result, and the additional collection instructions are then generated based on the determined collection content. According to the requirements of the additional collection instructions, additional information is collected on the current batch of portable food, and the results of the additional collection verification are analyzed in detail to understand the food safety status. Ultimately, corresponding management measures will be formulated based on the certification results. If there are safety hazards in the food, recall, destruction and other measures may be required; if the food safety situation is good but still needs close attention, subsequent testing and monitoring can be strengthened.
[0078] Through the above steps, when the warning level has not reached the emergency level but is in the sensitive range, the safety status of food can be further confirmed through additional collection and certification, and corresponding management measures can be taken according to the certification results, which helps to improve the pertinence and effectiveness of food safety management.
[0079] Furthermore, the present application further includes step S900-2, and step S900-2 further includes:
[0080] Step S910-2: Configure multi-source monitoring sensors based on abnormal component detection results.
[0081] Step S920 - 2 : Authenticate and identify abnormal components of the sampled data set through the multi-source monitoring sensor.
[0082] Step S930-2: Complete portable food management based on the authentication and identification results.
[0083] Specifically, multi-source monitoring sensors of appropriate types are selected or configured based on the type and characteristics of the abnormal components detected. For example, for pesticide residue detection, sensors capable of detecting multiple pesticide residues can be selected; for heavy metal detection, sensors with high precision and sensitivity can be selected. The configured multi-source monitoring sensors collect real-time or periodic data on portable food. The collected data can include various physical parameters and chemical indicators, reflecting the food safety status. Furthermore, after pre-processing the collected data, specific signal processing algorithms or machine learning models are used to perform anomaly detection and analysis on the processed data. Based on the analysis results, the presence of abnormal components is determined, and the type and content of the abnormal components are determined. Based on the anomaly detection results, the abnormal components are authenticated and identified. The authentication and identification process can include comparison with a standard database and expert evaluation, ultimately determining the type and content of the abnormal component and its impact on food safety. Based on the authentication and identification results of the abnormal components, a risk assessment is conducted on the portable food, including the impact of the abnormal components on food safety and potential health risks. Based on the results of the risk assessment, appropriate management measures are formulated.
[0084] By configuring multi-source monitoring sensors for portable food management based on the results of abnormal component detection, real-time monitoring and effective management of food safety can be achieved, which not only helps to improve the level of food safety, but also protects the health and rights of consumers.
[0085] Through the technical solutions of the above embodiments, the present application provides a portable intelligent food ingredient analysis method, which solves the technical problems that exist in the prior art during the food analysis and detection process, such as insufficient analysis coverage, low timeliness and intelligence, resulting in inaccurate analysis results, reduced analysis quality and efficiency, and a strong post-positioning of the analysis results, affecting the quality inspection results and the health and safety of consumers. The method achieves the technical effect of improving the accuracy and efficiency of food ingredient analysis, enhancing the timeliness and intelligence of food analysis, and ensuring high-quality food quality inspection to protect the health and safety of consumers.
[0086] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the scope of the present application, and such modifications and improvements are all within the scope of protection of the present application.
Claims
1. A portable food ingredient intelligent analysis method, characterized in that: The method comprises: Establishing a sampling data set, wherein the sampling data set is a sampling set of the same batch of portable food, and the sampling data set includes a step sampling set and a random sampling set; configuring an intelligent sensing device, sampling the sampling data set through the intelligent sensing device, and establishing a monitoring data set with sample mapping; Performing an attention evaluation of abnormal ingredients on the portable food, and establishing a first attention feature set according to the attention evaluation result; Sampling samples of the current batch of the portable food, and establishing a second feature set of interest according to the sample sampling results, wherein the second feature set of interest is updated through the adaptive update layer; Perform feature superposition and fusion based on the first feature set of interest and the second feature set of interest, perform feature focusing of a deep learning network based on the result of feature superposition and fusion, and establish a dynamic feature focusing layer; Performing feature recognition of the monitoring data set through the deep learning network constrained by the dynamic feature focusing layer, and establishing feature recognition results; Feeding back the feature recognition result to the adaptive update layer, performing a second focus feature set update, and continuously iterating detection; Generate abnormal ingredient detection results of portable food based on continuous iterative test results; The step of evaluating the portable food for abnormal ingredients and establishing a first set of attention features according to the evaluation result further includes: Obtaining the occurrence frequency of abnormal components in the big data, performing frequency attention evaluation based on the occurrence frequency, and generating a frequency attention evaluation result; Perform importance analysis on abnormal components, complete importance attention evaluation based on importance analysis results, and generate importance attention evaluation results; Complete the attention evaluation according to the frequency attention evaluation results and the importance attention evaluation results; Feeding back the feature recognition result to the adaptive update layer, performing a second focus feature set update, and continuously iterating detection, further includes: Configuring an iterative monitoring window, and using the iterative monitoring window to monitor the feedback of feature recognition results; Conduct incentive analysis within the iterative monitoring window based on the supervision results and establish window incentives; The window excitation is used to perform excitation compensation on the feature recognition result input to the adaptive update layer, and the second focus feature set update is performed according to the excitation compensation result.
2. A portable food ingredient intelligent analysis method as claimed in claim 1, characterized in that: The establishing of the sampling data set further includes: Get the total amount of food in the current batch of portable food; Determining the sampling amount of the sampling data set according to the total amount of food; Performing step sampling and random sampling ratio division based on the sampling amount to establish the step sampling quantity and the random sampling quantity; Perform step-by-step segmentation of the portable food in the current batch according to the step-by-step sampling quantity, and establish a step-by-step sampling set according to the step-by-step segmentation result; Eliminating the step sampling set from the portable food under the current batch, and randomly selecting a random sampling quantity of the eliminated portable food to establish a random sampling set; A sampling data set is established according to the step sampling set and the random sampling set.
3. A portable food ingredient intelligent analysis method as claimed in claim 1, characterized in that: The iterative monitoring window incentive analysis is performed according to the supervision result to establish the window incentive, and further includes: Obtaining the proportion of data describing the same incentive in the supervision result, and generating a basic incentive factor according to the proportion of data; Calculate and obtain the incentive mean under the same incentive, and generate an additional incentive factor according to the incentive mean; A continuous excitation attenuation of an iterative monitoring window is established, the basic excitation factor and the additional excitation factor are integrated and corrected through the continuous excitation attenuation, and the window excitation is established according to the integrated and corrected result.
4. A portable food ingredient intelligent analysis method as claimed in claim 1, characterized in that: The method further comprises: Performing warning level analysis based on the abnormal component detection results and establishing warning level analysis results; Determine whether the warning level analysis result meets the preset warning threshold; If the warning level analysis result meets the preset warning threshold, an abnormality is directly reported according to the warning level analysis result.
5. A portable food ingredient intelligent analysis method as claimed in claim 4, characterized in that: The determining whether the warning level analysis result meets the preset warning threshold value also includes: If the warning level analysis result cannot meet the preset warning threshold, determining whether the warning level analysis result is within a preset sensitive interval; If the warning level analysis result is within the preset sensitive interval, generating an additional collection instruction according to the level of the warning level analysis result; Perform additional collection authentication of portable food under the current batch based on the additional collection instruction; Manage portable food based on additional collection certification results.
6. A portable food ingredient intelligent analysis method as claimed in claim 1, characterized in that: The method further comprises: Configure multi-source monitoring sensors based on abnormal component detection results; Authentication and identification of abnormal components of the sampled data set by means of the multi-source monitoring sensor; Complete portable food management based on the certification identification results.
Citation Information
Patent Citations
A Physical and Chemical Data Analysis System for Food Safety Risk Monitoring
AU2020103340A4
Rice safety risk assessment method based on multi-machine learning algorithm fusion
CN114764682A
Adaptive correlation perception unsupervised deep learning anomaly detection method
CN115879505A
Food classification method and system based on deep learning and readable storage medium
CN116933156A
Food safety monitoring method and system based on big data
CN117670378A
