Macular cigarette pollution source determination method and device, electronic equipment and storage medium

Through automated image processing technology, the color information of macular cigarette branches is extracted and input into the discriminant function model, which solves the problems of complex and high cost of manual operations in the existing technology, and achieves rapid and accurate determination of pollution source types, reducing labor costs.

CN119624937APending Publication Date: 2025-03-14CHINA TOBACCO JIANGSU INDAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411817117.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing macular tobacco pollution source identification technology relies on manual operations, with high professional qualities and prone to errors, resulting in high labor costs and large workloads.

Method used

By obtaining the image of the target cigarette branch, extracting the color information of the macular area, determining the target attribute parameters, and inputting them into the pre-constructed discriminant function model, the type of contamination source of the macular is automatically determined.

Benefits of technology

The pollution source type of macular tobacco branches is achieved without manual participation, and the rapid and accurate determination of the macular tobacco branches is achieved, reducing labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119624937A_ABST
    Figure CN119624937A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a macular cigarette pollution source determination method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an acquired target cigarette image of a target cigarette of a to-be-identified pollution source type; wherein the target cigarette image comprises at least one yellow spot area; target color information of target yellow spots in the target cigarette image is extracted, and target attribute parameters of the target yellow spots are determined based on the target color information; and inputting the target attribute parameter into a pre-constructed target discrimination function model corresponding to each pollution source type, and determining a target pollution source type of the target yellow spot based on an output result of each target discrimination function model. According to the technical scheme provided by the embodiment of the invention, the target pollution source type of the target yellow spot can be quickly and accurately determined, manual participation is not needed, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to a method, device, electronic device and storage medium for determining a yellow-spotted cigarette contamination source. Background Art

[0002] Yellow spot cigarettes are defective products in cigarette production and are a relatively serious quality defect in cigarette appearance. The existing yellow spot cigarette pollution source identification technology mainly uses instruments to identify the chemical characteristics of the pollution source, and the staff determines the pollution type of the yellow spot cigarette based on the identification results.

[0003] However, in the process of implementing the present invention, it was found that the prior art has at least the following technical problems: it requires high professional quality of the staff and is prone to errors; and the workload is large, resulting in high labor costs. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for determining the pollution source of a yellow spot cigarette, so as to achieve the purpose of quickly and accurately determining the target pollution source type of a target yellow spot without manual participation, thus reducing labor costs.

[0005] According to one aspect of the present invention, a method for determining a yellow spot cigarette pollution source is provided, comprising:

[0006] Acquire a target cigarette image of a target cigarette of a type of pollution source to be identified; wherein the target cigarette image contains at least one yellow spot area;

[0007] Extracting target color information of a target yellow spot in the target cigarette image, and determining target attribute parameters of the target yellow spot based on the target color information;

[0008] The target attribute parameters are respectively input into the pre-constructed target discriminant function models corresponding to the respective pollution source types, and the target pollution source type of the target macula is determined based on the output result of each target discriminant function model.

[0009] According to another aspect of the present invention, a device for determining a yellow-spotted cigarette pollution source is provided, comprising:

[0010] An image acquisition module, used to acquire a target cigarette image of a target cigarette of a type of pollution source to be identified; wherein the target cigarette image contains at least one yellow spot area;

[0011] An information extraction module, used to extract target color information of a target yellow spot in the target cigarette image, and determine target attribute parameters of the target yellow spot based on the target color information;

[0012] The pollution source type determination module is used to input the target attribute parameters into the pre-built target discriminant function models corresponding to each pollution source type, and determine the target pollution source type of the target macula based on the output result of each target discriminant function model.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining the yellow-spotted cigarette contamination source described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the yellow-spotted cigarette contamination source described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention first obtains the target cigarette image of the target cigarette of the pollution source type to be identified; wherein the target cigarette image contains at least one yellow spot area; then, the target color information of the target yellow spot in the target cigarette image is extracted, and the target attribute parameters of the target yellow spot are determined based on the target color information; finally, the target attribute parameters are respectively input into the pre-constructed target discriminant function models corresponding to each pollution source type, and the target pollution source type of the target yellow spot is determined based on the output result of each target discriminant function model. The technical solution of this embodiment does not require the staff to use instruments to identify the chemical characteristics of the target yellow spot. Through the target color information of the target yellow spot in the target cigarette image, the target pollution source type of the target yellow spot can be quickly and accurately determined without human intervention, reducing labor costs.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flow chart of a method for determining a yellow spot cigarette pollution source provided according to an embodiment of the present invention;

