Method, device and equipment for generating explicit identifier
Patent Information
- Authority / Receiving Office
- HK · HK
- Patent Type
- Applications
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-17
AI Technical Summary
In existing technologies, the explicit identifiers of AI-generated content are easily tampered with, making it difficult to effectively prevent malicious replacement, and they cannot reliably bind content and source information.
By decoding the RGBA four-channel matrix data of the explicit label image, size conformity detection is performed to determine the edge image, and watermark information is embedded in the edge image to generate the target explicit label image.
The generated explicit identifier image can effectively resist tampering, prevent malicious replacement, and ensure a reliable binding between content and source information.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
(19) State Intellectual Property Office (12) Invention Patent Application (10) Application Publication Number (43) Application Publication Date (21) Application Number 202511377564.1 (22) Application Date 2025.09.24 (71) Applicant Alibaba (China) Co., Ltd. Address 310052, Room 508, 5th Floor, Building 4, No. 699, Wangshang Road, Changhe Street, Binjiang District, Hangzhou City, Zhejiang Province (72) Inventors Yin Xiaolin, Xi Zuping, Fan Hangyu, Yang Rui (74) Patent Agency Beijing Ruipai Intellectual Property Agency Co., Ltd. 11597 Patent Attorney Liu Feng, Yang Chunxiao (51) Int.Cl. G06T 1 / 00 (2006.01) G06T 7 / 13 (2017.01) G06T 7 / 90 (2017.01) G06T 5 / 30 (2006.01) (54) Invention Title: A Method, Apparatus, and Device for Generating Explicit Labels (57) Abstract: This invention discloses a method, apparatus, and device for generating explicit labels. In this embodiment, an explicit label image is acquired; the explicit label image is decoded to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array; size compliance detection is performed based on the vertical and horizontal pixel counts of the explicit label image; in response to the explicit label image passing the size compliance detection, an edge image is determined based on the explicit label image; watermark information is embedded in the edge image to generate a target explicit label image. Through the above method, a target explicit label image that effectively resists tampering, prevents malicious replacement, and reliably binds content and source information can be generated. Claims 3 pages, Description 14 pages, Drawings 8 pages, CN 121258763 A 2026.01.02 CN 1 21 25 87 63 A 1. A method for generating an explicit identifier, characterized in that the method comprises: acquiring an explicit identifier image; decoding the explicit identifier image to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the first dimension of the three-dimensional array is the vertical pixel count of the explicit identifier image, the second dimension is the horizontal pixel count of the explicit identifier image, and the third dimension is the number of channels; performing size compliance detection based on the vertical pixel count and horizontal pixel count of the explicit identifier image; in response to the explicit identifier image passing the size compliance detection, determining an edge image based on the explicit identifier image; embedding watermark information into the edge image to generate a target explicit identifier image. 2. The method according to claim 1, characterized in that the method further comprises: pasting the target explicit identifier image into a candidate image to generate a target image.3. The method according to claim 1, wherein determining the edge image based on the explicit identifier image specifically includes: determining the edge image in the explicit identifier image according to an edge detection algorithm; or, determining the edge image in the explicit identifier image according to an edge dilation method specifically includes: performing transparency conversion on the explicit identifier image to generate a transparency conversion image; performing neighborhood dilation on the transparency conversion image to generate a dilated image; generating an edge image based on the dilated image and the transparency conversion image. 4. The method according to claim 3, wherein performing neighborhood dilation on the transparency conversion image to generate a dilated image specifically includes: determining the identifier in the transparency conversion image; performing neighborhood dilation on the edge region of the identifier to determine the pixel neighborhood region generated by the dilation; obtaining multiple target pixels with transparency of 0 within the pixel neighborhood region; for each target pixel, setting the RGB pixel value of the target pixel to the RGB pixel value of its corresponding neighborhood dilation center point, setting the transparency to 255, and generating the dilated image. 5. The method according to claim 3, wherein generating an edge image based on the dilated image and the transparency conversion image specifically includes: calculating the absolute difference between the dilated image and the transparency conversion image to generate an edge image. 6. The method according to claim 1, wherein the method further includes: obtaining initial watermark information; and encrypting and obfuscating the initial watermark information to generate watermark information. 7. The method according to claim 1, wherein embedding the watermark information into the edge image to generate a target explicit identification image specifically includes: obtaining multiple pixels in the edge image whose total pixels are not equal to 0, and determining multiple coordinate positions corresponding to the multiple pixels respectively; embedding the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a pre-set embedding rule to generate a target explicit identification image; or, obtaining multiple pixels in the edge image whose total transparency is not equal to 0, and determining multiple coordinate positions corresponding to the multiple pixels respectively; embedding the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a pre-set embedding rule to generate a target explicit identification image. 8. A method for extracting explicit identifiers, characterized in that the method comprises: acquiring a target image; extracting a target explicit identifier image from the target image using a set method, wherein the target explicit identifier image is generated as described in any one of claims 1-7, and the set method includes template matching or feature point matching; and performing size normalization processing on the target explicit identifier image to generate a target explicit identifier image of standard size;9. The method according to claim 8, wherein the method further comprises: sequentially performing bit-by-bit voting, deobfuscation, and decryption on the watermark information to generate initial watermark information. 10. The method according to claim 8, characterized in that, determining the watermark information position in the target explicit label image of the standard size and extracting watermark information according to the watermark information position specifically includes: generating a target edge image in the target explicit label image of the standard size according to an edge detection algorithm; determining multiple target pixels in the target edge image whose pixel value is not equal to 0, and determining multiple target coordinate positions corresponding to the multiple target pixels; extracting the watermark information from the multiple target pixels corresponding to the multiple target coordinate positions according to a preset watermark extraction rule; or, obtaining an explicit label image, wherein the explicit label image does not embed watermark information; determining the target edge image in the explicit label image according to an edge dilation method or the edge detection algorithm; determining multiple pixels in the target edge image whose transparency or pixel value is not equal to 0, and determining the coordinate positions of the multiple pixels; determining target pixels at the same coordinate positions in the target explicit label image of the standard size according to the coordinate positions; and extracting the watermark information from the multiple target pixels according to a preset watermark extraction rule. 11. An apparatus for generating an explicit identifier, characterized in that the apparatus comprises: a first acquisition unit for acquiring an explicit identifier image; a decoding unit for decoding the explicit identifier image to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the first dimension of the three-dimensional array is the number of vertical pixels of the explicit identifier image, the second dimension is the number of horizontal pixels of the explicit identifier image, and the third dimension is the number of channels; a detection unit for performing size compliance detection based on the number of vertical pixels and the number of horizontal pixels of the explicit identifier image; a first generation unit for determining an edge image based on the explicit identifier image in response to the explicit identifier image passing the size compliance detection; the first generation unit is further configured to embed watermark information into the edge image to generate a target explicit identifier image. 12. An apparatus for extracting explicit identifiers, characterized in that the apparatus comprises: a second acquisition unit, configured to acquire a target image; and an extraction unit, configured to extract a target explicit identifier image from the target image using a set method, wherein the target explicit identifier image is generated according to any one of claims 1-7, and the set method includes template matching or feature point matching;A processing unit is used to perform size normalization processing on the target explicit identification image to generate a target explicit identification image of standard size; a determining unit is used to determine the position of watermark information in the target explicit identification image of standard size, and extract watermark information according to the position of watermark information. 13. An electronic device, comprising a memory and a processor, characterized in that the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-10. 14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method as described in any one of claims 1-10. Claims 3 / 3 Page 4 CN 121258763 A Method, apparatus and device for generating explicit identification Technical Field
[0001] The present invention relates to the field of artificial intelligence, and more specifically, to a method, apparatus and device for generating explicit identification. Background Technology
[0002] With the rapid development of Artificial Intelligence Generated Content (AIGC) technology, generated content in fields such as images, videos, and text is becoming increasingly popular. However, AIGC technology also brings serious challenges, such as the spread of false information, identity theft, and evidence forgery, which pose a serious threat to social governance and judicial recognition. In order to deal with this risk, the "Management Measures for the Identification of Artificial Intelligence Generated Content" were formulated, which clearly requires service providers to adopt a dual-track identification system that combines explicit identification and implicit identification in order to achieve the traceability and management of AIGC content, remind users to identify false information through identification, and clarify the identification responsibilities and obligations of relevant service entities.
[0003] In the prior art, taking images as an example, the current mainstream explicit identification technology has significant security risks; explicit identification is easy to be tampered with and removed, for example, erased, covered, or replaced by common image editing tools; in addition, explicit identification is easy to be maliciously replaced. After removing the original identification, attackers can implant forged identification information and frame other users or platforms with illegal generated content.
[0004] In summary, how to generate an explicit identifier that effectively resists tampering, prevents malicious replacement, and reliably binds content and source information is a problem that needs to be solved. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method, apparatus, and device for generating an explicit identifier, which can generate a target explicit identifier image that effectively resists tampering, prevents malicious replacement, and reliably binds content and source information.
[0006] In a first aspect, embodiments of the present invention provide a method for generating an explicit identifier, the method comprising: acquiring an explicit identifier...The explicit label image is decoded to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the first dimension of the three-dimensional array is the vertical pixel count of the explicit label image, the second dimension is the horizontal pixel count of the explicit label image, and the third dimension is the number of channels; size compliance detection is performed based on the vertical and horizontal pixel counts of the explicit label image; in response to the explicit label image passing the size compliance detection, an edge image is determined based on the explicit label image; watermark information is embedded in the edge image to generate a target explicit label image.
[0007] Optionally, the method further includes: pasting the target explicit label image into a candidate image to generate a target image.
[0008] Optionally, determining the edge image based on the explicit label image specifically includes: determining the edge image in the explicit label image according to an edge detection algorithm; or, determining the edge image in the explicit label image according to an edge dilation method specifically includes: performing a transparency conversion on the explicit label image to generate a transparency conversion image; performing neighborhood dilation on the transparency conversion image to generate a dilated image; and generating an edge image based on the dilated image and the transparency conversion image.
[0009] Optionally, the step of performing size compliance detection based on the number of vertical pixels and the number of horizontal pixels of the explicit label image specifically includes: obtaining a minimum embedding size threshold and a maximum embedding size threshold, wherein the minimum embedding size threshold includes a minimum number of vertical pixels and a minimum number of horizontal pixels, and the maximum embedding size threshold includes a maximum number of vertical pixels and a maximum number of horizontal pixels; comparing the number of vertical pixels and the number of horizontal pixels of the explicit label image with the minimum embedding size threshold and the maximum embedding size threshold to perform size compliance detection, wherein if the number of vertical pixels of the explicit label image is greater than or equal to the minimum number of vertical pixels and less than or equal to the maximum number of vertical pixels, and the number of horizontal pixels of the explicit label image is greater than or equal to the minimum number of horizontal pixels and less than or equal to the maximum number of horizontal pixels, then the size compliance detection is passed.
[0010] Optionally, the step of performing neighborhood dilation on the transparency conversion image to generate a dilated image specifically includes: determining an identifier in the transparency conversion image; performing neighborhood dilation on the edge region of the identifier to determine the pixel neighborhood region generated by the dilation; obtaining multiple target pixels with a transparency of 0 within the pixel neighborhood region; and for each target pixel, setting the RGB pixel value of the target pixel to the RGB pixel value of its corresponding neighborhood dilation center point, setting the transparency to 255, and generating the dilated image.
[0011] Optionally, generating an edge image based on the dilated image and the transparency conversion image specifically includes: calculating the absolute difference between the dilated image and the transparency conversion image to generate an edge image.
[0012] Optionally, the method further includes: obtaining initial watermark information; encrypting and obfuscating the initial watermark information to generate watermark information.
[0013] Optionally, embedding the watermark information into the edge image to generate a target explicit identification image specifically includes: obtaining multiple pixels in the edge image where all pixels are not equal to 0, determining multiple coordinate positions corresponding to the multiple pixels; embedding the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a pre-set embedding rule to generate a target explicit identification image; or, obtaining multiple pixels in the edge image where all transparency is not equal to 0, determining multiple coordinate positions corresponding to the multiple pixels; embedding the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a pre-set embedding rule to generate a target explicit identification image.
[0014] In a second aspect, embodiments of the present invention provide a method for extracting explicit identifiers, the method comprising: acquiring a target image; extracting a target explicit identifier image from the target image using a set method, wherein the target explicit identifier image is generated as described in the first aspect or any possible method described in the first aspect, and the set method includes template matching or feature point matching; performing size normalization processing on the target explicit identifier image to generate a target explicit identifier image of standard size; determining the position of watermark information in the target explicit identifier image of standard size, and extracting watermark information based on the position of watermark information.
[0015] Optionally, the method further comprises: sequentially performing a bitstream bit-by-bit voting mechanism, deobfuscation, and decryption on the watermark information to generate initial watermark information.
[0016] Optionally, determining the watermark information position in the target explicit identification image of the standard size and extracting the watermark information based on the watermark information position specifically includes: generating a target edge image in the target explicit identification image of the standard size according to an edge detection algorithm; determining multiple target pixels in the target edge image whose pixels are not equal to 0, and determining multiple target coordinate positions corresponding to the multiple target pixels; extracting the watermark information from the multiple target pixels corresponding to the multiple target coordinate positions according to a pre-set watermark extraction rule; or, obtaining an explicit identification image, wherein the explicit identification image does not embed watermark information; determining the target edge image in the explicit identification image according to an edge dilation method or the edge detection algorithm; determining multiple pixels in the target edge image whose transparency or pixels are not equal to 0, and determining the coordinate positions of the multiple pixels; determining the target edge image based on the coordinate positions; and determining the target edge image based on the target edge image.A. Target pixels at the same coordinate positions in the target explicit identifier image; extract the watermark information from the plurality of target pixels according to a pre-set watermark extraction rule.
[0017] In a third aspect, embodiments of the present invention provide an apparatus for generating explicit identifiers, the apparatus comprising: a first acquisition unit, configured to acquire an explicit identifier image; a decoding unit, configured to decode the explicit identifier image to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the dimension of the first dimension array is the vertical pixel count of the explicit identifier image, the dimension of the second dimension array is the horizontal pixel count of the explicit identifier image, and the dimension of the third dimension array is the number of channels; a detection unit, configured to perform size compliance detection based on the vertical pixel count and the horizontal pixel count of the explicit identifier image; a first generation unit, configured to determine an edge image based on the explicit identifier image in response to the explicit identifier image passing the size compliance detection; the first generation unit is further configured to embed watermark information into the edge image to generate a target explicit identifier image.
[0018] Optionally, the first generation unit is further configured to: paste the target explicit label image into the candidate image to generate a target image.
[0019] Optionally, the first generation unit is specifically configured to: determine an edge image in the explicit label image according to an edge detection algorithm; or, determine an edge image in the explicit label image according to an edge dilation method, specifically including: performing transparency conversion on the explicit label image to generate a transparency conversion image; performing neighborhood dilation on the transparency conversion image to generate a dilated image; and generating an edge image based on the dilated image and the transparency conversion image.
[0020] Optionally, the detection unit is specifically used to: obtain a minimum embedding size threshold and a maximum embedding size threshold, wherein the minimum embedding size threshold includes a minimum number of vertical pixels and a minimum number of horizontal pixels, and the maximum embedding size threshold includes a maximum number of vertical pixels and a maximum number of horizontal pixels; compare the number of vertical pixels and the number of horizontal pixels of the explicit label image with the minimum embedding size threshold and the maximum embedding size threshold to perform size compliance detection, wherein the number of vertical pixels of the explicit label image is greater than or equal to the minimum number of vertical pixels and less than or equal to the maximum number of vertical pixels, and the number of horizontal pixels of the explicit label image is greater than or equal to the minimum number of horizontal pixels and less than or equal to the maximum number of horizontal pixels, then the size compliance detection is passed.
[0021] Optionally, the first generation unit is specifically used to: determine the label in the transparency conversion image; perform neighborhood dilation on the edge region of the label to determine the pixel neighborhood region generated by the dilation; obtain multiple target pixels with transparency of 0 in the pixel neighborhood region; for each target pixel, calculate the RGB pixel value of the target pixel.The RGB pixel value of the corresponding neighborhood dilation center point is set, and the transparency is set to 255 to generate the dilated image.
[0022] Optionally, the first generation unit is specifically used to: calculate the absolute difference between the dilated image and the transparency conversion image to generate an edge image.
[0023] Optionally, the first acquisition unit is further used to: acquire initial watermark information; the first generation unit is further used to: encrypt and obfuscate the initial watermark information to generate watermark information.
[0024] Optionally, the first generation unit is specifically used to: acquire multiple pixels in the edge image where all pixels are not equal to 0, determine multiple coordinate positions corresponding to the multiple pixels respectively; embed the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a preset embedding rule to generate a target explicit identification image; or, acquire multiple pixels in the edge image where all transparency is not equal to 0, determine multiple coordinate positions corresponding to the multiple pixels respectively; embed the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a preset embedding rule to generate a target explicit identification image.
[0025] In a fourth aspect, embodiments of the present invention provide an apparatus for extracting explicit identifiers, the apparatus comprising: a second acquisition unit for acquiring a target image; an extraction unit for extracting a target explicit identifier image from the target image using a set method, wherein the target explicit identifier image is generated as described in the first aspect or any possible method described in the first aspect, and the set method includes template matching or feature point matching; a processing unit for performing size normalization processing on the target explicit identifier image to generate a target explicit identifier image of standard size; and a determining unit for determining the position of watermark information in the target explicit identifier image of standard size, and extracting watermark information based on the position of the watermark information.
[0026] Optionally, the apparatus further comprises: a second generation unit for sequentially performing bit-by-bit voting mechanism, deobfuscation, and decryption on the watermark information to generate initial watermark information.
[0027] Optionally, the determining unit is specifically used for: generating a target edge image in the standard-sized target explicit label image according to an edge detection algorithm; determining multiple target pixels in the target edge image whose pixels are not equal to 0, and determining multiple target coordinate positions corresponding to the multiple target pixels; extracting the watermark information from the multiple target pixels corresponding to the multiple target coordinate positions according to a pre-set watermark extraction rule; or, obtaining an explicit label image, wherein the explicit label image does not embed watermark information; determining the target edge image in the explicit label image according to an edge dilation method or the edge detection algorithm.The target edge image is marked; multiple pixels in the target edge image with transparency or pixel count not equal to 0 are determined, and the coordinate positions of the multiple pixels are determined; target pixels at the same coordinate positions in the target explicit identification image of the standard size are determined according to the coordinate positions; the watermark information is extracted from the multiple target pixels according to a pre-set watermark extraction rule.
[0028] In a fifth aspect, embodiments of the present invention provide an electronic device, including a memory and a processor, the memory being used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in the first aspect, any one of the first aspect, the second aspect, or any one of the second aspect.
[0029] In a sixth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer program instructions thereon, the computer program instructions implementing the method as described in the first aspect, any one of the first aspect, the second aspect, or any one of the second aspect when executed by a processor.
[0030] In this embodiment of the invention, an explicit identifier image is acquired; the explicit identifier image is decoded to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the first dimension of the three-dimensional array is the vertical pixel count of the explicit identifier image, the second dimension is the horizontal pixel count of the explicit identifier image, and the third dimension is the number of channels; size compliance detection is performed based on the vertical and horizontal pixel counts of the explicit identifier image; in response to the explicit identifier image passing the size compliance detection, an edge image is determined based on the explicit identifier image; and watermark information is embedded in the edge image. Through the above method, watermark information is embedded into the edge image to generate a target explicit identifier image that effectively resists tampering, prevents malicious replacement, and reliably binds content and source information.
[0031] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the present invention with reference to the accompanying drawings, in which: FIG1 is a flowchart of a method for generating an explicit identifier according to an embodiment of the present invention; FIG2 is a flowchart of another method for generating an explicit identifier according to an embodiment of the present invention; FIG3 is a flowchart of yet another method for generating an explicit identifier according to an embodiment of the present invention; FIG4 is a flowchart of a method for extracting an explicit identifier according to an embodiment of the present invention; FIG5 is a flowchart of another method for extracting an explicit identifier according to an embodiment of the present invention; FIG6 is a schematic diagram of an apparatus for generating an explicit identifier according to an embodiment of the present invention; FIG7 is a schematic diagram of an apparatus for extracting an explicit identifier according to an embodiment of the present invention; FIG8 is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Description
[0032] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0033] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
[0034] Unless the context explicitly requires it, the words "comprising," "including," and similar terms throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to."
[0035] In the description of the present application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of the present application, unless otherwise stated, "a plurality of" means two or more.
[0036] In the prior art, Artificial Intelligence Generated Content (AIGC) technology is used to generate synthetic content. This synthetic content includes information such as images, audio, video, and virtual scenes. A synthetic content identifier is set within the generated synthetic content to indicate that a certain content is AI-generated synthetic content. This identifier includes information such as the generation service provider and content dissemination service provider, for example, user ID, platform information, and generation timestamp, which can also be called traceability information. The synthetic content identifier includes explicit identifiers and implicit identifiers. Explicit identifiers are added to the AI-generated synthetic content or interactive scene interface, presented in the form of text, sound, graphics, etc., and are clearly perceptible to the user. Taking the explicit identifier as an example, text, sound, graphics, etc., are used to represent the content. Explicit identifiers such as logos and signatures are directly overlaid on a specific area of an image (e.g., in the corners, center, or multiple areas). These identifiers have a certain degree of transparency, ensuring they are clearly visible while preventing obscuring the original image content. While these identifiers can alert users to false information, they lack traceability in the event of malicious incidents such as the spread of false information or illegal content, making it difficult to identify the responsible party. Furthermore, these identifiers are easily tampered with and removed, for example, by being erased, covered, or replaced using common image editing tools. Additionally, they are vulnerable to malicious replacement; attackers can remove the original identifier and implant counterfeit identifier information, falsely framing other users or platforms with illegally generated content. Therefore, how to generate an effective system that resists tampering, prevents malicious replacement, and allows for...The problem that needs to be solved is the explicit identification of binding content and source information. The source information includes information such as synthesis service provider and content dissemination service provider.
[0037] In this embodiment of the invention, in order to solve the above problem, a method for generating explicit identification is proposed, as shown in Figure 1. The method includes: Step S101: Obtaining an explicit identification image.
[0038] Specifically, the explicit identification image includes an identification and a background. For example, the identification is "User Cat" in KaiTi font, black in color, and the background is white; or, the identification is "A Platform" in SongTi font, white in color, and the background is black. This is only an example. The specific content and color of the identification and the background are determined according to the actual situation. This embodiment of the invention does not limit them.
[0039] Step S102: Decoding the explicit identification image to generate RGBA four-channel matrix data.
[0040] Specifically, in the RGBA, R represents red, G represents green, B represents blue, and A represents transparency (Alpha). The RGBA four-channel matrix data includes a three-dimensional array. The first dimension of the three-dimensional array is the vertical pixel count of the explicit label image, i.e., the height; the second dimension is the horizontal pixel count of the explicit label image, i.e., the width; and the third dimension is the number of channels, which is fixed at 4, corresponding to R, G, B, and A respectively. The pixel value range of each channel is usually 0~255, where 0 represents no color or complete transparency, and 255 represents the most intense color or complete opacity.
[0041] Step S103: Perform size compliance detection based on the vertical and horizontal pixel counts of the explicit label image.
[0042] In one possible implementation, the step of performing size compliance detection based on the vertical and horizontal pixel counts of the explicit label image specifically includes: obtaining a minimum embedding size threshold and a maximum embedding size threshold, wherein the minimum embedding size threshold includes a minimum vertical pixel count and a minimum horizontal pixel count, and the maximum embedding size threshold includes a maximum vertical pixel count and a maximum horizontal pixel count; comparing the vertical and horizontal pixel counts of the explicit label image with the minimum and maximum embedding size thresholds to perform size compliance detection, wherein if the vertical pixel count of the explicit label image is greater than or equal to the minimum vertical pixel count and less than or equal to the maximum vertical pixel count, and the horizontal pixel count of the explicit label image is greater than or equal to the minimum horizontal pixel count and less than or equal to the maximum horizontal pixel count, then the size compliance detection is passed.
[0043] For example, the minimum vertical pixel count is...The minimum number of horizontal pixels, the maximum number of vertical pixels, and the maximum number of horizontal pixels; if the number of vertical pixels and the number of horizontal pixels of the explicit label image satisfy ≤ ≤ and ≤ ≤, then the size compliance detection is passed; wherein, the specific values of the minimum number of vertical pixels, the minimum number of horizontal pixels, the maximum number of vertical pixels, and the maximum number of horizontal pixels are determined according to the actual situation.
[0044] Step S104: In response to the explicit label image passing the size compliance detection, the edge image is determined according to the explicit label image.
[0045] Specifically, the determination of the edge image according to the explicit label image includes two methods, as follows: Method 1: Determine the edge image in the explicit label image according to the edge detection algorithm, wherein the edge detection method can be the Canny method, the Sobel method, etc., and the embodiments of the present invention do not limit it, and the specific method is determined according to the actual situation.
[0046] Method 2: Determine the edge image in the explicit label image according to the edge dilation method, specifically including: performing transparency conversion on the explicit label image to generate a transparency conversion image; performing neighborhood dilation on the transparency conversion image to generate a dilated image; generating an edge image based on the dilated image and the transparency conversion image.
[0047] In one possible implementation, the edge image determined by the edge dilation method in the explicit label image can also be called an edge difference map.
[0048] In one possible implementation, perform transparency conversion on each pixel in the explicit label image. Assuming that the background of the explicit label image is white and the label of the explicit label image is colored, then set the transparency of the pixels in the white background to 0, and otherwise set it to 255, so that the background of the explicit label is converted to full transparency, and output the transparency conversion image. The specific value of the transparency setting is determined according to the actual situation.
[0049] In one possible implementation, the step of performing neighborhood dilation on the transparency conversion image to generate a dilated image specifically includes: determining an identifier in the transparency conversion image; performing neighborhood dilation on the edge region of the identifier to determine the pixel neighborhood region generated by the dilation; obtaining multiple target pixels with a transparency of 0 within the pixel neighborhood region; and for each target pixel, setting the RGB pixel value of the target pixel to the RGB pixel value of its corresponding neighborhood dilation center point, and setting the transparency to 255 to generate the dilated image.
[0050] For example, assuming the identifier in the transparency conversion image is "user kitten", neighborhood dilation is performed on the edge region of the "user kitten", for example, performing 3×3 neighborhood dilation, specifically taking any pixel in the edge region as the center.The center is a square area composed of 8 adjacent pixels; or, the entire area of the "user cat" is dilated; the pixel neighborhood area generated by the dilation is determined, that is, the area that the dilated "user cat" has more than the initial "user cat", that is, the pixel neighborhood area; multiple target pixels with transparency of 0 are determined in the pixel neighborhood area, and the RGB pixel value of the target pixel is set to the RGB pixel value of its corresponding neighborhood dilation center point, wherein the neighborhood dilation center point is represented as, represents the coordinate, and the transparency is set to 255 to generate the dilated image.
[0051] In one possible implementation, the edge image is generated according to the dilated image and the transparency conversion image, specifically including: calculating the absolute difference between the dilated image and the transparency conversion image to generate the edge image.
[0052] Step S105: Embed watermark information into the edge image to generate a target explicit identification image.
[0053] In one possible implementation, if the edge image is generated by an edge detection algorithm, then multiple pixels in the edge image whose pixels are not equal to 0 are obtained, and multiple coordinate positions corresponding to the multiple pixels are determined; the watermark information is embedded into the multiple pixels corresponding to the multiple coordinate positions one by one according to a pre-set embedding rule to generate a target explicit identification image.
[0054] In this embodiment of the invention, the edge image is a binary image. Specifically, a candidate edge image is first obtained by the edge detection algorithm. If the candidate edge image includes multiple pixel values and is not a binary image containing only 0 and 255 pixel values, that is, the candidate edge image is not a clear black and white image, then it needs to be binarized. For example, if the pixel threshold is set to 200, all pixels with pixel values greater than or equal to 200 are set to 255, and pixels with pixel values less than 200 are set to 0, the candidate edge image is converted into a clear black and white edge image, and then the watermark information embedding process is performed. The pixel threshold is determined according to the actual situation, and this is only an example.
[0055] In one possible implementation, if the edge image is generated by edge dilation, then multiple pixels in the edge image with non-zero transparency are obtained; the watermark information is embedded into the multiple pixels according to a pre-set embedding rule to generate a target explicit identification image.
[0056] In one possible implementation, there are multiple pixels in the edge image with non-zero transparency, each pixel is represented by a symbol, and the pre-set embedding rule is as follows: Specification 7 / 14 Page 11 CN 121258763 A Wherein, ∈{ | i=1 N}, N represents the total number of pixels with non-zero transparency, theThe transparency of the pixel is represented by j = (i+1)mod(), where j is the length of the watermark information, and the watermark information is represented by an encrypted and obfuscated watermark bitstream; j is a constant vector of size 1 × 4, which can be customized, for example, set to (0, 0, 0, 255), which is only an example here.
[0057] In the above way, the watermark information is embedded into the pixels of the edge image according to the preset embedding rules to generate the target explicit identification image.
[0058] In one possible implementation, after step S105, the following steps are also included, as shown in Figure 2, including: Step S106, pasting the target explicit identification image into the candidate image to generate the target image.
[0059] Specifically, the target explicit identification image with watermark information is pasted into the candidate image according to the pasting position coordinates and transparency fusion method, wherein the candidate image is an AIGC generated image or other generated image, and the source protection of the explicit identification of the generated image is completed in the above way.
[0060] In one possible implementation, before step S105, the following steps are further included, as shown in Figure 3: Step S107: Obtain initial watermark information.
[0061] For example, the initial watermark information is a user ID, such as "ID123456778", which is only an example.
[0062] Step S108: Encrypt and obfuscate the initial watermark information to generate watermark information.
[0063] Specifically, the initial watermark information is encrypted and obfuscated using encryption and obfuscation methods such as Cyclic Redundancy Check (CRC) and Bose-Chaudhuri-Hocquenghem Code (BCH) to generate an encrypted and obfuscated watermark bitstream, i.e., the watermark information. Other encryption and obfuscation methods can also be used, and this embodiment of the invention does not limit them.
[0064] In this embodiment of the invention, a single-pixel annular region (i.e., the pixel neighborhood region generated by the expansion of the explicit identifier outline) is used as a carrier. The pixel values of this region are modified to encode the traceability information, thereby completing the embedding of the traceability information. The key traceability information is embedded in the explicit identifier as watermark information. The above embedding method makes the key traceability information and the identifier body integrated into one, forming a strong binding relationship, which can prevent the explicit identifier from being tampered with or maliciously replaced. Any tampering, erasure, or overlay of the explicit identifier will destroy the traceability information it carries while destroying the identifier's own structure, resulting in traceability failure and thus exposing the tampering behavior. In addition, because attackers lack the embedded information, the explicit identifiers they forge cannot pass the information verification carried by the identifier, thereby effectively preventing the explicit identifier from being maliciously replaced. Moreover, the above method does not increase the cost of the additional traceability information.The external visual elements maintain the original appearance of the explicit logo, while deeply binding the traceability information into the structure of the logo. The above embedding method has strong concealment, less visual disturbance, and also has the advantages of strong robustness, high real-time performance and low cost. Among them, strong robustness refers to resistance to compression, scaling and transmission, etc.; it can meet the requirements of the current standard for explicit logos.
[0065] In this embodiment of the invention, a method for extracting explicit logos is proposed, as shown in Figure 4. The method includes: Step S401, obtaining the target image.
[0066] Specifically, the target image is a generated image carrying the target display logo image. For example, the target image is a landscape image, and the upper left corner of the landscape image carries the target display logo image "User 55". This is only an example. Specification 8 / 14 pages 12 CN 121258763 A
[0067] Step S402, extracting the target explicit logo image from the target image by setting a method.
[0068] In one possible implementation, the setting method includes template matching or feature point matching, the target explicit labeling image is generated according to the method of FIG1 above, the target explicit labeling image has embedded watermark information, and the target explicit labeling image is represented as shown.
[0069] Step S403: Perform size normalization processing on the target explicit labeling image to generate the target explicit labeling image of standard size.
[0070] Specifically, assuming the standard size is and, the target explicit labeling image is scaled to the standard size and.
[0071] Step S404: Determine the position of the watermark information in the target explicit labeling image of standard size, and extract the watermark information according to the position of the watermark information.
[0072] In one possible implementation, the method of extracting watermark information includes the following: Method 1: Blind extraction.
[0073] Specifically, according to the edge detection algorithm, a target edge image is generated in the standard-sized target explicit identification image; multiple target pixels with non-zero pixels in the target edge image are determined, and multiple target coordinate positions corresponding to the multiple target pixels are determined; the watermark information is extracted from the multiple target pixels corresponding to the multiple target coordinate positions.
[0074] In this embodiment of the invention, the target edge image is a binarized image. Specifically, a candidate target edge image is first obtained through the edge detection algorithm. If the candidate target edge image includes multiple pixel values and is not a binarized image containing only 0 and 255 pixel values, that is, the candidate target edge image is not a clear black and white image, then it needs to be binarized. For example, if the pixel threshold is set to 200, all pixels with pixel values greater than or equal to 200 are set to 255, and pixels with pixel values less than 200 are set to 0, the candidate target edge image is converted to black and white.A clear edge image is obtained, and then watermark information extraction processing is performed. The set pixel threshold is determined according to the actual situation, and this is only an example.
[0075] In one possible implementation, the pixels in the target edge image that are not equal to 0 are represented as i=1 N. The pre-set watermark extraction rule is as follows: Wherein, Ri, Gi, and Bi are the RGB values respectively, f(Ri, Gi, Bi) is a function with Ri, Gi, and Bi as input. The function relationship f can take the maximum value, minimum value, or average value. The threshold a1 is a custom value, which can be determined based on experience, or it can be the pixel average value, median, mode, etc., and this is only an example.
[0076] In one possible implementation, the watermark extraction rule can also define thresholds aR, aG, and aB for Ri, Gi, and Bi values respectively. If Ri, Gi, and Bi are all greater than their corresponding thresholds, the extracted information is 0. If they are all less than their corresponding thresholds, the extracted information is 1. The above extraction rules can be selected according to the specific scenario.
[0077] In this embodiment of the invention, the watermark information is a bitstream represented by 0 and 1.
[0078] Method 2: Non-blind extraction.
[0079] Specifically, an explicit identification image is obtained, wherein the explicit identification image does not embed watermark information; according to the edge specification page 9 / 14 13 CN 121258763 A dilation method or edge detection algorithm, a target edge image is determined in the explicit identification image; multiple pixels with transparency or pixel value not equal to 0 in the target edge image are determined, and the coordinate positions of the multiple pixels are determined; target pixels with the same coordinate positions in the target explicit identification image of the standard size are determined according to the coordinate positions; the watermark information is extracted from the multiple target pixels according to the preset watermark extraction rules.
[0080] In one possible implementation, the watermark extraction rules and binarization method are as described in Method 1 above, and will not be repeated here.
[0081] In one possible implementation, before step S405, the following steps are further included, as shown in Figure 5: Step S405: Perform bit-by-bit voting, de-obfuscation, and decryption on the watermark information sequentially to generate initial watermark information.
[0082] Specifically, first, the bit stream represented by 01 is subjected to bit-by-bit voting, and then de-obfuscation is performed according to the obfuscation method used when embedding the watermark information, and decryption methods such as CRC and BCH are used to decrypt the watermark information to generate initial watermark information. For example, the initial watermark information is "ID123456778".
[0083] In one possible implementation, the bit-by-bit voting mechanism is as follows: The bit stream is sequentially...Divided into K independent groups, where K = LD / LB, where LD is the length of the bitstream and LB is the length of the watermark information; each independent group has a 01 bit string of the same length, and the number of 0s and 1s at each index position in multiple independent groups is counted, and the one with more 0s and 1s is the watermark information corresponding to that index position; for example, there are 10 independent groups, each of which is a 01 bit string of length 15. For the first index position of the independent group, assuming that 7 of the first index positions of the 10 independent groups are 1s and 3 are 0s, then the watermark information corresponding to the first index position is confirmed to be 1. This is only an example, and the specific determination is based on the actual situation.
[0084] Through the above embodiments, explicit identifiers can be independently verified, and they can also complement implicit identifiers. When the generated image containing implicit identifiers is maliciously tampered with or reconstructed by the model, the implicit identifier information is destroyed, which may make it difficult to identify or extract the implicit identifiers. The watermark information embedded in the explicit identifiers can be extracted and verified.
[0085] In this embodiment of the invention, an apparatus for generating explicit identifiers is provided, as shown in FIG6, specifically including: a first acquisition unit 601, a decoding unit 602, a detection unit 603, and a first generation unit 604; wherein, the first acquisition unit 601 is used to acquire an explicit identifier image; the decoding unit 602 is used to decode the explicit identifier image to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the dimension of the first dimension array is the vertical pixel count of the explicit identifier image, the dimension of the second dimension array is the horizontal pixel count of the explicit identifier image, and the dimension of the third dimension array is the number of channels; the detection unit 603 is used to perform size compliance detection based on the vertical pixel count and the horizontal pixel count of the explicit identifier image; the first generation unit 604, in response to the explicit identifier image passing the size compliance detection, is used to determine an edge image based on the explicit identifier image; the first generation unit 604 is further used to embed watermark information into the edge image to generate a target explicit identifier image.
[0086] Further, the first generation unit is also used to: paste the target explicit label image into the candidate image to generate a target image.
[0087] Further, the first generation unit is specifically used to: determine an edge image in the explicit label image according to an edge detection algorithm; or, determine an edge image in the explicit label image according to an edge dilation method, specifically including: performing transparency conversion on the explicit label image to generate a transparency conversion image; performing neighborhood dilation on the transparency conversion image to generate a dilated image; and generating an edge image based on the dilated image and the transparency conversion image. Specification 10 / 14 pages 14 CN 121258763 A
[0088] Further, the detection unit is specifically used to: obtain a minimum embedding size threshold and a maximum embedding size threshold, wherein the minimum embedding size threshold includes a minimum number of vertical pixels and a minimum number of horizontal pixels, and the maximum embedding size threshold includes a maximum number of vertical pixels and a maximum number of horizontal pixels; compare the number of vertical pixels and the number of horizontal pixels of the explicit label image with the minimum embedding size threshold and the maximum embedding size threshold to perform size compliance detection, wherein the number of vertical pixels of the explicit label image is greater than or equal to the minimum number of vertical pixels and less than or equal to the maximum number of vertical pixels, and the number of horizontal pixels of the explicit label image is greater than or equal to the minimum number of horizontal pixels and less than or equal to the maximum number of horizontal pixels, then the size compliance detection is passed.
[0089] Further, the generation unit is specifically used to: determine the label in the transparency conversion image; perform neighborhood dilation on the edge region of the label to determine the pixel neighborhood region generated by the dilation; obtain multiple target pixels with transparency of 0 in the pixel neighborhood region; for each target pixel, set the RGB pixel value of the target pixel to the RGB pixel value of its corresponding neighborhood dilation center point, set the transparency to 255, and generate the dilated image.
[0090] Further, the generation unit is specifically used to: calculate the absolute difference between the dilated image and the transparency conversion image to generate an edge image.
[0091] Further, the acquisition unit is also used to: acquire initial watermark information; the generation unit is also used to: encrypt and obfuscate the initial watermark information to generate watermark information.
[0092] Further, the generation unit is specifically used to: acquire multiple pixels in the edge image where all pixels are not equal to 0, determine multiple coordinate positions corresponding to the multiple pixels respectively; embed the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a pre-set embedding rule to generate a target explicit identification image; or, acquire multiple pixels in the edge image where all transparency is not equal to 0, determine multiple coordinate positions corresponding to the multiple pixels respectively; embed the watermark information one by one into the multiple pixels corresponding to the multiple coordinate positions according to a pre-set embedding rule to generate a target explicit identification image.
[0093] In this embodiment of the invention, an apparatus for extracting explicit identifiers is provided, as shown in FIG7, specifically including: a second acquisition unit 701, an extraction unit 702, a processing unit 703, and a determination unit 704; wherein, the second acquisition unit 701 is used to acquire a target image; the extraction unit 702 is used to extract a target explicit identifier image from the target image using a set method, wherein the target explicit identifier image is generated as in the first aspect or any possible method of the first aspect, and the set method includes template matching or feature point matching; the processing unit 703...Unit 703 is used to perform size normalization processing on the target explicit identification image to generate a standard-sized target explicit identification image; the determining unit 704 is used to determine the position of the watermark information in the standard-sized target explicit identification image and extract the watermark information based on the watermark information position.
[0094] Further, the device also includes: a second generating unit, used to obfuscate and decrypt the watermark information to generate initial watermark information.
[0095] Further, the determining unit is specifically used for: generating a target edge image in the target explicit identification image of the standard size according to the edge detection algorithm; determining multiple target pixels in the target edge image whose pixels are not equal to 0, and determining multiple target coordinate positions corresponding to the multiple target pixels; extracting the watermark information from the multiple target pixels corresponding to the multiple target coordinate positions according to a preset watermark extraction rule; or, obtaining an explicit identification image, wherein the explicit identification image does not embed watermark information; determining a target edge image in the explicit identification image according to the edge dilation method or the edge detection algorithm; determining multiple pixels in the target edge image whose transparency or pixels are not equal to 0, and determining the coordinate positions of the multiple pixels; determining target pixels at the same coordinate positions in the target explicit identification image of the standard size according to the coordinate positions; extracting the watermark information from the multiple target pixels according to a preset watermark extraction rule.
[0096] Figure 8 is a schematic diagram of the structure of the electronic device in the embodiment of the present invention. As shown in Figure 8, it includes a general computer hardware structure, which includes at least a processor 801 and a memory 802. The processor 801 and the memory 802 are connected via a bus 803. The memory 802 is adapted to store instructions or programs executable by the processor 801. The processor 801 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 801 executes the instructions stored in the memory 802 to perform the method flow of the embodiments of the present invention as described above, thereby realizing data processing and control of other devices. The bus 803 connects the above-mentioned components together, and also connects the above-mentioned components to a display controller 804, a display device, and an input / output (I / O) device 805. The input / output (I / O) device 805 can be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 805 is connected to the system via an input / output (I / O) controller 806.
[0097] The instructions stored in the memory 802 are executed by at least one processor 801 to: acquire an explicit identifier image; decode the explicit identifier image to generate RGBA.Four-channel matrix data; size compliance detection is performed based on the vertical and horizontal pixel counts of the explicit identifier image; in response to the explicit identifier image passing the size compliance detection, an edge image is determined based on the explicit identifier image; watermark information is embedded in the edge image to generate a target explicit identifier image.
[0098] Specifically, the electronic device includes: one or more processors 801 and a memory 802, as shown in Figure 8, which uses one processor 801 as an example. The processor 801 and the memory 802 can be connected via a bus or other means, as shown in Figure 8, which uses a bus connection as an example. The memory 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 801 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in the memory 802, thereby realizing the above-mentioned method for determining and generating explicit identifiers.
[0099] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store an option list, etc. Furthermore, memory 802 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 802 may optionally include memory remotely located relative to processor 801, and these remote memories may be connected to external devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0100] One or more modules are stored in memory 802 and, when executed by one or more processors 801, perform the method for generating explicit identifiers in any of the above method embodiments.
[0101] As those skilled in the art will recognize, various aspects of the embodiments of the present invention can be implemented as a system, method, or computer program product. Therefore, various aspects of the embodiments of the present invention may take the form of a completely hardware implementation, a completely software implementation (including firmware, resident software, microcode, etc.), or an implementation that combines software and hardware aspects, which may generally be referred to herein as a “circuit,” “module,” or “system.” Furthermore, various aspects of the embodiments of the present invention may take the form of a computer program product implemented in one or more computer-readable media having computer-readable program code implemented thereon.
[0102] Any combination of one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, (but not limited to) electronic,Magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or apparatuses, or any suitable combination thereof. More specific examples (not an exhaustive list) of computer-readable storage media will include: a specification with one or more wires, 12 / 14 pages, 16 CN 121258763 A electrical connection, a portable computer floppy disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable optical disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the context of embodiments of the present invention, a computer-readable storage medium can be any tangible medium capable of containing or storing a program used by an instruction execution system, device, or apparatus, or in conjunction with a program used by an instruction execution system, device, or apparatus.
[0103] A computer-readable signal medium can include a propagated digital signal having computer-readable program code implemented therein, such as in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including but not limited to: electromagnetic, optical, or any suitable combination thereof. The computer-readable signal medium can be any of the following computer-readable media: not a computer-readable storage medium, but capable of communicating, propagating, or transmitting a program used by or in conjunction with an instruction execution system, device, or apparatus.
[0104] Any suitable medium, including but not limited to wireless, wired, fiber optic cable, RF, or any suitable combination thereof, can be used to transmit program code implemented on the computer-readable medium.
[0105] The computer program code for performing operations relating to various aspects of embodiments of the present invention can be written in any combination of one or more programming languages, including: object-oriented programming languages such as Java, Smalltalk, C++, etc.; and conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server as a standalone software package. In the latter case, the remote computer can be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., by using the Internet provided by an Internet service provider).
[0106] The flowchart illustrations and / or block diagrams of the methods, apparatus (systems), and computer program products according to embodiments of the present invention described above illustrate various aspects of the embodiments of the present invention. It will be understood that each block of the flowchart illustrations and / or block diagrams is...The combination of blocks in the flowchart illustrations and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus to produce a machine such that the instructions (executed via the processor of the computer or other programmable data processing apparatus) create means for implementing the functions / actions specified in the flowchart and / or block diagram blocks or blocks.
[0107] These computer program instructions can also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other apparatus to operate in a particular manner, such that the instructions stored in the computer-readable medium produce an article of writing including instructions for implementing the functions / actions specified in the flowchart and / or block diagram blocks or blocks.
[0108] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other apparatus to cause a series of operative steps to be performed on the computer, other programmable apparatus, or other apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide a process for implementing the functions / actions specified in the flowchart and / or block diagram blocks or blocks.
[0109] The above description is only a preferred embodiment of this application and is not intended to limit this application. For those skilled in the art, this application can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the protection scope of this application.
[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data need to comply with the relevant laws, regulations and standards of relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. Users' refusal to process personal information other than the necessary information required for basic functions will not affect users' use of basic functions. Instruction manual, page 14 / 14, 18 CN 121258763 A, Figure 1; Instruction manual, Figure 1 / 8, page 19 CN 121258763 A, Figure 2; Instruction manual, Figure 2 / 8, page 20 CN 121258763 A, Figure 3; Instruction manual, Figure 3 / 8, page 21 CN 121258763 A, Figure 4; Instruction manual, Figure 4 / 8, page 22 CN 121258763 A, Figure 5; Instruction manual, Figure 5 / 8, page 23 CN 121258763 A, Figure 6; Instruction manual, Figure 6 / 8, page 24 CN 121258763 AFigure 7说明书附图7 / 8页25 CN 121258763 AFigure 8说明书附图8 / 8页26 CN 121258763 AAbstractAbdominal ultrasound examination method, system and deviceMethod, device and equipment for generating explicit identifierThe embodiment of the invention discloses a method, a device and equipment for generating an explicit identifier. In the embodiment of the invention, an explicit identification image is obtained; the explicit identification image is decoded, RGBA four-channel matrix data is generated, and the RGBA four-channel matrix data comprises a three-dimensional array; performing size compliance detection according to the number of vertical pixels and the number of horizontal pixels of the explicit identification image; in response to an explicit identification image passing the size compliance detection, determining an edge image according to the explicit identification image; and embedding watermark information into the edge image to generate a target explicit identification image. Throughthe method, the target explicit identification image which effectively resists tampering, is prevented from being maliciously replaced and can reliably bind the content and the source information can be generated.
Claims
1. A method for generating explicit identifiers, characterized in that, The method includes: Get the explicitly labeled image; The explicit label image is decoded to generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the first dimension of the three-dimensional array is the vertical pixel count of the explicit label image, the second dimension is the horizontal pixel count of the explicit label image, and the third dimension is the number of channels. Size compliance detection is performed based on the vertical and horizontal pixel counts of the explicitly labeled image; In response to the explicit label image passing the size compliance detection, an edge image is determined based on the explicit label image; The watermark information is embedded in the edge image to generate a target explicit identification image.
2. The method according to claim 1, characterized in that, The method further includes: The target explicit identifier image is pasted into the candidate image to generate the target image.
3. The method according to claim 1, characterized in that, The step of determining the edge image based on the explicitly identified image specifically includes: The edge image is determined in the explicitly labeled image according to the edge detection algorithm; Alternatively, the edge image can be determined in the explicitly labeled image according to the edge dilation method, specifically including: The explicit identifier image is subjected to transparency conversion to generate a transparency-converted image; The transparency-converted image is then dilated in its neighborhood to generate a dilated image. An edge image is generated based on the dilated image and the transparency conversion image.
4. The method according to claim 3, characterized in that, The step of performing neighborhood dilation on the transparency-converted image to generate a dilated image specifically includes: Determine the identifiers in the transparency-transformed image; The edge region of the identifier is dilated to determine the neighborhood region of the pixel generated by the dilation. Obtain multiple target pixels with zero transparency within the neighborhood of the pixel; For each target pixel, the RGB pixel value of the target pixel is set to the RGB pixel value of its corresponding neighborhood dilation center point, and the transparency is set to 255 to generate the dilated image.
5. The method according to claim 3, characterized in that, The step of generating an edge image based on the dilated image and the transparency-converted image specifically includes: The edge image is generated by calculating the absolute difference between the dilated image and the transparency-converted image.
6. The method according to claim 1, characterized in that, The method further includes: Obtain initial watermark information; The initial watermark information is encrypted and obfuscated to generate a new watermark information.
7. The method according to claim 1, characterized in that, The step of embedding watermark information into the edge image to generate a target explicit identification image specifically includes: Obtain multiple pixels in the edge image where all pixels are not equal to 0, and determine multiple coordinate positions corresponding to each of the multiple pixels; The watermark information is embedded one by one into multiple pixels corresponding to the multiple coordinate positions according to the pre-set embedding rules to generate a target explicit identification image. Alternatively, obtain multiple pixels in the edge image whose transparency is not equal to 0, and determine multiple coordinate positions corresponding to each of the multiple pixels; The watermark information is embedded into multiple pixels corresponding to the multiple coordinate positions one by one according to the pre-set embedding rules to generate a target explicit identification image.
8. A method for extracting explicit identifiers, characterized in that, The method includes: Acquire the target image; The target explicit identifier image is extracted from the target image by a set method, wherein the target explicit identifier image is generated as described in any one of claims 1-7, and the set method includes template matching or feature point matching; The target explicit label image is normalized in size to generate a standard-sized target explicit label image; Determine the location of the watermark information in the target explicit identification image of the standard size, and extract the watermark information based on the location of the watermark information.
9. The method according to claim 8, characterized in that, The method further includes: The watermark information is sequentially subjected to a bit-by-bit voting mechanism, deobfuscation, and decryption to generate initial watermark information.
10. The method according to claim 8, characterized in that, The process of determining the location of the watermark information in the target explicit identification image of the standard size, and extracting the watermark information based on the location of the watermark information, specifically includes: Based on the edge detection algorithm, a target edge image is generated in the target explicit label image of the standard size; Identify multiple target pixels in the target edge image whose pixel values are not equal to 0, and determine multiple target coordinate positions corresponding to the multiple target pixels; According to the pre-set watermark extraction rules, the watermark information is extracted from multiple target pixels corresponding to the multiple target coordinate positions; Alternatively, obtain an explicit identifier image, wherein the explicit identifier image does not embed watermark information; The target edge image is determined in the displayed identifier image according to the edge dilation method or the edge detection algorithm; Identify multiple pixels in the target edge image whose transparency or pixel value is not equal to 0, and determine the coordinate positions of the multiple pixels; Based on the coordinate positions, determine the target pixels at the same coordinate positions in the target explicit identification image of the standard size; The watermark information is extracted from the multiple target pixels according to the pre-set watermark extraction rules.
11. An apparatus for generating explicit identifiers, characterized in that, The device includes: The first acquisition unit is used to acquire the explicit identifier image; The decoding unit is used to decode the explicit identification image and generate RGBA four-channel matrix data, wherein the RGBA four-channel matrix data includes a three-dimensional array, wherein the first dimension of the three-dimensional array is the vertical pixel count of the explicit identification image, the second dimension is the horizontal pixel count of the explicit identification image, and the third dimension is the number of channels. The detection unit is used to perform size compliance detection based on the number of vertical pixels and the number of horizontal pixels in the explicitly marked image; The first generation unit, in response to the explicit identification image passing the size compliance detection, is used to determine an edge image based on the explicit identification image; The first generation unit is further configured to embed watermark information into the edge image to generate a target explicit identification image.
12. An apparatus for extracting explicit identifiers, characterized in that, The device includes: The second acquisition unit is used to acquire the target image; An extraction unit is configured to extract a target explicit identifier image from the target image using a set method, wherein the target explicit identifier image is generated as described in any one of claims 1-7, and the set method includes template matching or feature point matching; The processing unit is used to perform size normalization processing on the target explicit label image to generate a standard-sized target explicit label image; The determining unit is used to determine the position of the watermark information in the target explicit identification image of the standard size, and extract the watermark information based on the position of the watermark information.
13. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-10.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-10.