A food quality safety risk assessment method and system
Through multi-spectral imaging technology and image processing methods, the problem of identifying changes in food packaging and gas leakage problems has been solved, and accurate assessment and timely control of food quality and safety risks have been achieved.
Patent Information
- Application Number
- CN202510139104.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-08
AI Technical Summary
The prior art is difficult to accurately identify potential changes and gas leakage problems inside food packaging, resulting in the incomplete and timely assessment of food quality and safety risk.
A multi-spectral imaging system is used to scan food packaging, collect spectral images of different bands, and extract reflective information through denoising and light equalization pre-processing, calculate gas leakage index and moisture permeability index, and conduct quality risk assessment in combination with environmental conditions.
It has achieved in-depth analysis of changes in the internal and external environment of food packaging, accurately assessed food quality and safety risks, promptly triggered risk control measures, and ensured food quality and safety.
Smart Images

Figure CN119574472B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food quality detection, and in particular to a food quality safety risk assessment method and system. Background Art
[0002] Food safety has always been a global concern, especially in the increasingly complex food supply chain, where the control of food quality and safety becomes particularly important from farm to table. As an important part of this field, food quality and safety risk assessment has become a key technology to improve the level of food safety management. With the development of modern technology, food quality and safety assessment is not only limited to conventional means such as sensory inspection and microbial testing of the food itself, but also gradually introduces high-precision and high-efficiency testing methods, especially in the monitoring of packaging technology and storage conditions. Specifically, in high-end food fields such as fresh food and cold chain logistics, the integrity of packaging materials directly affects the quality and safety of food.
[0003] At present, traditional food quality assessment methods mainly rely on appearance inspection, conventional temperature and humidity monitoring, and common physical and chemical testing methods. Although these methods can identify physical damage to the packaging surface or temperature anomalies during transportation to a certain extent, they often ignore potential changes inside the packaging, especially in some foods that have higher requirements for sealing, such as fresh food and cold chain food. Minor damage to the packaging film or gas leakage problems often cannot be accurately detected by traditional methods. In addition, existing technologies pay more attention to the surface state of the packaging, while ignoring the minor chemical changes that occur in the packaging materials during long-term transportation and storage, such as the penetration of moisture and oxygen. These changes may affect food quality only after a long time.
[0004] In addition, existing technologies lack the ability to accurately diagnose potential problems inside packaging. Traditional methods often cannot provide real-time monitoring and precise positioning of changes in gas composition within food packaging, such as oxygen, carbon dioxide, and moisture permeation. At this point, the quality of the food may have been irreversibly affected, and delays in the food distribution process by consumers or transporters have prevented the problem from being discovered and effectively controlled in a timely manner. Due to the limitations of technical means, current food quality risk assessment methods cannot comprehensively, timely, and accurately identify all potential food safety hazards. Summary of the invention
[0005] In view of the deficiencies of the prior art, the present invention provides a food quality and safety risk assessment method and system, which solves the problems mentioned in the background technology.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: A food quality and safety risk assessment method, comprising the following steps:
[0007] S1, by using a multi-spectral imaging system to scan food packaging, collect spectral food packaging images of different bands, extract the reflection information of different bands contained in each food packaging image, analyze the physical and chemical change information on the surface and inside of the packaged food packaging, and form a spectral image set S;
[0008] S2, by performing denoising preprocessing and illumination equalization preprocessing on the spectral image set S, and then performing edge detection and image threshold processing, characteristic map labels are obtained to form a characteristic map set F;
[0009] S3, calculating the risk of gas leakage and moisture penetration in the food package based on the feature graph set F, and obtaining a gas leakage index G and a moisture penetration index H;
[0010] S4, obtaining a quality risk assessment value R of the food packaging by combining the obtained gas leakage index G and moisture permeability index H with the real-time ambient humidity and ambient temperature;
[0011] S5. By comparing the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R, the quality and safety risk assessment result of the scanned food packaging is obtained, and risk control measures are triggered according to the quality and safety risk assessment result.
[0012] Preferably, said S1 includes S11 and S12;
[0013] S11, using a multispectral imaging system to scan food packaging, collecting spectral food packaging images in different bands, each spectral food packaging image contains surface and internal spectral information, and obtaining a spectral information dataset I of spectral food packaging images in several bands to reflect the integrity, physical state and quality change of the packaging;
[0014] The spectral information data set I is specifically I={Ik(x, y)|k=1, 2, ... N, (x, y)∈X}; wherein Ik represents the reflection intensity of the kth wave at the position (x, y) of the food package, N represents the total number of collected bands, and X represents the coordinate set of all pixel points in the spectral food package image.
[0015] Preferably, S12, extracting the reflection information of each spectral food packaging image according to the collected spectral information data set I, and processing the intensity data of reflections of several bands according to different bands, wherein the band reflection information includes the chemical state and physical state of the food packaging, including oxygen content, moisture penetration and packaging defects, and forming a spectral image set S by integrating the reflection information of different bands;
[0016] The spectral image set S is specifically S={Sk(x, y)|k=1, 2, ... N, (x, y)∈X}; wherein Sk(x, y) represents the spectral characteristic value of the k-th wave reflection information at the position (x, y);
[0017] Among them, the spectral characteristic value Sk(x, y) is specifically a multidimensional feature set = {Ik(x, y), UIk(x, y), AIk(x, y)}, wherein Ik(x, y) represents the reflection intensity of the kth wave at the position (x, y) of the food package, UIk represents the fluctuation mean of the kth waveband number collected at the position (x, y), and AIk(x, y) represents the standard deviation of the kth waveband number collected at the position (x, y).
[0018] Preferably, S2 includes S21 and S22;
[0019] S21. Perform denoising preprocessing and illumination equalization preprocessing on the spectral image set S, wherein the denoising preprocessing includes using Gaussian filtering, mean filtering and median filtering to remove image noise caused by environmental noise and equipment interference, and the illumination equalization preprocessing includes histogram equalization and contrast-limited adaptive histogram equalization technology to adjust the impact caused by uneven illumination, to obtain a processed spectral image set SC after denoising preprocessing and illumination equalization preprocessing.
[0020] Preferably, S22, analyzing and extracting the processed spectral image set SC, including edge detection and image threshold processing analysis, wherein the edge detection includes applying the Sobel operator to perform edge detection to obtain edge strength G(x, y), and then performing image threshold processing on the edge strength G(x, y), specifically converting the edge strength G(x, y) into a binary image by thresholding, and marking it as a feature image F(x, y), wherein the feature image F(x, y) is used as a feature map mark for defects and gas leakage in the spectral image set S, and the feature map set F is obtained by eliminating the feature images F(x, y) without feature map marks and integrating the eliminated feature images F(x, y);
[0021] The feature image F(x, y) is obtained by the following binary image conversion method:
[0022] ;
[0023] Where, Tthe represents the binary conversion threshold preset by thresholding;
[0024] When the edge strength G(x, y) ≥ the binary conversion threshold Tthe, the edge strength G(x, y) at the position (x, y) is calculated and marked as a feature map;
[0025] When the edge strength G(x, y) is less than the binary conversion threshold Tthe, the edge strength G(x, y) at the position (x, y) is set to 0 and is not marked as a feature map.
[0026] Preferably, said S3 includes S31;
[0027] S31. The risk of gas leakage and moisture penetration in food packaging is calculated based on the feature map set F, including using the change in band reflection intensity in the multispectral imaging data, combining the sensitivity of different bands to gas penetration and moisture penetration, and estimating the risk of gas leakage by calculating the change in reflection intensity, to obtain the gas leakage index G and moisture penetration index H.
[0028] Preferably, the gas leakage index G is obtained by the following calculation formula:
[0029] ;
[0030] In the formula, G(x, y) represents the gas leakage index at the position (x, y), specifically represents the gas leakage risk value at the position (x, y), and gk represents the sensitivity coefficient of the kth band to gas leakage;
[0031] The moisture permeability index H is obtained by the following calculation formula:
[0032] ;
[0033] Where H(x, y) represents the moisture penetration index at the position (x, y), specifically represents the moisture penetration risk value at the position (x, y), and hk represents the sensitivity coefficient of the kth band to moisture penetration.
[0034] Preferably, the S4 includes S41;
[0035] S41, combining the obtained gas leakage index G and moisture permeability index H with the real-time ambient humidity and ambient temperature, wherein the ambient humidity includes the real-time ambient humidity Eh, and the ambient temperature includes the real-time ambient temperature Et, and performing dimensionless processing on the real-time ambient humidity Eh and the real-time ambient temperature Et, to obtain a quality risk assessment value R of the food packaging;
[0036] The quality risk assessment value R is obtained by the following calculation formula:
[0037] ;
[0038] Wherein, r1, r2, r3 and r4 represent the weight coefficients of the gas leakage index G, the moisture permeability index H, the real-time ambient humidity Eh and the real-time ambient temperature Et, respectively, and r1+r2+r3+r4=1. The specific value is set by the user.
[0039] Preferably, the S5 includes S51;
[0040] S51. Compare the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R to obtain the quality and safety risk assessment result of the scanned food package, and trigger risk control measures according to the quality and safety risk assessment result;
[0041] The quality and safety risk assessment results are obtained through the following comparison methods:
[0042] When the quality risk assessment value R is less than the food quality integrity assessment threshold Rthe, the quality safety risk assessment result of the scanned food packaging is obtained as a safe state, indicating that the quality risk of the current food packaging is within the allowable fluctuation range;
[0043] When the quality risk assessment value R ≥ the food quality integrity assessment threshold Rthe, the quality safety risk assessment result of the scanned food package is in an unsafe state, indicating that the quality risk of the current food package exceeds the allowable fluctuation range, triggering control measures for the current scanned food package, including extracting the unique identifier of the current food package and sending it to the relevant quality inspection department for inspection.
[0044] A food quality and safety risk assessment system, comprising a food packaging scanning module, a scanning pre-processing module, a leakage and penetration analysis module, a comprehensive analysis module and a decision-making module;
[0045] The food packaging scanning module scans the food packaging by using a multi-spectral imaging system, collects spectral food packaging images of different bands, extracts the reflection information of different bands contained in each food packaging image, analyzes the physical and chemical change information on the surface and inside of the packaged food packaging, and forms a spectral image set S;
[0046] The scanning preprocessing module performs denoising preprocessing and illumination equalization preprocessing on the spectral image set S, and then performs edge detection and image threshold processing to obtain feature map labels to form a feature map set F;
[0047] The leakage and penetration analysis module calculates the risk of gas leakage and moisture penetration in the food package based on the feature graph set F, and obtains the gas leakage index G and the moisture penetration index H;
[0048] The comprehensive analysis module obtains the quality risk assessment value R of the food packaging by combining the obtained gas leakage index G and the moisture permeability index H with the real-time ambient humidity and ambient temperature;
[0049] The decision module compares the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R to obtain the quality and safety risk assessment result of the scanned food packaging, and triggers risk control measures according to the quality and safety risk assessment result.
[0050] The present invention provides a food quality and safety risk assessment method and system, which has the following beneficial effects:
[0051] (1) By collecting spectral food packaging images of different bands and extracting reflection information, a spectral image set S was constructed, which can deeply reflect the physical and chemical changes of packaging materials. A feature map set F was generated, which effectively extracted the potential defects and gas leakage characteristics in the packaging. By calculating the gas leakage index G and the moisture permeability index H, the environmental changes inside and outside the food packaging and their impact on food quality and safety were revealed. An accurate quality risk assessment value R was obtained, which was compared with the preset integrity assessment threshold Rth. The safety risk of the packaging was assessed in real time and the corresponding control measures were triggered to ensure timely prevention and control of risks. Through in-depth analysis of spectral image data, the limitations of relying solely on appearance inspection were eliminated, and a more reliable technical means was provided for high-precision, non-destructive testing. The insufficiency of traditional methods that cannot effectively evaluate the intrinsic quality changes of packaging was solved, and timely measures could be taken to ensure the quality and safety of food.
[0052] (2) The spectral image set S is optimized through denoising preprocessing and illumination balancing preprocessing, thereby reducing the interference factors caused by environmental noise and equipment interference, and effectively eliminating the impact of uneven illumination. The edge intensity G(x, y) is converted into a binary image F(x, y) through a preset binary conversion threshold Tthe thresholding process to mark the possible defects and gas leakage feature images in the packaging. This process accurately extracts the image parts that may have problems by eliminating the areas without feature map marks, ensuring that subsequent analysis is more focused on key areas. The final feature map set F contains the core information of packaging integrity and potential risks, greatly improving the analysis efficiency and laying a solid foundation for the subsequent risk assessment of gas leakage and moisture penetration. Through this series of image processing technologies, high-sensitivity detection of packaging quality is ensured, especially in complex environments, which can effectively identify packaging defects and improve the monitoring capabilities of food quality and safety.
[0053] (3) By evaluating the gas leakage and moisture penetration risks of food packaging and combining environmental conditions to provide a more accurate quality risk assessment, the gas leakage index G and moisture penetration index H are accurately calculated based on the reflection intensity change of the feature map set F and the sensitivity coefficients of gas leakage and moisture penetration in different bands, thereby reflecting the potential risk of packaging materials. This process provides strong data support for evaluating the quality of packaging through fine band selection and change calculation. Further combined with real-time ambient humidity Eh and ambient temperature Et, the quality risk assessment value R of food packaging is finally calculated, which can accurately reflect the quality risk of packaging under different environmental conditions, especially in the case of climate change or unstable storage environment, ensuring the high accuracy and adaptability of quality assessment. The response speed and accuracy of food safety management are greatly improved. Not only can the quality status of food packaging be monitored in real time, but risk assessment can also be dynamically adjusted according to actual environmental changes, thereby achieving more refined food safety management, effectively preventing and controlling the occurrence of food quality problems, and ensuring the safety and integrity of food during storage and transportation. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of the steps of a food quality and safety risk assessment method of the present invention;
[0055] Figure 2 The present invention is a schematic diagram of a food quality and safety risk assessment system. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0057] Example 1
[0058] The present invention provides a food quality and safety risk assessment method, please refer to Figure 1 , including the following steps:
[0059] S1, by using a multi-spectral imaging system to scan food packaging, collect spectral food packaging images of different bands, extract the reflection information of different bands contained in each food packaging image, analyze the physical and chemical change information on the surface and inside of the packaged food packaging, and form a spectral image set S;
[0060] S2, by performing denoising preprocessing and illumination equalization preprocessing on the spectral image set S, and then performing edge detection and image threshold processing, characteristic map labels are obtained to form a characteristic map set F;
[0061] S3, calculating the risk of gas leakage and moisture penetration in the food package based on the feature graph set F, and obtaining a gas leakage index G and a moisture penetration index H;
[0062] S4, obtaining a quality risk assessment value R of the food packaging by combining the obtained gas leakage index G and moisture permeability index H with the real-time ambient humidity and ambient temperature;
[0063] S5. By comparing the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R, the quality and safety risk assessment result of the scanned food packaging is obtained, and risk control measures are triggered according to the quality and safety risk assessment result.
[0064] In this embodiment, by collecting spectral food packaging images of different bands and extracting reflection information, a spectral image set S is constructed, which can deeply reflect the physical and chemical changes of packaging materials and provide basic data for further risk assessment. Through denoising, light balancing, edge detection and other processing, a feature map set F is generated, which effectively extracts potential defects and gas leakage characteristics in the packaging, providing a clear image basis for subsequent risk calculations. By calculating the gas leakage index G and the moisture permeability index H, the environmental changes inside and outside the food packaging and their impact on food quality and safety are revealed. These key indicators provide an important basis for quality risk assessment. By combining these indices with ambient humidity and temperature, an accurate quality risk assessment value R is obtained, ensuring a comprehensive assessment of packaging quality. Finally, the quality risk assessment value R is compared with the preset integrity assessment threshold Rth to evaluate the safety risk of the package in real time and trigger corresponding control measures, ensuring timely prevention and control of risks. Through in-depth analysis of spectral image data, the limitations of relying solely on appearance inspection are eliminated, providing a more reliable technical means for high-precision and non-destructive testing, and solving the problem that traditional methods cannot effectively evaluate the changes in the intrinsic quality of packaging. Measures can be taken in time to ensure the quality and safety of food, which is especially important in the storage and transportation of fresh, cold chain and other high-requirement foods.
[0065] Example 2
[0066] This embodiment is explained in Example 1, please refer to Figure 1 , specifically: the S1 includes S11 and S12;
[0067] S11, using a multispectral imaging system to scan food packaging, collecting spectral food packaging images in different bands, each spectral food packaging image contains surface and internal spectral information, and obtaining a spectral information dataset I of spectral food packaging images in several bands to reflect the integrity, physical state and quality change of the packaging;
[0068] The spectral information data set I is specifically I={Ik(x, y)|k=1, 2, ... N, (x, y)∈X}; wherein Ik represents the reflection intensity of the kth wave at the position (x, y) of the food package, N represents the total number of collected bands, and X represents the coordinate set of all pixel points in the spectral food package image.
[0069] S12, extracting the reflection information of each spectral food packaging image according to the collected spectral information data set I, and processing the intensity data of reflections of several bands according to different bands, wherein the band reflection information includes the chemical state and physical state of the food packaging, including oxygen content, moisture penetration and packaging defects, and forming a spectral image set S by integrating the reflection information of different bands;
[0070] The spectral image set S is specifically S={Sk(x, y)|k=1, 2, ... N, (x, y)∈X}; wherein Sk(x, y) represents the spectral characteristic value of the k-th wave reflection information at the position (x, y);
[0071] Among them, the spectral characteristic value Sk(x, y) is specifically a multidimensional feature set = {Ik(x, y), UIk(x, y), AIk(x, y)}, wherein Ik(x, y) represents the reflection intensity of the kth wave at the position (x, y) of the food package, UIk represents the fluctuation mean of the kth waveband number collected at the position (x, y), and AIk(x, y) represents the standard deviation of the kth waveband number collected at the position (x, y).
[0072] In this embodiment, the spectral food packaging images under different bands are collected by a multi-spectral imaging system to generate a spectral information data set I, wherein the reflection intensity Ik(x, y) of each image includes the spectral information of the surface and the inside of the food packaging, providing a comprehensive perspective of packaging integrity, physical state and quality change. In step S12, by processing the spectral information data set I, the reflection intensity data in each spectral image is extracted and combined with the band characteristics, the spectral image set SSS is obtained, and the reflection information of different bands is further integrated, including the reflection intensity of Ik(x, y), the fluctuation mean of UIk(x, y) and the standard deviation of AIk(x, y). The integration of this multidimensional feature set enables the spectral feature value Sk(x, y) at each position to fully reflect the various changes in the packaging material, especially in terms of oxygen content, moisture penetration and packaging defects. Compared with the traditional single-band reflection information analysis, this processing method provides a higher-precision packaging quality assessment, especially in detecting small changes inside the packaging. By integrating multi-band reflection information, it is possible to more accurately reveal potential problems of packaging materials under different environmental conditions, especially when judging quality and safety hazards such as moisture penetration and gas leakage, with greater sensitivity and reliability. Such a multi-dimensional information set can provide a more comprehensive and in-depth basis for subsequent food quality and safety risk assessment, further improving the efficiency and accuracy of food packaging quality monitoring, especially in the high-demand fields of fresh food and cold chain transportation, greatly enhancing the ability to ensure food safety.
[0073] Example 3
[0074] This embodiment is explained in Example 2. Please refer to Figure 1 , specifically: S2 includes S21 and S22;
[0075] S21. Perform denoising preprocessing and illumination equalization preprocessing on the spectral image set S, wherein the denoising preprocessing includes using Gaussian filtering, mean filtering and median filtering to remove image noise caused by environmental noise and equipment interference, and the illumination equalization preprocessing includes histogram equalization and contrast-limited adaptive histogram equalization technology to adjust the impact caused by uneven illumination, to obtain a processed spectral image set SC after denoising preprocessing and illumination equalization preprocessing.
[0076] S22, analyzing and extracting the processed spectral image set SC, including edge detection and image threshold processing analysis, wherein edge detection includes applying the Sobel operator to perform edge detection to obtain edge strength G(x, y), and then performing image threshold processing on the edge strength G(x, y), specifically converting the edge strength G(x, y) into a binary image by thresholding, and marking it as a feature image F(x, y), wherein the feature image F(x, y) is used as a feature map marker for defects and gas leakage in the spectral image set S, and obtaining the feature map set F by eliminating the feature images F(x, y) without feature map markers and integrating the eliminated feature images F(x, y);
[0077] The feature image F(x, y) is obtained by the following binary image conversion method:
[0078] ;
[0079] Where, Tthe represents the binary conversion threshold preset by thresholding;
[0080] When the edge strength G(x, y) ≥ the binary conversion threshold Tthe, the edge strength G(x, y) at the position (x, y) is calculated and marked as a feature map;
[0081] When the edge strength G(x, y) is less than the binary conversion threshold Tthe, the edge strength G(x, y) at the position (x, y) is set to 0 and is not marked as a feature map.
[0082] In this embodiment, the spectral image set S is optimized by denoising preprocessing and illumination equalization preprocessing, thereby reducing the interference factors caused by environmental noise and equipment interference, and effectively eliminating the influence of uneven illumination. Specifically, the denoising preprocessing removes noise by Gaussian filtering, mean filtering and median filtering methods, and the illumination equalization preprocessing adjusts the image by histogram equalization and contrast-limited adaptive histogram equalization technology to obtain the processed spectral image set SC. This preprocessing process provides clearer and more realistic image data for subsequent image analysis, so that unnecessary noise and illumination effects in the image are eliminated, and the image quality is improved. Then, the feature map in the spectral image set SC is further extracted by edge detection and image threshold processing, especially by using the Sobel operator for edge detection, obtaining the edge intensity G (x, y), and performing threshold processing by a preset binary conversion threshold Tthe, and converting the edge intensity G (x, y) into a binary image F (x, y) to mark the defects and gas leakage feature images that may exist in the packaging. This process removes areas without feature map markers and accurately extracts those parts of the image that may have problems, ensuring that subsequent analysis focuses more on key areas. The resulting feature map set F contains core information about packaging integrity and potential risks, greatly improving analysis efficiency and laying a solid foundation for subsequent risk assessment of gas leakage and moisture penetration. This series of image processing technologies ensures highly sensitive detection of packaging quality, especially in complex environments, and can effectively identify packaging defects, improving the monitoring capabilities of food quality and safety.
[0083] Example 4
[0084] This embodiment is explained in Example 3, please refer to Figure 1 , specifically: the S3 includes S31;
[0085] S31. The risk of gas leakage and moisture penetration in food packaging is calculated based on the feature map set F, including using the change in band reflection intensity in the multispectral imaging data, combining the sensitivity of different bands to gas penetration and moisture penetration, and estimating the risk of gas leakage by calculating the change in reflection intensity, to obtain the gas leakage index G and moisture penetration index H.
[0086] The gas leakage index G is obtained by the following calculation formula:
[0087] ;
[0088] In the formula, G(x, y) represents the gas leakage index at the position (x, y), specifically represents the gas leakage risk value at the position (x, y), and gk represents the sensitivity coefficient of the kth band to gas leakage;
[0089] The moisture permeability index H is obtained by the following calculation formula:
[0090] ;
[0091] Where H(x, y) represents the moisture penetration index at the position (x, y), specifically represents the moisture penetration risk value at the position (x, y), and hk represents the sensitivity coefficient of the kth band to moisture penetration.
[0092] The S4 includes S41;
[0093] S41, combining the obtained gas leakage index G and moisture permeability index H with the real-time ambient humidity and ambient temperature, wherein the ambient humidity includes the real-time ambient humidity Eh, and the ambient temperature includes the real-time ambient temperature Et, and performing dimensionless processing on the real-time ambient humidity Eh and the real-time ambient temperature Et, to obtain a quality risk assessment value R of the food packaging;
[0094] The quality risk assessment value R is obtained by the following calculation formula:
[0095] ;
[0096] Wherein, r1, r2, r3 and r4 represent the weight coefficients of the gas leakage index G, the moisture permeability index H, the real-time ambient humidity Eh and the real-time ambient temperature Et, respectively, and r1+r2+r3+r4=1. The specific value is set by the user.
[0097] The S5 includes S51;
[0098] S51. Compare the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R to obtain the quality and safety risk assessment result of the scanned food package, and trigger risk control measures according to the quality and safety risk assessment result;
[0099] The quality and safety risk assessment results are obtained through the following comparison methods:
[0100] When the quality risk assessment value R is less than the food quality integrity assessment threshold Rthe, the quality safety risk assessment result of the scanned food packaging is obtained as a safe state, indicating that the quality risk of the current food packaging is within the allowable fluctuation range;
[0101] When the quality risk assessment value R ≥ the food quality integrity assessment threshold Rthe, the quality safety risk assessment result of the scanned food package is in an unsafe state, indicating that the quality risk of the current food package exceeds the allowable fluctuation range, triggering control measures for the current scanned food package, including extracting the unique identifier of the current food package and sending it to the relevant quality inspection department for inspection.
[0102] In this embodiment, by evaluating the gas leakage and moisture penetration risks of food packaging and combining environmental conditions to provide a more accurate quality risk assessment, the gas leakage index G and moisture penetration index H are accurately calculated based on the reflection intensity change of the feature map set F and the sensitivity coefficients of gas leakage and moisture penetration in different bands, thereby reflecting the potential risk of packaging materials. This process provides strong data support for evaluating the quality of packaging through fine band selection and change calculation. Further combined with the real-time ambient humidity Eh and ambient temperature Et, the quality risk assessment value R of food packaging is finally calculated, which can accurately reflect the quality risk of packaging under different environmental conditions, especially in the case of climate change or unstable storage environment, ensuring the high accuracy and adaptability of quality assessment. At the same time, by comparing with the preset food quality integrity assessment threshold Rthe, the safe and unsafe states of food packaging are clearly distinguished, thereby providing enterprises with an operational decision-making basis. Once the assessment value R exceeds the safety range, the system will automatically trigger risk control measures and promptly feedback the packaging problem to the relevant departments for further inspection, greatly improving the response speed and accuracy of food safety management. It can not only monitor the quality status of food packaging in real time, but also dynamically adjust risk assessment according to actual environmental changes, thereby achieving more refined food safety management, effectively preventing the occurrence of food quality problems, and ensuring the safety and integrity of food during storage and transportation.
[0103] Example 5
[0104] A food quality and safety risk assessment system, please refer to Figure 2 ,Specifically: including food packaging scanning module, scanning pre-processing module, leakage and penetration analysis module, comprehensive analysis module and decision-making module;
[0105] The food packaging scanning module scans the food packaging by using a multi-spectral imaging system, collects spectral food packaging images of different bands, extracts the reflection information of different bands contained in each food packaging image, analyzes the physical and chemical change information on the surface and inside of the packaged food packaging, and forms a spectral image set S;
[0106] The scanning preprocessing module performs denoising preprocessing and illumination equalization preprocessing on the spectral image set S, and then performs edge detection and image threshold processing to obtain feature map labels to form a feature map set F;
[0107] The leakage and penetration analysis module calculates the risk of gas leakage and moisture penetration in the food package based on the feature graph set F, and obtains the gas leakage index G and the moisture penetration index H;
[0108] The comprehensive analysis module obtains the quality risk assessment value R of the food packaging by combining the obtained gas leakage index G and the moisture permeability index H with the real-time ambient humidity and ambient temperature;
[0109] The decision module compares the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R to obtain the quality and safety risk assessment result of the scanned food packaging, and triggers risk control measures according to the quality and safety risk assessment result.
[0110] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A food quality and safety risk assessment method, characterized in that: The following steps are involved: S1, by using a multi-spectral imaging system to scan food packaging, collect spectral food packaging images of different bands, extract the reflection information of different bands contained in each food packaging image, analyze the physical and chemical change information on the surface and inside of the packaged food packaging, and form a spectral image set S; S2, by performing denoising preprocessing and illumination equalization preprocessing on the spectral image set S, and then performing edge detection and image threshold processing, characteristic map labels are obtained to form a characteristic map set F; S3, calculating the risk of gas leakage and moisture penetration in the food package based on the feature graph set F, and obtaining a gas leakage index G and a moisture penetration index H; The S3 includes S31; S31, calculating the risk of gas leakage and moisture penetration in the food package based on the feature map set F, including using the change in band reflection intensity in the multispectral imaging data, combining the sensitivity of different bands to gas penetration and moisture penetration, and estimating the risk of gas leakage by calculating the change in reflection intensity, and obtaining the gas leakage index G and the moisture penetration index H; The gas leakage index G is obtained by the following calculation formula: ; In the formula, G(x, y) represents the gas leakage index at the position (x, y), specifically represents the gas leakage risk value at the position (x, y), and gk represents the sensitivity coefficient of the kth band to gas leakage; The moisture permeability index H is obtained by the following calculation formula: ; Where H(x, y) represents the moisture penetration index at the position (x, y), specifically represents the moisture penetration risk value at the position (x, y), and hk represents the sensitivity coefficient of the kth band to moisture penetration; Among them, Sk (x, y) represents the spectral characteristic value of the k-th wave reflection information at the position (x, y); S4, obtaining a quality risk assessment value R of the food packaging by combining the obtained gas leakage index G and moisture permeability index H with the real-time ambient humidity and ambient temperature; S5. By comparing the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R, the quality and safety risk assessment result of the scanned food packaging is obtained, and risk control measures are triggered according to the quality and safety risk assessment result.
2. A food quality and safety risk assessment method according to claim 1, characterized in that: Said S1 includes S11 and S12; S11, using a multispectral imaging system to scan food packaging, collecting spectral food packaging images in different bands, each spectral food packaging image contains surface and internal spectral information, and obtaining a spectral information dataset I of spectral food packaging images in several bands to reflect the integrity, physical state and quality change of the packaging; The spectral information data set I is specifically I={Ik(x, y)|k=1, 2, ... N, (x, y)∈X}; wherein Ik represents the reflection intensity of the kth wave at the position (x, y) of the food package, N represents the total number of collected bands, and X represents the coordinate set of all pixel points in the spectral food package image.
3. A food quality and safety risk assessment method according to claim 2, characterized in that: S12, extracting the reflection information of each spectral food packaging image according to the collected spectral information data set I, and processing the intensity data of reflections of several bands according to different bands, wherein the band reflection information includes the chemical state and physical state of the food packaging, including oxygen content, moisture penetration and packaging defects, and forming a spectral image set S by integrating the reflection information of different bands; The spectral image set S is specifically S={Sk(x, y)|k=1, 2, ... N, (x, y)∈X}; Among them, the spectral characteristic value Sk(x, y) is specifically a multidimensional feature set = {Ik(x, y), UIk(x, y), AIk(x, y)}, wherein Ik(x, y) represents the reflection intensity of the kth wave at the position (x, y) of the food package, UIk represents the fluctuation mean of the kth waveband number collected at the position (x, y), and AIk(x, y) represents the standard deviation of the kth waveband number collected at the position (x, y).
4. A food quality and safety risk assessment method according to claim 3, characterized in that: The S2 includes S21 and S22; S21. Perform denoising preprocessing and illumination equalization preprocessing on the spectral image set S, wherein the denoising preprocessing includes using Gaussian filtering, mean filtering and median filtering to remove image noise caused by environmental noise and equipment interference, and the illumination equalization preprocessing includes histogram equalization and contrast-limited adaptive histogram equalization technology to adjust the impact caused by uneven illumination, to obtain a processed spectral image set SC after denoising preprocessing and illumination equalization preprocessing.
5. A food quality and safety risk assessment method according to claim 4, characterized in that: S22, analyzing and extracting the processed spectral image set SC, including edge detection and image threshold processing analysis, wherein edge detection includes applying the Sobel operator to perform edge detection to obtain edge strength G(x, y), and then performing image threshold processing on the edge strength G(x, y), specifically converting the edge strength G(x, y) into a binary image by thresholding, and marking it as a feature image F(x, y), wherein the feature image F(x, y) is used as a feature map mark for defects and gas leakage in the spectral image set S, and obtaining the feature map set F by eliminating the feature images F(x, y) without feature map marks and integrating the eliminated feature images F(x, y); The feature image F(x, y) is obtained by the following binary image conversion method: ; Wherein, Tthe represents the binary conversion threshold value preset by thresholding; When the edge strength G(x, y) ≥ the binary conversion threshold Tthe, the edge strength G(x, y) at the position (x, y) is calculated and marked as a feature map; When the edge strength G(x, y) is less than the binary conversion threshold Tthe, the edge strength G(x, y) at the position (x, y) is set to 0 and is not marked as a feature map.
6. A food quality and safety risk assessment method according to claim 1, characterized in that: The S4 includes S41; S41, combining the obtained gas leakage index G and moisture permeability index H with the real-time ambient humidity and ambient temperature, wherein the ambient humidity includes the real-time ambient humidity Eh, and the ambient temperature includes the real-time ambient temperature Et, and performing dimensionless processing on the real-time ambient humidity Eh and the real-time ambient temperature Et, to obtain a quality risk assessment value R of the food packaging; The quality risk assessment value R is obtained by the following calculation formula: ; Wherein, r1, r2, r3 and r4 represent the weight coefficients of the gas leakage index G, the moisture permeability index H, the real-time ambient humidity Eh and the real-time ambient temperature Et, respectively, and r1+r2+r3+r4=1. The specific value is set by the user.
7. A food quality and safety risk assessment method according to claim 1, characterized in that: The S5 includes S51; S51. Compare the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R to obtain the quality and safety risk assessment result of the scanned food package, and trigger risk control measures according to the quality and safety risk assessment result; The quality and safety risk assessment results are obtained through the following comparison methods: When the quality risk assessment value R is less than the food quality integrity assessment threshold Rthe, the quality safety risk assessment result of the scanned food packaging is obtained as a safe state, indicating that the quality risk of the current food packaging is within the allowable fluctuation range; When the quality risk assessment value R ≥ the food quality integrity assessment threshold Rthe, the quality safety risk assessment result of the scanned food package is in an unsafe state, indicating that the quality risk of the current food package exceeds the allowable fluctuation range, triggering control measures for the current scanned food package, including extracting the unique identifier of the current food package and sending it to the relevant quality inspection department for inspection.
8. A food quality and safety risk assessment system, applied to a food quality and safety risk assessment method according to any one of claims 1 to 7, characterized in that: It includes food packaging scanning module, scanning pre-processing module, leakage and penetration analysis module, comprehensive analysis module and decision-making module; The food packaging scanning module scans the food packaging by using a multi-spectral imaging system, collects spectral food packaging images of different bands, extracts the reflection information of different bands contained in each food packaging image, analyzes the physical and chemical change information on the surface and inside of the packaged food packaging, and forms a spectral image set S; The scanning preprocessing module performs denoising preprocessing and illumination equalization preprocessing on the spectral image set S, and then performs edge detection and image threshold processing to obtain feature map labels to form a feature map set F; The leakage and penetration analysis module calculates the risk of gas leakage and moisture penetration in the food package based on the feature graph set F, and obtains the gas leakage index G and the moisture penetration index H; The comprehensive analysis module obtains the quality risk assessment value R of the food packaging by combining the obtained gas leakage index G and the moisture permeability index H with the real-time ambient humidity and ambient temperature; The decision module compares the preset food quality integrity assessment threshold Rthe with the quality risk assessment value R to obtain the quality and safety risk assessment result of the scanned food packaging, and triggers risk control measures according to the quality and safety risk assessment result.
Citation Information
Patent Citations
System for in-line inspection of seal integrity
CN113677971A
Sealed state determination method of packaged food and manufacturing method of sealed packed food
JP2017138105A