[0022] Figure 2 is a flow chart of another method for determining a yellow spot cigarette pollution source provided according to an embodiment of the present invention;

[0023] Figure 3 is a schematic structural diagram of a device for determining a yellow-spotted cigarette pollution source provided according to an embodiment of the present invention;

[0024] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing the method for determining the yellow spot cigarette pollution source according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0027] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.

[0028] Figure 1 This is a flow chart of a method for determining a yellow spot cigarette pollution source according to an embodiment of the present invention. This embodiment can be applied to the case of determining the target pollution source type of a target yellow spot in a target cigarette, and the method can be executed by a yellow spot cigarette pollution source determination device, which can be implemented in the form of hardware and / or software.

[0029] like Figure 1 As shown, the method of this embodiment may specifically include:

[0030] S110, obtaining a target cigarette image of a target cigarette of a type of pollution source to be identified.

[0031] The target cigarette image contains at least one yellow spot area. The target cigarette is a cigarette of a pollution source type to be identified, and the pollution source type may include at least one of a sugar type, a flavor type, and a lubricant type.

[0032] In a specific implementation, the target cigarette image of the target cigarette can be obtained through an image acquisition device. For example, the image acquisition device acquires a panoramic image of the target cigarette and uses the panoramic image as the target cigarette image; or the image acquisition device acquires a macular image corresponding to the macular area in the target cigarette and uses the macular image as the target cigarette image.

[0033] Optionally, the image acquisition device may include an electron microscope. For example, the electron microscope is a high-resolution electron microscope with a fixed light source. By placing the target cigarette under the high-resolution electron microscope, a microscopic image of the target cigarette is acquired to obtain the target cigarette image of the target cigarette. The resolution of the high-resolution electron microscope is not less than 1 micron, and the magnification is 50-100 times. After the light source is adjusted and fixed, the brightness and color temperature of the light source should be kept stable to ensure the stability of the subsequent extraction of macular color information.

[0034] S120, extracting target color information of a target yellow spot in the target cigarette image, and determining target attribute parameters of the target yellow spot based on the target color information.

[0035] Among them, the target attribute parameter can be at least two of the sum of the brightness values ​​of each pixel point corresponding to the target yellow spot, the sum of the red and green values, and the sum of the blue and yellow values; or, the target attribute parameter can be at least two of the average brightness, the average red and green values, and the average blue and yellow values.

[0036] In a specific implementation, the target cigarette image can be converted to a target color space, wherein the target color space is a space including brightness, a first channel, and a second channel; illustratively, the target color space can be a CIE-Lab color space. In the target cigarette image after conversion to the target color space, the macular area corresponding to the target macular is determined, the color information of the macular area is used as the target color information, and the brightness information of the target macular in the target cigarette image is determined based on the target color information.

[0037] Alternatively, the method of extracting the target color information of the target macula in the target cigarette image may include: determining the regional contour of the area to which the target macula in the target cigarette image belongs based on the color value of each pixel point in the target cigarette image and a preset macula color threshold; determining the target macula image corresponding to each regional contour based on an edge detection algorithm, and converting the target macula image to a target color space; and determining the target color information of the target macula based on the target macula image converted to the target color space.

[0038] The target color space is a space including brightness, a first channel and a second channel. The first channel is used to represent the range from red to green, and the second channel is used to represent the range from yellow to blue. The target color information includes the brightness value, red-green value and yellow-blue value of each pixel corresponding to the target yellow spot in the target cigarette image.

