Disclosure of Invention
Because the existing method has the above problems, embodiments of the present invention provide a method and an apparatus for adding a watermark, and a method and an apparatus for tracking screen image leakage.
In a first aspect, an embodiment of the present invention provides a method for adding a watermark, including:
determining equipment information and a character dot matrix graph corresponding to each character of the equipment information, and determining a check dot matrix graph corresponding to the equipment information based on the character of the equipment information;
and generating a watermark pattern corresponding to the equipment information based on the character dot matrix pattern corresponding to each character and the check dot matrix pattern, and adding the watermark pattern corresponding to the equipment information to secret information.
Optionally, the determining the device information and the character dot matrix pattern corresponding to each character of the device information includes:
determining a character dot matrix graph corresponding to each character based on a preset dot matrix graph comparison table;
the determining a check dot matrix pattern corresponding to the device information based on the characters of the device information includes:
determining verification information corresponding to the equipment information based on the characters of the equipment information and preset verification parameters;
and determining the dot matrix graph corresponding to the verification information based on the preset dot matrix graph comparison table, and determining the dot matrix graph corresponding to the verification information as the verification dot matrix graph corresponding to the equipment information.
Optionally, the generating a watermark pattern corresponding to the device information based on the character dot pattern corresponding to each character and the check dot pattern includes:
and determining an initial dot matrix, arranging the initial dot matrix, the character dot matrix graph corresponding to each character and the check dot matrix graph according to a preset watermark format, and generating a watermark graph corresponding to the equipment information.
In a second aspect, an embodiment of the present invention further provides a screen image leakage tracking method, including:
extracting a watermark pattern in the acquired screen image, wherein the watermark pattern is acquired by adopting the watermark adding method according to any one of the first aspect;
determining first inspection information based on a check dot matrix graph in the watermark graph, wherein the check dot matrix graph is generated based on a character dot matrix graph, and the character dot matrix graph corresponds to equipment information of equipment for generating the screen image;
determining second check information based on all character dot matrix graphs in the watermark graphs, and determining equipment information corresponding to the watermark graphs;
and when the first check information is the same as the second check information, determining the equipment information corresponding to the watermark pattern as the equipment information which leaks the secret information.
Optionally, the determining first check information based on the check dot pattern in the watermark pattern includes:
determining an initial dot matrix in the screen image, and determining a preset number of character dot matrix graphs and check dot matrix graphs based on the initial dot matrix and a preset watermark format;
and generating the watermark graph based on the initial dot matrix, the preset number of character dot matrix graphs and the check dot matrix graph, and generating first check information based on the check dot matrix graph.
Optionally, the determining second check information based on all the actual character dot matrix patterns in the watermark pattern includes:
determining characters corresponding to each character dot matrix graph in the watermark graph based on a preset dot matrix graph comparison table;
and determining second check information corresponding to the watermark graph based on the characters corresponding to the character dot matrix graphs and preset check parameters.
Optionally, the determining the device information corresponding to the watermark pattern includes:
and determining equipment information corresponding to the watermark pattern based on the watermark information corresponding to each character dot matrix pattern in the watermark pattern.
Optionally, after determining the actual device information corresponding to the watermark pattern, the method further includes:
and when the first check information is the same as the second check information, determining that the watermark pattern is not tampered, otherwise, determining that the watermark pattern is tampered.
Optionally, the check information includes one or both of a check value and a check dot pattern.
In a third aspect, an embodiment of the present invention further provides a watermark adding apparatus, including a dot pattern determining unit and a watermark pattern adding unit, where:
the dot matrix graph determining unit is used for determining equipment information and character dot matrix graphs corresponding to all characters of the equipment information, and determining check dot matrix graphs corresponding to the equipment information based on the characters of the equipment information;
and the watermark pattern adding unit is used for generating a watermark pattern corresponding to the equipment information based on the character dot pattern corresponding to each character and the check dot pattern, and adding the watermark pattern corresponding to the equipment information to secret information.
Optionally, the dot pattern determining unit is configured to:
determining a character dot matrix graph corresponding to each character based on a preset dot matrix graph comparison table;
determining verification information corresponding to the equipment information based on the characters of the equipment information and preset verification parameters;
and determining the dot matrix graph corresponding to the verification information based on the preset dot matrix graph comparison table, and determining the dot matrix graph corresponding to the verification information as the verification dot matrix graph corresponding to the equipment information.
Optionally, the dot pattern determining unit is configured to:
and determining an initial dot matrix, arranging the initial dot matrix, the character dot matrix graph corresponding to each character and the check dot matrix graph according to a preset watermark format, and generating a watermark graph corresponding to the equipment information.
In a fourth aspect, an embodiment of the present invention further provides a screen image leakage tracking apparatus, including a watermark pattern extraction unit, an information determination unit, and a leakage device determination unit, where:
the watermark pattern extraction unit is configured to extract a watermark pattern in the acquired screen image, where the watermark pattern is acquired by using the watermark adding method according to any one of the first aspect;
the information determining unit is used for determining first checking information based on a check dot matrix graph in the watermark graph, wherein the check dot matrix graph is generated based on a character dot matrix graph, and the character dot matrix graph corresponds to equipment information of equipment for generating the screen image; the device is used for determining second check information based on all character dot matrix graphs in the watermark graphs and determining device information corresponding to the watermark graphs;
and the leaked device determining unit is used for determining the device information corresponding to the watermark pattern as the device information which leaks the confidential information when the first check information is the same as the second check information.
Optionally, the information determining unit is configured to:
determining an initial dot matrix in the screen image, and determining a preset number of character dot matrix graphs and check dot matrix graphs based on the initial dot matrix and a preset watermark format;
and generating the watermark graph based on the initial dot matrix, the preset number of character dot matrix graphs and the check dot matrix graph, and generating first check information based on the check dot matrix graph.
Optionally, the information determining unit is configured to:
determining characters corresponding to each character dot matrix graph in the watermark graph based on a preset dot matrix graph comparison table;
and determining second check information corresponding to the watermark graph based on the characters corresponding to the character dot matrix graphs and preset check parameters.
Optionally, the leakage apparatus determining unit is configured to:
and determining equipment information corresponding to the watermark pattern based on the watermark information corresponding to each character dot matrix pattern in the watermark pattern.
Optionally, the leakage apparatus determining unit is further configured to:
and when the first check information is the same as the second check information, determining that the watermark pattern is not tampered, otherwise, determining that the watermark pattern is tampered.
Optionally, the check information includes one or both of a check value and a check dot pattern.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the watermarking method according to the first aspect are implemented.
In a sixth aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the screen image leakage tracking method according to the second aspect when executing the program.
In a seventh aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the steps of the watermarking method according to the first aspect.
In an eighth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium storing a computer program, which causes the computer to execute the steps of the screen image leakage tracking method according to the second aspect.
In a ninth aspect, an embodiment of the present invention further provides a computer program product, which includes computer executable instructions, and when executed by a processor, the instructions are used to implement the watermarking method according to the first aspect.
In a tenth aspect, embodiments of the present invention further provide a computer program product, which includes computer executable instructions, when executed by a processor, for implementing the screen image leakage tracking method according to the second aspect.
According to the technical scheme, the embodiment of the invention determines the check dot matrix pattern corresponding to the equipment information based on the characters of the equipment information through the character dot matrix pattern corresponding to each character of the equipment information, generates the watermark pattern corresponding to the equipment information based on the character dot matrix pattern corresponding to each character and the check dot matrix pattern, and adds the watermark pattern corresponding to the equipment information to the confidential information. Therefore, on the basis of the character dot matrix patterns corresponding to the characters of the equipment information, the check dot matrix patterns determined based on the characters of the equipment information are further combined to generate the watermark patterns corresponding to the equipment information, the watermark patterns can be prevented from being distorted to a certain extent, and therefore the probability that the equipment information corresponding to the distorted watermark patterns in the screen image is mistakenly judged as the equipment information with leaked confidential information can be effectively avoided when the watermark patterns are distorted, the misjudgment rate can be further reduced to a certain extent, and the accuracy of the determined equipment information with leaked confidential information is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 shows a flowchart of a watermarking method provided in this embodiment, including:
s101, determining the device information and the character dot matrix graph corresponding to each character of the device information, and determining the check dot matrix graph corresponding to the device information based on the characters of the device information.
The device information refers to information corresponding to a device for viewing the confidential information, and the device information may be ID, identifier, IP, and the like of the device.
The character dot pattern is a dot pattern corresponding to each character of the device information.
The check dot pattern is a dot pattern generated based on the characters of the device information.
In implementation, when a user views secret information through a certain device, the device can call internally installed software to generate a watermark pattern consisting of a character dot pattern and a check dot pattern, and the watermark pattern is added to the secret information and then presented to the user. Specifically, first, the device information of the device may be determined, and a character dot pattern corresponding to each character in the device information may be determined. Then, the check dot pattern corresponding to the device information may be determined based on the characters of the device information, and it is understood that the characters for determining the check dot pattern corresponding to the device information may be all characters of the device information or may be partial characters of the device information, for example, when the device information includes letters (e.g., a13405), the check dot pattern corresponding to the device information may be determined based on only the characters (i.e., 13405) other than the letters in the device information.
S102, generating a watermark pattern corresponding to the equipment information based on the character dot matrix pattern and the check dot matrix pattern corresponding to each character, and adding the watermark pattern corresponding to the equipment information to the secret information.
In an implementation, after determining a character dot pattern corresponding to each character of the device information and a check dot pattern corresponding to the device information, a watermark pattern corresponding to the device information may be generated based on the character dot pattern corresponding to each character and the check dot pattern, for example, the character dot pattern corresponding to each character and the check dot pattern may be arranged and combined to obtain the watermark pattern corresponding to the device information. Then, the watermark pattern corresponding to the generated device information can be added to the confidential information, so that when a user performs screen capture or photo on the confidential information, the obtained screen image contains the watermark pattern.
According to the technical scheme, the embodiment of the invention determines the check dot matrix pattern corresponding to the equipment information based on the characters of the equipment information through the character dot matrix pattern corresponding to each character of the equipment information, generates the watermark pattern corresponding to the equipment information based on the character dot matrix pattern corresponding to each character and the check dot matrix pattern, and adds the watermark pattern corresponding to the equipment information to the confidential information. Therefore, on the basis of the character dot matrix patterns corresponding to the characters of the equipment information, the check dot matrix patterns determined based on the characters of the equipment information are further combined to generate the watermark patterns corresponding to the equipment information, the watermark patterns can be prevented from being distorted to a certain extent, and therefore the probability that the equipment information corresponding to the distorted watermark patterns in the screen image is mistakenly judged as the equipment information with leaked confidential information can be effectively avoided when the watermark patterns are distorted, the misjudgment rate can be further reduced to a certain extent, and the accuracy of the determined equipment information with leaked confidential information is improved.
Further, on the basis of the above method embodiment, the character dot pattern and the check dot pattern may be determined based on a preset dot pattern and a preset check parameter, and the corresponding processing in step S101 may be as follows: and determining a character dot matrix graph corresponding to each character based on a preset dot matrix graph comparison table. Determining verification information corresponding to the equipment information based on the characters of the equipment information and preset verification parameters; and determining the dot matrix graph corresponding to the verification information based on the preset dot matrix graph comparison table, and determining the dot matrix graph corresponding to the verification information as the verification dot matrix graph corresponding to the equipment information.
The preset check parameter refers to a preset parameter for determining the check information corresponding to the device information, and may be 512.
In implementation, the character dot pattern corresponding to each character in the device information may be determined based on a preset dot pattern comparison table, and the check information corresponding to the device information may be determined based on a preset check parameter of the character of the device information, where the check may be a specific numerical value or a specific character string. Then, the dot pattern corresponding to the verification information may be determined based on the preset dot pattern comparison table, and the dot pattern corresponding to the verification information may be determined as the verification dot pattern corresponding to the device information. Therefore, the character dot matrix graph and the check dot matrix graph are determined based on the preset dot matrix graph comparison table and the preset check parameters, so that the management equipment can extract the corresponding watermark graph when receiving the screen image containing the confidential information conveniently, and the equipment information leaking the confidential information can be determined based on the same preset dot matrix graph comparison table and the preset check parameters, so that the accuracy of the equipment information corresponding to the watermark graph in the determined screen image can be further improved, and the misjudgment rate can be further reduced.
Further, on the basis of the above method embodiment, a watermark pattern corresponding to the device information may be generated by combining the starting dot matrix and a preset watermark format, and the corresponding processing of step S102 may be as follows: and determining an initial dot matrix, arranging the initial dot matrix, the character dot matrix graph corresponding to each character and the check dot matrix graph according to a preset watermark format, and generating the watermark graph corresponding to the equipment information.
The preset watermark format refers to a preset format for generating a watermark pattern by arranging and combining the initial dot matrix, the character dot matrix pattern corresponding to each character and the check dot matrix pattern.
In implementation, the watermark pattern corresponding to the device information may be generated by combining the starting dot matrix and a preset watermark format, and specifically, first, the starting dot matrix may be determined. Then, the initial dot matrix, the character dot matrix pattern corresponding to each character, and the check dot matrix pattern may be arranged according to a preset watermark format, so as to generate a watermark pattern corresponding to the device information. Therefore, the watermark pattern is generated according to the preset watermark format, so that when the watermark pattern in the screen image containing the confidential information is extracted, the watermark pattern can be extracted according to the same format, the extracted watermark pattern in the screen image is more accurate, the accuracy of the equipment information corresponding to the watermark pattern in the determined screen image can be further improved, and the misjudgment rate is reduced.
Taking the preset dot matrix pattern comparison table as shown in fig. 2 as an example, assuming that the device information is a1401 and the format of the watermark pattern is a 9 × 9 squared form, the character dot matrix pattern corresponding to each character of the device information can be obtained as shown in fig. 3. Assume that the preset verification rule is: the verification information is equal to the remainder of the digital information in the equipment information and the preset verification parameters. And assuming that the preset parameter is 512 as an example, the remainder of 1401 and 512 is 377, that is, the verification information corresponding to the device information is 377. Then, the verification information 377 may be converted into binary 101111001 and represented by a predetermined format lattice, and assuming that the predetermined format lattice is a 3 × 3 lattice, the verification lattice corresponding to the verification information may be graphically represented as shown in fig. 4. Then, the initial dot matrix shown in fig. 2 and each character dot matrix pattern of the device information may be arranged in sequence, the check dot matrix pattern may be arranged in the last grid of the squared figure, and a watermark pattern corresponding to the device information is generated as shown in fig. 5.
Fig. 6 is a flowchart illustrating a screen image leakage tracking method provided in this embodiment, including:
s601, extracting the watermark pattern in the acquired screen image.
The watermark pattern is obtained by adopting any one watermarking method in the method embodiments shown in fig. 1.
In implementation, after the secret information leaks, the device leaking the secret information can be tracked, so that further inquiry and accountability can be carried out according to the device information leaking the secret information, and the device information leaking the secret information can be determined according to the watermark pattern and the verification information in the screen image. Specifically, when the management device acquires a screen image (such as a screen shot or a picture) containing confidential information, the watermark pattern may be extracted from the screen image.
S602, determining first check information based on the check dot matrix graph in the watermark graph.
The first check information refers to check information directly determined according to check dot patterns in watermark patterns in the screen image.
The check dot matrix graph is generated based on a character dot matrix graph, and the character dot matrix graph corresponds to the equipment information of the equipment for generating the screen image.
In implementation, after the watermark pattern in the acquired screen image is extracted, the check dot pattern may be extracted from the watermark pattern in the screen image, for example, by using any one of the watermarking methods shown in fig. 1. Then, the first check information may be determined based on the check dot pattern extracted from the watermark pattern.
S603, determining second check information based on all character dot matrix graphs in the watermark graph, and determining equipment information corresponding to the watermark graph.
The second check information refers to check information determined based on all the character dot patterns in the watermark pattern in the screen image obtained above, and may be obtained by analyzing and calculating based on all the character dot patterns in the watermark pattern in the screen image.
In implementation, after the watermark pattern in the screen image is extracted and the first check information is determined, the second check information may be determined based on all the character dot patterns in the watermark pattern in the screen image. Then, the device information that may be the device that leaks the secret information may be determined based on all the character dot patterns in the watermark pattern in the screen image, for example, the device information that may be the device that leaks the secret information may be determined according to a preset dot pattern comparison table (see fig. 2), and the device information may be ID, identification, IP, and the like of the device.
S604, when the first check information is the same as the second check information, the device information corresponding to the watermark pattern is determined as the device information from which the secret information is leaked.
In an embodiment, after the second check information is determined and the device information corresponding to the watermark pattern is determined, it may be determined whether the first check information and the second check information are the same, and when the first check information and the second check information are the same, the device information obtained based on the watermark pattern in the screen image may be determined as the device information from which the confidential information is leaked. Otherwise, the watermark pattern in the screen image is considered to be an invalid pattern, and the verification fails. It is to be understood that, since the first check information is determined directly from the check dot patterns extracted from the screen image and the second check information is determined based on all the character dot patterns in the watermark pattern in the screen image, when one or more of all the character dot patterns in the watermark pattern in the screen image are tampered, the first check information and the second check information may be different.
According to the technical scheme, the first check information is determined based on the check dot matrix graph in the watermark graph in the screen image, the second check information is calculated based on all the character dot matrix graphs in the watermark graph, and the equipment information corresponding to the watermark graph is determined as the equipment information with leaked confidential information when the first check information is the same as the second check information. Therefore, on the basis of the watermark pattern, the first check information determined directly based on the check dot matrix pattern in the watermark pattern in the screen image and the second check information determined based on all the character dot matrix patterns in the watermark pattern in the screen image are further combined to determine the equipment information with leaked confidential information, and only when the first check information is the same as the second check information, the equipment information corresponding to the watermark pattern is determined as the equipment information with leaked confidential information, so that the probability that the equipment information corresponding to the watermark pattern in the screen image is mistakenly determined as the equipment information with leaked confidential information when the watermark pattern is distorted can be avoided to a certain extent, the misjudgment rate can be further reduced to a certain extent, and the accuracy of the determined equipment information with leaked confidential information is improved.
Further, on the basis of the above method embodiment, the watermark pattern in the screen image may be determined based on a preset watermark format, and the corresponding processing of step S602 may be as follows: determining an initial dot matrix in a screen image, and determining a preset number of character dot matrix graphs and check dot matrix graphs based on the initial dot matrix and a preset watermark format; generating a watermark pattern based on the initial dot matrix, the preset number of character dot matrix patterns and the check dot matrix patterns, and generating first check information based on the check dot matrix patterns.
The preset watermark format refers to a preset format for generating a watermark pattern, such as a 9 × 9 squared lattice format.
The starting dot matrix refers to the first dot matrix in each preset watermark pattern, i.e. the dot matrix marking the beginning of the watermark pattern, for example, the starting symbol in fig. 2 may be set as the starting dot matrix.
The preset number refers to the number of character dot matrix patterns to be included in the watermark patterns determined based on the preset watermark format.
In implementation, after receiving the screen image, first, a starting dot matrix may be determined in the screen image, for example, a pattern identical to the specific pattern of the starting dot matrix may be found in the screen image according to the specific pattern of the starting dot matrix set as above, and determined as the starting dot matrix. Then, a predetermined number of character dot patterns may be determined from the starting dot matrix according to a predetermined watermark format, and the dot patterns may be verified. And then, generating a watermark pattern in the screen image based on the initial dot matrix, the character dot pattern and the check dot pattern. Then, the first verification information may be generated based on the verification lattice pattern.
Taking the watermark pattern in the screen image as an example as shown in fig. 5, wherein the first dot matrix is a starting dot matrix, the 2 nd to 6 th dot matrixes are character dot matrix patterns, the 7 th and 8 th dot matrix patterns are blank dot matrixes, that is, dot matrixes which do not correspond to characters or check values, and the 9 th dot matrix pattern is a check dot matrix pattern. It can be understood that the process of obtaining the watermark pattern and extracting the first check information may be the reverse process of adding the watermark pattern to the secret information, and is not described herein again. Therefore, the accuracy of determining the watermark pattern can be further improved by determining the watermark pattern according to the initial dot matrix, so that the misjudgment rate can be further reduced, and the accuracy of the determined equipment information with leaked confidential information can be improved. Meanwhile, the watermark pattern is determined according to the initial dot matrix, and the speed of determining the watermark pattern can be effectively increased, so that the efficiency of determining the equipment information leaking the confidential information can be effectively improved.
Further, on the basis of the above method embodiment, the second check information may also be determined according to all character dot patterns in the watermark pattern, and the corresponding partial processing of step S603 may be as follows: determining watermark information corresponding to each character dot matrix graph in the watermark graph based on a preset dot matrix graph comparison table; and determining second check information corresponding to the watermark pattern based on the watermark information corresponding to each character dot matrix pattern and the preset check parameters.
And the second check information refers to check information determined according to each character dot matrix graph of the watermark graph in the acquired screen image.
The preset dot pattern comparison table refers to preset character relations, as shown in fig. 2.
The watermark information refers to characters corresponding to each dot matrix in the preset dot matrix graph comparison table, such as characters possibly appearing in the device information.
In implementation, after the watermark pattern in the screen image is acquired, second check information corresponding to the watermark pattern may be determined. Specifically, firstly, watermark information corresponding to each character dot pattern may be determined according to a preset dot pattern comparison table. Then, second verification information actually corresponding to the watermark pattern may be calculated based on the watermark information corresponding to each determined character dot pattern and a preset verification parameter, so as to determine device information from which secret information is leaked based on the watermark pattern in the screen image, the first verification information, and the second verification information. It can be understood that the process of acquiring the watermark pattern in the screen image and extracting the first check information may be the reverse process of adding the watermark pattern to the secret information, and is not described herein again. Therefore, the watermark information is determined based on the preset dot matrix pattern comparison table, and the second check information is determined based on the watermark information and the preset check parameters, so that the determined second check information is more accurate, and the accuracy of the determined equipment information which leaks the confidential information can be further improved.
Further, on the basis of the above method embodiment, the device information corresponding to the watermark pattern may be determined based on the character dot pattern, and the corresponding partial processing of step S604 may be as follows: and determining equipment information corresponding to the watermark pattern based on the watermark information corresponding to each character dot matrix pattern in the watermark pattern.
In an implementation, after the second check information is determined, the device information corresponding to the watermark pattern may be determined based on the watermark pattern in the screen image. Specifically, firstly, the watermark information corresponding to each character dot pattern in the watermark pattern, that is, the specific character corresponding to each character dot pattern, may be determined based on the preset dot pattern comparison table. Then, the watermark information can be combined according to the sequence of the character dot matrix graph to obtain the device information corresponding to the screen image. Therefore, the equipment information corresponding to the watermark pattern in the screen image is determined based on the watermark information corresponding to each character dot matrix pattern, and the accuracy of the determined equipment information corresponding to the watermark pattern in the screen image can be further improved.
Further, on the basis of the above method embodiment, after determining whether the first check information and the second check information are the same, it may also be determined whether the watermark pattern is tampered, and the corresponding processing may be as follows: and when the first check information is the same as the second check information, determining that the watermark pattern is not tampered, otherwise, determining that the watermark pattern is tampered.
In implementation, after judging whether the first check information and the second check information are the same, whether the watermark pattern in the screen image is tampered can be further determined according to the judgment result. Specifically, if the first check information is the same as the second check information, it may be considered that the watermark pattern in the screen image is not tampered, that is, the watermark pattern in the screen image is the originally generated watermark pattern. If the first check information is different from the second check information, the watermark pattern in the screen image can be considered to be tampered. Therefore, whether the watermark graph is tampered or not is determined according to whether the first check information and the second check information are the same or not, more bases can be provided for tracing the leakage of the confidential information, the misjudgment rate can be further reduced, and the accuracy of the determined equipment information leaking the confidential information is improved.
It is to be understood that, assuming that the watermark pattern in the screen image is as shown in fig. 5, the first verification information may be directly obtained from the last grid of the squared grid in fig. 5 (i.e., the verification dot pattern), and the first verification information may be represented as 377; the second calibration information may be calculated according to the first eight cases (i.e., the start symbol and all the character dot patterns) of the nine-square case of fig. 5, and may also be represented as 377. At this time, if the first verification information is the same as the second verification information, the device information a1401 corresponding to the watermark pattern determined based on the watermark information corresponding to each character dot pattern in the watermark pattern in the screen image may be determined as the device information from which the confidential information is leaked.
On the contrary, if one or more of all the character dot patterns in the watermark pattern in the screen image are tampered, the device information determined based on all the character dot patterns in the watermark pattern in the screen image is different from the device information actually generated into the screen image. Taking the watermark pattern in the screen image as shown in fig. 7 as an example, according to fig. 7, the first verification information 377 and the second verification information 1481 and 512 are remainder 457, where the first verification information 377 and the second verification information 457 are obviously different, and therefore the device information a1481 determined based on the watermark pattern in fig. 7 is not the device information for actually generating the screen image.
It should be noted that, in implementation, the check dot patterns in the watermark patterns in the screen image may also be tampered. When the check dot pattern is tampered, the first check information and the second check information corresponding to the watermark pattern in the determined screen image may also be different, and the specific determination method is the same as the method provided by the above method embodiment, and is not described herein again.
It is to be understood that the check information (including the first check information and the second check information, etc.) mentioned in the above method embodiments may include one or both of a check value and a check dot pattern. When the verification information is the verification value or the verification dot pattern, mutual conversion can be performed based on preset verification parameters, and the verification value or the verification dot pattern can also be directly determined as the verification information. Or when the verification information includes the verification value and the verification dot pattern, one of the verification value and the verification dot pattern may be selected to be used in the execution process of the above method embodiment, or both the verification value and the verification dot pattern may be used in the execution process of the above method embodiment.
It is to be understood that the implementation of the above method embodiment may be a specific device, and the device is installed with software having corresponding functions of the above method embodiment, and the device may implement the processes of the above method embodiment through the software.
Fig. 8 shows a watermarking apparatus provided by the present embodiment, which includes a dot pattern determining unit 801 and a watermarking pattern adding unit 802, where:
the dot pattern determining unit 801 is configured to determine device information and a character dot pattern corresponding to each character of the device information, and determine a check dot pattern corresponding to the device information based on the character of the device information;
the watermark pattern adding unit 802 is configured to generate a watermark pattern corresponding to the device information based on the character dot pattern corresponding to each character and the check dot pattern, and add the watermark pattern corresponding to the device information to secret information.
Optionally, the dot pattern determining unit 801 is configured to:
determining a character dot matrix graph corresponding to each character based on a preset dot matrix graph comparison table;
determining verification information corresponding to the equipment information based on the characters of the equipment information and preset verification parameters;
and determining the dot matrix graph corresponding to the verification information based on the preset dot matrix graph comparison table, and determining the dot matrix graph corresponding to the verification information as the verification dot matrix graph corresponding to the equipment information.
Optionally, the dot pattern determining unit 801 is configured to:
and determining an initial dot matrix, arranging the initial dot matrix, the character dot matrix graph corresponding to each character and the check dot matrix graph according to a preset watermark format, and generating a watermark graph corresponding to the equipment information.
The watermark adding apparatus described in this embodiment may be used to implement each method embodiment of the above-described watermark adding method, and the principle and technical effect are similar, which are not described herein again.
Fig. 9 shows a screen image leakage tracking apparatus provided in this embodiment, which includes a watermark pattern extraction unit 901, an information determination unit 902, and a leakage device determination unit 903, where:
the watermark pattern extracting unit 901 is configured to extract a watermark pattern in an acquired screen image, where the watermark pattern is acquired by using the watermark adding method according to any one of the first aspect;
the information determining unit 902 is configured to determine first check information based on a check dot matrix pattern in the watermark pattern, where the check dot matrix pattern is generated based on a character dot matrix pattern, and the character dot matrix pattern corresponds to device information of a device that generates the screen image; the device is used for determining second check information based on all character dot matrix graphs in the watermark graphs and determining device information corresponding to the watermark graphs;
the leaked device determining unit 903 is configured to determine, when the first check information is the same as the second check information, device information corresponding to the watermark pattern as device information from which the secret information is leaked.
Optionally, the information determining unit 902 is configured to:
determining an initial dot matrix in the screen image, and determining a preset number of character dot matrix graphs and check dot matrix graphs based on the initial dot matrix and a preset watermark format;
and generating the watermark graph based on the initial dot matrix, the preset number of character dot matrix graphs and the check dot matrix graph, and generating first check information based on the check dot matrix graph.
Optionally, the information determining unit 902 is configured to:
determining characters corresponding to each character dot matrix graph in the watermark graph based on a preset dot matrix graph comparison table;
and determining second check information corresponding to the watermark graph based on the characters corresponding to the character dot matrix graphs and preset check parameters.
Optionally, the leakage apparatus determining unit 903 is configured to:
and determining equipment information corresponding to the watermark pattern based on the watermark information corresponding to each character dot matrix pattern in the watermark pattern.
Optionally, the leakage apparatus determining unit 903 is further configured to:
and when the first check information is the same as the second check information, determining that the watermark pattern is not tampered, otherwise, determining that the watermark pattern is tampered.
Optionally, the check information includes one or both of a check value and a check dot pattern.
The screen image leakage tracking device of this embodiment may be used in various method embodiments for performing the screen image leakage tracking, and the principle and technical effects thereof are similar, and are not described herein again.
As shown in fig. 10, an embodiment of the present invention further provides an electronic device, where the electronic device may include: a processor (processor)1001, a memory (memory)1002, and a bus 1003;
wherein,
the processor 1001 and the memory 1002 complete communication with each other through the bus 1003;
the processor 1001 is configured to call program instructions in the memory 1002 to execute the methods provided by the method embodiments of the watermarking method described above.
As shown in fig. 11, an embodiment of the present invention further provides an electronic device, where the electronic device may include: a processor (processor)1101, a memory (memory)1102, and a bus 1103;
wherein,
the processor 1101 and the memory 1102 communicate with each other via the bus 1103;
the processor 1101 is configured to call program instructions in the memory 1102 to execute the methods provided by the method embodiments of the screen image leakage tracking method described above.
Furthermore, the logic instructions in the memory 1002/1102 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the methods provided by the method embodiments of the above-mentioned watermarking method when executed by a processor.
In another aspect, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the methods provided by the method embodiments of the screen image leakage tracking method.
In another aspect, the present embodiment also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the method embodiments of the above-mentioned watermarking method.
In another aspect, the present embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the method embodiments of the screen image leakage tracking method described above.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.