A label authentication method, device, equipment and medium
By acquiring and using parameter information of the target mask image, ensuring that the outline size of the label image and the mask image is consistent, the problem of poor matching rate in the prior art is solved, and the efficiency and accuracy of labels are improved.
Patent Information
- Application Number
- CN202411067391.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-08-06
AI Technical Summary
In the prior art, the matching rate between the label image and the mask image is poor, which affects the normal false identification of the label, resulting in poor false identification effect and efficiency.
By obtaining parameter information of the target mask image, determine the target display parameters of the mask image on the imaging device and the target shooting parameters of the camera device for the label image, thereby ensuring the displayed target mask image and the captured target label image. The contour size is the same, which improves the overlapping effect.
The overlapping effect between the label image and the mask image is improved, the integrity, clarity and efficiency of the label forgery identification process is ensured, and the accuracy and efficiency of false identification are improved.
Smart Images

Figure CN118586938B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of label authentication, and in particular to a label authentication method, device, equipment and medium. Background Art
[0002] Micro-coded images are images composed of a large number of tiny coding points or areas. Compared with traditional barcodes and QR codes, micro-coded images contain richer and more complex information, are more difficult to identify, and have higher anti-counterfeiting performance. As a new type of anti-counterfeiting identification method, they are widely used in the field of label anti-counterfeiting.
[0003] A common authentication method in the prior art is to adjust the camera magnification of the camera device according to the type of the camera device to capture the label image; when the label image coincides with the mask image, the label image is authenticated. In this method, the matching rate between the captured label image and the mask image is poor, which affects the normal authentication of the label, thereby resulting in poor authentication effect and efficiency of the label. Summary of the invention
[0004] The present invention provides a method, device, equipment and medium for identifying counterfeit labels, so as to improve the efficiency and accuracy of identifying counterfeit labels.
[0005] In a first aspect, the present invention provides a method for identifying a counterfeit label, comprising:
[0006] Acquire a target mask image that matches the tag to be identified, and parameter information of the target mask image; the parameter information includes a correspondence between candidate device identification information, candidate display parameter information, and candidate camera parameter information;
[0007] In the parameter information, search for target display parameter information and target camera parameter information that match the camera device identification information;
[0008] Displaying a target mask image on a display screen according to the target display parameter information;
[0009] According to the target camera parameter information, the tag to be identified is photographed, and the photographed tag image is displayed on the display screen, and the user is prompted to move the camera device so that the target mask image displayed on the display screen overlaps with the photographed tag image;
[0010] When the target mask image coincides with the captured target label image, the label to be identified is forged according to the microscopic coding area in the target label image to obtain the identification result of the label to be identified.
[0011] In a second aspect, the present invention further provides a label authentication device, comprising:
[0012] An information acquisition module, used to acquire a target mask image matching the tag to be identified, and parameter information of the target mask image; the parameter information includes a correspondence between candidate device identification information, candidate display parameter information, and candidate camera parameter information;
[0013] An information query module, used to query the target display parameter information and target camera parameter information matching the camera device identification information in the parameter information;
[0014] An image display module, used for displaying a target mask image on a display screen according to target display parameter information;
[0015] The tag shooting module is used to shoot the tag to be identified according to the target camera parameter information, and display the captured tag image on the display screen, and prompt the user to move the camera device so that the target mask image displayed on the display screen overlaps with the captured tag image;
[0016] The forgery identification module is used to perform forgery identification on the tag to be identified according to the microscopic coding area in the target tag image when the target mask image coincides with the captured target tag image, and obtain the identification result of the tag to be identified.
[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0018] at least one processor; and
[0019] a memory communicatively coupled to at least one processor; wherein
[0020] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the label authentication method provided by any embodiment of the present invention.
[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the label authentication method of any embodiment of the present invention when executed by a processor.
[0022] The technical solution of the embodiment of the present invention obtains parameter information of the target mask image; in the parameter information of the mask image, determines the targeted display parameter information of the mask image on the camera device, and the targeted camera parameters of the camera device for the label image, thereby displaying the mask image and photographing the label image. Compared with the technical solution of selecting the mask image and the camera magnification factor respectively in the prior art, the technical solution can ensure that the outline size of the displayed target mask image and the photographed target label image is the same, improve the overlap effect between the target mask image and the target label image, so as to completely, clearly and quickly identify the counterfeit of the label according to the microscopic coding area in the label image, thereby improving the efficiency and accuracy of counterfeit identification.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 This is a flow chart of a label authentication method provided according to Embodiment 1 of the present invention;
[0026] Figure 2 is a flow chart of a label authentication method provided according to Embodiment 2 of the present invention;
[0027] Figure 3A is a flow chart of a label authentication method provided according to Embodiment 3 of the present invention;
[0028] Figure 3B is a schematic diagram of a label provided according to Embodiment 3 of the present invention;
[0029] Figure 3C is a schematic diagram of a mask image displayed in a mobile phone interface according to Embodiment 3 of the present invention;
[0030] Figure 3D is a schematic diagram of another label provided according to Embodiment 3 of the present invention;
[0031] Figure 3E is a schematic diagram of another mask image displayed in a mobile phone interface according to Embodiment 3 of the present invention;
[0032] Figure 3FA schematic diagram of another tag provided according to the third embodiment of the present invention;
[0033] Figure 3G A schematic diagram of another mask image displayed in a mobile phone interface according to a third embodiment of the present invention;
[0034] Figure 4 is a schematic structural diagram of a label authentication device provided according to a fourth embodiment of the present invention;
[0035] Figure 5 It is a schematic diagram of the structure of an electronic device for implementing the label authentication method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] It should be noted that the terms "first" and "second" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the mask image, etc. involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0039] Embodiment 1
[0040] Figure 1 A flowchart of a label authentication method provided in Embodiment 1 of the present invention is provided. This embodiment is applicable to situations where labels are to be authenticated. The method can be performed by a label authentication device, which can be implemented in the form of hardware and / or software and specifically configured in an electronic device, such as a mobile phone.
[0041] See also Figure 1 The method for identifying the counterfeit label shown includes:
[0042] S101, acquiring a target mask image matching a tag to be identified and parameter information of the target mask image; the parameter information includes a correspondence between candidate device identification information, candidate display parameter information and candidate camera parameter information.
[0043] In this embodiment, the label to be identified may be a label to be authenticated. The target mask image may be a mask image with the same contour shape as the label to be identified; wherein the mask image may be an image with a certain degree of transparency. The parameter information may be stored on the server side. The candidate device identification information may be identification information of a candidate camera device used to shoot the label image; the candidate device identification information may be used to uniquely identify the corresponding candidate camera device; the candidate display parameter information may be parameter information used to display the mask image, for example, including but not limited to display ratio information, display transparency information, and display color information; the candidate camera parameter information may be parameter information used to shoot the label image, for example, including but not limited to camera magnification information, aperture size information, and sensitivity information. Specifically, a certain algorithm is used to obtain a target mask image that matches the label to be identified, and the parameter information of the target mask image is obtained from the server side.
[0044] It should be noted that the correspondence between the candidate device identification information, the candidate display parameter information and the candidate camera parameter information can be independently set by the technical personnel according to actual needs or practical experience.
[0045] S102: In the parameter information, search for target display parameter information and target camera parameter information that match the camera device identification information.
[0046] In this embodiment, the camera device identification information may be identification information of a camera device used to shoot the tag to be identified, and is used to uniquely identify the camera device. The target display parameter information may be candidate display parameter information for displaying a target mask image. The target camera parameter information may be candidate camera parameter information for shooting the tag to be identified. Specifically, a certain algorithm may be used to query the target display parameter information and the target camera parameter information that match the camera device identification information in the parameter information.
[0047] S103: Displaying the target mask image on the display screen according to the target display parameter information.
[0048] Specifically, a certain algorithm is used to display the target mask image on the display screen according to the target display parameter information. Optionally, a certain algorithm is used to display the target mask image on the display screen according to the target display parameter information.
[0049] Optionally, the target display parameter information is display ratio information; displaying the target mask image on the display screen according to the target display parameter information includes: adjusting the display ratio of the target mask image according to the display ratio information; and displaying the target mask image on the display screen according to the display ratio.
[0050] The display ratio information may be the ratio of the height and / or width of the mask image to the display screen. In a specific embodiment, the display ratio information may be the ratio of the width of the target mask image to the display screen; according to the display ratio information, the width display ratio of the target mask image is determined; according to the height and width of the target mask image and the width display ratio, the display ratio of the height of the target mask image to the display screen under proportional scaling, i.e., the height display ratio of the target mask image, is determined; according to the height display ratio and the width display ratio, the target mask image is displayed on the display screen.
[0051] It can be understood that by adopting the above-mentioned technical scheme, the display ratio of the target mask image is adjusted according to the display ratio information, and the target mask image is displayed, which can ensure that the target mask image is displayed completely and clearly on the display screen, thereby avoiding the occurrence of situations where the target mask image is too large to overflow the display range of the display screen or is too small to be difficult to observe, thereby improving the display effect of the target mask image, and making it easier for users to overlap the label image with the target mask image, thereby improving the overlap effect between the target mask image and the label image.
[0052] S104, photographing the label to be identified according to the target camera parameter information, and displaying the photographed label image on a display screen, and prompting the user to move the camera device so that the target mask image displayed on the display screen overlaps with the photographed label image.
[0053] Specifically, the camera of the camera device can be adjusted according to the target camera parameter information; illustratively, the magnification of the camera of the camera device is adjusted according to the camera magnification information in the target camera parameter information, etc.; the label to be identified is photographed by the adjusted camera device, and the photographed label image is displayed on the display screen; a prompt message is generated to prompt the user to move the camera device so that the target mask image displayed on the display screen and the photographed label image overlap; wherein the display screen of the display screen may include a first layer and a second layer; the first layer is used to display the target mask image, and the second layer is used to display the photographed label image, so that the user can move the camera device to make the target mask image displayed on the display screen overlap with the photographed label image.
[0054] S105 . When the target mask image overlaps with the captured target label image, the label to be identified is identified forged according to the microscopic coding area in the target label image to obtain an identification result of the label to be identified.
[0055] In this embodiment, the target label image may be a label image when it coincides with the target mask image displayed on the display screen. Specifically, when the target mask image coincides with the captured target label image, the microscopic coding image composed of microscopic coding points in the microscopic coding area of the target label image is parsed to obtain the parsing result of the microscopic coding image. According to the parsing result, the recognition result of the label to be identified is determined. Exemplarily, the parsing result may be queried in a database; if the parsing result is queried in the database, the recognition result of the label to be identified is a genuine label; otherwise, the recognition result of the label to be identified is a counterfeit label.
[0056] The technical solution of the embodiment of the present invention obtains parameter information of the target mask image; in the parameter information of the mask image, determines the targeted display parameter information of the mask image on the camera device, and the targeted camera parameters of the camera device for the label image, thereby displaying the mask image and photographing the label image. Compared with the technical solution of selecting the mask image and the camera magnification factor respectively in the prior art, the technical solution can ensure that the outline size of the displayed target mask image and the photographed target label image is the same, improve the overlap effect between the target mask image and the target label image, so as to completely, clearly and quickly identify the counterfeit of the label according to the microscopic coding area in the label image, thereby improving the efficiency and accuracy of counterfeit identification.
[0057] Embodiment 2
[0058] Figure 2 This is a flow chart of a label authentication method provided in the second embodiment of the present invention. Based on the technical solutions of the above embodiments, the embodiment of the present invention optimizes and improves the acquisition operations of target display parameter information and target camera parameter information.
[0059] Further, "in the parameter information, query the target display parameter information and target camera parameter information that match the camera device identification information" is refined into "according to the candidate device identification information in each candidate information configuration table, query the target information configuration table that matches the camera device identification information; determine the candidate display parameter information in the target information configuration table as the target display parameter information; determine the candidate camera parameter information in the target information configuration table as the target camera parameter information" to complete the operation of obtaining the target display parameter information and the target camera parameter information.
[0060] It should be noted that, for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions in the aforementioned embodiments.
[0061] See also Figure 2 The method for identifying the counterfeit label shown includes:
[0062] S201, acquiring a target mask image matching a tag to be identified and parameter information of the target mask image; the parameter information includes a correspondence between candidate device identification information, candidate display parameter information and candidate camera parameter information.
[0063] In this embodiment, the parameter information includes at least one candidate information configuration table; the candidate information configuration table includes candidate device identification information, candidate display parameter information and candidate camera parameter information; the candidate device identification information in each candidate information configuration table is different. The candidate information configuration table may also include remark information of the target mask image, the name of the target mask image and identification information of the target mask image.
[0064] S202: According to the candidate device identification information in each of the candidate information configuration tables, query a target information configuration table that matches the camera device identification information.
[0065] In this embodiment, the target information configuration table is the candidate information configuration table that matches the camera device identification information. Specifically, the candidate information configuration table whose candidate device identification information is the same as the camera device identification information is determined as the target information configuration table.
[0066] S203: Determine the candidate display parameter information in the target information configuration table as the target display parameter information.
[0067] S204: Determine the candidate camera parameter information in the target information configuration table as the target camera parameter information.
[0068] S205: Display the target mask image on a display screen according to the target display parameter information.
[0069] S206, photographing the label to be identified according to the target camera parameter information, displaying the photographed label image on the display screen, and prompting the user to move the camera device so that the target mask image displayed on the display screen overlaps with the photographed label image.
[0070] S207: When the target mask image overlaps with the captured target label image, the label to be identified is identified forged according to the microscopic coding area in the target label image to obtain an identification result of the label to be identified.
[0071] Optionally, the parameter information also includes the correspondence between the candidate micro-coding area distribution information and the candidate display parameter information; after querying the target display parameter information and the target camera parameter information that match the camera device identification information, it also includes: querying the target micro-coding area distribution information associated with the target display parameter information; before performing forgery identification on the label to be identified based on the micro-coding area in the target label image and obtaining the identification result of the label to be identified, it also includes: determining the micro-coding area in the target label image based on the target micro-coding area distribution information.
[0072] The candidate microscopic coding region distribution information may be the distribution information of the microscopic coding region in the label image, for example, including but not limited to position information, shape information, area information, etc. The target microscopic coding region distribution information may be the distribution information of the microscopic coding region in the target label image.
[0073] Specifically, after querying the target display parameter information and the target camera parameter information that match the camera device identification information, it also includes: determining the candidate microscopic coding area distribution information that has the same associated candidate display parameter information as the target display parameter information as the target microscopic coding area distribution information.
[0074] In an optional embodiment, the candidate information configuration table may include candidate microscopic coding area distribution information, and the candidate microscopic coding area distribution information in the target information configuration table may be determined as the target microscopic coding area distribution information.
[0075] It can be understood that by adopting the above-mentioned technical scheme, the microscopic coding area in which the microscopic coding points exist in the target label image can be quickly determined through the microscopic coding area distribution information, so as to facilitate the counterfeit identification of the label to be identified based on the microscopic coding image in the microscopic coding area, thereby improving the efficiency of determining the microscopic coding area and the efficiency of counterfeit identification of the label.
[0076] The technical solution of the embodiment of the present invention queries the target information configuration table that matches the camera device identification information through the candidate device identification information and the camera device identification information in each candidate information configuration table, thereby determining the candidate display parameter information in the target information configuration table as the target display parameter information, and determining the candidate camera parameter information in the target information configuration table as the target camera parameter information, thereby improving the efficiency of querying the target display parameter information and the target camera parameter information.
[0077] Embodiment 3
[0078] Figure 3A This is a flow chart of a label authentication method provided in Embodiment 3 of the present invention. Based on the technical solutions of the above embodiments, the embodiment of the present invention optimizes and improves the acquisition operation of the target mask image.
[0079] Furthermore, "obtaining a target mask image that matches the label to be identified" is refined into "obtaining label style information of the label to be identified, and image identification information of at least one candidate mask image; determining the candidate mask image that matches the image identification information with the label style information as the target mask image" to improve the operation of obtaining the target mask image.
[0080] It should be noted that, for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions in the aforementioned embodiments.
[0081] See also Figure 3A The method for identifying the counterfeit label shown includes:
[0082] S301: Obtain label style information of a label to be identified and image identification information of at least one candidate mask image.
[0083] In this embodiment, the candidate mask image may be a mask image corresponding to each label. Label style information may be used to uniquely identify the style of the label; wherein the style may refer to the outline, size, and structural layout of the label. Image identification information may be used to uniquely identify the candidate mask image. Specifically, a certain algorithm is used to obtain the label style information of the label to be identified.
[0084] Optionally, obtaining label style information of the label to be identified includes: sending QR code image prompt information to the user to prompt the user to capture the QR code image in the label to be identified; and determining the label style information of the label to be identified based on the captured QR code image.
[0085] The QR code image prompt information may be prompt information for prompting the user to take a picture of the QR code in the tag, and the present invention does not limit the type of prompt information. Specifically, a certain algorithm is used to determine the label style information of the tag to be identified based on the taken QR code image.
[0086] It can be understood that by adopting the above technical solution, by sending QR code image prompt information to the user and quickly determining the label style information of the label to be identified based on the captured QR code image, it is possible to avoid the user manually selecting or inputting label style information, thereby improving the efficiency of determining label style information.
[0087] Optionally, the label style information of the label to be identified is determined based on the captured QR code image, including: parsing the QR code in the captured QR code image to obtain a parsing result and an information type of the parsing result; if the information type is a style information type, determining the parsing result as label style information; if the information type is a product information type, querying the label style information that matches the parsing result; and determining the queried label style information as the label style information of the label to be identified.
[0088] Among them, the information type may include but is not limited to style information type and product information type; among them, the style information type may refer to the type of label style information whose parsing result is; the product information type may refer to the type of product information whose parsing result is; the product information may include but is not limited to product batch information and product category information, etc.
[0089] In an optional embodiment, the information type also includes a code value type, that is, the parsing result of the QR code image is a QR code value, then the label style information matching the QR code value is queried, and the queried label style information is determined as the label style information of the label to be identified.
[0090] It can be understood that, by adopting the above technical solution, the QR code can be parsed, and the label style information can be determined according to the type of the parsing result, thereby improving the efficiency of determining the label style information.
[0091] S302: Determine the candidate mask image whose image identification information matches the label style information as the target mask image.
[0092] In this embodiment, there is a corresponding relationship between the image identification information and the candidate style information; the candidate style information may be the style information of the label. Specifically, the candidate mask image whose corresponding candidate style information is the same as the label style is determined as the target mask image.
[0093] S303, obtaining parameter information of the target mask image; the parameter information includes the correspondence between candidate device identification information, candidate display parameter information and candidate camera parameter information.
[0094] S304: In the parameter information, search for target display parameter information and target camera parameter information that match the camera device identification information.
[0095] S305: Display the target mask image on the display screen according to the target display parameter information.
[0096] S306, photographing the label to be identified according to the target camera parameter information, and displaying the photographed label image on the display screen, and prompting the user to move the camera device so that the target mask image displayed on the display screen overlaps with the photographed label image.
[0097] S307, when the target mask image overlaps with the captured target label image, the label to be identified is identified forged according to the microscopic coding area in the target label image to obtain an identification result of the label to be identified.
[0098] In an optional embodiment, the target mask image and the target mask image parameter information are stored on the server side; the identification device equipped with the counterfeit label identification method of the embodiment of the present invention can send the label style information and the camera device identification information to the server side; the server side determines the target mask image, the target display parameter information, the target camera parameter information and the target micro-coding area distribution information according to the label style information and the camera device label information, and feeds back the target mask image, the target parameter information, the target camera parameter information and the target micro-coding area distribution information to the identification device; the identification device displays the target mask image on the display screen according to the target display parameter information; according to the target camera parameter information, the label to be identified is photographed, and the photographed label image is displayed on the display screen, and the user is prompted to move the camera device so that the target mask image displayed on the display screen coincides with the photographed label image; when the target mask image coincides with the photographed target label image, the micro-coding area in the target label image is determined according to the target micro-coding area distribution information, and the label to be identified is subjected to counterfeit identification to obtain the identification result of the label to be identified.
[0099] Optional, Figure 3B is a schematic diagram of a label. Figure 3B As shown, the label is in the shape of a rectangle; the area on the right side of the label marked by a vertical line “|” is the QR code area, and the area on the left side of the label marked by an upper diagonal line “ / ” is the micro coding area; the micro coding area includes a large number of micro coding points; the area on the left side of the label marked by a lower diagonal line “\” is the product icon area.
[0100] Optional, Figure 3C It is a schematic diagram of a mask image displayed in the mobile phone interface. Figure 3C As shown, the gray area is the mask image displayed in the mobile phone display interface, the product icon area is displayed on the left side of the mask image, and the QR code area is displayed on the right side. The mobile phone display interface can display a first layer and a second layer; the first layer is displayed above the second layer; the first layer can be used to display the mask image; the second layer can be used to display the image captured by the camera device; the mask image can have a certain degree of transparency, which is convenient for the user to move the camera device so that the target mask image displayed on the first layer and the captured label image displayed on the second layer overlap.
[0101] The product icon area is as follows: Figure 3C The position in the mask image shown is consistent with the product icon area in Figure 3B The QR code area is in the same position as shown in the label. Figure 3C The position in the mask image shown is consistent with the QR code area in Figure 3BThe positions in the labels shown are the same, so that the user can align the mask image with the photographed label image according to the outline of the mask image displayed in the mobile phone display interface, the product icon area and the QR code area in the mask image, so that the mask image overlaps with the photographed label image.
[0102] Optional, Figure 3D is a schematic diagram of another type of label. Figure 3D As shown, the label is circular in shape; the area marked by the vertical line "|" in the label is the QR code area, the area marked by the upper diagonal line " / " in the label is the micro coding area; the micro coding area includes a large number of micro coding points; the area marked by the lower diagonal line "\" in the label is the product icon area. The product image area and the QR code area are inside the micro coding area; the product image area is above the QR code area.
[0103] Optional, Figure 3E is another schematic diagram of a mask image displayed in a mobile phone interface. Figure 3E As shown, the gray area is the mask image displayed in the mobile phone display interface. The mask image includes a product icon area and a QR code area. The product icon area is located above the QR code area.
[0104] The product icon area is as follows: Figure 3E The position in the mask image shown is consistent with the product icon area in Figure 3D The QR code area is in the same position as shown in the label. Figure 3E The position in the mask image shown is consistent with the QR code area in Figure 3D The positions in the labels shown are the same, so that the user can align the mask image with the photographed label image according to the outline of the mask image displayed in the mobile phone display interface, the product icon area and the QR code area in the mask image, so that the mask image overlaps with the photographed label image.
[0105] Optional, Figure 3F This is another schematic diagram of a label. Figure 3F As shown, the label is rectangular in shape; the area marked by the vertical line "|" in the label is the QR code area, the area marked by the upper diagonal line " / " in the label is the micro coding area; the micro coding area includes a large number of micro coding points; the area marked by the lower diagonal line "\" in the label is the product icon area. The product image area and the QR code area are inside the micro coding area; the product image area is above the QR code area.
[0106] Optional, Figure 3G is another schematic diagram of a mask image displayed in a mobile phone interface. Figure 3GAs shown, the gray area is the mask image displayed in the mobile phone display interface. The mask image includes a product icon area and a QR code area. The product icon area is located above the QR code area.
[0107] The product icon area is as follows: Figure 3G The position in the mask image shown is consistent with the product icon area in Figure 3F The QR code area is in the same position as shown in the label. Figure 3G The position in the mask image shown is consistent with the QR code area in Figure 3F The positions in the labels shown are the same, so that the user can align the mask image with the photographed label image according to the outline of the mask image displayed in the mobile phone display interface, the product icon area and the QR code area in the mask image, so that the mask image overlaps with the photographed label image.
[0108] The embodiment of the present invention obtains label style information of a label to be identified and image identification information of at least one candidate mask image; and determines the candidate mask image that matches the image identification information with the label style information as the target mask image, thereby obtaining a target mask image that matches the contour shape of the label to be identified, thereby improving the accuracy of the target mask image and the overlap effect between the target mask image and the target label image.
[0109] Embodiment 4
[0110] Figure 4 This is a schematic diagram of the structure of a label authentication device provided in Embodiment 4 of the present invention. This embodiment is applicable to the case of authenticating labels, the device can execute the label authentication method, the label authentication device can be implemented in the form of hardware and / or software, and the device can be configured in an electronic device.
[0111] See also Figure 4 The label authentication device shown in the figure includes an information acquisition module 401, an information query module 402, an image display module 403, a label shooting module 404 and a counterfeit identification module 405, wherein:
[0112] The information acquisition module 401 is used to acquire a target mask image that matches the tag to be identified, and parameter information of the target mask image; the parameter information includes a correspondence between candidate device identification information, candidate display parameter information, and candidate camera parameter information;
[0113] An information query module 402 is used to query the target display parameter information and the target camera parameter information matching the camera device identification information in the parameter information;
[0114] An image display module 403 is used to display a target mask image on a display screen according to target display parameter information;
[0115] The tag shooting module 404 is used to shoot the tag to be identified according to the target camera parameter information, and display the captured tag image on the display screen, and prompt the user to move the camera device so that the target mask image displayed on the display screen overlaps with the captured tag image;
[0116] The forgery identification module 405 is used to perform forgery identification on the tag to be identified according to the microscopic coding area in the target tag image when the target mask image coincides with the captured target tag image, and obtain an identification result of the tag to be identified.
[0117] The technical solution of the embodiment of the present invention obtains parameter information of the target mask image; in the parameter information of the mask image, determines the targeted display parameter information of the mask image on the camera device, and the targeted camera parameters of the camera device for the label image, thereby displaying the mask image and photographing the label image. Compared with the technical solution of selecting the mask image and the camera magnification factor respectively in the prior art, the technical solution can ensure that the outline size of the displayed target mask image and the photographed target label image is the same, improve the overlap effect between the target mask image and the target label image, so as to completely, clearly and quickly identify the counterfeit of the label according to the microscopic coding area in the label image, thereby improving the efficiency and accuracy of counterfeit identification.
[0118] Optionally, the parameter information includes at least one candidate information configuration table; the candidate information configuration table includes candidate device identification information, candidate display parameter information and candidate camera parameter information; the candidate device identification information in each candidate information configuration table is different;
[0119] The information query module 402 includes:
[0120] A configuration table query unit, used to query a target information configuration table that matches the camera device identification information according to the candidate device identification information in each candidate information configuration table;
[0121] A first information determination unit, configured to determine the candidate display parameter information in the target information configuration table as the target display parameter information;
[0122] The second information determining unit is used to determine the candidate camera parameter information in the target information configuration table as the target camera parameter information.
[0123] The information acquisition module 401 includes:
[0124] An information acquisition unit, used to acquire label style information of a label to be identified and image identification information of at least one candidate mask image;
[0125] The image determination unit is used to determine the candidate mask image whose image identification information matches the label style information as the target mask image.
[0126] The information acquisition unit includes:
[0127] An information sending subunit is used to send a QR code image prompt information to the user to prompt the user to take a picture of the QR code image in the tag to be identified;
[0128] The information determination unit is used to determine the label style information of the label to be identified according to the captured two-dimensional code image.
[0129] The information determination subunit is specifically used for:
[0130] Parse the QR code in the captured QR code image to obtain a parsing result and information type of the parsing result;
[0131] If the information type is a style information type, the parsing result is determined as label style information;
[0132] If the information type is a product information type, query the label style information that matches the parsing result;
[0133] The queried label style information is determined as the label style information of the label to be identified.
[0134] Optionally, the parameter information further includes a correspondence between candidate microscopic coding region distribution information and candidate display parameter information;
[0135] The device further comprises:
[0136] A distribution information query module, used to query target microscopic coding area distribution information associated with target display parameter information;
[0137] The region determination module is used to determine the microscopic coding region in the target label image according to the target microscopic coding region distribution information.
[0138] Optionally, the target display parameter information is display ratio information;
[0139] The image display module 403 includes:
[0140] A display ratio adjustment unit, used to adjust the display ratio of the target mask image according to the display ratio information;
[0141] The image display unit is used to display the target mask image on the display screen according to the display ratio.
[0142] The label authentication device provided in the embodiment of the present invention can execute the label authentication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the label authentication method.
[0143] Embodiment 5
[0144] Figure 5 A schematic diagram of the structure of an electronic device 500 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0145] like Figure 5 As shown, the electronic device 500 includes at least one processor 501, and a memory connected to the at least one processor 501 in communication, such as a read-only memory (ROM) 502, a random access memory (RAM) 503, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 501 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 502 or the computer program loaded from the storage unit 508 to the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0146] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0147] The processor 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 501 executes the various methods and processes described above, such as a method for detecting counterfeit tags.
[0148] In some embodiments, the method for authenticating a label may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the processor 501, one or more steps of the method for authenticating a label described above may be performed. Alternatively, in other embodiments, the processor 501 may be configured to execute the method for authenticating a label in any other appropriate manner (e.g., by means of firmware).
[0149] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0150] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable label authentication device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed completely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or completely on a remote machine or server.
[0151] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0152] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0153] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0154] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.
[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0156] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A label authentication method, characterized in that: The method comprises: Acquire a target mask image matching the tag to be identified, and parameter information of the target mask image; the parameter information includes at least one candidate information configuration table; the candidate information configuration table includes a correspondence between candidate device identification information, candidate display parameter information, and candidate camera parameter information; the candidate device identification information in each of the candidate information configuration tables is different; According to the candidate device identification information in each of the candidate information configuration tables, querying a target information configuration table that matches the camera device identification information; Determine the candidate display parameter information in the target information configuration table as the target display parameter information; Determine the candidate camera parameter information in the target information configuration table as the target camera parameter information; Displaying the target mask image on a display screen according to the target display parameter information; According to the target camera parameter information, photograph the label to be identified, display the photographed label image on the display screen, and prompt the user to move the camera device so that the target mask image displayed on the display screen overlaps with the photographed label image; When the target mask image coincides with the captured target label image, the label to be identified is identified forged according to the microscopic coding area in the target label image to obtain an identification result of the label to be identified; Wherein, the camera device identification information is the identification information of the camera device; The step of obtaining a target mask image that matches the label to be identified includes: Acquire label style information of the label to be identified and image identification information of at least one candidate mask image; the label style information is used to uniquely identify the style of the label; wherein the style includes the outline, size and structural layout of the label; The candidate mask image whose image identification information matches the label style information is determined as the target mask image.
2. The method according to claim 1, characterized in that The step of obtaining the label style information of the label to be identified includes: Sending a QR code image prompt message to the user to prompt the user to take a photo of the QR code image in the tag to be identified; The label style information of the label to be identified is determined according to the captured two-dimensional code image.
3. The method according to claim 2, characterized in that The step of determining the label style information of the label to be identified according to the captured two-dimensional code image includes: Parsing the QR code in the captured QR code image to obtain a parsing result and information type of the parsing result; If the information type is a style information type, determining the parsing result as tag style information; If the information type is a product information type, querying the label style information matching the parsing result; The queried label style information is determined as the label style information of the label to be identified.
4. The method according to claim 1, characterized in that The parameter information also includes a correspondence between candidate microscopic coding region distribution information and candidate display parameter information; After querying the target display parameter information and the target camera parameter information matching the camera device identification information, the following further includes: Querying target microscopic coding area distribution information associated with the target display parameter information; Before performing forgery identification on the tag to be identified based on the microscopic coding area in the target tag image to obtain the identification result of the tag to be identified, the method further includes: According to the target microscopic coding area distribution information, the microscopic coding area in the target label image is determined.
5. The method according to claim 1, characterized in that The target display parameter information is display ratio information; The step of displaying the target mask image on a display screen according to the target display parameter information comprises: According to the display ratio information, adjusting the display ratio of the target mask image; The target mask image is displayed on a display screen according to the display ratio.
6. A label authentication device, characterized in that: The device comprises: An information acquisition module, used to acquire a target mask image matching the tag to be identified, and parameter information of the target mask image; the parameter information includes at least one candidate information configuration table; the candidate information configuration table includes a correspondence between candidate device identification information, candidate display parameter information and candidate camera parameter information; the candidate device identification information in each candidate information configuration table is different; An information query module, used to query the target display parameter information and the target camera parameter information matching the camera device identification information in the parameter information; An image display module, used for displaying the target mask image on a display screen according to the target display parameter information; A label shooting module, used for shooting the label to be identified according to the target camera parameter information, and displaying the captured label image on the display screen, and prompting the user to move the camera device so that the target mask image displayed on the display screen overlaps with the captured label image; a forgery identification module, used for, when the target mask image coincides with the photographed target label image, performing forgery identification on the label to be identified according to the microscopic coding area in the target label image, and obtaining an identification result of the label to be identified; Wherein, the camera device identification information is the identification information of the camera device; Wherein, the information query module includes: A configuration table query unit, used to query a target information configuration table that matches the camera device identification information according to the candidate device identification information in each candidate information configuration table; A first information determining unit, configured to determine candidate display parameter information in the target information configuration table as target display parameter information; A second information determination unit, configured to determine candidate camera parameter information in the target information configuration table as target camera parameter information; Wherein, the information acquisition module is used to: An information acquisition unit, used to acquire label style information of a label to be identified and image identification information of at least one candidate mask image; the label style information is used to uniquely identify the style of the label; wherein the style includes the outline, size and structural layout of the label; The image determination unit is used to determine the candidate mask image whose image identification information matches the label style information as the target mask image.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the label authentication method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the label authentication method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Picture shooting method and mobile terminal
CN105827987A
Microcosmic coding image recognition method and device, code scanning equipment and storage medium
CN117077705A