[0039] In this embodiment, a macular color threshold can be set in advance, and the pixel points in the target cigarette image whose color value is greater than the macular color threshold are determined as macular pixels belonging to the target macular; the pixel points whose color value is less than or equal to the macular color threshold are determined as background pixels in the target cigarette image. The color value includes a red color value, a green color value, and a blue color value. By comparing the color value corresponding to each pixel point in the target cigarette image with the macular color threshold, each macular pixel point belonging to the target macular in the target cigarette image can be determined. The regional contour of the area to which the target macular in the target cigarette image belongs is determined by different macular pixels. Exemplarily, the regional contour can be a circular contour, a rectangular contour, an irregular shape contour, and the like.

[0040] In order to accurately and finely cut the target macula in the target cigarette image, an edge detection algorithm can be used to extract the target macula image corresponding to each region contour in the target cigarette image. Exemplarily, the edge detection algorithm includes at least one of the Canny operator algorithm, the Sobel operator and the Laplace algorithm.

[0041] In order to obtain the target color information of the target macular image, the target macular image may be converted to the target color space. It should be noted that before the target macular image is converted to the color space, it may be determined whether the current color space of the target macular image is consistent with the target color space. If they are consistent, the target color information of the target macular is determined based on the current target macular image. If they are inconsistent, the target macular image is converted to the target color space, and the target color information of the target macular is determined based on the converted target macular image.

[0042] This embodiment can quickly and accurately extract the target macular image through the edge detection algorithm, and provides a method for determining the target color information, which is convenient for quickly determining the target color information.

[0043] In a specific implementation, the target attribute parameters may be the average brightness, the average red-green color, and the average blue-yellow color; based on the target color information, the average brightness, the average red-green color, and the average blue-yellow color of each pixel corresponding to the target yellow spot in the target cigarette image are determined. It should be noted that the target attribute parameters can be determined based on the independent variables of the pre-constructed target discriminant function model corresponding to each pollution source type. Exemplarily, if the independent variables are the average brightness, the average red-green color, and the average blue-yellow color, the average brightness, the average red-green color, and the average blue-yellow color of the target yellow spot can be determined as the target attribute parameters. If the independent variables are the average red-green color and the average blue-yellow color, the average red-green color and the average blue-yellow color of the target yellow spot can be determined as the target attribute parameters.

[0044] In this embodiment, when the image acquisition light source is stable, the brightness value of the image obtained by the test is usually relatively stable. Whether the brightness values ​​of different pollution source types are stable can be determined by the changes in the brightness average value and relative standard deviation of the macula of different pollution source types. When the brightness value is relatively stable, it means that the effect of distinguishing the pollution source types by the brightness value is not obvious. The color characteristics of the macula under different pollution sources show regional distribution characteristics. Therefore, in order to accurately detect the pollution source type and reduce the workload, the red-green color average value and the blue-yellow color average value that have a greater impact on distinguishing the pollution source type can be used as target attribute parameters. Optionally, the target attribute parameters may be the red-green color average value and the blue-yellow color average value. The implementation method of determining the target attribute parameters of the target macula based on the target color information may be: based on the target color information, determine the red-green color average value and the blue-yellow color average value of the target macula.

[0045] Specifically, based on the target color information of the target macular image, the red-green saturation value and the blue-yellow saturation value corresponding to each macular pixel in the target macular image can be determined, and the red-green saturation average value of the red-green saturation value and the blue-yellow saturation average value of the blue-yellow saturation value corresponding to each macular pixel can be determined. The red-green saturation average value and the blue-yellow saturation average value are determined as the target attribute parameters.

[0046] S130, respectively inputting the target attribute parameters into the pre-constructed target discriminant function models corresponding to the respective pollution source types, and determining the target pollution source type of the target macula based on the output result of each target discriminant function model.

[0047] The target discriminant function model includes at least one of a Fisher discriminant function model, a typical discriminant analysis function model, a multivariate linear discriminant analysis function model and a nonlinear discriminant analysis function model.

[0048] It should be noted that, for each pollution source type, a target discriminant function model corresponding to the pollution source type can be set, and the mapping relationship between the pollution source type and the attribute parameters of the macula of the pollution source type can be reflected through the discriminant function model.

