Anti-counterfeiting identification method for filter element, and related apparatus

By using the anti -counterfeit identification image of the filter element in the water purification equipment, the problem of difficulty identification of the authenticity of the filter element is solved, the anti -counterfeiting of counterfeit filter element is achieved, and the equipment operation and user health are guaranteed.

WO2025016437A1PCT designated stage expired Publication Date: 2025-01-23WUHU MIDEA SMART KITCHEN APPLIANCE MFG CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/106196
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-21
Filing Date
2024-07-18
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify and distinguish the authenticity of the filter element in the water purification equipment, resulting in counterfeit filter element infringement of the interests of the manufacturer and affecting the operation of the water purification equipment and the health of the user.

Method used

By obtaining the anti -counterfeit identification image of the filter element, the filter element is used for anti -counterfeiting identification operations based on image processing technology, including the image interception, compression, identification and comparison, and determine the authentic information of the product of the filter element.

Benefits of technology

The authenticity of the filter element is realized, the circulation of counterfeit filter elements is to ensure the interests of manufacturers, and to ensure the safety and effective operation of water purification equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024106196_23012025_PF_FP_ABST
    Figure CN2024106196_23012025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are an anti-counterfeiting identification method for a filter element, and a related apparatus. The method comprises: acquiring an anti-counterfeiting marked image of a filter element to be subjected to identification; and on the basis of the anti-counterfeiting marked image, performing an anti-counterfeiting identification operation on the filter element, and determining product authenticity information of the filter element. By means of the method, the present application can determine the authenticity of a filter element.
Need to check novelty before this filing date? Find Prior Art

Description

Anti-counterfeiting identification method and related device for filter element

[0001] This application claims priority to the Chinese patent application No. 2023108839786 filed on July 18, 2023, entitled “A method for identifying anti-counterfeiting marks of a filter element and related devices”; this application claims priority to the Chinese patent application No. 2023108861296 filed on July 18, 2023, entitled “A method for identifying anti-counterfeiting marks of a filter element and related devices”; this application claims priority to the Chinese patent application No. 2023109044428 filed on July 21, 2023, entitled “A method for identifying anti-counterfeiting marks of a filter element and related devices” The present application claims priority to the Chinese patent application entitled “Anti-counterfeiting identification method, device, water purification equipment and electronic equipment for filter element”; the present application claims priority to the Chinese patent application entitled “Anti-counterfeiting identification method, device, water purification equipment and electronic equipment for filter element” with application number 2023109147246 filed on July 21, 2023; the present application claims priority to the Chinese patent application entitled “Anti-counterfeiting identification method, device and water purification equipment for filter element” with application number 2023109147316 filed on July 21, 2023; all of which are incorporated into the present application by reference.

Technical field

[0002] The present application belongs to the technical field of water purification equipment, and in particular relates to an anti-counterfeiting identification method for a filter element and a related device. [Background Technology]

[0003] Filter elements are key consumables for water purification equipment and need to be replaced regularly. Counterfeit and shoddy filter elements often appear on the market. Counterfeit filter elements not only infringe on the interests of manufacturers, but the quality of counterfeit filter elements is also difficult to guarantee, which affects the operation of water purification equipment and the health of users. Therefore, anti-counterfeiting identification of filter elements in water purification equipment is crucial.

[0004] [Summary of the invention]

[0005] The present application mainly provides a filter element anti-counterfeiting identification method and related devices to solve the problem of filter element anti-counterfeiting identification of water purification equipment.

[0006] In order to solve the above technical problems, the present application provides an anti-counterfeiting identification method for a filter element, which includes: obtaining an anti-counterfeiting mark image of the filter element to be identified; based on the anti-counterfeiting mark image, performing an anti-counterfeiting identification operation on the filter element to determine the product authenticity information of the filter element.

[0007] In some embodiments, an anti-counterfeiting identification operation is performed on the filter element based on the anti-counterfeiting logo image to determine the product authenticity information of the filter element, including: obtaining the processing result of the anti-counterfeiting logo image; and determining the product authenticity information of the filter element based on the processing result, wherein the processing result is the recognition result of the anti-counterfeiting logo image, or the comparison result of comparing the anti-counterfeiting logo image and the template logo image.

[0008] In some embodiments, the processing result is a recognition result of the anti-counterfeiting mark image, and the recognition result includes the ciphertext data of the anti-counterfeiting mark in the anti-counterfeiting mark image.

[0009] In some embodiments, based on the processing results, the product authenticity information of the filter element is determined, including: decrypting the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark; judging whether the plaintext data complies with the preset coding rules; wherein, the production information of the filter element is encoded according to the preset coding rules to obtain the plaintext data; in response to the plaintext data complying with the preset coding rules, the filter element is determined to be authentic.

[0010] In some embodiments, based on the processing results, the product authenticity information of the filter element is determined, including: sending the ciphertext data to the server; the server can decrypt the ciphertext data, obtain the plaintext data corresponding to the anti-counterfeiting mark, and obtain the associated information corresponding to the plaintext data, the associated information represents whether the filter element is associated with other water purification equipment, and based on the associated information, the product authenticity information of the filter element is determined.

[0011] In some embodiments, the anti-counterfeiting identification method of the filter element further includes: obtaining an auxiliary identification mark corresponding to the filter element to be identified.

[0012] In some embodiments, before obtaining the processing result of the anti-counterfeiting mark image, it also includes: judging whether the auxiliary identification mark in the filter element image is the same as the target identification mark; wherein, the filter element image includes the auxiliary identification mark and the anti-counterfeiting mark; in response to the auxiliary identification mark being the same as the target identification mark, executing the step of obtaining the processing result of the anti-counterfeiting mark image.

[0013] In some embodiments, before obtaining the processing result of the anti-counterfeiting logo image, it also includes: dividing the anti-counterfeiting logo image into at least one image block based on the memory space of the processor in the water purification equipment; obtaining the compressed anti-counterfeiting logo image of the filter element based on the compression blocks corresponding to each image block, wherein the compressed anti-counterfeiting logo image of the filter element is used for processing to obtain the processing result of the anti-counterfeiting logo image.

[0014] In some embodiments, based on the anti-counterfeiting mark image, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element, including: ternary processing of the anti-counterfeiting mark image to obtain a ternary image; based on the comparison result of the pixel ratio of the grayscale median value of the ternary image and the target ratio threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element.

[0015] In some embodiments, based on the comparison result of the pixel ratio of the grayscale median value of the ternary image and the target ratio threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element, including: when the pixel ratio of the grayscale median value of the ternary image is greater than the target ratio threshold, obtaining multiple anti-counterfeiting logo images again at a first time interval; performing ternary processing on the multiple anti-counterfeiting logo images respectively to obtain new multiple ternary images; when the new multiple ternary images include at least one target ternary image, determining the product authenticity information based on the anti-counterfeiting logo image corresponding to the target ternary image, the target ternary image being a ternary image in which the pixel ratio of the grayscale median value is less than or equal to the target ratio threshold.

[0016] In some embodiments, after determining the authenticity information of the product based on the anti-counterfeiting mark image corresponding to the target ternary image, it also includes: obtaining the anti-counterfeiting mark image again at a second time interval to perform anti-counterfeiting identification on the filter element, and the second time interval is greater than the first time interval.

[0017] In some embodiments, based on the comparison result of the pixel ratio of the grayscale median value of the ternary image and the target ratio threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element, including: when the pixel ratio of the grayscale median value of the ternary image is less than or equal to the target ratio threshold, the product authenticity information is determined based on the anti-counterfeiting logo image.

[0018] In some embodiments, obtaining an anti-counterfeiting mark image of a filter element to be identified includes: obtaining a filter element image; wherein the filter element image is obtained by photographing the filter element to be identified, and the filter element to be identified includes an anti-counterfeiting mark; and intercepting the anti-counterfeiting mark image from the filter element image.

[0019] In some embodiments, capturing an anti-counterfeiting mark image from a filter element image includes: determining cropping coordinates based on the relative position of an image acquisition device and a filter element to be identified in a water purification device; wherein the image acquisition device is capable of photographing the filter element to be identified to obtain a filter element image; and based on the cropping coordinates, cropping image data from the filter element image to obtain an anti-counterfeiting mark image.

[0020] In some embodiments, intercepting the anti-counterfeiting mark image from the filter element image includes: obtaining a grayscale filter element image based on grayscale data of the filter element image; and intercepting the anti-counterfeiting mark image from the grayscale filter element image.

[0021] In some embodiments, intercepting the anti-counterfeiting mark image from the filter element image includes: performing image preprocessing on the filter element image to obtain a first target image, wherein the difference between the anti-counterfeiting mark area and the background area in the first target image is greater than the difference between the anti-counterfeiting mark area and the background area in the filter element image; based on the size information of the anti-counterfeiting mark, determining the target area where the anti-counterfeiting mark is located in the first target image; based on the target area, cropping the filter element image to obtain the anti-counterfeiting mark image.

[0022] In some embodiments, the anti-counterfeiting logo image is captured from the grayscale filter image, and the anti-counterfeiting logo image is captured from the grayscale filter image, including: determining the anti-counterfeiting logo boundary in the grayscale filter image based on the target grayscale threshold; based on the anti-counterfeiting logo boundary and the anti-counterfeiting logo size information, capturing the second filter image to obtain the anti-counterfeiting logo image.

[0023] In some embodiments, based on the anti-counterfeiting mark image, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element, including: comparing the anti-counterfeiting mark image with the template mark image to determine the product authenticity information of the filter element.

[0024] In some embodiments, the anti-counterfeiting logo image and the template logo image are compared to determine the product authenticity information of the filter element, including: performing image segmentation processing on the anti-counterfeiting logo image based on grayscale information to obtain a first logo image; performing binarization and rotation processing on the first logo image to obtain a binarized image; performing image segmentation processing on the binarized image based on the logo size to obtain multiple first logo sub-images; performing translation processing on the multiple first logo sub-images respectively to obtain multiple second logo sub-images corresponding to the second logo image; comparing the second logo image with the template logo image to determine the product authenticity information.

[0025] In order to solve the above technical problems, the present application provides another anti-counterfeiting identification method for filter cartridges, which method includes: obtaining an anti-counterfeiting logo image of the filter cartridge, wherein the anti-counterfeiting logo image of the filter cartridge is obtained by photographing the filter cartridge to be identified loaded on the water purification equipment by a camera element on the water purification equipment; based on the storage space of the processor in the water purification equipment, dividing the anti-counterfeiting logo image into at least one image block; based on the compression blocks corresponding to each image block, obtaining a compressed image corresponding to the anti-counterfeiting logo image; identifying the compressed image to obtain an identification result indicating whether the filter cartridge to be identified is counterfeit.

[0026] In some embodiments, before dividing the anti-counterfeiting mark image into at least one image block based on the memory space of the processor in the water purification equipment, it also includes: determining the cropping coordinates based on the relative position of the camera element and the filter element to be identified in the water purification equipment; based on the cropping coordinates, cropping the image data from the image captured by the camera element to obtain the anti-counterfeiting mark image.

[0027] In some embodiments, after dividing the anti-counterfeiting logo image into at least one image block based on the memory space of the processor in the water purification equipment, and before obtaining the compressed image corresponding to the anti-counterfeiting logo image based on the compression blocks corresponding to each image block, it also includes: compressing the image block to obtain the compression block corresponding to the image block; wherein the processor executes the acquisition of the image block from the camera element and the compression of the image block in parallel.

[0028] In some embodiments, before compressing the image block to obtain a compressed block corresponding to the image block, the method further includes: sequentially acquiring and buffering an image block from an imaging element.

[0029] In some embodiments, compressing an image block to obtain a compressed block corresponding to the image block includes: each time an image block is acquired and cached, compressing the image block for the image block acquired and cached previously to obtain a compressed block corresponding to the image block.

[0030] In some embodiments, after compressing the image block to obtain the compressed block corresponding to the image block, and before obtaining the compressed image corresponding to the anti-counterfeiting mark image based on the compressed block corresponding to each image block, it also includes: detecting whether each image block has been compressed; in response to each image block having been compressed, executing the step of obtaining the compressed image corresponding to the anti-counterfeiting mark image based on the compressed block corresponding to each image block; in response to the existence of an uncompressed image block, returning to the step of sequentially acquiring and caching an image block from the camera element.

[0031] In some embodiments, detecting whether all image blocks have been compressed includes: obtaining coordinate information of the latest compressed image block in the anti-counterfeiting mark image; and determining whether all image blocks have been compressed based on the coordinate information.

