Food safety intelligent supervision, prevention and control system
By introducing an intelligent supervision and prevention and control system into the food safety traceability system, dynamic analysis and processing of image data, the problem of safety hazards of image data transmission in the existing technology has been solved, and more efficient and safe data transmission has been achieved.
Patent Information
- Application Number
- CN202411612905.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the image data corresponding to food safety traceability is adopted in a single method, and the image processing method cannot be adaptively adjusted according to the actual situation of sensitive information, resulting in a greater safety hazard during image data transmission.
Provided is a food safety intelligent supervision and prevention system, including an image acquisition unit, an image analysis unit, a sensitive determination unit, an image processing unit and a data transmission unit. Through image analysis and sensitivity judgment, the image type is determined and the appropriate sensitivity analysis method is selected, the image cutting or encryption processing method is selected according to the proportion of sensitive areas and the distribution coefficient, and the transmission path is determined through the data transmission unit.
By dynamically adjusting the image processing method, the security of image data transmission is improved, the risk of data leakage is reduced, and the security risks caused by the single confidentiality method in the prior art are avoided.
Smart Images

Figure CN119559572A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food traceability, and in particular to an intelligent food safety supervision and control system. Background Art
[0002] The food safety traceability process involves a large amount of image data, which may contain sensitive information such as the company's production process and quality control. In the process of data transmission, there are multiple risks of data security and privacy protection, including data leakage and potential malicious attacks, which bring serious security risks to the company. Therefore, how to ensure the secure transmission of image data and reduce data security risks is a technical problem that technicians in this field need to solve urgently.
[0003] China Patent Publication No. CN115082087A discloses a food safety traceability system based on blockchain and big data, including: including an information collection module, a storage encryption module and a traceability query module, the information collection module is used to collect food information in the traceability process, the storage encryption module is used to encrypt and store the information in the database, the traceability query module is used to manage the authority and display the traceability query process on a visual interface, the storage encryption module and the traceability query module are both electrically connected to the information collection module, the information collection module includes a traceability database module, a unique coding generation unit, an environmental information acquisition module and a transaction information collection module, the storage encryption module includes a department construction unit and a data encryption module, the traceability query module includes a user management module, an information query module and a traceability information display module, and the information query module is electrically connected to the user management module. It can be seen that the above technical solution has the following problems: the confidentiality method adopted for the image data corresponding to the food safety traceability is single, and it is impossible to adaptively adjust the image processing method according to the actual situation of sensitive information, resulting in greater security risks in the image data transmission process. Summary of the invention
[0004] To this end, the present invention provides an intelligent food safety supervision and control system to overcome the problem that the confidentiality method adopted in the prior art for image data corresponding to food safety traceability is single, and the image processing method cannot be adaptively adjusted according to the actual situation of sensitive information, resulting in greater security risks during image data transmission.
[0005] To achieve the above objectives, the present invention provides a food safety intelligent supervision and control system, comprising:
[0006] An image acquisition unit, used for acquiring a target image;
[0007] An image analysis unit, connected to the image acquisition unit, for determining the image type of the target image according to the determination result;
[0008] A sensitivity determination unit connected to the image analysis unit, for determining the sensitivity analysis method according to the image type corresponding to the target image, that is, determining the sensitive area according to the sensitive keywords or the affected area;
[0009] An image processing unit, which is connected to the image analysis unit and the sensitivity determination unit respectively, and is used to determine the image state of the target image according to the sensitive area ratio and the sensitive area distribution coefficient, and determine the image processing method as image segmentation processing or image encryption processing according to the image state;
[0010] The data transmission unit is connected to the image processing unit and is used to determine the transmission mode of the segmented image corresponding to the target image, or to randomly select a transmission path for transmitting the encrypted image or the secondary encrypted image.
[0011] Further, the image analysis unit responds to different determination results to determine the image type of the target image;
[0012] The image analysis unit responds with a determination result that there are sensitive keywords in the target image, and the image type is determined to be a Class I image;
[0013] The image analysis unit responds with a determination result that there is no sensitive keyword in the target image, and the image type is determined to be a second-class image;
[0014] The sensitive keyword is a keyword whose safety factor is less than a preset safety factor.
[0015] Furthermore, when the image type corresponding to the target image processed by the sensitivity determination unit is a type of image, the sensitive area is determined according to the sensitive keywords, wherein:
[0016] Sensitivity detection is performed on each sensitive keyword according to the text reading order. When sensitivity detection is performed on a single sensitive keyword, the sensitive keyword is recorded as a target sensitive keyword, a sensitive keyword whose character interval reference value with the target sensitive keyword is less than a preset character interval reference value is recorded as a reference sensitive keyword, a reference sensitive keyword with the largest character interval reference value corresponding to the target sensitive keyword is recorded as a maximum interval keyword, a minimum area that can contain each character between the target sensitive keyword and the maximum interval keyword and the target sensitive keyword and the maximum interval keyword is recorded as a sensitive area, and sensitivity detection is continued for sensitive keywords that are not recorded as sensitive areas until sensitivity detection of each sensitive keyword is completed, then area detection is stopped.
[0017] Furthermore, when the image type corresponding to the target image processed by the sensitivity determination unit is a second-class image, regional analysis is performed on each affected area to determine the sensitive area, wherein:
[0018] When performing regional analysis on a single impact area, the impact area is recorded as the target impact area, the impact area corresponding to the target impact area and having an impact distance less than the preset impact distance is recorded as the reference impact area, and the smallest rectangular area that can contain each reference impact area and the target impact area is recorded as an associated area. If there are impact area sections and sensitive area sections in the associated area, the associated area after removing the impact area sections and the sensitive area sections is recorded as a sensitive area, until all impact areas are recorded as sensitive areas, then the regional analysis is stopped;
[0019] The affected areas are the face areas, key equipment areas and raw material areas corresponding to the two types of images.
[0020] Furthermore, the state analysis unit determines the image state of the target image according to the sensitive area ratio and the sensitive area distribution coefficient, and the image state includes:
[0021] A first image state in which the sensitive area ratio is less than a preset sensitive area ratio and the sensitive area distribution coefficient is less than a preset sensitive area distribution coefficient;
[0022] A second image state in which the sensitive area ratio is greater than or equal to a preset sensitive area ratio or the sensitive area distribution coefficient is greater than or equal to a preset sensitive area distribution coefficient.
[0023] Further, the image processing unit responds to different image states to determine the image processing mode;
[0024] The image state responded by the image processing unit is the first image state, and the image processing method performed is image segmentation processing;
[0025] The image state responded by the image processing unit is the second image state, and the image processing method performed is image encryption processing.
[0026] Furthermore, the image processing method performed by the image processing unit is image segmentation processing;
[0027] For a single image of the same type, each sensitive area is cut, and the remaining area after cutting each sensitive area is recorded as the first area, each sensitive area is recorded as the second area and the center position of each second area is detected, a cross line perpendicular to the boundary of the corresponding second area is established at the center position of each second area, and each second area is cut based on the cross line;
[0028] For a single second-category image, each sensitive area is cut, and the remaining area after cutting each sensitive area is recorded as the first area. Each sensitive area is recorded as a second area and each second area is segmented. When segmenting a single second area, the center position of each affected area in each second area is detected to establish a cross line perpendicular to the boundary of the corresponding second area, and each second area is cut based on the cross line.
[0029] Further, the image transmission unit responds to different segmentation conditions to determine a transmission mode of the segmented image corresponding to the target image;
[0030] The segmentation condition to which the image transmission unit responds is that the difference between the number of segmented images and the number of transmission paths is greater than the standard difference, the correlation coefficient between each segmented image is detected, the two segmented images with the smallest correlation coefficient are placed in the segmentation combination, and the segmented image with the smallest correlation with the segmentation combination is continued to be placed in the segmentation combination until the number of segmented images in the segmentation combination reaches a preset number, the set of each segmented image in the segmentation combination is recorded as a combined image, the combined image and each segmented image not recorded as a combined image are recorded as reference images, and the reference image is transmitted to the transmission path that has the smallest correlation with the reference image and has not transmitted the reference image according to the order of the proportion of sensitive areas corresponding to the reference images from large to small;
[0031] The segmentation condition responded by the image transmission unit is that the difference between the number of segmented images and the number of transmission paths is less than or equal to the standard difference. According to the order of the proportion of sensitive areas corresponding to the segmented images from large to small, each segmented image is transmitted to the transmission path with the smallest correlation and the segmented image corresponding to the target image is not transmitted.
[0032] Furthermore, the image transmission unit is provided with a correlation determination method, and the determination method includes:
[0033] For any segmented image and a transmission path corresponding to a type of image, the segmented image is recorded as a target type of image to be transmitted, and the correlation coefficient between the segmented image corresponding to each type of image being transmitted by the transmission path and the target type of image to be transmitted is detected. The correlation between the target type of image to be transmitted and the transmission path is the average value of each correlation coefficient.
[0034] For any segmented image and a transmission path corresponding to the two-category image, the segmented image is recorded as the target two-category image to be transmitted, and the similarity threshold between the segmented image corresponding to each two-category image being transmitted by the transmission path and the target two-category image to be transmitted is detected. The correlation between the target two-category image to be transmitted and the transmission path is the average value of each similarity threshold.
[0035] Furthermore, the image processing method performed by the image processing unit is image encryption processing, and encryption processing is performed on the first type of image or the second type of image to obtain an encrypted image, and the image processing unit responds to different setting conditions to determine whether secondary encryption processing is required for the encrypted image;
[0036] The setting condition for the image encryption unit response is that the pixel correlation is greater than or equal to the preset pixel correlation or the encryption sensitivity threshold is greater than or equal to the preset encryption sensitivity threshold, and secondary encryption processing needs to be performed on the encrypted image;
[0037] The setting condition for the image encryption unit response is that the pixel correlation is less than the preset pixel correlation and the encryption sensitivity threshold is less than the preset encryption sensitivity threshold, and there is no need to perform secondary encryption processing on the encrypted image.
[0038] Compared with the prior art, the beneficial effect of the present invention lies in that, in the technical scheme of the present invention, the image analysis unit determines the image type of the target image according to the judgment result, and effectively reflects whether there are sensitive keywords in the target image through the judgment result, and then adaptively selects different sensitive analysis methods according to the image type corresponding to the target image, so that the selection of sensitive analysis method is more in line with the actual application scenario, and can select different benchmarks according to the first or second category of images to determine the sensitive area, and then can accurately locate the sensitive information, which is conducive to the determination of the subsequent image status, and avoids the problem of a single confidentiality method caused by direct encryption without determining the sensitive area in the prior art, thereby reducing data security risks.
[0039] Furthermore, in the present invention, the image state of the target image is determined according to the proportion of sensitive areas and the distribution coefficient of sensitive areas. The proportion of sensitive areas and the distribution coefficient of sensitive areas are effectively reflected, and different image processing methods are adaptively selected according to the image state of the target image, so that the selection of image processing method is more in line with the actual application scenario, avoiding the problem of a single confidentiality method for image data corresponding to food safety traceability in the prior art, and being unable to adaptively adjust the image processing method according to the actual situation of sensitive information, and also avoiding the problem of complicating the processing process due to the use of encryption algorithms when the proportion of sensitive areas is small and the distribution is concentrated, thereby improving the overall processing efficiency.
[0040] Furthermore, the image processing method in the present invention is image cutting processing, which can select different cutting methods according to the first category of images or the second category of images, and then adaptively select different cutting methods for cutting the first category of images and the second category of images. The selection of the cutting method is more in line with the actual application scenario, avoiding the problem that the sensitive areas corresponding to the first category of images and the second category of images cannot be effectively segmented due to a single cutting method, resulting in data leakage during data transmission, which brings security risks to the enterprise, thereby reducing the risk of data leakage.
[0041] Furthermore, the image transmission unit in the present invention determines the transmission mode of the segmented image corresponding to the target image according to the segmentation conditions, and effectively reflects the load balancing situation of the transmission path through the segmentation conditions, and then adaptively selects different transmission modes, so that the selection of the transmission mode is more in line with the actual application scenario, avoiding the problem of information leakage caused by the transmission of multiple segmented images with too large correlation coefficients through the same transmission path, thereby reducing the security risks in the data transmission process.
[0042] Furthermore, the image processing unit in the present invention responds to different setting conditions to determine whether secondary encryption processing is required for the encrypted image. The encryption effect of the encrypted image is effectively reflected by setting the conditions, and then whether secondary encryption processing is required for the encrypted image is determined based on the actual encryption effect, thereby ensuring the security of the image data, avoiding the problem of data leakage during data transmission due to poor encryption effect, and reducing the transmission risk of image data. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a unit connection diagram of the food safety intelligent supervision and control system of the present invention;
[0044] Figure 2 The present invention determines the image type of the target image according to the determination result;
[0045] Figure 3 This is a flow chart of the present invention for determining the image state of a target image according to the sensitive area ratio and the sensitive area distribution coefficient;
[0046] Figure 4 The present invention is a flow chart of determining an image processing method according to an image state. DETAILED DESCRIPTION
[0047] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0048] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0049] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0050] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0051] See also Figures 1 to 4 As shown, the present invention provides a food safety intelligent supervision and control system, comprising:
[0052] An image acquisition unit, used for acquiring a target image;
[0053] An image analysis unit, connected to the image acquisition unit, for determining the image type of the target image according to the determination result;
[0054] A sensitivity determination unit connected to the image analysis unit, for determining the sensitivity analysis method according to the image type corresponding to the target image, that is, determining the sensitive area according to the sensitive keywords or the affected area;
[0055] An image processing unit, which is connected to the image analysis unit and the sensitivity determination unit respectively, and is used to determine the image state of the target image according to the sensitive area ratio and the sensitive area distribution coefficient, and determine the image processing method as image segmentation processing or image encryption processing according to the image state;
[0056] The data transmission unit is connected to the image processing unit and is used to determine the transmission mode of the segmented image corresponding to the target image, or to randomly select a transmission path for transmitting the encrypted image or the secondary encrypted image.
[0057] The application scenario of the present invention is the image data processing and transmission corresponding to the food safety traceability process. The target images include but are not limited to raw material source images, production and processing images, production record images, and quality report images. This is content that is easy for technical personnel in this field to understand and will not be elaborated on in detail.
[0058] Specifically, the image analysis unit responds to different determination results to determine the image type of the target image;
[0059] The image analysis unit responds with a determination result that there are sensitive keywords in the target image, and the image type is determined to be a Class I image;
[0060] The image analysis unit responds with a determination result that there is no sensitive keyword in the target image, and the image type is determined to be a second-class image;
[0061] The sensitive keyword is a keyword whose safety factor is less than a preset safety factor.
[0062] The determination result includes a first determination result and a second determination result, the first determination result is that the target image contains sensitive keywords, and the second determination result is that the target image does not contain sensitive keywords;
[0063] The relationship between the safety factor and the effective historical frequency is negatively correlated. The method for confirming the effective historical frequency is to record all the first-category images whose safety level can meet the user's needs in the historical image recognition process as first-category sensitive images, and record all the first-category images whose safety level cannot meet the user's needs in the historical image recognition process as second-category sensitive images. For a single keyword, the difference between the number of times the keyword appears in the first-category sensitive image and the number of times it appears in the second-category sensitive image is recorded as the effective historical frequency;
[0064] The value of the preset safety factor can be determined by the user according to the actual application scenario. It can be understood that the smaller the value of the preset safety factor, the greater the sensitivity of the keyword. A value of the preset safety factor is provided. The preset safety factor is the average value of the risk factors of each keyword corresponding to all images of a class whose safety level can meet the user's needs in the historical image recognition process.
[0065] Specifically, when the image type corresponding to the target image processed by the sensitivity determination unit is a type of image, the sensitive area is determined according to the sensitive keywords, wherein:
[0066] Sensitivity detection is performed on each sensitive keyword according to the text reading order. When sensitivity detection is performed on a single sensitive keyword, the sensitive keyword is recorded as a target sensitive keyword, a sensitive keyword whose character interval reference value with the target sensitive keyword is less than a preset character interval reference value is recorded as a reference sensitive keyword, a reference sensitive keyword with the largest character interval reference value corresponding to the target sensitive keyword is recorded as a maximum interval keyword, a minimum area that can contain each character between the target sensitive keyword and the maximum interval keyword and the target sensitive keyword and the maximum interval keyword is recorded as a sensitive area, and sensitivity detection is continued for sensitive keywords that are not recorded as sensitive areas until sensitivity detection of each sensitive keyword is completed, then area detection is stopped.
[0067] The method for confirming the reference value of the interval character is as follows: for two sensitive keywords, the first sensitive keyword in the text reading order is recorded as the first sensitive keyword, the second sensitive keyword in the text reading order is recorded as the second sensitive keyword, and the number of characters between the first sensitive keyword and the second sensitive keyword is recorded as the reference value of the interval character;
[0068] The value of the preset character spacing reference value can be determined by the user according to the actual application scenario. It can be understood that the larger the value of the preset character spacing reference value, the larger the area of the sensitive area is divided. A value of the preset character spacing reference value is provided, and the preset character spacing reference value is 50.
[0069] Specifically, when the target image processed by the sensitivity determination unit corresponds to a second-class image, regional analysis is performed on each affected area to determine the sensitive area, wherein:
[0070] When performing regional analysis on a single impact area, the impact area is recorded as the target impact area, the impact area corresponding to the target impact area and having an impact distance less than the preset impact distance is recorded as the reference impact area, and the smallest rectangular area that can contain each reference impact area and the target impact area is recorded as an associated area. If there are impact area sections and sensitive area sections in the associated area, the associated area after removing the impact area sections and the sensitive area sections is recorded as a sensitive area, until all impact areas are recorded as sensitive areas, then the regional analysis is stopped;
[0071] The affected areas are the face areas, key equipment areas and raw material areas corresponding to the two types of images.
[0072] Among them, the face area is the area with face features in the second type of image, the key equipment area is the area where the equipment that is crucial to food production is located in the second type of image, and the raw material area is the area where the raw materials or semi-finished products used in the storage and production process are located in the second type of image. Users can identify the face area, key equipment area and raw material area through machine vision and deep learning networks. This is easy for technicians in this field to understand and will not be described in detail.
[0073] The method for confirming the impact distance is that, for two impact areas, the shortest distance between the center positions corresponding to the two impact areas is recorded as the impact distance; the method for confirming the center position corresponding to the impact area is that, for one impact area, the center position corresponding to the impact area is the center of the circumscribed circle corresponding to the impact area;
[0074] The method for confirming the preset impact distance is that the user can determine it according to the actual application scenario. It can be understood that the larger the value of the preset impact distance, the larger the area of the divided sensitive area. A value of the preset impact distance is provided, and the preset impact distance is 25% of the length corresponding to each target image.
[0075] A method for confirming impact area sections and sensitive area sections is to record incomplete impact areas contained in an associated area as associated impact areas, record areas where each associated impact area is located in the associated area as impact area sections, record incomplete sensitive areas contained in an associated area as associated sensitive areas, and record areas where each associated sensitive area is located in the associated area as sensitive area sections.
[0076] Specifically, the state analysis unit determines the image state of the target image according to the sensitive area ratio and the sensitive area distribution coefficient, and the image state includes:
[0077] A first image state in which the sensitive area ratio is less than a preset sensitive area ratio and the sensitive area distribution coefficient is less than a preset sensitive area distribution coefficient;
[0078] A second image state in which the sensitive area ratio is greater than or equal to a preset sensitive area ratio or the sensitive area distribution coefficient is greater than or equal to a preset sensitive area distribution coefficient.
[0079] Wherein, for a target image, the sensitive area ratio = the area of the sensitive area in the target image / the area of the target image;
[0080] The sensitive area distribution coefficient is confirmed by performing distance detection on each sensitive area. When performing distance detection on a single sensitive area, the sensitive area is recorded as a target sensitive area, and other sensitive areas in the target image are recorded as target sensitive areas. The influence distances corresponding to the target sensitive area and each reference sensitive area are detected, and the minimum value of each influence distance is recorded as the minimum influence distance. The average value of the minimum influence distances corresponding to each sensitive area is recorded as the sensitive area distribution coefficient.
[0081] The values of the preset sensitive area ratio and the preset sensitive area distribution coefficient can be determined by the user according to the actual application scenario. It can be understood that the larger the values of the preset sensitive area ratio and the preset sensitive area distribution coefficient are, the higher the user's demand for image cutting processing is. Provided are the values of the preset sensitive area ratio and the preset sensitive area distribution coefficient. The preset sensitive area ratio is 30%. The method for confirming the preset sensitive area distribution coefficient is to detect the records of image cutting processing in the historical image processing process, and record the average value of the sensitive area distribution coefficient corresponding to the records that can meet the user's confidentiality requirements as the preset sensitive area distribution coefficient.
[0082] Specifically, the image processing unit responds to different image states to determine an image processing mode;
[0083] The image state responded by the image processing unit is the first image state, and the image processing method performed is image segmentation processing;
[0084] The image state responded by the image processing unit is the second image state, and the image processing method performed is image encryption processing.
[0085] Specifically, the image processing method performed by the image processing unit is image segmentation processing;
[0086] For a single image of the same type, each sensitive area is cut, and the remaining area after cutting each sensitive area is recorded as the first area, each sensitive area is recorded as the second area and the center position of each second area is detected, a cross line perpendicular to the boundary of the corresponding second area is established at the center position of each second area, and each second area is cut based on the cross line;
[0087] For a single second-category image, each sensitive area is cut, and the remaining area after cutting each sensitive area is recorded as the first area. Each sensitive area is recorded as a second area and each second area is segmented. When segmenting a single second area, the center position of each affected area in each second area is detected to establish a cross line perpendicular to the boundary of the corresponding second area, and each second area is cut based on the cross line.
[0088] The method for confirming the center position of the second area is that, for a second area, the center position corresponding to the second area is the center point of a circumscribed circle corresponding to the second area.
[0089] Specifically, the image transmission unit responds to different segmentation conditions to determine a transmission mode of a segmented image corresponding to a target image;
[0090] The segmentation condition to which the image transmission unit responds is that the difference between the number of segmented images and the number of transmission paths is greater than the standard difference, the correlation coefficient between each segmented image is detected, the two segmented images with the smallest correlation coefficient are placed in the segmentation combination, and the segmented image with the smallest correlation with the segmentation combination is continued to be placed in the segmentation combination until the number of segmented images in the segmentation combination reaches a preset number, the set of each segmented image in the segmentation combination is recorded as a combined image, the combined image and each segmented image not recorded as a combined image are recorded as reference images, and the reference image is transmitted to the transmission path that has the smallest correlation with the reference image and has not transmitted the reference image according to the order of the proportion of sensitive areas corresponding to the reference images from large to small;
[0091] The segmentation condition responded by the image transmission unit is that the difference between the number of segmented images and the number of transmission paths is less than or equal to the standard difference. According to the order of the proportion of sensitive areas corresponding to the segmented images from large to small, each segmented image is transmitted to the transmission path with the smallest correlation and the segmented image corresponding to the target image is not transmitted.
[0092] The segmentation condition includes a first segmentation condition and a second segmentation condition, the first segmentation condition is that the difference between the number of segmented images and the number of transmission paths is greater than the standard difference, and the second segmentation condition is that the difference between the number of segmented images and the number of transmission paths is less than or equal to the standard difference;
[0093] The standard quantity difference is 0, the preset quantity is equal to the quantity difference between the number of segmented images and the number of transmission paths, the quantity difference = the number of segmented images - the number of transmission paths, the number of segmented images = the number of first areas + the number of areas cut along the cross lines for each second area, it can be understood that the number of first areas is 1;
[0094] Detect the correlation coefficients between the segmented images. Specifically, perform full correlation detection on the segmented images corresponding to a target image. When performing full correlation detection on a single segmented image, record the segmented image as the target segmented image, and record the other segmented images corresponding to the target image as reference segmented images. Detect the correlation coefficients between the target segmented image and the reference segmented images.
[0095] The method for confirming the correlation coefficient is that, for the two segmented images corresponding to the first type of image, the correlation coefficient = the number of identical sensitive keywords + the matching coefficient; for the two segmented images corresponding to the second type of image, the correlation coefficient = the area coefficient - the distance coefficient, the distance coefficient is positively correlated with the segmentation distance, and the area coefficient is positively correlated with the segmentation area. The number of identical sensitive keywords is the number of identical sensitive keywords in the two segmented images, and the method for confirming the matching coefficient is that, for a sensitive keyword in a segmented image, the number of related keywords corresponding to the sensitive keyword in the other segmented image is recorded as the related number; for the two segmented images, one segmented image is recorded as the first segmented image, and the other segmented image is recorded as the second segmented image; the average value of the related numbers corresponding to the sensitive keywords in the first segmented image is recorded as the first related mean, and the average value of the related numbers corresponding to the sensitive keywords in the second segmented image is recorded as the second related mean; the matching coefficient is the larger value between the first related mean and the second related mean;
[0096] The related keywords corresponding to the sensitive keywords are keywords that are used in combination with the sensitive keywords more times than the preset number of times;
[0097] The method for confirming the number of times of use of a combination is as follows: for a sensitive keyword, each sensitive area where the sensitive keyword appears in the historical image recognition process is detected, and all keywords excluding the sensitive keyword that appear in each sensitive area are recorded as reference keywords. For a reference keyword, the number of times the reference keyword appears is the number of times the reference keyword and the sensitive keyword are used in combination; the value of the preset number of times of use of a combination can be determined according to the actual application scenario. It can be understood that the larger the value of the preset number of times of use of a combination is, the higher the correlation between the sensitive keyword and the corresponding keyword is. A value of the preset number of times of use of a combination is provided, and the preset number of times of use of a combination is the average value of the number of times of use of a combination corresponding to each relevant keyword that can meet the needs of the user in the historical image recognition process;
[0098] The segmentation distance is the shortest distance between the center position of one segmented image and the center position of another segmented image. The method for confirming the center position of the segmented image is that, for one segmented image, the center position of the segmented image is the center of the circumscribed circle of the segmented image.
[0099] The segmented area is confirmed by detecting the areas of the two segmented images respectively and recording the larger value as the segmented area.
[0100] For a reference image, the proportion of the sensitive area corresponding to the reference image = the area of the sensitive area in the reference image / the area of the reference image;
[0101] The method for confirming the correlation is to record the segmented images in the segmentation combination as difference images, perform segmentation detection on each segmented image that is not placed in the segmentation combination, and when performing segmentation detection on a single segmented image that is not placed in the segmentation combination, record the average value of the correlation coefficients between each difference image and the segmented image that is not placed in the segmentation combination as the correlation.
[0102] Specifically, the image transmission unit is provided with a correlation determination method, and the determination method includes:
[0103] For any segmented image and a transmission path corresponding to a type of image, the segmented image is recorded as a target type of image to be transmitted, and the correlation coefficient between the segmented image corresponding to each type of image being transmitted by the transmission path and the target type of image to be transmitted is detected. The correlation between the target type of image to be transmitted and the transmission path is the average value of each correlation coefficient.
[0104] For any segmented image and a transmission path corresponding to the two-category image, the segmented image is recorded as the target two-category image to be transmitted, and the similarity threshold between the segmented image corresponding to each two-category image being transmitted by the transmission path and the target two-category image to be transmitted is detected. The correlation between the target two-category image to be transmitted and the transmission path is the average value of each similarity threshold.
[0105] Among them, similarity threshold = same impact fragment coefficient + same sensitive area ratio coefficient, the same impact fragment coefficient is positively correlated with the same impact fragment, the same sensitive area ratio coefficient is positively correlated with the same sensitive area ratio, the same impact fragment is confirmed by, for two segmented images, the number of the same impact fragments appearing in the two segmented images; the impact fragment is the area corresponding to the incomplete face, key equipment or raw material that appears in the segmented image, and the same impact fragment is the area corresponding to the same face, the same key equipment or the same raw material. Users can determine whether the impact fragments are the same impact fragments through machine vision and deep learning networks. This is content that is easy for technical personnel in this field to understand and will not be described in detail; the method for confirming the same sensitive area ratio is, for two segmented images, respectively detect the reference ratios corresponding to the two segmented images, and record the larger value of the reference ratio as the same sensitive area ratio; for one segmented image, the reference ratio = the sum of the areas of each same impact fragment / the area of the impact area in the segmented image.
[0106] Specifically, the image processing method performed by the image processing unit is image encryption processing, and encryption processing is performed on the first type of image or the second type of image to obtain an encrypted image. The image processing unit responds to different setting conditions to determine whether a secondary encryption processing is required for the encrypted image;
[0107] The setting condition for the image encryption unit response is that the pixel correlation is greater than or equal to the preset pixel correlation or the encryption sensitivity threshold is greater than or equal to the preset encryption sensitivity threshold, and secondary encryption processing needs to be performed on the encrypted image;
[0108] The setting condition for the image encryption unit response is that the pixel correlation is less than the preset pixel correlation and the encryption sensitivity threshold is less than the preset encryption sensitivity threshold, and there is no need to perform secondary encryption processing on the encrypted image.
[0109] Among them, the encryption process generates an initial value of the iteration through a hash function, uses a hyperchaotic module to iterate according to the initial value of the iteration to generate a chaotic sequence, and performs block scrambling and cyclic shifting on the first or second type of image according to the chaotic sequence to obtain an encrypted image; the secondary encryption process performs a wavelet transform on the encrypted image and performs secondary scrambling on the transformed matrix to obtain a secondary encrypted image, which is easy for those skilled in the art to understand and will not be described in detail;
[0110] The setting condition includes a first setting condition and a second setting condition, the first setting condition is that the pixel correlation is greater than or equal to the preset pixel correlation or the encryption sensitivity threshold is greater than or equal to the preset encryption sensitivity threshold, and the second setting condition is that the pixel correlation is less than the preset pixel correlation and the encryption sensitivity threshold is less than the preset encryption sensitivity threshold;
[0111] The method for confirming pixel correlation is to convert the encrypted image into a grayscale image, extract N horizontally adjacent pixel pairs, and the value of N can be determined by the user. The greater the user's demand for reflecting the overall characteristics of the image, the larger the value of N. A value of N is provided, and N is 50. p1 is the pixel value of the pixel point corresponding to the left side of each adjacent pixel pair, and p2 is the pixel value of the pixel point corresponding to the right side of each adjacent pixel pair. Pixel correlation = covariance between p1 and p2 / (standard deviation of p1 × standard deviation of p2);
[0112] The method for confirming the encryption sensitive threshold is that, for pixel value p, the negative of the product of the probability of pixel value p appearing and the logarithm of the probability of pixel value p appearing with base 2 is recorded as the sensitive value corresponding to the pixel value p. Since the grayscale image is an 8-bit grayscale image, the value of p is 0, 1, 2..., 255, and the sum of the sensitive values corresponding to the pixel values is recorded as the encryption sensitive threshold.
[0113] The values of the preset pixel correlation degree and the preset encryption sensitivity threshold can be determined by the user according to the actual application scenario. The greater the user's demand for reducing security risks during image transmission, the closer the value of the preset pixel correlation degree is to 0, and the closer the value of the preset encryption sensitivity threshold is to 8. Provided are values of the preset pixel correlation degree and the preset encryption sensitivity threshold, the preset pixel correlation degree is 0.2, and the preset encryption sensitivity threshold is 7.5.
[0114] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A food safety intelligent supervision and control system, characterized in that: include: An image acquisition unit, used for acquiring a target image; An image analysis unit, connected to the image acquisition unit, for determining the image type of the target image according to the determination result; A sensitivity determination unit connected to the image analysis unit, for determining the sensitivity analysis method according to the image type corresponding to the target image, that is, determining the sensitive area according to the sensitive keywords or the affected area; An image processing unit, which is connected to the image analysis unit and the sensitivity determination unit respectively, and is used to determine the image state of the target image according to the sensitive area ratio and the sensitive area distribution coefficient, and determine the image processing method as image segmentation processing or image encryption processing according to the image state; The data transmission unit is connected to the image processing unit and is used to determine the transmission mode of the segmented image corresponding to the target image, or to randomly select a transmission path for transmitting the encrypted image or the secondary encrypted image.
2. The food safety intelligent supervision and control system according to claim 1 is characterized in that: The image analysis unit determines the image type of the target image in response to different determination results; The image analysis unit responds with a determination result that there are sensitive keywords in the target image, and the image type is determined to be a Class I image; The image analysis unit responds with a determination result that there is no sensitive keyword in the target image, and the image type is determined to be a second-class image; The sensitive keyword is a keyword whose safety factor is less than a preset safety factor.
3. The food safety intelligent supervision and control system according to claim 2 is characterized in that: When the image type corresponding to the target image processed by the sensitivity determination unit is a type of image, the sensitive area is determined according to the sensitive keywords, wherein: Sensitivity detection is performed on each sensitive keyword according to the text reading order. When sensitivity detection is performed on a single sensitive keyword, the sensitive keyword is recorded as a target sensitive keyword, a sensitive keyword whose character interval reference value with the target sensitive keyword is less than a preset character interval reference value is recorded as a reference sensitive keyword, a reference sensitive keyword with the largest character interval reference value corresponding to the target sensitive keyword is recorded as a maximum interval keyword, a minimum area that can contain each character between the target sensitive keyword and the maximum interval keyword and the target sensitive keyword and the maximum interval keyword is recorded as a sensitive area, and sensitivity detection is continued for sensitive keywords that are not recorded as sensitive areas until sensitivity detection of each sensitive keyword is completed, then area detection is stopped.
4. The food safety intelligent monitoring and control system according to claim 3 is characterized in that: When the image type corresponding to the target image processed by the sensitivity determination unit is a second-class image, regional analysis is performed on each affected area to determine the sensitive area, wherein: When performing regional analysis on a single impact area, the impact area is recorded as the target impact area, the impact area corresponding to the target impact area and having an impact distance less than the preset impact distance is recorded as the reference impact area, and the smallest rectangular area that can contain each reference impact area and the target impact area is recorded as an associated area. If there are impact area sections and sensitive area sections in the associated area, the associated area after removing the impact area sections and the sensitive area sections is recorded as a sensitive area, until all impact areas are recorded as sensitive areas, then the regional analysis is stopped; The affected areas are the face areas, key equipment areas and raw material areas corresponding to the two types of images.
5. The food safety intelligent monitoring and control system according to claim 4 is characterized in that: The state analysis unit determines the image state of the target image according to the sensitive area ratio and the sensitive area distribution coefficient, and the image state includes: A first image state in which the sensitive area ratio is less than a preset sensitive area ratio and the sensitive area distribution coefficient is less than a preset sensitive area distribution coefficient; A second image state in which the sensitive area ratio is greater than or equal to a preset sensitive area ratio or the sensitive area distribution coefficient is greater than or equal to a preset sensitive area distribution coefficient.
6. The food safety intelligent monitoring and control system according to claim 5 is characterized in that: The image processing unit responds to different image states to determine an image processing mode; The image state responded by the image processing unit is the first image state, and the image processing method performed is image segmentation processing; The image state responded by the image processing unit is the second image state, and the image processing method performed is image encryption processing.
7. The food safety intelligent monitoring and control system according to claim 6 is characterized in that: The image processing method performed by the image processing unit is image segmentation processing; For a single image of the same type, each sensitive area is cut, and the remaining area after cutting each sensitive area is recorded as the first area, each sensitive area is recorded as the second area and the center position of each second area is detected, a cross line perpendicular to the boundary of the corresponding second area is established at the center position of each second area, and each second area is cut based on the cross line; For a single second-category image, each sensitive area is cut, and the remaining area after cutting each sensitive area is recorded as the first area. Each sensitive area is recorded as a second area and each second area is segmented. When segmenting a single second area, the center position of each affected area in each second area is detected to establish a cross line perpendicular to the boundary of the corresponding second area, and each second area is cut based on the cross line.
8. The food safety intelligent monitoring and control system according to claim 7 is characterized in that: The image transmission unit responds to different segmentation conditions to determine a transmission mode of the segmented image corresponding to the target image; The segmentation condition to which the image transmission unit responds is that the difference between the number of segmented images and the number of transmission paths is greater than the standard difference, the correlation coefficient between each segmented image is detected, the two segmented images with the smallest correlation coefficient are placed in the segmentation combination, and the segmented image with the smallest correlation with the segmentation combination is continued to be placed in the segmentation combination until the number of segmented images in the segmentation combination reaches a preset number, the set of each segmented image in the segmentation combination is recorded as a combined image, the combined image and each segmented image not recorded as a combined image are recorded as reference images, and the reference image is transmitted to the transmission path that has the smallest correlation with the reference image and has not transmitted the reference image according to the order of the proportion of sensitive areas corresponding to the reference images from large to small; The segmentation condition responded by the image transmission unit is that the difference between the number of segmented images and the number of transmission paths is less than or equal to the standard difference. According to the order of the proportion of sensitive areas corresponding to the segmented images from large to small, each segmented image is transmitted to the transmission path with the smallest correlation and the segmented image corresponding to the target image is not transmitted.
9. The food safety intelligent monitoring and control system according to claim 8, characterized in that: The image transmission unit is provided with a correlation determination method, and the determination method includes: For any segmented image and a transmission path corresponding to a type of image, the segmented image is recorded as a target type of image to be transmitted, and the correlation coefficient between the segmented image corresponding to each type of image being transmitted by the transmission path and the target type of image to be transmitted is detected. The correlation between the target type of image to be transmitted and the transmission path is the average value of each correlation coefficient. For any segmented image and a transmission path corresponding to the two-category image, the segmented image is recorded as the target two-category image to be transmitted, and the similarity threshold between the segmented image corresponding to each two-category image being transmitted by the transmission path and the target two-category image to be transmitted is detected. The correlation between the target two-category image to be transmitted and the transmission path is the average value of each similarity threshold.
10. The food safety intelligent monitoring and control system according to claim 5, characterized in that: The image processing method performed by the image processing unit is image encryption processing, and encryption processing is performed on the first type of image or the second type of image to obtain an encrypted image. The image processing unit responds to different setting conditions to determine whether a secondary encryption processing is required for the encrypted image; The setting condition for the image encryption unit response is that the pixel correlation is greater than or equal to the preset pixel correlation or the encryption sensitivity threshold is greater than or equal to the preset encryption sensitivity threshold, and secondary encryption processing is required for the encrypted image; The setting condition for the image encryption unit response is that the pixel correlation is less than the preset pixel correlation and the encryption sensitivity threshold is less than the preset encryption sensitivity threshold, and there is no need to perform secondary encryption processing on the encrypted image.
Citation Information
Patent Citations
Food safety traceability system based on block chain and big data
CN115082087A
Image information desensitization method and device, computer equipment and storage medium
CN109872284A
Image processing method and device, computer readable storage medium and electronic equipment
CN111935486A
Block chain-based big data privacy sharing security protection system and method
CN114584374A
Video and picture desensitization method and device, electronic equipment and storage medium
CN117078704A