[0049] Optionally, the target attribute parameters are respectively input into the pre-constructed target discriminant function models corresponding to each pollution source type, and the target pollution source type of the target yellow spot is determined based on the output results of each target discriminant function model, including: for each pollution source type, using the target attribute parameters as the independent variables of the target discriminant function model corresponding to the pollution source type, and determining the target function value corresponding to the target attribute parameters; determining the pollution source type corresponding to the maximum value in the target function value as the target pollution source type of the target yellow spot.

[0050] In this embodiment, the method of determining the target pollution source type is described by taking the Fischer discriminant function model as the target discriminant function model as an example. For example, the target discriminant function model corresponding to the sugar material type is as follows:

[0051] Y 糖 =-0.074a+0.223b+c

[0052] The discriminant function model corresponding to the flavor type is as follows:

[0053] Y 香 =-0.165a+0.232b+c

[0054] The discriminant function model corresponding to the lubricant type is as follows:

[0055] Y 油 =-0.084a+0.082b+c

[0056] Among them, a represents the average value of red and green, b represents the average value of blue and yellow, and c is a predetermined constant.

[0057] In a specific implementation, the objective function value corresponding to each pollution source type can be determined based on the target attribute parameters, and the pollution source type corresponding to the maximum objective function value is determined as the target pollution source type.

[0058] The technical solution of the embodiment of the present invention first obtains the target cigarette image of the target cigarette of the pollution source type to be identified; wherein the target cigarette image contains at least one yellow spot area; then, the target color information of the target yellow spot in the target cigarette image is extracted, and the target attribute parameters of the target yellow spot are determined based on the target color information; finally, the target attribute parameters are respectively input into the pre-constructed target discriminant function models corresponding to each pollution source type, and the target pollution source type of the target yellow spot is determined based on the output result of each target discriminant function model. The technical solution of this embodiment does not require the staff to use instruments to identify the chemical characteristics of the target yellow spot. Through the target color information of the target yellow spot in the target cigarette image, the target pollution source type of the target yellow spot can be quickly and accurately determined without human intervention, reducing labor costs.

[0059] Figure 2It is a flowchart of another method for determining the pollution source of yellow spot cigarettes provided according to an embodiment of the present invention. In addition to the above embodiments, this embodiment also includes: obtaining a sample data set; wherein the sample data set includes multiple sample yellow spot images, and a pollution type label corresponding to each sample yellow spot image; the pollution type label corresponds to the pollution source type one by one; determining the sample color information of each sample yellow spot image, and determining the sample attribute parameters corresponding to the sample yellow spot image based on the sample color information; for each pollution type label, based on the sample attribute parameters of the sample yellow spot image corresponding to the pollution type label and a preset discriminant function, construct a discriminant function model corresponding to the pollution type label as the target discriminant function model of the pollution source type corresponding to the pollution type label. Among them, the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Such as Figure 2 As shown, the method includes:

[0060] S210, obtaining a sample data set; wherein the sample data set includes a plurality of sample macular images and a pollution type label corresponding to each sample macular image; the pollution type label corresponds to the pollution source type one by one.

[0061] It should be noted that the pollution type label may include at least one of a sugar type label, a flavor type label and a lubricant type label.

[0062] In this embodiment, a preset number of yellow spot smoke samples that have been identified in the past can be screened out, and each yellow spot smoke sample is subjected to microscopic image acquisition under a high-resolution electron microscope with a fixed light source, thereby obtaining a sample yellow spot image. The pollution type label of each sample yellow spot image is determined based on the pollution source type obtained by historical identification.

[0063] In practical applications, the sample macular image is a pre-processed image that has been cropped, enlarged, and rotated, thereby ensuring that the size of each sample macular image remains consistent.

[0064] S220 , determining sample color information of each sample macular image, and determining sample attribute parameters corresponding to the sample macular image based on the sample color information.