[0032] In some embodiments, compressing an image block to obtain a compressed block corresponding to the image block includes: determining a binarization threshold based on the color space of the anti-counterfeiting mark image; binarizing each pixel in the image block based on the binarization threshold to obtain a data block; and compressing the data block to obtain a compressed block corresponding to the data block.

[0033] In some embodiments, the anti-counterfeiting mark image is a multi-channel image, and the binarization threshold includes sub-thresholds corresponding to each channel, based on the binarization threshold.

[0034] In some embodiments, each pixel in the image block is binarized to obtain a data block, including: for each pixel in the image block, based on the relationship between the pixel value of the pixel in each channel and the sub-threshold of the corresponding channel, binarizing the pixel into a first value or a second value.

[0035] In some embodiments, the sub-threshold includes an upper limit value or a lower limit value.

[0036] In some embodiments, based on the relationship between the pixel value of the pixel point in each channel and the sub-threshold of the corresponding channel, the pixel point is binarized into a first value or a second value, including: in response to the pixel value of the pixel point in each channel being greater than the upper limit value, the pixel point is binarized into the first value.

[0037] In some embodiments, based on the relationship between the pixel value of the pixel point in each channel and the sub-threshold of the corresponding channel, the pixel point is binarized into a first value or a second value, including: in response to the pixel value of the pixel point in each channel being less than the lower limit value, the pixel point is binarized into the second value.

[0038] In some embodiments, the anti-counterfeiting mark image is an RGB image.

[0039] In some embodiments, determining a binarization threshold based on the color space of the anti-counterfeiting mark image includes: obtaining the pixel extreme values ​​of each channel in the RGB color space; and determining the binarization threshold based on the pixel extreme values ​​of each channel and a preset error.

[0040] In some embodiments, compressing a data block to obtain a compressed block corresponding to the data block includes: dividing the data block into a plurality of sub-data blocks; for each sub-data block, weighting and averaging the elements in the sub-data block to obtain compressed data corresponding to the sub-data block; and using the compressed data corresponding to each sub-data block to obtain a compressed block.

[0041] In order to solve the above technical problems, the present application provides another anti-counterfeiting identification method for filter cartridges, which method includes: obtaining a filter cartridge image, which can also be called a filter cartridge identification image; wherein, the filter cartridge image is obtained by photographing the filter cartridge to be identified loaded on the water purification equipment by a camera element on the water purification equipment; based on a first identification result of the filter cartridge anti-counterfeiting identification in the filter cartridge image, a second identification result is obtained to characterize whether the filter cartridge to be identified is counterfeit; wherein, the first identification result includes ciphertext data of the filter cartridge anti-counterfeiting identification.

[0042] In some embodiments, before obtaining a second recognition result indicating whether the filter element to be identified is counterfeit based on a first recognition result of the filter element anti-counterfeiting mark in the filter element image, it also includes: determining whether the auxiliary recognition mark in the filter element image is the same as the target recognition mark; in response to the auxiliary recognition mark being the same as the target recognition mark, executing the first recognition result based on the filter element anti-counterfeiting mark in the filter element image to obtain a second recognition result indicating whether the filter element to be identified is counterfeit.

[0043] In some embodiments, determining whether the auxiliary identification mark in the filter element image is the same as the target identification mark includes: determining whether the pixel value of each pixel point in the second image data of the auxiliary identification mark in the filter element image is within a preset range; in response to the pixel value of each pixel point being within the preset range, converting the pixel value of each pixel point into a grayscale value; based on the difference between the grayscale value and the standard grayscale value, determining whether the auxiliary identification mark is the same as the target identification mark; wherein the standard grayscale value is obtained by grayscale processing the image data of the target identification mark.

[0044] In some embodiments, based on the difference between the grayscale value and the preset standard grayscale value, determining whether the auxiliary identification identifier is the same as the target identification identifier includes at least one of the following: in response to the difference being within a preset difference range, determining that the auxiliary identification identifier is the same as the target identification identifier; in response to the difference not being within the preset difference range, determining that the auxiliary identification identifier is different from the target identification identifier.

[0045] In some embodiments, based on a first recognition result of the filter element anti-counterfeiting mark in the filter element image, a second recognition result is obtained to characterize whether the filter element to be identified is counterfeit, including: decrypting the ciphertext data to obtain plaintext data corresponding to the filter element anti-counterfeiting mark; judging whether the plaintext data complies with preset coding rules; wherein, the production information of the filter element is encoded according to the preset coding rules to obtain plaintext data; in response to the plaintext data complying with the preset coding rules, a second recognition result is obtained based on the plaintext data.

[0046] In some embodiments, the second identification result is determined by the server based on the associated information corresponding to the filter element to be identified, and the associated information is obtained based on the plaintext data corresponding to the anti-counterfeiting mark of the filter element. The associated information indicates whether the filter element to be identified is associated with other water purification equipment, and the plaintext data is obtained by the server by decrypting the ciphertext data received from the water purification equipment.

[0047] In order to solve the above technical problems, the present application provides another anti-counterfeiting identification method for filter elements, which includes: obtaining a filter element image of the filter element to be identified, the filter element image including the anti-counterfeiting mark of the filter element; obtaining a grayscale filter element image based on the grayscale data of the filter element image; cutting out the anti-counterfeiting mark image from the grayscale filter element image; comparing the anti-counterfeiting mark image with the template mark image to determine the product authenticity information of the filter element.

[0048] In some embodiments, the anti-counterfeiting logo image and the template logo image are compared to determine the product authenticity information of the filter element, including: performing image segmentation processing on the anti-counterfeiting logo image based on grayscale information to obtain a first logo image; performing binarization and rotation processing on the first logo image to obtain a binarized image; performing image segmentation processing on the binarized image based on the logo size to obtain multiple first logo sub-images; performing translation processing on the multiple first logo sub-images respectively to obtain multiple second logo sub-images corresponding to the second logo image; comparing the second logo image with the template logo image to determine the product authenticity information.

[0049] In some embodiments, binarizing and rotating the first identification image includes: performing binarization processing on the first identification image by traversing a binarization threshold within a binarization threshold range, and performing rotation processing on the first identification image by traversing a rotation angle within a rotation angle range.

[0050] In some embodiments, performing translation processing on the plurality of first identification sub-images includes: performing translation processing on a translation action set by traversing the translation actions based on the first identification sub-images.

[0051] In some embodiments, the second identification image is compared with the template identification image to determine the authenticity information of the product, including: comparing multiple second identification sub-images in the second identification image with multiple template identification sub-images in the template identification image one by one to obtain the image difference between the second identification image and the template identification image; and determining the authenticity information of the product based on the image difference corresponding to the second identification image.

[0052] In some embodiments, determining product authenticity information based on an image difference corresponding to a second identification image includes: acquiring multiple second identification images; and determining product authenticity information based on a minimum image difference among the image differences of the multiple second identification images.

[0053] In some embodiments, an anti-counterfeiting mark image is intercepted from a grayscale filter image, including: determining the anti-counterfeiting mark boundary in the grayscale filter image based on a target grayscale threshold; intercepting the grayscale filter image based on the anti-counterfeiting mark boundary and anti-counterfeiting mark size information to obtain the anti-counterfeiting mark image.

[0054] In order to solve the above technical problems, the present application provides another anti-counterfeiting identification method for filter elements, which includes: obtaining an anti-counterfeiting mark image of the filter element to be identified; performing ternary processing on the anti-counterfeiting mark image to obtain a ternary image; when the pixel ratio of the grayscale median value of the ternary image is greater than the target ratio threshold, performing an anti-counterfeiting identification operation on the filter element to determine the product authenticity information of the filter element.

[0055] In some embodiments, an anti-counterfeiting identification operation is performed on a filter element to determine the product authenticity information of the filter element, including: obtaining multiple anti-counterfeiting logo images again at a first time interval; performing ternary processing on the multiple anti-counterfeiting logo images respectively to obtain multiple new ternary images; when the new multiple ternary images include at least one target ternary image, determining the product authenticity information based on the anti-counterfeiting logo image corresponding to the target ternary image, the target ternary image being a ternary image in which the proportion of pixels of the grayscale intermediate value is less than or equal to the target proportion threshold.

[0056] In some embodiments, after determining the authenticity information of the product based on the anti-counterfeiting mark image corresponding to the target ternary image, the method further includes: obtaining the anti-counterfeiting mark image again at a second time interval to perform anti-counterfeiting identification on the filter element, and the second time interval is greater than the first time interval.

[0057] In some embodiments, performing an anti-counterfeiting identification operation on the filter element to determine the product authenticity information of the filter element includes: sending an anti-counterfeiting mark image to a server; and receiving the product authenticity information sent by the server.

[0058] In some embodiments, after obtaining the ternary image, the method further includes: determining the authenticity information of the product based on the anti-counterfeiting mark image when the pixel ratio of the grayscale intermediate value of the ternary image is less than or equal to the target ratio threshold.

[0059] In some embodiments, the anti-counterfeiting mark image is a color image.

[0060] In some embodiments, after obtaining the anti-counterfeiting mark image of the filter element to be identified and before performing ternary processing on the anti-counterfeiting mark image, the method further includes: converting the anti-counterfeiting mark image into a grayscale image.

[0061] In order to solve the above technical problems, the present application provides other anti-counterfeiting identification methods for filter elements, which include: obtaining a to-be-processed image of the filter element to be identified, the to-be-processed image including the anti-counterfeiting mark of the filter element, and the to-be-processed image can also be called a filter element image; performing image preprocessing on the to-be-processed image to obtain a first target image, wherein the difference between the anti-counterfeiting mark area and the background area in the first target image is greater than the difference between the anti-counterfeiting mark area and the background area in the to-be-processed image; based on the size information of the anti-counterfeiting mark, determining the target area where the anti-counterfeiting mark is located in the first target image; based on the target area, cropping the to-be-processed image to obtain an anti-counterfeiting mark image, and the anti-counterfeiting mark image is used to determine the product authenticity information of the filter element.

[0062] In some embodiments, image preprocessing is performed on the image to be processed to obtain a first target image, including: binarizing the image to be processed to obtain a target binary image; and based on the pixel value of each pixel in the target binary image, expanding and filling the pixels adjacent to each pixel in the target binary image with pure color pixels to obtain the first target image.

[0063] In some embodiments, the filling and extension direction of the pure color pixels is determined based on the distribution characteristics of the background area in the target binary image.

[0064] In some embodiments, based on the size information of the anti-counterfeiting mark, the target area where the anti-counterfeiting mark is located in the first target image is determined, including: taking the pixel point of the first target image as the reference point, traversing all the pixel points of the first target image in sequence, and obtaining the count value of the target pixel point in the area corresponding to the size information in the first target image, the target pixel point is a pixel point whose pixel value is greater than the target pixel threshold; based on the count value of the target pixel point, the target area is determined.

[0065] In some embodiments, determining the target area based on the count value of the target pixel points includes: determining an area with the largest count value of the target pixel points in the first target image as the target area.

[0066] In some embodiments, after obtaining the count value of the target pixel points in the area corresponding to the size information in the first target image, it also includes: when there are multiple areas in the first target image where the count value of the target pixel points is greater than the target count threshold, at least one of the image to be processed and the first target image is sent to the server for the server to perform anti-counterfeiting identification on the filter element.

[0067] To solve the above technical problems, the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the method provided in the above first aspect.

[0068] In order to solve the above technical problems, the present application provides a water purification device, which includes an equipment body, a main control module carried by the equipment body, the filter element to be identified is loaded on the equipment body, and the main control module is used to execute the method provided in the above first aspect.

[0069] In order to solve the above technical problems, the present application provides a filter cartridge anti-counterfeiting system, which includes a water purification device and a server that are communicatively connected; the water purification device is used to execute the method provided in the above first aspect.

[0070] In order to solve the above technical problems, the present application provides a computer-readable storage medium, which stores a program file. The program file can be executed to implement the method provided in the first aspect above.

[0071] The beneficial effect of the present application is: different from the existing technology, the present application discloses an anti-counterfeiting identification method for a filter element. After obtaining the anti-counterfeiting mark image of the filter element to be identified, the anti-counterfeiting identification operation is performed on the filter element based on the anti-counterfeiting mark image to determine the product authenticity information of the filter element.

Brief Description of the Drawings

[0072] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:

[0073] FIG1 is a schematic flow chart of a first embodiment of the anti-counterfeiting identification method for a filter element provided by the present application;

[0074] FIG2 is a schematic flow chart of a second embodiment of the anti-counterfeiting identification method for a filter element provided by the present application;

