Watermark decryption method, watermark decryption device and electronic equipment
By using pre-built network models to extract images and information from watermark pages, it solves the difficulty and interference problems of small-size pattern recognition and improves the accuracy and efficiency of watermark decryption.
Patent Information
- Application Number
- CN202311848944.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2024-10-18
AI Technical Summary
Existing watermark decryption technology is difficult to accurately identify small-sized patterns in encrypted watermarks, and is easily interfered by original page elements, resulting in reduced decryption accuracy.
The pre-built first and second network models are used to extract the watermark image and information from the watermark page to be identified, and the original watermark information is decrypted through encryption rules to improve the identification efficiency and accuracy.
Processing watermark features through two network models improves the accuracy of watermark recognition and the reliability of decryption, which is more accurate and faster than traditional methods.
Smart Images

Figure CN118799160A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a watermark decryption method, a watermark decryption device and an electronic device. Background Art
[0002] Watermark encryption usually converts character information into patterns to obtain encrypted watermarks to achieve confidentiality of information. However, in the decryption process, it may be difficult to identify each pattern in the encrypted watermark. This is because there may be small patterns in the encrypted watermark, which are difficult to accurately identify. In addition, some patterns in the encrypted watermark may be interfered by other elements in the original page, such as color, shape, etc., making the pattern similar to the content of the original page or obscured. Then, if each pattern cannot be accurately identified, the accuracy of decryption may be reduced, resulting in incorrect decrypted information. Summary of the invention
[0003] The embodiments of the present application provide a watermark decryption method, a watermark decryption device and an electronic device, which can improve the accuracy of decryption.
[0004] In the first aspect, an embodiment of the present application provides a watermark decryption method, the method comprising: obtaining a watermark page to be identified; inputting the watermark page to be identified into a pre-constructed first network model to extract the watermark image, and obtaining a target watermark image corresponding to the watermark page to be identified; inputting the target watermark image into a pre-constructed second network model to extract watermark information, and obtaining encrypted watermark information in the target watermark image, wherein the encrypted watermark information comprises encrypted information composed of multiple patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule; decrypting the encrypted watermark information according to the encryption rule, and obtaining the original watermark information corresponding to the watermark page to be identified.
[0005] In the second aspect, an embodiment of the present application provides a watermark decryption device, which includes: an acquisition module, used to acquire a watermark page to be identified; a first extraction module, used to input the watermark page to be identified into a pre-constructed first network model to extract the watermark image, and obtain a target watermark image corresponding to the watermark page to be identified; a second extraction module, used to input the target watermark image into a pre-constructed second network model to extract watermark information, and obtain encrypted watermark information in the target watermark image, wherein the encrypted watermark information includes encrypted information composed of multiple patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule; a decryption module, used to decrypt the encrypted watermark information according to the encryption rule, and obtain the original watermark information corresponding to the watermark page to be identified.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0008] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0009] In an embodiment of the present application, a watermark page to be identified is first obtained, and then the watermark page to be identified is input into a pre-constructed first network model for watermark image extraction to obtain a target watermark image corresponding to the watermark page to be identified, and then the target watermark image is input into a pre-constructed second network model for watermark information extraction to obtain encrypted watermark information in the target watermark image, wherein the encrypted watermark information includes encrypted information composed of multiple patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule, and finally the encrypted watermark information is decrypted according to the encryption rule to obtain the original watermark information corresponding to the watermark page to be identified. In this way, the watermark of the watermark page to be identified is processed by two models, and compared with traditional manual detection or simple image processing methods, the watermark features can be better captured, and can be accurately and quickly identified. On the basis of improving the efficiency and accuracy of watermark identification, the reliability of decryption is increased. If the correct encryption pattern cannot be obtained, the decryption process will fail or produce an erroneous result. Therefore, the target watermark image can be accurately obtained through the first network model, and the encrypted watermark information can be accurately identified through the second network model, thereby improving the success rate and accuracy of decryption. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a flow chart of a watermark decryption method provided in an embodiment of the present application;
[0011] Figure 2 is a structural diagram of a first network model provided in an embodiment of the present application;
[0012] Figure 3 It is a structural schematic diagram of a ghost structure provided in an embodiment of the present application;
[0013] Figure 4 is another structural schematic diagram of the ghost structure provided in the embodiment of the present application;
[0014] Figure 5 is a structural diagram of a second network model provided in an embodiment of the present application;
[0015] Figure 6 It is a structural schematic diagram of a watermark decryption device provided in an embodiment of the present application;
[0016] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0018] In the following, in conjunction with the accompanying drawings, a watermark decryption method, a watermark decryption device and an electronic device provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
[0019] Figure 1 A watermark decryption method provided by an embodiment of the present application is shown. The method can be executed by an electronic device, and the electronic device may include: a terminal device or a network side device. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:
[0020] S110: Obtain a watermark page to be identified.
[0021] The watermark pages to be identified may include pictures, files, web pages, etc. in various formats.
[0022] S120: Inputting the watermark page to be identified into a pre-built first network model to extract a watermark image, and obtaining a target watermark image corresponding to the watermark page to be identified.
[0023] It can be understood that the first network model is used to extract the watermark image in the watermark page to be identified. The first network model can extract, enhance or improve the characteristics of the watermark image, which can ensure that subsequent information extraction tasks can be performed more accurately.
[0024] S130: Input the target watermark image into a pre-constructed second network model to extract watermark information, and obtain encrypted watermark information in the target watermark image.
[0025] The encrypted watermark information includes encrypted information composed of a plurality of patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule.
[0026] It can be understood that the second network model is used to extract the watermark information included in the watermark image, that is, the watermark image processed by the first network model is used as the input of the second network model, and after calculation and processing by the second network model, the encrypted watermark information in the target watermark image is obtained.
[0027] S140: Decrypt the encrypted watermark information according to the encryption rule to obtain the original watermark information corresponding to the watermark page to be identified.
[0028] The encryption rule may include three-layer encryption, and the encrypted watermark information is obtained by performing three-layer encryption on the original watermark information, which can prevent the leakage of the original watermark information and the misappropriation by a third party.
[0029] In an embodiment of the present application, a watermark page to be identified is first obtained, and then the watermark page to be identified is input into a pre-constructed first network model for watermark image extraction to obtain a target watermark image corresponding to the watermark page to be identified, and then the target watermark image is input into a pre-constructed second network model for watermark information extraction to obtain encrypted watermark information in the target watermark image, wherein the encrypted watermark information includes encrypted information composed of multiple patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule, and finally the encrypted watermark information is decrypted according to the encryption rule to obtain the original watermark information corresponding to the watermark page to be identified. In this way, the watermark of the watermark page to be identified is processed by two models, and compared with traditional manual detection or simple image processing methods, the watermark features can be better captured, and can be accurately and quickly identified. On the basis of improving the efficiency and accuracy of watermark identification, the reliability of decryption is increased. If the correct encryption pattern cannot be obtained, the decryption process will fail or produce an erroneous result. Therefore, the target watermark image can be accurately obtained through the first network model, and the encrypted watermark information can be accurately identified through the second network model, thereby improving the success rate and accuracy of decryption.
[0030] In one implementation, the step of inputting the watermark page to be identified into a pre-built first network model to extract a watermark image and obtain a target watermark image corresponding to the watermark page to be identified includes: extracting at least one watermark position from the watermark page to be identified by using the first network model; and cropping the watermark page to be identified based on the target watermark position to obtain the target watermark image, wherein the at least one watermark position includes the target watermark position. It is understandable that the watermark page to be identified may include multiple encrypted watermark information, each of which corresponds to a watermark position. In this case, there may be a variety of situations in the layout, such as each encrypted watermark information may be connected together, a pattern in a certain encrypted watermark information may be blocked, the encrypted watermark information may be too small, and so on. This may result in errors in identification if the pattern in the encrypted watermark information in the watermark page to be identified is directly identified. Therefore, in order to enable the second network model to accurately identify the pattern in the encrypted watermark information, the watermark page to be identified can be processed by the first network model first, that is, one is determined from multiple encrypted watermark information, and cropped to obtain the target watermark image, thereby providing better input for the subsequent second network model used to extract watermark information.
[0031] Optionally, before the watermark page to be identified is input into the first network model, the watermark page to be identified can be preprocessed, wherein the preprocessing refers to using traditional Fourier transform to convert the image from the spatial domain to the transform domain, then processing the transform coefficients in the transform domain, and then performing an inverse transform to convert the image from the transform domain to the spatial domain to achieve the purpose of removing the noise of the watermark page to be identified. The watermark page to be identified after filtering can remove the noise, which is beneficial to the subsequent target detection operation.
[0032] In one implementation, decrypting the encrypted watermark information according to the encryption rule to obtain the original watermark information corresponding to the watermark page to be identified may include the following steps:
[0033] Step 1: Split the encrypted watermark information to obtain a first graphic, a second graphic, a third graphic, encrypted data and verification data.
[0034] The encrypted data is located between the first graphic and the second graphic, the verification data is located between the second graphic and the third graphic, and the encrypted data and the verification data include at least one electronic code symbol.
[0035] Exemplarily, the first graphic may be a hollow diamond ◇, the second graphic may be a solid diamond ◆, and the third graphic may be a solid triangle ▲, for example ◇---..--....☆◎------...-☆-------..-☆----....-◆..---▲, wherein the encrypted data is "---..--....☆◎------...-☆-------..-☆----....-", and the verification data is "..---". In the actual encryption operation, directly using the code symbol as a pattern added to the document web page is not easy to identify, and it is easy to cause missed detection and false detection. Therefore, a solid rectangle ■ can be selected to represent "-", and a hollow rectangle can be selected to represent ".". In addition, the specific style and color of the pattern corresponding to the code symbol, the first graphic, the second graphic, and the third graphic are not specifically limited in this application.
[0036] Step 2: Decrypt the encrypted data according to the encryption rule to obtain first decryption information.
[0037] Step 3: When the verification result of verifying the first decrypted information based on the verification data is passed, the first decrypted information is used as the original watermark information.
[0038] In this implementation, after the encrypted watermark information is split according to the original encryption structure, encrypted data and verification data can be obtained, and the verification data is used to verify whether the decrypted encrypted data is correct.
[0039] Further, in an implementation manner, decrypting the encrypted data according to the encryption rule to obtain the first decryption information may include the following steps:
[0040] Step 21: Decode the encrypted data according to the first-level mapping table in the encryption rule to obtain the first-level character corresponding to each code symbol in the encrypted data, wherein the first-level mapping table includes the mapping relationship between the code symbol and the first-level character.
[0041] As shown in Table 1, it is a first-level mapping table.
[0042] Table 1.
[0043]
[0044] Take the encrypted watermark information in the above example as an example: ◇---..--....☆◎
[0045] ------...-☆-------..-☆----....-◆..---▲, after splitting, the encrypted data is:---..--....☆◎
[0046] ------...-☆-------..-☆----....-, from Table 1, we can know that "---.." represents the character "8", "--..." represents the character "7", ".----" represents the character "1", "--..." represents the character "7", "-----" represents the character "0", "---.." represents the character "8", "-----" represents the character "0", and "....-" represents the character "4". Therefore, we can know that the encrypted data is "87☆◎17☆08☆04".
[0047] Step 22: According to the secondary mapping table in the encryption rule, the plurality of primary characters are decoded to obtain the secondary characters corresponding to each primary character, wherein the secondary mapping table includes a mapping relationship between the primary characters and the secondary characters.
[0048] As shown in Table 2, it is a two-level mapping table.
[0049]
[0050] In “87☆170804”, the second-level character corresponding to the first-level character “8” is “7”, the second-level character corresponding to the first-level character “7” is “2”, the second-level character corresponding to the first-level character “1” is “6”, the second-level character corresponding to the first-level character “7” is “2”, the second-level character corresponding to the first-level character “0” is “4”, the second-level character corresponding to the first-level character “8” is “7”, the second-level character corresponding to the first-level character “0” is “4”, and the second-level character corresponding to the first-level character “4” is “9”. It can be seen that the encrypted data corresponding to the second-level character is “72☆◎62☆47☆49”.
[0051] Step 23: According to the three-level mapping table in the encryption rule, a plurality of the second-level characters are decoded to obtain a third-level character corresponding to each of the second-level characters.
[0052] As shown in Table 3, it is a three-level mapping table.
[0053]
[0054]
[0055] The three - level mapping table can be understood as a keyboard index table. In the encrypted data corresponding to the secondary characters, "72☆◎62☆47☆49", where "72" represents "X", "62" represents "s", "47" represents "u", and "49" represents "o", then the information corresponding to the three - level characters is "X◎suo". It should be noted that for the convenience of decryption, when performing three - level mapping encryption, there is an interval graphic between every two adjacent three - level characters. In the above example, the interval graphic is ☆; at the same time, in the original watermark information at the beginning, there is also an interval graphic between every two adjacent characters. In the above example, this interval graphic is ◎.
[0056] Step 24: Construct the first decryption information according to multiple three - level characters.
[0057] Among them, in one implementation, constructing the first decryption information according to multiple three - level characters includes: determining the original character corresponding to each three - level character according to the grammar structure corresponding to each three - level character, where the first decryption information includes each original character.
[0058] From the above example, multiple three - level characters are "X" and "suo". Since there are only 21 letters in the Chinese pinyin alphabet and 26 letters in the English alphabet. Therefore, when a three - level character is composed of multiple letters, it is necessary to distinguish whether this three - level character is an English word or a Chinese character. Usually, it can be distinguished according to the spelling rules of English words and Chinese characters. In the Chinese pinyin system, a pinyin usually consists of an initial consonant + a final consonant, and the pinyin combination "suo" conforms to the structure of Chinese pinyin. According to the information on the watermark page to be recognized, the Chinese character corresponding to "suo" can be determined, for example, "所", so the original watermark information can be "X所".
[0059] In one implementation, in the case where the verification result of verifying the first decryption information based on the verification data passes, taking the first decryption information as the original watermark information includes: decoding the verification data according to the first - level mapping table to obtain verification characters, where the verification characters include the first - level characters corresponding to each telegraph symbol in the verification data; in the case where the number of verification characters is equal to the number of original characters included in the first decryption information, taking the first decryption information as the original watermark information.
[0060] That is to say, the verification data is only encrypted at the first level, and the original verification data is mapped to the code symbol through the first level mapping table. Therefore, when decrypting, the code symbol is mapped to the original verification data through the first level mapping table. In the above example, the verification data is "..---". It can be seen from Table 1 that "..---" represents 2, that is, when the number of original characters is 2, the first decrypted information can be used as the original watermark information.
[0061] Optionally, when the verification result is a failure, the first network model may reselect the target watermark image and re-extract and decrypt the encrypted information.
[0062] In the above implementation, the confidentiality of information can be improved through three-layer encryption, and the start and end patterns and proofreading information are added to the encrypted information to improve the detection accuracy. In addition, appropriate changes are made on the basis of Morse encryption to make the encrypted information easy to detect and confidential.
[0063] In one implementation, the first network model includes a first input layer, a first backbone network layer, a first feature fusion layer and a first output layer, wherein the first input layer includes an image channel of a preset size, the first backbone network layer includes a first preset number of Ghost Module layers and Ghost BottleNeck layers, the structure of the first feature fusion layer is a feature pyramid network FPN, and the first output layer does not include a CBM structure.
[0064] Among them, the first network model is designed based on the YOLO target detection network, such as Figure 2 As shown, it is a schematic diagram of the basic structure of the first network model, the first input layer 210, the first backbone network layer 220 is the backbone layer, the first feature fusion layer 230 is the Neck layer, and the first output layer 240 is the Prediction layer. The backbone layer adopts a ghost network structure (GhostNet), which consists of two parts: Ghost Module and Ghost BottleNeck.
[0065] like Figure 3 As shown in the figure, it is a schematic diagram of the basic structure of Ghost Module. Ghost Module divides the input feature map into multiple sub-feature maps, and performs convolution operations on each sub-feature map through some small convolution kernels. Finally, the outputs of all sub-feature maps are added together to obtain the final output of the module. This can greatly reduce the number of parameters and calculations while ensuring the accuracy of the model.
[0066] like Figure 4As shown in the figure, it is a schematic diagram of the basic structure of Ghost BottleNeck, which uses the bottleneck structure to reduce the size and number of channels of the feature map, thereby further reducing the complexity of the model.
[0067] In the Neck layer, the FPN structure is adopted, and in the Prediction layer, the CBM structure is not included, wherein whether or not the CBM structure is included is relative to the second network model. As shown in Table 4, this is the ghost network adopted by the first network model.
[0068] Table 4.
[0069]
[0070] In one implementation, the second network model includes a first input layer, a second backbone network layer, a first feature fusion layer and a second output layer, wherein the second backbone network layer includes a second preset number of the GhostModule layers and the Ghost BottleNeck layers, the first preset number is less than the second preset number, and the second output layer includes a CBM structure.
[0071] Among them, the second network model is also designed based on the YOLO target detection network, such as Figure 5 , which is a schematic diagram of the basic structure of the second network model, including a first output layer 510, a second backbone network layer 520, a first feature fusion layer 530, and a second output layer 540. The second backbone network layer 520 is a backbone layer, and the second backbone network layer also adopts a ghost network structure (GhostNet), which consists of two parts: Ghost Module and Ghost BottleNeck. Figure 3 and Figure 4 The ghost network used in the second backbone network layer is richer than the first backbone network layer of the first network model, as shown in Table 5.
[0072] Table 5.
[0073]
[0074]
[0075] In addition, a multi-layer CBM structure is used to further extract features in the second output layer 540. When the size of the input watermark page to be identified meets the preset size, the Prediction layer can use a detection head to directly output the target watermark image, and the detection head uses CIOU_Loss and DIOU_Nms.
[0076] Figure 6A schematic diagram showing the structure of a watermark decryption device provided by an embodiment of the present application is shown in FIG. Figure 6 As shown, the watermark decryption device 600 may include: an acquisition module 610 , a first extraction module 620 , a second extraction module 630 and a decryption module 640 .
[0077] In this embodiment, the acquisition module 610 is used to acquire the watermark page to be identified; the first extraction module 620 is used to input the watermark page to be identified into a pre-constructed first network model to extract the watermark image, and obtain the target watermark image corresponding to the watermark page to be identified; the second extraction module 630 is used to input the target watermark image into a pre-constructed second network model to extract the watermark information, and obtain the encrypted watermark information in the target watermark image, wherein the encrypted watermark information includes encrypted information composed of multiple patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule; the decryption module 640 is used to decrypt the encrypted watermark information according to the encryption rule, and obtain the original watermark information corresponding to the watermark page to be identified.
[0078] In one implementation, the first extraction module 620 is used to extract at least one watermark position from the watermark page to be identified by adopting the first network model; based on the target watermark position, the watermark page to be identified is cropped to obtain the target watermark image, wherein the at least one watermark position includes the target watermark position.
[0079] In one implementation, the decryption module 640 is used to split the encrypted watermark information to obtain a first graphic, a second graphic, a third graphic, encrypted data and verification data, wherein the encrypted data is located between the first graphic and the second graphic, the verification data is located between the second graphic and the third graphic, and the encrypted data and the verification data include at least one electronic code symbol; decrypt the encrypted data according to the encryption rule to obtain first decrypted information; when the verification result of verifying the first decrypted information based on the verification data is passed, the first decrypted information is used as the original watermark information.
[0080] In one implementation, decrypting the encrypted data according to the encryption rule to obtain the first decryption information includes: decoding the encrypted data according to the first-level mapping table in the encryption rule to obtain the first-level character corresponding to each telegraph symbol in the encrypted data, wherein the first-level mapping table includes the mapping relationship between the telegraph symbol and the first-level character, and there is a spacing pattern between each adjacent two telegraph symbols; decoding a plurality of the first-level characters according to the second-level mapping table in the encryption rule to obtain the second-level character corresponding to each of the first-level characters, wherein the second-level mapping table includes the mapping relationship between the first-level character and the second-level character; decoding a plurality of the second-level characters according to the third-level mapping table in the encryption rule to obtain the third-level character corresponding to each of the second-level characters; and constructing the first decryption information based on the plurality of third-level characters.
[0081] In one implementation, constructing the first decryption information based on a plurality of third-level characters includes: determining the original character corresponding to each third-level character according to the grammatical structure corresponding to each third-level character, wherein the first decryption information includes each original character.
[0082] In one implementation, when the verification result of the first decrypted information based on the verification data is passed, the first decrypted information is used as the original watermark information, including: decoding the verification data according to the first-level mapping table to obtain a verification character, wherein the verification character includes a first-level character corresponding to each of the electronic code symbols in the verification data; when the number of the verification character is equal to the number of the original characters included in the first decrypted information, the first decrypted information is used as the original watermark information.
[0083] In one implementation, the first network model includes a first input layer, a first backbone network layer, a first feature fusion layer and a first output layer, wherein the first input layer includes an image channel of a preset size, the first backbone network layer includes a first preset number of Ghost Module layers and Ghost BottleNeck layers, the structure of the first feature fusion layer is a feature pyramid network FPN, and the first output layer does not include a CBM structure.
[0084] In one implementation, the second network model includes a first input layer, a second backbone network layer, a first feature fusion layer and a second output layer, wherein the second backbone network layer includes a second preset number of the GhostModule layers and the Ghost BottleNeck layers, the first preset number is less than the second preset number, and the second output layer includes a CBM structure.
[0085] The watermark decryption device provided in the embodiment of the present application can realize Figure 1 To avoid repetition, the various processes implemented in the illustrated embodiment will not be described again here.
[0086] The watermark decryption device in the embodiment of the present application may be a device, or a component, an integrated circuit, or a chip in an electronic device. The embodiment of the present application does not make any specific limitation.
[0087] The watermark decryption device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0088] Optional, such as Figure 7 As shown, the embodiment of the present application also provides an electronic device 700, including a processor 710, a memory 720, a program or instruction stored in the memory 720 and executable on the processor 710, and the program or instruction is executed by the processor 710 to implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0089] The embodiment of the present application also provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0090] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0091] The present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the above Figure 1 To avoid repetition, the various processes of the illustrated method embodiment will not be described again here.
[0092] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0093] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0095] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A watermark decryption method, characterized in that: include: Get the watermark page to be identified; Inputting the watermark page to be identified into a pre-built first network model to extract the watermark image, and obtaining a target watermark image corresponding to the watermark page to be identified; Inputting the target watermark image into a pre-constructed second network model to extract watermark information, and obtaining encrypted watermark information in the target watermark image, wherein the encrypted watermark information includes encrypted information composed of a plurality of patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule; The encrypted watermark information is decrypted according to the encryption rule to obtain the original watermark information corresponding to the watermark page to be identified.
2. The method according to claim 1, characterized in that The step of inputting the to-be-identified watermark page into a pre-built first network model to extract a watermark image and obtaining a target watermark image corresponding to the to-be-identified watermark page includes: By adopting the first network model, extracting at least one watermark position from the watermark page to be identified; Based on the target watermark position, the watermark page to be identified is cropped to obtain the target watermark image, wherein the at least one watermark position includes the target watermark position.
3. The method according to claim 1, characterized in that: The decrypting the encrypted watermark information according to the encryption rule to obtain the original watermark information corresponding to the watermark page to be identified includes: Splitting the encrypted watermark information to obtain a first graphic, a second graphic, a third graphic, encrypted data and verification data, wherein the encrypted data is located between the first graphic and the second graphic, the verification data is located between the second graphic and the third graphic, and the encrypted data and the verification data include at least one electronic code symbol; Decrypting the encrypted data according to the encryption rule to obtain first decrypted information; When the verification result of verifying the first decrypted information based on the verification data is passed, the first decrypted information is used as the original watermark information.
4. The method according to claim 3, characterized in that The decrypting the encrypted data according to the encryption rule to obtain first decryption information includes: Decoding the encrypted data according to the first-level mapping table in the encryption rule to obtain the first-level character corresponding to each code symbol in the encrypted data, wherein the first-level mapping table includes the mapping relationship between the code symbol and the first-level character, and there is a spacing pattern between each two adjacent code symbols; Decoding the plurality of primary characters according to the secondary mapping table in the encryption rule to obtain a secondary character corresponding to each primary character, wherein the secondary mapping table includes a mapping relationship between the primary characters and the secondary characters; Decoding the plurality of the secondary characters according to the third-level mapping table in the encryption rule to obtain the third-level character corresponding to each of the secondary characters; The first decryption information is constructed according to a plurality of third-level characters.
5. The method according to claim 4, characterized in that The step of constructing the first decryption information according to a plurality of third-level characters comprises: According to the grammatical structure corresponding to each of the third-level characters, the original character corresponding to each of the third-level characters is determined, wherein the first decryption information includes each of the original characters.
6. The method according to claim 5, characterized in that The step of using the first decrypted information as the original watermark information when the verification result of verifying the first decrypted information based on the verification data is passed includes: Decoding the check data according to the primary mapping table to obtain a check character, wherein the check character includes a primary character corresponding to each of the electronic code symbols in the check data; When the number of the check characters is equal to the number of the original characters included in the first decrypted information, the first decrypted information is used as the original watermark information.
7. The method according to any one of claims 1 to 6, characterized in that: The first network model includes a first input layer, a first backbone network layer, a first feature fusion layer and a first output layer, wherein the first input layer includes an image channel of a preset size, the first backbone network layer includes a first preset number of Ghost Module layers and GhostBottleNeck layers, the structure of the first feature fusion layer is a feature pyramid network FPN, and the first output layer does not include a CBM structure.
8. The method according to claim 7, characterized in that The second network model includes a first input layer, a second backbone network layer, a first feature fusion layer and a second output layer, wherein the second backbone network layer includes a second preset number of the Ghost Module layers and the Ghost BottleNeck layers, the first preset number is less than the second preset number, and the second output layer includes a CBM structure.
9. A watermark decryption device, characterized in that: include: An acquisition module is used to acquire a watermark page to be identified; A first extraction module is used to input the watermark page to be identified into a pre-built first network model to extract the watermark image, and obtain a target watermark image corresponding to the watermark page to be identified; A second extraction module is used to input the target watermark image into a pre-built second network model to extract watermark information, and obtain encrypted watermark information in the target watermark image, wherein the encrypted watermark information includes encrypted information composed of multiple patterns, and the encrypted watermark information is obtained by encrypting the original watermark information according to a preset encryption rule; The decryption module is used to decrypt the encrypted watermark information according to the encryption rule to obtain the original watermark information corresponding to the watermark page to be identified.
10. An electronic device, characterized in that: The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the watermark decryption method according to any one of claims 1 to 8.