[0065] In this embodiment, each sample macular image is converted to the target color space, and based on the sample macular image converted to the target color space, the sample color information is determined. Based on the sample color information, the average red-green color value and the average blue-yellow color value of the sample macular image are determined as sample attribute parameters.

[0066] S230. For each pollution type label, based on the sample attribute parameters of the sample macular image corresponding to the pollution type label and a preset discriminant function, a discriminant function model corresponding to the pollution type label is constructed as a target discriminant function model of the pollution source type corresponding to the pollution type label.

[0067] The preset discriminant function includes at least one of a Fisher discriminant function, a typical discriminant analysis function, a multivariate linear discriminant analysis function and a nonlinear discriminant analysis function.

[0068] In order to determine the mapping relationship between the pollution type label and the sample attribute parameters, based on the preset discriminant function, a functional analysis is performed on the relationship between the sample attribute parameters and the pollution type label corresponding to the macular image of each sample, and the coefficient of the discriminant function model corresponding to each pollution type label is determined, so as to construct the target discriminant function model corresponding to each pollution type label based on the coefficient.

[0069] This embodiment pre-builds a target discriminant function model through a sample data set, thereby facilitating rapid determination of the target pollution source type of the target macula through the target function model.

[0070] S240, obtaining the collected target cigarette image of the target cigarette of the type of pollution source to be identified.

[0071] S250, extracting target color information of a target yellow spot in the target cigarette image, and determining target attribute parameters of the target yellow spot based on the target color information.

[0072] S260, respectively inputting the target attribute parameters into the pre-constructed target discriminant function models corresponding to the respective pollution source types, and determining the target pollution source type of the target macula based on the output result of each target discriminant function model.

[0073] In this embodiment, the sample data set also includes sample morphological information corresponding to each sample macular image; the sample morphological information includes at least one of the macular area of ​​the sample macular in the sample macular image, the relative coordinates of the macular center point, and the size of the macular fitting rectangle; after extracting the target color information of the target macular in the target cigarette image, it also includes: determining the target morphological information of the target macular in the target cigarette image; determining the verification pollution source type of the target macular based on the pollution type label corresponding to the sample morphological information that matches the target morphological information; when the target pollution source type and the verification pollution source type do not match, generating warning information, and sending the warning information to the operation and maintenance terminal.

[0074] The target morphological information includes at least one of the target macula area, the relative coordinates of the macula center point, and the size of the macula fitting rectangle.

[0075] In this embodiment, sample morphological information matching the target morphological information can be determined in the sample data set. Exemplarily, sample morphological information that meets preset conditions can be used as sample morphological information matching the target morphological information: the preset conditions include at least one of the following: the area difference between the macular area of ​​the sample macula and the macular area of ​​the target macula is less than a preset threshold; the size difference between the size of the macular fitting rectangle of the sample macula and the size of the macular fitting rectangle of the target macula is less than a preset difference range; the distance between the relative coordinates of the macular center of the sample macula and the relative coordinates of the macular center of the target macula is less than a preset distance.

[0076] In a specific implementation, the pollution type label corresponding to the sample morphological information that matches the target morphological information can be used to determine the verified pollution source type of the target yellow spot; when the target pollution source type and the verified pollution source type match, it means that the target pollution source type is correctly determined; when the target pollution source type and the verified pollution source type do not match, it means that the target pollution source type may be wrong, and an early warning information containing the target cigarette image can be generated, and the early warning information can be sent to the operation and maintenance terminal, so that the operation and maintenance personnel can verify the pollution source type of the target yellow spot in the target cigarette image according to the received early warning information.

[0077] This embodiment verifies the target pollution source type through sample morphology information and target morphology information, and generates warning information and sends it to the operation and maintenance terminal when there may be errors in the target pollution source type, so as to promptly remind the operation and maintenance personnel to check, which is conducive to improving the accuracy of determining the target pollution source type. By adding sample morphology information, the richness and diversity of the sample data set are increased, which facilitates the accurate determination of the target pollution source type.

[0078] Furthermore, after sending the warning information to the operation and maintenance terminal, it also includes: receiving correction information sent by the operation and maintenance terminal, and determining the real pollution source type of the target yellow spot based on the correction information; updating the sample data set based on the target yellow spot and the real pollution source type; and updating the target discriminant function model based on the updated sample data set.