[0075] FIG3 is a schematic flow chart of a third embodiment of the anti-counterfeiting identification method for a filter element provided by the present application;

[0076] FIG4 is a schematic flow chart of a fourth embodiment of the anti-counterfeiting identification method for a filter element provided by the present application;

[0077] FIG5 is a schematic flow chart of a fifth embodiment of the anti-counterfeiting identification method for a filter element provided by the present application;

[0078] FIG6 is a flow chart of a sixth embodiment of the anti-counterfeiting identification method for a filter element provided by the present application;

[0079] FIG7 is a flow chart of an embodiment of step S11 provided by the present application;

[0080] FIG8 is a schematic diagram of an embodiment of performing pure color pixel filling on a target binary image provided by the present application;

[0081] FIG9 is a schematic diagram of an embodiment of a filter element image provided by the present application;

[0082] FIG10 is a schematic diagram of an embodiment of a first target image provided by the present application;

[0083] FIG11 is a schematic diagram of an embodiment of counting target pixels of a first target image provided by the present application;

[0084] FIG12 is a schematic diagram of the location of a target area according to an embodiment of the present application;

[0085] FIG13 is a schematic diagram of a frame structure of an electronic device according to an embodiment of the present application;

[0086] FIG14 is a schematic diagram of the framework structure of an embodiment of a water purification device provided by the present application;

[0087] FIG15 is a schematic diagram of the framework structure of an embodiment of the filter element anti-counterfeiting system provided by the present application;

[0088] FIG16 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided in the present application. [Specific implementation method]

[0089] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0090] It should be noted that the terms "first," "second," and so on, used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include at least one of these features.

[0091] In the description of the application, the meaning of "multiple" is at least two, for example, two, three, etc., unless otherwise clearly and specifically limited. In the embodiments of the present application, all directional indications (such as up, down, left, right, front, back ...) are only used to explain the relative position relationship, movement situation, etc. between each component under a certain specific posture (as shown in the drawings). If this specific posture changes, this directional indication also changes accordingly. In addition, the terms "comprise" and "have" and any of their deformations are intended to cover non-exclusive inclusions. For example, the process, method, system, product or equipment comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or equipment.

[0092] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0093] Please refer to FIG1 , which is a schematic flow chart of a first embodiment of the anti-counterfeiting identification method for a filter element provided by the present application. The method includes:

[0094] S11: Acquire an anti-counterfeiting mark image of the filter element to be identified.

[0095] In one embodiment, the anti-counterfeiting mark image of the filter element to be identified can be obtained by intercepting the filter element image, and the filter element image is obtained by photographing the filter element to be identified. The filter element to be identified includes an anti-counterfeiting mark, and the anti-counterfeiting mark can be a QR code containing data information such as the production date, model, and expiration date of the filter element. It can be understood that in other embodiments, the anti-counterfeiting mark image of the filter element to be identified can also be a filter element image. The filter element to be identified can be a filter element installed when the water purification equipment leaves the factory, or it can be a filter element replaced by the user. The image acquisition device for photographing the filter element image can be any device that can photograph images, such as a camera; to solve the cost problem, the existing camera with the worst processing power can be selected. The image acquisition device can be installed inside the water purification equipment. When the water purification equipment is powered on, the image acquisition device can photograph the filter element to be identified and obtain the filter element image.

[0096] Among them, any of the following methods can be used to capture the anti-counterfeiting logo image from the filter element image: Method 1, based on the relative position of the image acquisition device and the filter element to be identified in the water purification equipment, determine the cropping coordinates; wherein, the image acquisition device can photograph the filter element to be identified to obtain a filter element image; based on the cropping coordinates, crop the image data from the filter element image to obtain the anti-counterfeiting logo image.

[0097] Method 2: A grayscale filter image is obtained based on the grayscale data of the filter image; the anti-counterfeiting mark image is then clipped from the grayscale filter image. In one specific embodiment, the anti-counterfeiting mark boundary in the grayscale filter image can be determined based on a target grayscale threshold. Then, based on the anti-counterfeiting mark boundary and the size information, a second filter image is clipped to obtain the anti-counterfeiting mark image.

[0098] Method three, performing image preprocessing on the filter element image to obtain a first target image, wherein the difference between the anti-counterfeiting mark area and the background area in the first target image is greater than the difference between the anti-counterfeiting mark area and the background area in the filter element image; based on the size information of the anti-counterfeiting mark, determining the target area where the anti-counterfeiting mark is located in the first target image; based on the target area, cropping the filter element image to obtain the anti-counterfeiting mark image.

[0099] S12: Based on the anti-counterfeiting mark image, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element.

[0100] In one embodiment, performing an anti-counterfeiting identification operation on a filter element based on an anti-counterfeiting label image to determine the authenticity of the filter element includes processing the anti-counterfeiting label image to obtain a processing result of the anti-counterfeiting label image. The authenticity of the product is determined based on the processing result. Processing the anti-counterfeiting label image may include identifying the anti-counterfeiting label image or comparing the anti-counterfeiting label image with a template label image; accordingly, the processing result of the anti-counterfeiting label image includes an identification result and a comparison result.

[0101] In a specific embodiment, the processing result is a recognition result, and the recognition result includes the ciphertext data of the anti-counterfeiting mark in the anti-counterfeiting mark image. The main control module in the water purification device can recognize the anti-counterfeiting mark image to obtain the ciphertext data of the anti-counterfeiting mark; or the anti-counterfeiting mark image can be sent to other devices with recognition capabilities, and the other devices can recognize and obtain the ciphertext data. Based on the processing result, determining the authenticity of the product may include: decrypting the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark, and determining the authenticity of the product based on the plaintext data. In one embodiment, it is possible to determine whether the plaintext data complies with the preset coding rules; wherein, the production information of the filter element is encoded according to the preset coding rules to obtain the plaintext data; in response to the plaintext data complying with the preset coding rules, the filter element is determined to be authentic. The plaintext data corresponding to the anti-counterfeiting mark can also be directly compared with the reference plaintext data. If the comparison results are consistent, the filter element is authentic. The reference plaintext data is set when the filter element leaves the factory. In this embodiment, based on the processing results, the authenticity information of the product can be determined by the main control module; in other embodiments, based on the processing results, the authenticity information of the product can also be determined by the server, that is, the main control module sends the ciphertext data to the server; the server decrypts the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark, and determines the authenticity information of the product based on the plaintext data.

[0102] In another embodiment, determining the product authenticity information based on the processing results may further include: the main control module identifying the anti-counterfeiting mark image, obtaining the ciphertext data of the anti-counterfeiting mark, and sending the ciphertext data to the server; the server decrypting the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark, and obtaining the associated information corresponding to the plaintext data, the associated information indicating whether the filter cartridge is associated with other water purification equipment, and determining the product authenticity information of the filter cartridge based on the associated information. In this embodiment, after obtaining the ciphertext data, the main control module directly sends the ciphertext data to the server. In other embodiments, after obtaining the ciphertext data, the main control module first decrypts the plaintext data to obtain the plaintext data, determines whether the plaintext data complies with preset encoding rules, and if so, sends the ciphertext data to the server, so that the server determines the product authenticity information of the filter cartridge based on the associated information; if not, the filter cartridge is determined to be counterfeit.

[0103] In another specific embodiment, the processing result is a comparison result of the anti-counterfeiting mark image and the template mark image. Based on the comparison result, the authenticity of the filter element is determined. The template mark image contains the correct anti-counterfeiting mark. By comparing the anti-counterfeiting mark image with the template mark image, the degree of similarity between the anti-counterfeiting mark image and the template mark image is determined. If the degree of similarity exceeds a preset value, the filter element is determined to be authentic.

[0104] In one embodiment, the filter element to be identified corresponds to an auxiliary identification mark, and before obtaining the processing result of the anti-counterfeiting mark image, it also includes: judging whether the auxiliary identification mark in the filter element image is the same as the target identification mark; wherein the filter element image includes the auxiliary identification mark and the anti-counterfeiting mark; in response to the auxiliary identification mark being the same as the target identification mark, executing the step of obtaining the processing result of the anti-counterfeiting mark image.

[0105] In one embodiment, the processing result of the anti-counterfeiting logo image is obtained by processing the processing result of the compressed anti-counterfeiting logo image, for example, by identifying the compressed anti-counterfeiting logo image to obtain a recognition result, or by comparing the compressed anti-counterfeiting logo image with a compressed template logo image to obtain a comparison result. Before obtaining the processing result of the anti-counterfeiting logo image, the method further includes: dividing the anti-counterfeiting logo image into at least one image block based on the memory space of the processor in the water purification device; obtaining a compressed anti-counterfeiting logo image of the filter element based on the compression blocks corresponding to each image block; and processing the compressed anti-counterfeiting logo image of the filter element to obtain the processing result of the anti-counterfeiting logo image.

[0106] In another embodiment, based on the anti-counterfeiting mark image, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element, including: performing ternary processing on the anti-counterfeiting mark image to obtain a ternary image; based on the comparison result of the pixel ratio of the grayscale median value of the ternary image and the target ratio threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element.

[0107] In a specific embodiment, if the pixel ratio of the grayscale median value of the ternary image is greater than the target ratio threshold, multiple anti-counterfeiting mark images are obtained again at the first time interval; the multiple anti-counterfeiting mark images are ternary processed respectively to obtain multiple new ternary images; when the new multiple ternary images include at least one target ternary image, the product authenticity information is determined based on the anti-counterfeiting mark image corresponding to the target ternary image, and the target ternary image is a ternary image in which the pixel ratio of the grayscale median value is less than or equal to the target ratio threshold.

[0108] In another specific embodiment, when the proportion of pixels with intermediate grayscale values ​​of the ternary image is less than or equal to a target proportion threshold, the authenticity information of the product is determined based on the anti-counterfeiting mark image.

[0109] Among them, determining the authenticity of the product based on the anti-counterfeiting logo image corresponding to the target ternary image, and determining the authenticity of the product based on the anti-counterfeiting logo image, both can use the following specific steps to determine the authenticity of the filter element: identifying the anti-counterfeiting logo image to obtain ciphertext data; then determining the authenticity of the filter element based on the ciphertext data. For the detailed implementation process of this step, please refer to the above description and will not be repeated here; or comparing the anti-counterfeiting logo image and the template logo image to obtain a comparison result, and determining the authenticity of the filter element based on the comparison result.

[0110] Through the above method, the authenticity of the filter element can be determined based on the anti-counterfeiting mark image of the filter element, thereby achieving anti-counterfeiting of the filter element.

[0111] Please refer to FIG2 , which is a flow chart of a second embodiment of the anti-counterfeiting identification method for a filter element provided by the present application. The method includes:

[0112] S21: Acquire an anti-counterfeiting mark image of the filter element to be identified.

[0113] The specific implementation of S21 please refer to step S11 and will not be repeated here.

[0114] S22: Obtaining a recognition result obtained by recognizing the anti-counterfeiting mark image; the recognition result includes the ciphertext data of the anti-counterfeiting mark in the anti-counterfeiting mark image.

[0115] In one embodiment, the anti-counterfeiting mark image can be sent to the main control module in the water purification device, and the main control module identifies it to obtain the ciphertext data of the anti-counterfeiting mark in the anti-counterfeiting mark image, and the ciphertext data of the anti-counterfeiting mark can be used as the first identification result.

[0116] S23: Based on the identification result, determine the authenticity information of the filter element.

[0117] Specifically, based on the ciphertext data, the product authenticity information of the filter element is determined, that is, based on the first recognition result, a second recognition result is obtained that indicates whether the filter element to be recognized is counterfeit.

[0118] In one embodiment, the main control module in the water purification device can decrypt the ciphertext data to obtain the plaintext data of the anti-counterfeiting mark, and determine whether the plaintext data is consistent with the encoding data of the filter element when it leaves the factory. If they are consistent, it indicates that the filter element has not been forged; it can also be executed by a server connected to the water purification device, that is, the water purification device sends the first identification result to the server, and the server processes it to obtain the second identification result.

[0119] In one specific embodiment, the anti-counterfeiting mark can be a QR code. The QR code is identified to obtain ciphertext data corresponding to the anti-counterfeiting mark. The ciphertext data can be obtained by encrypting plaintext data including the production date, model, and expiration date of the filter element. In one embodiment, the second identification result is determined by the server based on the associated information corresponding to the filter element to be identified. The associated information is obtained based on the plaintext data corresponding to the anti-counterfeiting mark of the filter element. The associated information indicates whether the filter element to be identified is associated with other water purification equipment. The plaintext data is obtained by the server by decrypting the ciphertext data received from the water purification equipment. Specifically, the water purification equipment sends the ciphertext data corresponding to the anti-counterfeiting mark to the server. The server decrypts the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark and determines whether the plaintext data complies with a preset encoding rule. The plaintext data is obtained by encoding the filter element's production information according to the preset encoding rule. The filter element's production information includes information such as the filter element's production date, model, and expiration date. The plaintext data can be a string of characters. The preset encoding rule can, for example, be the meaning of each character in the plaintext data, such as the first character representing the model and the second to ninth characters representing the production date. It can be understood that the preset encoding rule is set by the user; in response to the plaintext data complying with the preset encoding rule, a second recognition result is obtained based on the plaintext data.

[0120] The above method can detect filter element anti-counterfeiting by acquiring an image of the filter element's anti-counterfeiting mark and identifying the image; then, based on the identification result, determining whether the filter element to be identified is counterfeit. The identification result includes ciphertext data of the filter element's anti-counterfeiting mark. Transmitting this ciphertext data during communication minimizes the possibility of the filter element's anti-counterfeiting mark being stolen during communication, thereby improving the security of the filter element's anti-counterfeiting mark and the reliability of filter element anti-counterfeiting detection.

[0121] In other embodiments, the filter element image includes an auxiliary identification mark and an anti-counterfeiting mark of the filter element. Before executing step S23, it can be determined whether the auxiliary identification mark in the filter element image is the same as the target identification mark; in response to the auxiliary identification mark being the same as the target identification mark, the steps of obtaining the processing result of the anti-counterfeiting mark image and determining the product authenticity information of the filter element based on the processing result are executed.

[0122] In one embodiment, the filter element image includes an anti-counterfeiting mark and an auxiliary identification mark. Before identifying the anti-counterfeiting mark, it is possible to determine whether the auxiliary identification mark in the filter element image is the same as the target identification mark by judging whether the pixel value of each pixel point in the second image data of the auxiliary identification mark in the filter element image is within a preset range; in response to the pixel value of each pixel point being within the preset range, the pixel value of each pixel point is converted into a grayscale value; based on the difference between the grayscale value and the standard grayscale value, it is determined whether the auxiliary identification mark is the same as the target identification mark; wherein, the standard grayscale value is obtained by grayscale processing of the image data of the target identification mark.

[0123] Specifically, the filter element image can be identified first to determine the second image area where the auxiliary identification mark is located. In one embodiment, the size of the anti-counterfeiting mark of the filter element and the location of the anti-counterfeiting mark of the filter element in the first image area of ​​the filter element image are known, and the size of the anti-counterfeiting mark of the filter element in the filter element image and the size of the auxiliary identification mark in the filter element image have a fixed relationship, such as the length of the anti-counterfeiting mark of the filter element and the auxiliary identification mark are the same, and the width of the anti-counterfeiting mark of the filter element is 3 times or 4 times the width of the auxiliary identification mark. After the position of the anti-counterfeiting mark of the filter element is known, the second image area where the auxiliary identification mark is located can be determined based on the size of the anti-counterfeiting mark of the filter element and the size relationship between the anti-counterfeiting mark of the filter element and the auxiliary identification mark. In another embodiment, the second image area where the auxiliary identification mark is located can also be determined based on the pixel value of each pixel point in the filter element image. For example, if the anti-counterfeiting mark of the filter element is in black and white and the auxiliary identification mark is in color, the second image area can be determined based on the difference in pixel values.

[0124] After determining the second image area, second image data is obtained. The second image data includes the pixel values ​​of each pixel in the second image area. A determination is made as to whether the pixel values ​​of each pixel are within a preset range. Due to differences in shooting lighting, the pixel values ​​of the same pixel in two images of the same object captured at the same shooting angle may differ. Therefore, a preset range is set, such as a range around the center of the RGB values ​​of a target color, which is the color that the second image area should display. In one specific embodiment, if the pixel values ​​of each pixel are within the preset range, the pixel values ​​are converted to grayscale values, which can range from 0 to 255. Based on the difference between the grayscale values ​​and a standard grayscale value, a determination is made as to whether the auxiliary identification mark and the target identification mark are identical. The standard grayscale value is obtained by grayscale processing the image data of the target identification mark. If the difference is within the preset difference range, the auxiliary identification mark in the filter element image is determined to be identical to the target identification mark. If the difference is not within the preset difference range, the auxiliary identification mark in the filter element image is determined to be different from the target identification mark. It is understood that the preset range and the preset difference range can be set by the user as needed and are not specifically limited herein. In another specific embodiment, if the pixel value of each pixel point is within a preset range, the pixel value of each pixel point is binarized so that the pixel value of each pixel point is 0 or 255, and it is determined whether the pixel value of each pixel point is the same as the standard pixel value. The standard pixel value is obtained by binarizing the image data of the target identification mark; if they are the same, it is determined that the auxiliary identification mark is the same as the target identification mark.

[0125] In another embodiment, whether the auxiliary identification mark in the filter element image is the same as the target identification mark can be determined by the first hash value of the standard image and the second hash value of the second image data of the auxiliary identification mark in the filter element image. Specifically, the first hash value of the standard image is obtained, and the second hash value of the second image data of the auxiliary identification mark in the filter element image is obtained; based on the first hash value and the second hash value, whether the auxiliary identification mark is the same as the target identification mark is determined. Specifically, the standard image contains a target identification mark, which can be the same size as the second image area where the auxiliary identification mark is located; the first hash value and the second hash value are obtained, and the Hamming distance between the first hash value and the second hash value is calculated; in response to the Hamming distance being less than a preset distance, it is determined that the auxiliary identification mark is the same as the target identification mark; in response to the Hamming distance being greater than the preset distance, it is determined that the auxiliary identification mark is different from the target identification mark. It can be understood that the preset distance can be set by the user, for example, to 5, 10, etc.

[0126] In other embodiments, after acquiring the filter cartridge image, the main control module in the water purification device may first compress the filter cartridge image to obtain a compressed image; and based on the compressed image, determine whether the auxiliary identification mark is identical to the target identification mark. The processor compresses the filter cartridge image by: dividing the filter cartridge image into at least one image block based on the processor's memory space; binarizing the image block to obtain a data block; specifically, acquiring the pixel extreme values ​​of each channel in the RGB color space of the filter cartridge image; and determining a binarization threshold based on the pixel extreme values ​​of each channel and a preset error. The binarization threshold may include an upper limit or a lower limit. For example, the upper limit of the R channel is 255 / 8-5, the upper limit of the G channel is 255 / 4-10, and the upper limit of the B channel is 255 / 8-5; the lower limit of the R channel is 10; where 5 and 10 are the preset errors. Based on the binarization threshold, each pixel in the image block is binarized to obtain a data block. Specifically, a determination is made as to whether the pixel value of each pixel in each channel is greater than the upper limit of that channel. If the pixel value of each pixel in each channel is greater than the upper limit, the pixel is binarized to a first value. Alternatively, a determination is made as to whether the pixel value of each pixel in each channel is less than the lower limit of that channel. If the pixel value of each pixel in each channel is less than the lower limit, the pixel is binarized to a second value. The first value can be 0, representing white, and the second value can be 1, representing black. The resulting data block contains only 0 and 1. Further, the data block is compressed to obtain a compressed block corresponding to the data block. The data block is divided into several sub-data blocks. For each sub-data block, the elements in the sub-data block are weighted and averaged to obtain compressed data corresponding to the sub-data block. A compressed block is obtained using the compressed data corresponding to each sub-data block. Finally, based on the compressed blocks corresponding to each image block, a compressed image corresponding to the filter element image is obtained.

[0127] Please refer to FIG3 , which is a schematic flow chart of a third embodiment of the anti-counterfeiting identification method for a filter element provided by the present application. The method includes:

[0128] S31: Receive the ciphertext data corresponding to the anti-counterfeiting mark of the filter element sent by the water purification device.

[0129] Among them, the ciphertext data is obtained based on the first image data recognition of the anti-counterfeiting mark of the filter element in the filter element image. The filter element image can also include an auxiliary identification mark, and the water purification equipment sends the ciphertext data based on the auxiliary identification mark being the same as the target identification mark; the filter element image is obtained by photographing the filter element to be identified loaded in the water purification equipment.

[0130] This embodiment can be executed by a server, and the server can be a memory and a processor coupled to each other, and the processor is used to execute program instructions stored in the memory to execute steps S21 and S22. The water purification device sends the ciphertext data corresponding to the anti-counterfeiting mark of the filter element to the server. In one embodiment, before sending the ciphertext data corresponding to the anti-counterfeiting mark of the filter element to the server, the water purification device can first determine whether the auxiliary identification mark in the filter element image is the same as the target identification mark. The specific judgment steps can refer to the relevant steps in the aforementioned embodiment and will not be repeated here. If the auxiliary identification mark and the target identification mark in the filter element image are the same, it indicates that the filter element in the water purification device is produced by the target manufacturer. Further, the water purification device recognizes the first image data of the anti-counterfeiting mark of the filter element in the filter element image, obtains the ciphertext data corresponding to the anti-counterfeiting mark of the filter element; and sends the ciphertext data to the server.

[0131] In another embodiment, the water purification device determines that the auxiliary identification mark and the target identification mark in the filter element image are the same, and identifies the first image data of the anti-counterfeiting mark of the filter element in the filter element image to obtain the ciphertext data corresponding to the anti-counterfeiting mark of the filter element; the ciphertext data can be decrypted to obtain the plaintext data corresponding to the anti-counterfeiting mark of the filter element; a preliminary judgment is made on the plaintext data, for example, it can be determined whether the plaintext data complies with the preset coding rules. The preset coding rules are used to encode the production information of the filter element according to the preset coding rules to obtain plaintext data when the filter element leaves the factory; when the plaintext data complies with the preset coding rules, the ciphertext data corresponding to the anti-counterfeiting mark of the filter element is sent to the server.

[0132] S32: Process the encrypted data to determine the authenticity of the filter element.

[0133] After receiving the ciphertext data, the server decrypts the ciphertext data to obtain the plaintext data corresponding to the filter element's anti-counterfeiting mark. In one embodiment, the plaintext data can be compared with the original data corresponding to the filter element's anti-counterfeiting mark stored in a database to obtain a comparison result; based on the comparison result, the identification result can be determined. The original data is obtained by encoding the filter element's production information at the time of its release from the factory; the comparison result indicates that the plaintext data and the original data are consistent or inconsistent. If the comparison result indicates that the plaintext data and the original data are consistent, the filter element to be identified is determined to be counterfeit; if the comparison result indicates that the plaintext data and the original data are inconsistent, the filter element to be identified is determined to be not counterfeit.

[0134] In another embodiment, the server may also obtain device information of the water purification device, or receive device information sent by the water purification device; compare the plaintext data with the original data corresponding to the anti-counterfeiting mark of the filter element stored in the database to obtain a comparison result, and if the comparison result indicates that the plaintext data and the original data are consistent, it indicates that the filter element to be identified is manufactured by the target manufacturer. Further, in response to the comparison result indicating that the plaintext data and the original data are consistent, based on the device information and the plaintext data, it is determined whether the filter element to be identified has been associated with other water purification devices; the association information indicating whether the filter element to be identified has been associated with other water purification devices can be stored in the database, that is, the database is searched for association information indicating that the filter element to be identified has been associated with other water purification devices. If not, it indicates that the filter element to be identified has not been associated with other water purification devices. In response to the fact that the filter element to be identified has not been associated with other water purification devices, it is determined that the filter element to be identified is not counterfeit and the filter element to be identified is associated with the water purification device. If there is information indicating that the filter element to be identified has been associated with other water purification devices, in response to the fact that the filter element to be identified has been associated with other water purification devices, it is determined that the filter element to be identified is counterfeit.

[0135] In this embodiment, each filter cartridge will store the original data corresponding to its anti-counterfeiting mark in the database when it leaves the factory. Therefore, when the filter cartridge to be identified is used, the plain text data corresponding to the anti-counterfeiting mark of the filter cartridge in the filter cartridge to be identified can be compared with the original data to determine whether the filter cartridge actually exists. Furthermore, since each filter cartridge is unique and can only be associated with one water purification device, it is possible to determine whether the filter cartridge to be identified has been associated with other water purification devices to determine whether the filter cartridge to be identified has been counterfeited. In this way, when an unscrupulous merchant copies the anti-counterfeiting mark of the same filter cartridge to be identified on a large scale, only at least two water purification devices need to be connected to the network for the server to clearly determine that the filter cartridge to be identified has been counterfeited; the target manufacturer can locate the sales area of ​​the water purification equipment and the counterfeit filter cartridge to be identified through the association information between the counterfeit filter cartridge to be identified and the water purification equipment, and then hold the unscrupulous merchant accountable.