[0079] Specifically, after determining the target pollution type corresponding to the target yellow spot, the operation and maintenance personnel can generate correction information containing the correct real pollution source type through the operation and maintenance terminal, and feed the correction information back to the yellow spot cigarette pollution source determination device, and determine the real pollution source type based on the correction information. When the real pollution source type is consistent with the target pollution source type, it means that the target pollution source type determined by the target discriminant function model is accurate. When the real pollution source type is inconsistent with the target pollution source type, it means that there is an error in the target pollution source type determined by the target discriminant function model, then the yellow spot image corresponding to the target yellow spot can be used as a new sample image, and based on the real pollution source type as the pollution type label of the new sample image, the new sample image and the pollution type label corresponding to the new sample image are added to the sample data set to update the sample data set; and when the number of new sample images is greater than the preset number threshold, the target discriminant function model can be updated based on the updated sample data set.

[0080] This embodiment determines the real pollution source type by correcting the information to improve the accuracy of determining the pollution source type; and updates the target discriminant function model based on the real pollution source type, which is conducive to reducing the discrimination error and improving the discrimination accuracy of the target discriminant function model. This embodiment also determines the target pollution source type based on the target morphological information, thereby diversifying the discrimination angles and improving the discrimination accuracy.

[0081] Figure 3 : is a schematic diagram of the structure of a yellow spot cigarette pollution source determination device provided according to an embodiment of the present invention, and the device is used to execute the yellow spot cigarette pollution source determination method provided in any of the above embodiments. The device and the yellow spot cigarette pollution source determination method of the above embodiments belong to the same inventive concept, and the details not fully described in the embodiments of the yellow spot cigarette pollution source determination device can refer to the embodiments of the above methods for determining the yellow spot cigarette pollution source. Figure 3 As shown, the device comprises:

[0082] The image acquisition module 10 is used to acquire a target cigarette image of a target cigarette of a type of pollution source to be identified; wherein the target cigarette image contains at least one yellow spot area;

[0083] The information extraction module 11 is used to extract the target color information of the target yellow spot in the target cigarette image, and determine the target attribute parameters of the target yellow spot based on the target color information;

[0084] The pollution source type determination module 12 is used to input the target attribute parameters into the pre-built target discriminant function models corresponding to each pollution source type, and determine the target pollution source type of the target macula based on the output result of each target discriminant function model.

[0085] Based on any optional technical solution in the embodiments of the present invention, optionally, the method further includes:

[0086] A data set acquisition module is used to acquire a sample data set before determining the target pollution source type of the target macula; wherein the sample data set includes a plurality of sample macula images and a pollution type label corresponding to each sample macula image; the pollution type label corresponds to the pollution source type one by one;

[0087] A sample attribute parameter determination module, used to determine the sample color information of each sample macular image, and determine the sample attribute parameters corresponding to the sample macular image based on the sample color information;

[0088] A model building module, for building a discriminant function model corresponding to each pollution type label based on sample attribute parameters of the sample macular image corresponding to the pollution type label and a preset discriminant function, as a target discriminant function model of the pollution source type corresponding to the pollution type label;

[0089] The preset discriminant function includes at least one of a Fisher discriminant function, a typical discriminant analysis function, a multivariate linear discriminant analysis function and a nonlinear discriminant analysis function.

[0090] Based on any optional technical solution in the embodiment of the present invention, optionally, the pollution source type determination module 12 includes:

[0091] An objective function value determination unit is used to determine the objective function value corresponding to the target attribute parameter for each pollution source type by taking the target attribute parameter as an independent variable of the target discriminant function model corresponding to the pollution source type;

[0092] The target pollution source type determination unit is used to determine the pollution source type corresponding to the maximum value in the objective function value as the target pollution source type of the target macula.

[0093] Based on any optional technical solution in the embodiment of the present invention, optionally, the information extraction module 11 includes:

[0094] A region contour determining unit, for determining a region contour of a region to which a target yellow spot in the target cigarette image belongs based on the color value of each pixel point in the target cigarette image and a preset yellow spot color threshold;

[0095] An image conversion unit, used for determining the target macular image corresponding to each area contour based on an edge detection algorithm, and converting the target macular image into a target color space;

[0096] A color information determination unit is used to determine target color information of a target macula based on a target macula image converted into a target color space; wherein the target color space is a space including brightness, a first channel and a second channel, the first channel is used to represent a range from red to green, and the second channel is used to represent a range from yellow to blue.

[0097] On the basis of any optional technical solution in the embodiments of the present invention, optionally, the sample data set also includes sample morphological information corresponding to each sample macula image; the sample morphological information includes at least one of the macula area, the relative coordinates of the macula center point, and the size of the macula fitting rectangle of the sample macula in the sample macula image;

[0098] The device also includes:

[0099] A target morphology information determination module, used to determine the target morphology information of the target yellow spot in the target cigarette image after extracting the target color information of the target yellow spot in the target cigarette image;

[0100] A verification pollution source type determination module, used to determine the verification pollution source type of the target macula based on the pollution type label corresponding to the sample morphological information matching the target morphological information;

[0101] The warning information generation module is used to generate warning information when the target pollution source type and the verified pollution source type do not match, and send the warning information to the operation and maintenance terminal.

[0102] Based on any optional technical solution in the embodiments of the present invention, optionally, the method further includes:

[0103] An information receiving module, used for receiving correction information sent by the operation and maintenance terminal after sending the warning information to the operation and maintenance terminal, and determining the real pollution source type of the target yellow spot based on the correction information;

[0104] A data set updating module, used for updating a sample data set based on a target yellow spot and a real pollution source type;

[0105] The model updating module is used to update the discriminant function model based on the updated sample data set.

[0106] Based on any optional technical solution in the embodiment of the present invention, optionally, the base information extraction module 11 includes:

[0107] The average value determination unit is used to determine the average value of the red-green color and the average value of the blue-yellow color of the target macular based on the target color information.

[0108] The technical solution of the embodiment of the present invention first obtains the target cigarette image of the target cigarette of the pollution source type to be identified; wherein the target cigarette image contains at least one yellow spot area; then, the target color information of the target yellow spot in the target cigarette image is extracted, and the target attribute parameters of the target yellow spot are determined based on the target color information; finally, the target attribute parameters are respectively input into the pre-constructed target discriminant function models corresponding to each pollution source type, and the target pollution source type of the target yellow spot is determined based on the output result of each target discriminant function model. The technical solution of this embodiment does not require the staff to use instruments to identify the chemical characteristics of the target yellow spot. Through the target color information of the target yellow spot in the target cigarette image, the target pollution source type of the target yellow spot can be quickly and accurately determined without human intervention, reducing labor costs.

[0109] It is worth noting that in the above-mentioned embodiment of the yellow spot cigarette pollution source determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0110] Figure 4 1 is a schematic diagram of the structure of an electronic device for implementing the method for determining the source of yellow spot cigarette pollution of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0111] like Figure 4 As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.

[0112] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0113] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 executes the various methods and processes described above, such as the yellow spot cigarette pollution source determination method.

[0114] In some embodiments, the method for determining the source of yellow spot cigarette contamination may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the method for determining the source of yellow spot cigarette contamination described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to execute the method for determining the source of yellow spot cigarette contamination by any other appropriate means (e.g., by means of firmware).

[0115] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0116] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0117] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0118] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0119] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0120] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0121] This embodiment also provides a computer program product, including a computer program, which, when executed by a processor, implements the method for determining the yellow-spotted cigarette contamination source as provided in any embodiment of the present application.

[0122] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0124] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for determining the pollution source of yellow-spotted cigarettes, characterized in that: include: Acquire a target cigarette image of a target cigarette of a type of pollution source to be identified; wherein the target cigarette image contains at least one yellow spot area; Extracting target color information of a target yellow spot in the target cigarette image, and determining target attribute parameters of the target yellow spot based on the target color information; The target attribute parameters are respectively input into the pre-constructed target discriminant function models corresponding to the respective pollution source types, and the target pollution source type of the target macula is determined based on the output result of each target discriminant function model.