[0136] In the above method, before identifying the anti-counterfeiting mark of the filter element, it is first determined whether the auxiliary identification mark is the same as the target identification mark. If they are the same, the anti-counterfeiting mark of the filter element is then identified; otherwise, the anti-counterfeiting mark of the filter element is not identified. This allows the target manufacturer to only perform anti-counterfeiting identification on the filter elements it produces, and will not mistakenly identify filter elements produced by other manufacturers, reducing detection time and thus reducing detection costs. Furthermore, as long as the water purification equipment is connected to the Internet, the interface determines whether the filter element to be identified is counterfeited through the server, rather than the user simply scanning the anti-counterfeiting mark of the filter element to determine whether the filter element is counterfeit. This allows the manufacturer of the filter element to be identified to clearly understand whether the filter element to be identified is counterfeit, making it easier for the manufacturer to protect its rights.

[0137] Please refer to FIG4 , which is a flow chart of a fourth embodiment of the anti-counterfeiting identification method for a filter element provided by the present application. The method includes:

[0138] S41: Acquire an anti-counterfeiting mark image of the filter element to be identified.

[0139] In one embodiment, the anti-counterfeiting mark image is captured from the filter element image, which is obtained by photographing the filter element by an image acquisition device. The filter element image can be a YUV image, which uses three YUV components to store data. Y represents brightness, that is, grayscale value, and U and V both represent chroma for describing color and color saturation.

[0140] In this step, the filter element image in YUV format is directly acquired, which does not place high imaging requirements on the image acquisition device, helps to reduce the cost of anti-counterfeiting identification. In addition, the filter element image has a smaller data volume than the RGB format image, which is convenient for storage and processing in a microcontroller unit (MCU) with a smaller random access memory (RAM) and a lower cost.

[0141] Among them, the step of intercepting the anti-counterfeiting mark image from the filter element image includes: obtaining a grayscale filter element image based on the grayscale data of the filter element image; intercepting the anti-counterfeiting mark image from the grayscale filter element image. Specifically, in this embodiment, the grayscale data of the filter element image is extracted to obtain the grayscale filter element image, and the collection and storage of the filter element image data are completed. In actual implementation, the grayscale filter element image can be saved to the on-chip flash memory (Flash) of the microcontroller unit for further processing. The grayscale filter element image is cropped, and the images of other areas other than the anti-counterfeiting mark in the grayscale filter element image are cropped to obtain the anti-counterfeiting mark image, and the data volume of the anti-counterfeiting mark image is smaller.

[0142] In one specific embodiment, extracting an anti-counterfeiting mark image from a grayscale filter image includes: determining the boundary of the anti-counterfeiting mark within the grayscale filter image based on a target grayscale threshold; and extracting the grayscale filter image based on the boundary and size information of the anti-counterfeiting mark to obtain the anti-counterfeiting mark image. In this embodiment, the boundary of the anti-counterfeiting mark within the grayscale filter image is determined based on a pre-set target grayscale threshold, and the grayscale filter image is extracted based on the boundary and size information. It will be appreciated that when extracting the grayscale filter image based on the size information of the anti-counterfeiting mark, it is first determined whether the size of the grayscale filter image is consistent with the pre-stored size information of the anti-counterfeiting mark. If not, the grayscale filter image is appropriately scaled.

[0143] S42: Obtain a comparison result of the anti-counterfeiting mark image and the template mark image, and determine the authenticity information of the filter element based on the comparison result.

[0144] In one embodiment, after capturing the security label image, the security label image is compared with the template label image. The authenticity of the filter cartridge is determined based on the degree of difference between the currently captured security label image and the template label image. If the difference between the security label image and the template label image is large, the filter cartridge is fake. If the difference between the security label image and the template label image is small, the filter cartridge is authentic.

[0145] It should be noted that by comparing with the template identification image, there is no need to run complex image processing algorithms in processors such as microcontrollers, which reduces the processor requirements for filter element anti-counterfeiting identification.

[0146] In a specific embodiment, the anti-counterfeiting mark image and the template mark image are compared to obtain a comparison result, and based on the comparison result, the product authenticity information of the filter element is determined, including: performing image segmentation processing based on grayscale information on the anti-counterfeiting mark image to obtain a first mark image; performing binarization and rotation processing on the first mark image to obtain a binarized image; performing image segmentation processing based on the mark size on the binarized image to obtain multiple first mark sub-images; performing translation processing on the multiple first mark sub-images respectively to obtain multiple second mark sub-images corresponding to the second mark image; comparing the second mark image with the template mark image to determine the product authenticity information.

[0147] Image segmentation refers to dividing an image into several non-overlapping regions based on features such as grayscale, color, spatial texture, and geometric shape, so that these features show consistency or similarity in the same region, but show obvious differences between different regions.

[0148] In this embodiment, image segmentation is performed based on the grayscale information of the anti-counterfeiting mark image to obtain the first mark image, thereby reducing the influence of other factors in the anti-counterfeiting mark image other than the anti-counterfeiting mark on the anti-counterfeiting identification of the filter element.

[0149] After binarizing and rotating the first logo image, a second image segmentation process is performed based on the size of the security label to produce multiple first logo sub-images, each corresponding to a different region of the security label. For example, if the first logo image includes the security label "Abcde," the binary image of the first logo image is segmented based on the size of each letter. This security label "Abcde" is segmented into first logo sub-images corresponding to the five letters A, b, c, d, and e. This means that the first logo image containing "Abcde" corresponds to five first logo sub-images.

[0150] After segmenting to obtain the first identification sub-image, multiple first identification sub-images are translated to obtain corresponding multiple second identification sub-images. The multiple second identification sub-images form a second identification image, which is compared with the template identification image to determine the authenticity of the filter element.

[0151] In some embodiments, binarizing and rotating the first identification image may include: performing binarization processing on the first identification image by traversing a binarization threshold within a binarization threshold range, and performing rotation processing on the first identification image by traversing a rotation angle within a rotation angle range.

[0152] In this embodiment, the first identification image is binarized and rotated multiple times until the binarization threshold value within the binarization threshold range and the rotation angle range are traversed, thereby obtaining multiple binary images. Each binary image is then subjected to image segmentation and translation based on the identification size to obtain multiple second identification images, which are then compared with the template identification image to determine the authenticity of the filter element. For example, the binarization threshold range includes binarization threshold 1, binarization threshold 2, and binarization threshold 3, and the rotation angle range includes rotation angle 1 and rotation angle 2.

[0153] The first identification image is binarized and rotated. The first identification image is binarized according to binarization threshold 1, binarization threshold 2, and binarization threshold 3 to obtain three binarized images. The three binarized images are then rotated by rotation angle 1 and rotation angle 2 to obtain six rotated binarized images.

[0154] In some embodiments, performing translation processing on a plurality of first identification sub-images may include: performing translation processing on a translation action set by traversing the translation actions based on the first identification sub-images.

[0155] In this embodiment, the first identification sub-image is subjected to translation processing of the translation actions within the translation action set. One first identification sub-image can be processed to obtain multiple second identification sub-images corresponding to different translation actions. For example, the translation action set includes upward translation, downward translation and left translation. By performing translation processing on one first identification sub-image, three second identification sub-images can be obtained.

[0156] In some embodiments, the second identification image is compared with the template identification image to determine the authenticity information of the product, including: comparing multiple second identification sub-images in the second identification image with multiple template identification sub-images in the template identification image one by one to obtain the image difference between the second identification image and the template identification image; and determining the authenticity information of the product based on the image difference corresponding to the second identification image.

[0157] The second identification image includes multiple second identification sub-images, each second identification sub-image represents an area of ​​the anti-counterfeiting mark. The second identification sub-image is compared one-to-one with the template identification sub-image in the template identification image to obtain the degree of difference between different areas of the anti-counterfeiting mark of the filter element 300. The authenticity of the filter element is judged based on the image difference between the second identification image and the template identification image.

[0158] For example, the second identification image includes second identification sub-images corresponding to the five letters A, b, c, d and e. These five second identification sub-images are compared with the corresponding template identification sub-images in the template identification image to obtain the image difference between each second identification sub-image and the corresponding template identification sub-image.

[0159] In actual implementation, the image difference value may be the pixel difference value of each pixel in the two images. In some embodiments, determining the product authenticity information based on the image difference value corresponding to the second identification image may include: obtaining multiple second identification images; and determining the product authenticity information based on the smallest image difference value among the multiple second identification images.

[0160] It is understood that the image captured by the image acquisition device differs from the pre-stored template identification image in terms of acquisition angle, lighting, and other aspects. In this embodiment, multiple second identification images can be generated through binarization, rotation, and translation, thereby increasing the image data volume. Without changing the anti-counterfeiting characteristics of the current filter element, they can be fully compared with the template identification image, reducing the impact of image acquisition angle, lighting, and other factors on aspect comparison, thereby ensuring the accuracy of filter element anti-counterfeiting identification.

[0161] Please refer to FIG5 , which is a flow chart of a fifth embodiment of the anti-counterfeiting identification method for a filter element provided by the present application. The method includes:

[0162] S51: Acquire an anti-counterfeiting mark image of the filter element to be identified.

[0163] The specific implementation of step S51 is described in S11 and will not be described again in detail. In this embodiment, the anti-counterfeiting mark image may be a multi-channel image, such as a three-channel or four-channel image.

[0164] The anti-counterfeiting mark image can be a captured image captured by an image acquisition device; it can also be obtained by cropping the captured image. For example, if the captured image contains a large number of blank areas or invalid information, it can be cropped. In a specific embodiment, the cropping coordinates can be determined based on the relative position of the image acquisition device and the filter element to be identified in the water purification equipment; based on the cropping coordinates, the image data is cropped from the image captured by the image acquisition device to obtain the anti-counterfeiting mark image. That is, the position of the image acquisition device and the filter element is fixed, and the processor knows the coordinate range of the auxiliary identification mark and the filter element anti-counterfeiting mark in the captured image, and can then crop according to the coordinate range to obtain the anti-counterfeiting mark image.

[0165] S52: Divide the anti-counterfeiting mark image into at least one image block based on the memory space of the processor in the water purification device.

[0166] Because each processor has different processing capabilities, the security mark image can be divided into at least one image block based on the processor's memory space. The data size of each image block can be less than or equal to the processor's memory space. In one specific embodiment, the processor is used to process the security mark image captured by the image acquisition device. Assuming that the size of a frame of the security mark image captured by the image acquisition device is 153KB and the processor has 16KB of memory space, the security mark image can be divided into 10 image blocks.

[0167] In one embodiment, the anti-counterfeiting mark image can be divided according to a certain coordinate sequence. For example, a coordinate system is established with the pixel point in the upper left corner of the anti-counterfeiting mark image as the origin, the X-axis is established toward the upper right corner of the anti-counterfeiting mark image, and the Y-axis is established toward the lower left corner of the anti-counterfeiting mark image. Assuming that the anti-counterfeiting mark image contains 320*240 pixels, it can be considered that the length of the anti-counterfeiting mark image on the X-axis is 320, and the length on the Y-axis is 240. Each image block obtained by dividing the anti-counterfeiting mark image contains the coordinate information of the image block in the coordinate system. For example, the length of the first image block is 10*10, and the coordinate range it contains is (0, 0) to (9, 9).

[0168] S53: obtaining a compressed anti-counterfeiting mark image of the filter element based on the compression blocks corresponding to the image blocks, wherein the compressed anti-counterfeiting mark image of the filter element is used for processing to obtain a processing result of the anti-counterfeiting mark image.

[0169] In one embodiment, after obtaining at least one image block, each image block can be input into a processor one at a time, which then compresses the image block to obtain a compressed block corresponding to the image block. In this case, the processor can concurrently execute the steps of obtaining the image block from the image acquisition device and compressing the image block. In other embodiments, the image block can be sent to another compression device, which then compresses the image block to obtain a compressed block corresponding to the image block, which is then sent to the processor of the water purification device.

[0170] Among them, compressing the image block includes: binarizing the image block to obtain a data block; compressing the data block to obtain a compressed block corresponding to the data block. Specifically, the image block can be binarized according to the existing binarization method to obtain a data block. Depending on the RGB data format, the data in the data block is different. For example, if the RGB data format is RGB24, each data in the data block obtained after binarization can be 0 or 255; if the RGB data format is RGB16, each data in the data block obtained after binarization can be the pixel extreme value of the corresponding channel; the pixel extreme value of the R channel is 0 or 255 / 8, the pixel extreme value of the G channel is 0 or 255 / 4, and the pixel extreme value of the B channel is 0 or 255 / 8.

[0171] In another embodiment, a binarization threshold can also be determined based on the color space of the anti-counterfeiting mark image; based on the binarization threshold, each pixel in the image block is binarized to obtain a data block. Specifically, the binarization threshold includes sub-thresholds corresponding to each channel. It can be understood that the sub-thresholds corresponding to each channel can be the same or different. The sub-threshold can specifically include an upper limit value or a lower limit value. In a specific embodiment, the anti-counterfeiting mark image is a three-channel image, namely R channel, G channel, and B channel. According to the different RGB data formats, the pixel extreme values ​​of each channel in the RGB color space are obtained. Based on the pixel extreme values ​​and the preset error, the binarization threshold is determined. Based on the pixel extreme values ​​of each channel and the preset error, the upper limit value and the lower limit value of each channel are determined. For example, the difference between the pixel extreme value of each channel and the preset error is used as the upper limit value of each channel. When the pixel is white and the RGB data format is RGB16, the pixel extreme value of the R channel of the pixel is 255 / 8, the pixel extreme value of the G channel is 255 / 4, and the pixel extreme value of the B channel is 255 / 8. Assuming that the preset error of the R channel and the G channel is 5 and the preset error of the B channel is 10, the upper limit value of the R channel is 255 / 8-5, the upper limit value of the G channel is 255 / 4-10, and the upper limit value of the B channel is 255 / 8-5. The difference between the pixel extreme value of each channel and the preset error is used as the upper limit value of each channel. When the pixel is black and the RGB data format is RGB16, the pixel extreme value of the R channel, G channel, and B channel of the pixel is 0. Assuming that the preset error of the R channel, G channel, and B channel is 5, the lower limit value of the R channel, G channel, and B channel is 10. It can be understood that the preset error can be set by the user as needed. The pixel extreme values ​​of each channel vary according to the color. In the above, black and white are taken as examples. In other implementations, if other colors are used, the above method can also be used to determine the sub-threshold corresponding to each channel.

[0172] Furthermore, for each pixel in the image block, based on the relationship between the pixel value of each channel and the sub-threshold of the corresponding channel, the pixel is binarized into a first value or a second value. Specifically, it is determined whether the pixel value of each pixel in each channel is greater than the upper limit of the channel, such as determining whether the pixel value of the pixel in the R channel is greater than 255 / 8-5, whether the pixel value of the pixel in the G channel is greater than 255 / 4-10, and whether the pixel value of the pixel in the B channel is greater than 255 / 8-5; in response to the pixel value of the pixel in each channel being greater than the upper limit, the pixel is binarized into the first value; or it is determined whether the pixel value of each pixel in each channel is less than the lower limit of the channel, such as determining whether the pixel value of the pixel in the R channel is less than 10, whether the pixel value of the pixel in the G channel is less than 10, and whether the pixel value of the pixel in the B channel is less than 10, and in response to the pixel value of the pixel in each channel being less than the lower limit, the pixel is binarized into the second value. The first value can be 0, which represents white; the second value can be 1, which represents black. It is understandable that in other embodiments, the first value and the second value may be interchangeable or may be other values, which are not specifically limited here.

[0173] In the above manner, the image block can be processed to obtain a data block. The data block consists of 0s and 1s. Compared with the image block, the amount of data occupied by the data block is reduced, and the image block can be compressed.

[0174] Although the data block obtained through the above processing has a smaller data volume than the image block, it may still be larger. In one embodiment, the data block can also be compressed to obtain a compressed block corresponding to the data block. Specifically, the data block can be divided into several sub-data blocks; for each sub-data block, the elements in the sub-data block are weighted and averaged to obtain the compressed data corresponding to the sub-data block; and the compressed block is obtained using the compressed data corresponding to each sub-data block. The weights for each element can be set by the user, for example, the weights can be set to 1.

[0175] For ease of understanding, taking a 4*4 data block as an example, the data block can be divided into two 2*2 sub-matrices. Each element in the sub-matrix is ​​multiplied by the corresponding weight, such as 1. The results of multiplying the four elements by the weight are averaged to obtain the compressed data corresponding to the sub-matrix. The compressed data corresponding to the two sub-matrices are concatenated to obtain the compressed block corresponding to the data block. In this case, the compressed block is a 1*2 matrix. For example, an 8*8 data block can be divided into 16 2*2 sub-data blocks.

[0176] It is understandable that the user can set a weight matrix, where the number of elements contained in the weight matrix is ​​equal to the number of sub-data blocks. For example, if the weight matrix contains 4 elements, the data block is divided into 4 sub-data blocks, and the number of elements in each sub-data block can be the same or different. Each element in the weight matrix is ​​the weight of each element in the sub-data block. In other words, for the same sub-data block, the weights of each element contained in it are the same when weighted; for different sub-data blocks, the weights when weighted can be the same or different. In a specific embodiment, the weight matrix can be an all-1 matrix.

[0177] By using the above method, the data volume of the compressed block obtained by compressing the data block is greatly reduced.

[0178] After receiving the compressed blocks, the water purification system's processor combines them in sequence to create a compressed image corresponding to the anti-counterfeiting logo image. At this point, the data size of the compressed image is significantly reduced compared to the filter element's anti-counterfeiting logo image, allowing the processor to process and analyze the compressed image.

[0179] S54: Obtain the processing result of the anti-counterfeiting mark image.

[0180] S55: Based on the processing result, determine the product authenticity information of the filter element.

[0181] In this embodiment, the compressed anti-counterfeiting logo image of the filter element can be processed to obtain a processing result. The processing result may include an identification result obtained by identifying the compressed anti-counterfeiting logo image of the filter element, or may include a comparison result obtained by comparing the compressed anti-counterfeiting logo image of the filter element and the compressed template logo image.

[0182] The specific implementation of steps S54 and S55 please refer to S11 and S12, which will not be repeated here.

[0183] By compressing the anti-counterfeiting mark image to obtain a compressed anti-counterfeiting mark image, a processor with a small processing capacity is used to determine the authenticity information of the filter element based on the compressed anti-counterfeiting mark image, thereby reducing the cost of the filter element authenticity identification process.

[0184] Please refer to FIG6 , which is a flow chart of a sixth embodiment of the anti-counterfeiting identification method for a filter element provided by the present application. The method includes:

[0185] S61: Acquire an anti-counterfeiting mark image of the filter element to be identified.

[0186] The specific implementation of step S61 is referred to S11 and will not be described in detail here. In this embodiment, the anti-counterfeiting mark image can be a captured image, or a grayscale image.

[0187] S62: performing ternary processing on the anti-counterfeiting mark image to obtain a ternary image.

[0188] It is understood that when the lens surface of the image acquisition device is not fogged, the anti-counterfeiting mark image captured by the image acquisition device includes an anti-counterfeiting mark with clear boundaries. When the lens surface of the image acquisition device is fogged, the captured anti-counterfeiting mark image will be relatively blurry. Taking the anti-counterfeiting mark of the filter element as a QR code as an example, if the lens surface of the image acquisition device is not fogged, the captured anti-counterfeiting mark image includes a QR code with clear boundaries and can display all the small squares with clear black and white; if the lens surface of the image acquisition device is fogged, the captured anti-counterfeiting mark image is blurred and can only display some of the small squares with clear black and white. If the lens surface of the image acquisition device is severely fogged, the captured anti-counterfeiting mark image is blurred and cannot display the small squares with clear black and white.

[0189] In this step, a first pixel threshold and a second pixel threshold may be preset, the first pixel threshold being smaller than the second pixel threshold, and the first pixel threshold and the second pixel threshold are used to perform ternary processing on the anti-counterfeiting mark image.

[0190] In this embodiment, the pixel value in the anti-counterfeiting mark image that is less than or equal to the first pixel threshold is set as the grayscale minimum value (for example, 0), the pixel value between the first pixel threshold and the second pixel threshold is set as the grayscale intermediate value (for example, 1), and the pixel value that is greater than or equal to the second pixel threshold is set as the grayscale maximum value (for example, 2).

[0191] Taking the anti-counterfeiting mark of the filter element as a QR code as an example, interval division is performed based on the RGB data of the anti-counterfeiting mark image, and ternary processing is performed.

[0192] In actual implementation, when the lens of the image acquisition device is normal, the RGB data of the black and white blocks in the collected anti-counterfeiting mark image fluctuates within a small range. For example, the RGB data of the black square is less than 20, and the RGB data of the white square is greater than 240.

[0193] When the lens of the image acquisition device becomes fogged, the collected anti-counterfeiting mark image is partially or completely blurred to varying degrees, and a series of intermediate RGB data between 20-240 appears.

[0194] In this embodiment, the anti-counterfeiting mark image is ternary processed, and the grayscale value of the black square position with RGB data less than 20 is set to 0, the grayscale value of the white square position with RGB data greater than 240 is set to 2, and the grayscale value of the position with intermediate RGB data is set to 1.

[0195] S63: Based on the comparison result of the pixel ratio of the grayscale median value of the ternary image and the target ratio threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element.

[0196] It should be noted that the number of pixels in the image captured by the image acquisition device is fixed. For example, the anti-counterfeiting logo image includes 64x64 pixels. The blurring of the lens of the image acquisition device is determined based on the pixel ratio of the grayscale median value of the ternary image, that is, the ratio of the grayscale median value of the ternary image to the total number of pixels.

[0197] In actual implementation, the target proportion threshold can be pre-set based on the actual test data. When the pixel proportion of the grayscale median value is greater than the target proportion threshold, the anti-counterfeiting mark image is blurred, indicating that the lens mirror of the image acquisition device is fogged.

[0198] For example, the target proportion threshold is 40%. When the proportion of pixels with the grayscale median value of the ternary image is greater than 40%, it indicates that the lens surface of the image acquisition device is fogged.

[0199] In this embodiment, after it is determined that the lens surface of the image acquisition device is fogged, a corresponding anti-counterfeiting identification operation is performed on the filter element to determine the authenticity of the filter element.

[0200] In actual implementation, the frequency of fogging inside the water purification equipment is low, and the timeliness requirements for filter element authenticity identification are not high. The anti-counterfeiting logo image can be collected through a low-cost image acquisition device. After determining that the lens is fogged, the corresponding anti-counterfeiting identification operation is taken. There is no need to use a lens with added anti-fogging material to meet the filter element anti-counterfeiting identification requirements.

[0201] It should be noted that for some counterfeit filter elements with missing or no surface markings, the anti-counterfeiting mark image is ternary processed, and whether it is fogged is judged based on whether the pixel ratio of the grayscale median value is greater than the target ratio threshold. This can accurately distinguish between counterfeiting and fogging. The image of the counterfeit filter element does not have pixels corresponding to the grayscale median value.

[0202] According to the anti-counterfeiting identification method of the filter element in the embodiment of the present application, the anti-counterfeiting mark image is ternary-processed, and the fogging situation is accurately identified based on the pixel ratio of the grayscale median value of the ternary image, and the corresponding anti-counterfeiting identification operation is performed. There is no need to improve the lens, which helps to reduce the cost of anti-counterfeiting identification of the filter element.

[0203] In actual implementation, after judging that the lens of the image acquisition device is fogged based on the pixel ratio of the grayscale median value of the ternary image, the authenticity information of the filter element can be determined through at least the following two anti-counterfeiting identification operations.

[0204] 1. No true or false judgment is made at the time, and multiple tests are performed subsequently.

[0205] In some embodiments, when the percentage of pixels with a grayscale median value of the ternary image is greater than a target percentage threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element. The anti-counterfeiting identification operation can include: acquiring multiple anti-counterfeiting identification images again at a first time interval; performing ternary processing on each of the multiple anti-counterfeiting identification images to obtain multiple new ternary images; and, when the multiple new ternary images include at least one target ternary image, determining the product authenticity information based on the anti-counterfeiting identification image corresponding to the target ternary image, wherein the target ternary image is a ternary image having a grayscale median value pixel percentage less than or equal to the target percentage threshold.

[0206] In this embodiment, the fogging of the lens of the image acquisition device is determined based on the ternary processed image of the anti-counterfeiting mark currently acquired, and the authenticity of the filter element is not determined currently.