2. The method according to claim 1, characterized in that Before determining the target pollution source type of the target macula, the method further includes: Acquire a sample data set; wherein the sample data set includes a plurality of sample macular images and a pollution type label corresponding to each of the sample macular images; the pollution type label corresponds to the pollution source type one by one; Determine sample color information of each of the sample macular images, and determine sample attribute parameters corresponding to the sample macular images based on the sample color information; For each of the pollution type labels, based on the sample attribute parameters of the sample macular image corresponding to the pollution type label and a preset discriminant function, a discriminant function model corresponding to the pollution type label is constructed as a target discriminant function model of the pollution source type corresponding to the pollution type label; The preset discriminant function includes at least one of a Fisher discriminant function, a typical discriminant analysis function, a multivariate linear discriminant analysis function and a nonlinear discriminant analysis function.

3. The method according to claim 1, characterized in that The target attribute parameters are respectively input into the pre-constructed target discriminant function models corresponding to the pollution source types, and the target pollution source type of the target macula is determined based on the output result of each target discriminant function model, including: For each type of pollution source, the target attribute parameter is used as an independent variable of a target discriminant function model corresponding to the pollution source type, and a target function value corresponding to the target attribute parameter is determined; The pollution source type corresponding to the maximum value in the objective function value is determined as the target pollution source type of the target macula.

4. The method according to claim 1, characterized in that: The step of extracting target color information of a target yellow spot in the target cigarette image includes: Based on the color value of each pixel point in the target cigarette image and a preset yellow spot color threshold, determining the area contour of the area to which the target yellow spot in the target cigarette image belongs; Based on an edge detection algorithm, determining a target macular image corresponding to each of the area contours, and converting the target macular image into a target color space; Based on the target macula image converted to the target color space, target color information of the target macula is determined; wherein the target color space is a space including brightness, a first channel and a second channel, the first channel is used to represent a range from red to green, and the second channel is used to represent a range from yellow to blue.

5. The method according to claim 2, characterized in that: The sample data set also includes sample morphological information corresponding to each sample macular image; the sample morphological information includes at least one of the macular area of ​​the sample macula in the sample macular image, the relative coordinates of the macular center point, and the size of the macular fitting rectangle; After extracting the target color information of the target yellow spot in the target cigarette image, the method further includes: Determining target morphological information of a target yellow spot in the target cigarette image; Determining the verification pollution source type of the target macula based on the pollution type label corresponding to the sample morphology information matching the target morphology information; In the case where the target pollution source type and the verified pollution source type do not match, an early warning message is generated and sent to the operation and maintenance terminal.

6. The method according to claim 5, characterized in that After sending the warning information to the operation and maintenance terminal, the method further includes: receiving correction information sent by the operation and maintenance terminal, and determining the real pollution source type of the target macula based on the correction information; Based on the target macula and the real pollution source type, updating the sample data set; The target discriminant function model is updated based on the updated sample data set.

7. The method according to claim 1, characterized in that The determining the target attribute parameter of the target macula based on the target color information comprises: Based on the target color information, the average red-green color value and the average blue-yellow color value of the target macular are determined.

8. A device for determining the pollution source of yellow-spotted cigarettes, characterized in that: include: An image acquisition module, used to acquire a target cigarette image of a target cigarette of a type of pollution source to be identified; wherein the target cigarette image contains at least one yellow spot area; An information extraction module, used to extract target color information of a target yellow spot in the target cigarette image, and determine target attribute parameters of the target yellow spot based on the target color information; The pollution source type determination module is used to input the target attribute parameters into the pre-built target discriminant function models corresponding to each pollution source type, and determine the target pollution source type of the target macula based on the output result of each target discriminant function model.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining the yellow-spotted cigarette contamination source according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the yellow-spotted cigarette contamination source according to any one of claims 1 to 7 when executed.