[0207] It is understandable that lens fogging will change with changes in the environment. The current lens fogging may disappear after a period of time.

[0208] Subsequently, multiple anti-counterfeiting mark images are continuously acquired and ternary-processed at the first time interval. As long as at least one of the multiple ternary images can be used to determine that the lens is no longer fogged, it is considered the target ternary image. The anti-counterfeiting mark image corresponding to the target ternary image is used to perform anti-counterfeiting identification and determine whether the filter element is genuine. For example, the first time interval is 6 hours.

[0209] The lens of the image acquisition device is fogged. Currently, the authenticity of the filter element is not judged. Subsequently, one anti-counterfeiting logo image is obtained every 6 hours, and a total of 20 anti-counterfeiting logo images are obtained. The 20 anti-counterfeiting logo images are ternary processed. When the pixel ratio of the grayscale median value of at least one of the 20 new ternary images is less than or equal to the target ratio threshold, anti-counterfeiting identification can be performed based on the corresponding anti-counterfeiting logo image.

[0210] Among them, determining the authenticity information of the product based on the anti-counterfeiting mark image corresponding to the target ternary image may include: identifying the anti-counterfeiting mark image corresponding to the target ternary image to obtain an identification result, or comparing the anti-counterfeiting mark image corresponding to the target ternary image with the template mark image to obtain a comparison result, and determining the authenticity information of the product based on the identification result or the comparison result.

[0211] In some embodiments, after determining the authenticity information of the product based on the anti-counterfeiting mark image corresponding to the target ternary image, the anti-counterfeiting identification method of the filter element may further include: obtaining the anti-counterfeiting mark image again at a second time interval to perform anti-counterfeiting identification on the filter element 300, and the second time interval is greater than the first time interval.

[0212] In this embodiment, after anti-counterfeiting identification is performed according to the anti-counterfeiting mark image corresponding to the target ternary image, the frequency of the anti-counterfeiting identification operation can be reduced, for example, the first time interval is 6 hours and the second time interval is 24 hours.

[0213] It can be understood that by regularly acquiring the anti-counterfeiting mark image according to the pre-set second time interval, not only can the authenticity of the filter element 300 be checked in real time, but also the fogging condition of the lens of the image acquisition device and the moisture or leakage inside the water purification equipment can be judged based on the ternary image corresponding to the anti-counterfeiting mark image.

[0214] 2. No authenticity judgment is made locally, but the cloud performs the authenticity judgment.

[0215] In some embodiments, performing an anti-counterfeiting identification operation on the filter element to determine the product authenticity information of the filter element may include: sending an anti-counterfeiting mark image to a server; and receiving the product authenticity information sent by the server.

[0216] In this embodiment, after determining that the lens of the image acquisition device is fogged, the water purification device or other terminal does not judge the authenticity of the current filter element, and sends the current anti-counterfeiting mark image to the cloud server. The server's powerful computing power is used to restore and analyze the blurred data to determine the authenticity of the filter element.

[0217] It should be noted that only when it is determined that the lens of the image acquisition device is fogged based on the ternary image corresponding to the anti-counterfeiting mark image, the above-mentioned anti-counterfeiting identification operation of subsequent multiple detections or authenticity judgment in the cloud is adopted. For anti-counterfeiting mark images with clear imaging, the authenticity of the filter element can be directly judged.

[0218] In some embodiments, based on the comparison result of the pixel ratio of the grayscale median value of the ternary image and the target ratio threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element, including: when the pixel ratio of the grayscale median value of the ternary image is less than or equal to the target ratio threshold, the product authenticity information is determined based on the anti-counterfeiting logo image.

[0219] In this embodiment, the pixel ratio of the grayscale median value of the ternary image is less than or equal to the target ratio threshold, indicating that the lens of the image acquisition device is not fogged, and anti-counterfeiting identification can be directly performed, and the authenticity information of the product can be determined using the current anti-counterfeiting mark image.

[0220] In some embodiments, the anti-counterfeiting mark image is a color image. After obtaining the anti-counterfeiting mark image of the filter element 300 to be identified, before performing ternary processing on the anti-counterfeiting mark image, the anti-counterfeiting identification method of the filter element further includes: converting the anti-counterfeiting mark image into a grayscale image.

[0221] It can be understood that a color image is also called an RGB image, which has three channels of color components: R, G, and B. After converting the color image of the anti-counterfeiting logo image into a grayscale image, there is only a single channel of color component, which can effectively improve the processing speed of the ternary processing of the anti-counterfeiting logo image.

[0222] In one specific embodiment, the initialization process involves capturing an anti-counterfeiting mark image, obtaining RGB data, and ternary processing of the RGB data. The grayscale values ​​of black squares with RGB data less than 20 are set to 0, the grayscale values ​​of white squares with RGB data greater than 240 are set to 2, and the grayscale values ​​of intermediate RGB data are set to 1. The percentage of 1 values ​​in the overall data is calculated, namely, the ratio of the grayscale median value of the ternary image to the total number of pixels. If the percentage of 1 values ​​exceeds 40%, the image acquisition device 400 is judged to have a fogged or abnormal lens, and an abnormality handling anti-counterfeiting identification operation is performed, including subsequent multiple tests or cloud-based authenticity verification. If the percentage of 1 values ​​is ≤ 40%, the image acquisition device 400 is judged to have a normal lens, and normal recognition is performed. The judgment result is output, and the next trigger for image capture is awaited. In this embodiment, by ternary processing the anti-counterfeiting mark image, fogging is accurately identified based on the percentage of pixels with the grayscale median value of the ternary image, and the corresponding anti-counterfeiting identification operation is performed. This eliminates the need for lens modification and helps reduce the cost of filter cartridge anti-counterfeiting identification.

[0223] Please refer to Figures 7-12. Figure 7 is a flowchart of an embodiment of step S11 provided in the present application; Figure 8 is a schematic diagram of an embodiment of performing pure color pixel filling on a target binary image provided in the present application; Figure 9 is a schematic diagram of an embodiment of a filter element image provided in the present application; Figure 10 is a schematic diagram of an embodiment of a first target image provided in the present application; Figure 11 is a schematic diagram of an embodiment of performing target pixel counting on the first target image provided in the present application; Figure 12 is a schematic diagram of the position of an embodiment of a target area provided in the present application; Step S11 may include:

[0224] S711: Acquire a filter element image.

[0225] The filter element image can be an image captured by an image acquisition device. If only the anti-counterfeiting mark's border is clearly visible in the filter element image, a black edge search method can be used to identify the target area where the anti-counterfeiting mark is located, or data from the center of the image can be directly captured. However, in real-world scenarios, due to numerous interfering factors in the filter element image, the black edge search method cannot accurately identify the target area where the anti-counterfeiting mark is located, or the acquisition angle may be offset, making it impossible to obtain valid image data of the anti-counterfeiting mark by capturing data from the center of the image.

[0226] S712: performing image preprocessing on the filter element image to obtain a first target image, wherein the difference between the anti-counterfeiting mark area and the background area in the first target image is greater than the difference between the anti-counterfeiting mark area and the background area in the filter element image.

[0227] In this step, the difference between the anti-counterfeiting mark area and the background area in the filter element image is increased by image preprocessing means to obtain a first target image, in which the anti-counterfeiting mark area is easier to identify.

[0228] It should be noted that the difference between the anti-counterfeiting mark area and the background area in the image refers to the degree of difference between the image features of the anti-counterfeiting mark area and the image features of the background area. The difference between the anti-counterfeiting mark area and the background area in the filter element image can be increased through image processing methods such as pixel expansion, contrast adjustment, and binarization, which helps to accurately locate the anti-counterfeiting mark area in the image.

[0229] In one embodiment, image preprocessing of the filter image includes: binarizing the filter image to obtain a target binary image; based on the pixel value of each pixel in the target binary image, expanding and filling the pixel points adjacent to each pixel in the target binary image with pure color pixels to obtain a first target image.

[0230] In this embodiment, the image preprocessing of the filter element image includes binarization processing and pixel expansion filling. Through the binarization processing and pixel expansion filling, the difference between the anti-counterfeiting mark area and the background area in the filter element image is effectively increased to obtain the first target image.

[0231] In actual implementation, the filter element image is binarized according to a preset binarization threshold, and the anti-counterfeiting mark area and the background area are preliminarily separated to obtain a target binary image.

[0232] According to the pixel value of each pixel in the target binary image, its adjacent pixel points are filled with pure color pixels to highlight the boundary between the anti-counterfeiting mark area and the background area, thereby increasing the difference between the anti-counterfeiting mark area and the background area in the filter element image.

[0233] For example, as shown in FIG8 , the pixel points of the target binary image are expanded, and the pixel values ​​of the pixel points adjacent to a certain pixel point of the target binary image are read one by one in the downward, left, and diagonal directions, and a threshold is used to determine whether it is a black dot. If it is a black dot, black pixels are used to fill it until the expansion processing of the entire target binary image is completed.

[0234] The filter element image shown in FIG9 is subjected to image preprocessing of binarization and pixel expansion filling to obtain the first target image shown in FIG10 . In the first target image, the difference between the anti-counterfeiting mark area and the background area is more obvious.

[0235] In some embodiments, the direction of expansion of the solid-color pixel fill is determined based on the distribution characteristics of the background region in the target binary image. It is understood that the background region is an interfering print that affects the identification and positioning of the security mark region. Determining the direction of expansion of the solid-color pixel fill based on the distribution characteristics of the background region effectively increases the difference between the security mark region and the background region. For example, as shown in FIG9 , the interfering factor in the background region is a large number of vertical stripes. By expanding the direction of expansion of the black pixel fill as shown in FIG8 , a first target image with an increased difference between the security mark region and the background region can be obtained.

[0236] S713: Determine a target area where the anti-counterfeiting mark is located in the first target image based on the size information of the anti-counterfeiting mark.

[0237] In this step, based on the size of the security mark, the target area of ​​the security mark is located in the first target image, where the security mark area is significantly different from the background area. For example, if the security mark is a 90x90 pixel square QR code, the target area of ​​the security mark matching the 90x90 pixel square is searched in the first target image.

[0238] In one embodiment, a pixel point of the first target image is used as a reference point, and all pixel points of the first target image are sequentially traversed to obtain a count value of a target pixel point in an area corresponding to the size information in the first target image, where the target pixel point is a pixel point whose pixel value is greater than a target pixel threshold;

[0239] The target area is determined based on the count values ​​of the target pixels.

[0240] In this embodiment, based on the size information of the anti-counterfeiting mark, we can start with the pixel point in the lower left corner of the first target image, traverse all the pixel points of the first target image in sequence, and use each pixel point as a reference point to calculate the count value of the target pixel points in the area corresponding to the size information.

[0241] For example, the target pixel is a black pixel, and the anti-counterfeiting mark is a 90x90 pixel square, as shown in FIG11 . Starting from the pixel in the lower left corner, the count value of the black pixel in the 90x90 pixel image is calculated, and then the reference point is moved one pixel to the right, and the count value of the black pixel in the 90x90 pixel image is continued to be calculated until all the pixels of the first target image are traversed.

[0242] In some embodiments, the area with the largest count value of target pixels in the first target image is determined as the target area.

[0243] In this embodiment, after obtaining the count value of the target pixel points in the area corresponding to each size information in the first target image, the area with the largest count value is taken as the target area. As shown in Figure 12, the filter element image can be cropped according to the target area (the black border next to the QR code) to obtain the anti-counterfeiting mark image for anti-counterfeiting identification.

[0244] In some embodiments, after obtaining the count value of the target pixel points in the area corresponding to the size information in the first target image, it can also include: when there are multiple areas in the first target image where the count value of the target pixel points is greater than the target count threshold, sending at least one of the filter element image and the first target image to the server for the server to perform anti-counterfeiting identification on the filter element.

[0245] Among them, the target counting threshold can be a counting critical value determined according to the pixel ratio of the target pixel points in the anti-counterfeiting mark. When the count value of the target pixel points in a certain area in the first target image is greater than the target counting threshold, it indicates that the area may be the area where the anti-counterfeiting mark is located.

[0246] In this embodiment, there are multiple areas in the first target image where the count values ​​of the target pixels are greater than the target count threshold, and the exact position of the target area cannot be accurately located. The filter element image and / or the first target image can be sent to the server, and the powerful computing power of the server can be used to perform anti-counterfeiting identification to improve the identification accuracy.

[0247] S714: Based on the target area, the filter element image is cropped to obtain an anti-counterfeiting mark image.

[0248] Among them, the anti-counterfeiting mark image is used to determine the product authenticity information of the filter element.

[0249] In this embodiment, the first target image is cropped according to the target area where the anti-counterfeiting mark is located to obtain the anti-counterfeiting mark image corresponding to the target area where the anti-counterfeiting mark is located. After cropping, the image size is greatly reduced, and anti-counterfeiting identification of the filter element can also be achieved using a low-cost processor.

[0250] The above embodiment, by performing image preprocessing on the filter element image, increases the difference between the anti-counterfeiting mark area and the background area in the filter element image, helps to accurately locate the anti-counterfeiting mark area in the image, crops the image according to the located target area, and performs anti-counterfeiting identification processing, thereby realizing low-cost filter element anti-counterfeiting identification.

[0251] In a specific embodiment, the image acquisition device acquires an image to be processed, and can first store the image in the on-chip Flash of the microprocessor unit, and then read the image from the on-chip Flash for image preprocessing. A threshold is selected for binarization processing, the image to be processed is binarized, and image preprocessing for black pixel expansion is performed. The black pixel is judged as a black pixel by the threshold, and the adjacent data below is filled with black, and the next pixel point is read until all are filled. After the image preprocessing is completed, the black pixel points in the area corresponding to the size information of the anti-counterfeiting mark in the first target image are counted, the first pixel point is selected as the coordinate origin, and the square image data of a set width starting from the coordinate origin is read, the black pixel points are calculated, and the coordinate point is moved to the next pixel point until all square pixel statistics are completed, and the area with the largest black pixel count value is determined as the target area where the anti-counterfeiting mark is located.

[0252] In this embodiment, by performing image preprocessing on the image to be processed, increasing the difference between the anti-counterfeiting mark area and the background area in the image to be processed, accurately locating the anti-counterfeiting mark area in the image, and cropping the image according to the located target area, low-cost filter element anti-counterfeiting identification can be achieved.

[0253] Please refer to FIG13 , which is a schematic diagram of the framework structure of an embodiment of an electronic device provided in this application.

[0254] Electronic device 130 can be a water purification device, a main control module within the water purification device, or a server. Electronic device 130 can perform any of the aforementioned methods. Specifically, the electronic device can include a memory 131 and a processor 132. The memory 131 stores program instructions; the processor 132 is configured to execute the program instructions stored in the memory to implement any of the aforementioned methods. In one specific embodiment, the processor 132 can include a running memory and a storage space. The storage space is configured to store compressed images; the running memory is configured to execute the program instructions stored in the memory 131 to implement any of the aforementioned methods.

[0255] The processor 132 may also be referred to as a CPU (Central Processing Unit). The processor 132 may be an integrated circuit chip having signal processing capabilities. The processor 132 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. In addition, the processor 132 may be implemented by an integrated circuit chip.

[0256] Please refer to Figure 14, which is a schematic diagram of the framework structure of an embodiment of the water purification equipment provided in this application.

[0257] The water purification device 140 may include a device body 141 and a main control module 142 integrated with the device body 141. The main control module 142 may be the aforementioned electronic device. The water purification device 140 may also be equipped with a filter cartridge, which may be mounted on the device body 141. In one embodiment, after the filter cartridge is mounted on the water purification device, it is positioned at the focal length of an image acquisition device; the image acquisition device is used to capture the filter cartridge.

[0258] In other embodiments, the water purification device 140 further includes an image acquisition device that can be in communication with the main control module 142 and configured to capture an image of the filter element, including an image of the anti-counterfeiting mark. The image acquisition device can also be a camera element. In some embodiments, the image acquisition device can include multiple image acquisition units, each corresponding to a plurality of filter elements in the water purification device 140, for viewing the plurality of filter elements in the water purification device 140.

[0259] Please refer to Figure 15, which is a schematic diagram of the framework structure of an embodiment of the filter element anti-counterfeiting system provided in this application.

[0260] The filter element anti-counterfeiting system 150 includes a water purification device 140 and a server 151 that are communicatively connected; the water purification device 140 and the server 151 are respectively used to execute the relevant steps in the method implementation provided in this application.

[0261] Please refer to FIG. 16 , which is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided in the present application.

[0262] The computer-readable storage medium 160 stores program instructions 161 . When the program instructions 161 are executed by a processor, they are used to implement the steps in any of the above method embodiments.

[0263] The computer-readable storage medium 160 can specifically be a medium that can store computer programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or it can also be a server that stores the computer program. The server can send the stored computer program to other devices for execution, or it can also execute the stored computer program itself.

[0264] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

[0265] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for anti-counterfeiting identification of a filter element, wherein: include: Acquire an anti-counterfeiting mark image of a filter element to be identified; Based on the anti-counterfeiting mark image, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element.

2. The method according to claim 1, wherein: The anti-counterfeiting identification operation is performed on the filter element based on the anti-counterfeiting mark image to determine the product authenticity information of the filter element, including: Obtaining a processing result of the anti-counterfeiting mark image; Based on the processing result, the product authenticity information of the filter element is determined, wherein the processing result is a recognition result of the anti-counterfeiting mark image, or a comparison result of the anti-counterfeiting mark image and a template mark image.

3. The method according to claim 2, wherein: The processing result is a recognition result of recognizing the anti-counterfeiting mark image, and the recognition result includes the ciphertext data of the anti-counterfeiting mark in the anti-counterfeiting mark image.

4. The method according to claim 3, wherein: Determining the authenticity information of the filter element based on the processing result includes: Decrypting the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark; Determine whether the plaintext data conforms to a preset coding rule; wherein the production information of the filter element is encoded according to the preset coding rule to obtain the plaintext data; In response to the plaintext data complying with a preset encoding rule, the filter element is determined to be genuine.

5. The method according to any one of claims 3 to 4, wherein: Determining the authenticity information of the filter element based on the processing result includes: The ciphertext data is sent to a server; the server can decrypt the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark, and obtain the associated information corresponding to the plaintext data, the associated information characterizing whether the filter element is associated with other water purification equipment, and based on the associated information, determine the product authenticity information of the filter element.

6. The method according to any one of claims 2 to 5, wherein: The method further includes: obtaining an auxiliary identification mark corresponding to the filter element to be identified; Before obtaining the processing result of the anti-counterfeiting mark image, the method further includes: Determine whether the auxiliary identification mark in the filter element image is the same as the target identification mark; wherein the filter element image includes the auxiliary identification mark and the anti-counterfeiting mark; In response to the auxiliary identification mark being the same as the target identification mark, the step of obtaining the processing result of the anti-counterfeiting mark image is performed.

7. The method according to any one of claims 2 to 6, wherein: Before obtaining the processing result of the anti-counterfeiting mark image, the method further includes: Based on the storage space of the processor in the water purification device, dividing the anti-counterfeiting mark image into at least one image block; Based on the compression blocks corresponding to the image blocks, a compressed anti-counterfeiting mark image of the filter element is obtained, wherein the compressed anti-counterfeiting mark image of the filter element is used for processing to obtain a processing result of the anti-counterfeiting mark image.

8. The method according to claim 1, wherein: The anti-counterfeiting identification operation is performed on the filter element based on the anti-counterfeiting mark image to determine the product authenticity information of the filter element, including: Performing ternary processing on the anti-counterfeiting mark image to obtain a ternary image; Based on the comparison result of the pixel ratio of the grayscale intermediate value of the ternary image and the target ratio threshold, an anti-counterfeiting identification operation is performed on the filter element to determine the product authenticity information of the filter element.

9. The method according to claim 8, wherein: The method of performing an anti-counterfeiting identification operation on the filter element based on the comparison result of the pixel ratio of the grayscale intermediate value of the ternary image and the target ratio threshold to determine the product authenticity information of the filter element includes: When the pixel proportion of the grayscale intermediate value of the ternary image is greater than the target proportion threshold, the pixel proportion of the ternary image is obtained again at the first time interval. Take a plurality of the anti-counterfeiting mark images; perform ternary processing on the plurality of the anti-counterfeiting mark images respectively to obtain a plurality of new ternary images; when the plurality of new ternary images include at least one target ternary image, determine the product authenticity information based on the anti-counterfeiting mark image corresponding to the target ternary image, the target ternary image being the ternary image whose pixel proportion of the grayscale intermediate value is less than or equal to the target proportion threshold.

10. The method according to claim 9, wherein: After determining the authenticity information of the product based on the anti-counterfeiting mark image corresponding to the target ternary image, the method further includes: The anti-counterfeiting mark image is acquired again at a second time interval to perform anti-counterfeiting identification on the filter element, and the second time interval is greater than the first time interval.

11. The method according to any one of claims 8 to 10, wherein: The method of performing an anti-counterfeiting identification operation on the filter element based on the comparison result of the pixel ratio of the grayscale intermediate value of the ternary image and the target ratio threshold to determine the product authenticity information of the filter element includes: When the pixel proportion of the grayscale intermediate value of the ternary image is less than or equal to the target proportion threshold, the product authenticity information is determined based on the anti-counterfeiting mark image.

12. The method according to any one of claims 1 to 11, wherein: The step of obtaining the anti-counterfeiting mark image of the filter element to be identified includes: Acquire a filter element image; wherein the filter element image is obtained by photographing the filter element to be identified, and the filter element to be identified includes an anti-counterfeiting mark; The anti-counterfeiting mark image is intercepted from the filter element image.

13. The method according to claim 12, wherein: The step of intercepting the anti-counterfeiting mark image from the filter element image comprises: Determine the cropping coordinates based on the relative position of the image acquisition device in the water purification device and the filter element to be identified; wherein the image acquisition device can photograph the filter element to be identified to obtain the filter element image; based on the cropping coordinates, crop the image data from the filter element image to obtain the anti-counterfeiting mark image; Or, based on the grayscale data of the filter element image, a grayscale filter element image is obtained; and the anti-counterfeiting mark image is intercepted from the grayscale filter element image; Or, perform image preprocessing on the filter element image to obtain a first target image, in which the difference between the anti-counterfeiting mark area and the background area in the first target image is greater than the difference between the anti-counterfeiting mark area and the background area in the filter element image; based on the size information of the anti-counterfeiting mark, determine the target area where the anti-counterfeiting mark is located in the first target image; based on the target area, crop the filter element image to obtain the anti-counterfeiting mark image.

14. The method according to claim 13, wherein: The anti-counterfeiting mark image is intercepted from the grayscale filter image, and the intercepting the anti-counterfeiting mark image from the grayscale filter image includes: Determining the anti-counterfeiting mark boundary in the grayscale filter element image based on a target grayscale threshold; Based on the anti-counterfeiting mark boundary and anti-counterfeiting mark size information, the second filter element image is intercepted to obtain the anti-counterfeiting mark image.

15. The method according to any one of claims 12 to 14, wherein: The anti-counterfeiting identification operation is performed on the filter element based on the anti-counterfeiting mark image to determine the product authenticity information of the filter element, including: The anti-counterfeiting mark image and the template mark image are compared to determine the product authenticity information of the filter element.

16. The method according to claim 15, wherein: The step of comparing the anti-counterfeiting mark image with the template mark image to determine the authenticity information of the filter element includes: Performing image segmentation processing on the anti-counterfeiting mark image based on grayscale information to obtain a first mark image; Performing binarization and rotation processing on the first identification image to obtain a binarized image; Performing image segmentation processing based on the logo size on the binary image to obtain a plurality of first logo sub-images; Performing translation processing on the plurality of first identification sub-images respectively to obtain a plurality of second identification sub-images corresponding to the second identification image; The second identification image is compared with the template identification image to determine the authenticity information of the product.

17. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores program instructions; and the processor is configured to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 16.

18. A water purification device, wherein: The water purification device includes an equipment body and a main control module carried by the equipment body. The filter element to be identified is loaded on the equipment body, and the main control module is used to execute the method described in any one of claims 1-16.

19. A filter element anti-counterfeiting system, wherein: The filter element anti-counterfeiting system includes a water purification device and a server that are communicatively connected; the water purification device is used to execute the method described in any one of claims 1-16.

20. A computer-readable storage medium, wherein: The computer-readable storage medium stores a program file, and the program file can be executed to implement the method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Filter element anti-counterfeiting mark identification method and related device

    CN119338474A

  • Filter element anti-counterfeiting method and related device

    CN119338475A

  • Anti-counterfeiting validation method and device for filter element of water purifier and electronic equipment

    CN104993936A

  • Anti-counterfeit identification generation and detection method

    CN109523451A

  • Filter element authentic identification method, water treatment device and computer readable storage medium

    CN111401917A