Watermark processing method and device, computer equipment and readable storage medium

By inserting watermark information based on zero-width characters and homocode characters into the data, the problem of poor universality of traditional watermark technology is solved, the data security and traceability are improved, and the data is effectively protected.

CN119167333APending Publication Date: 2024-12-20SHENZHEN POWER SUPPLY BUREAU

Patent Information

Application Number
CN202411152224.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional data watermarking technology cannot maintain consistency in the encoding environment, resulting in poor watermark versatility and difficulty in effectively protecting the copyright and integrity of data.

Method used

By inserting target watermark information generated based on zero-width characters and homocode characters into the to be processed text, the data marking is marked using these characters that are invisible to the naked eye, improving the universality and security of the watermark.

Benefits of technology

It realizes inserting tag information that is invisible to the naked eye in the data, avoiding the poor universality of traditional visible watermarks due to coding environment problems, and improving the security and traceability of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167333A_ABST
    Figure CN119167333A_ABST
Patent Text Reader

Abstract

The invention relates to a watermark processing method and device, computer equipment and a computer readable storage medium. The method comprises the steps of obtaining a to-be-processed text; determining target watermark information based on at least one of the zero-width characters and the same-shape and different-code characters according to a pre-formulated coding rule; the target watermark information comprises at least one of a target zero-width character and a target homomorphic different-code character; and inserting the target watermark information into the to-be-processed text. By adopting the method, not only can the universality of the watermark be improved, but also the security of the text to be processed can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a watermark processing method, apparatus, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] With the rapid development of information technology, data has become a key asset in modern society. However, the widespread dissemination and sharing of data has also brought serious security risks, and data leaks and infringement incidents have occurred frequently. In this context, data security and privacy protection have attracted widespread attention around the world.

[0003] Data watermarking technology, as an effective means of data protection, can trace the source of data leakage and protect data copyright and integrity by embedding specific marking information in the data. In practical applications, traditional data watermarking technology still has the problem that the watermark format or the encoding environment cannot be consistent, resulting in poor versatility of the watermark. Summary of the invention

[0004] Based on this, it is necessary to provide a watermark processing method, apparatus, computer device, computer-readable storage medium and computer program product that can improve versatility in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a watermark processing method, the method comprising:

[0006] Get the text to be processed;

[0007] Determining target watermark information based on at least one of a zero-width character and a homograph character according to a pre-established encoding rule; the target watermark information includes at least one of a target zero-width character and a target homograph character;

[0008] The target watermark information is inserted into the text to be processed.

[0009] In one of the embodiments, inserting the target watermark information into the text to be processed includes at least one of the following:

[0010] Get the first zero-width character, the second zero-width character and the third zero-width character in the target zero-width character; wherein the first zero-width character is the first target zero-width character; the second zero-width character is the last target zero-width character; and the third zero-width character is any character except the first zero-width character and the second zero-width character;

[0011] Acquire a first position, a second position, and a third position from the text to be processed, wherein the first position, the second position, and the third position are arranged in a target order, the first position precedes the second position, and the third position is any position between the first position and the second position;

[0012] Insert the first zero-width character into the first position; insert the second zero-width character into the second position; insert the third zero-width character into the third position;

[0013] or

[0014] Obtaining the position of a first homograph character in the to-be-processed text, and taking the position of the first homograph character as a fourth position;

[0015] The first homograph character at the fourth position is replaced by the target homograph character.

[0016] In one embodiment, determining the target watermark information based on at least one of a zero-width character and a homograph character comprises:

[0017] The target watermark information is determined based on at least one of the arrangement and combination mode of the zero-width characters and the encoding selection scheme of the homographic characters.

[0018] In one embodiment, the pre-defined encoding rule includes a mapping relationship between a first homographic character and a second homographic character; and determining target watermark information based on an encoding selection scheme for homographic characters includes:

[0019] According to the mapping relationship, determining the second homograph character corresponding to the first homograph character in the to-be-processed text;

[0020] Based on the second homographic character, generating first initial watermark information;

[0021] The first initial watermark information is encrypted to determine target watermark information.

[0022] In one embodiment, the pre-defined encoding rule includes specifying zero-width characters; determining target watermark information based on the arrangement and combination of zero-width characters, including:

[0023] Generate second initial watermark information based on the arrangement and combination of the specified zero-width characters;

[0024] The second initial watermark information is encrypted to determine the target watermark information.

[0025] In one embodiment, the step of determining the target watermark information based on at least one of a zero-width character and a homographic character according to a pre-defined encoding rule includes:

[0026] Processing the zero-width character to generate a coding record number; the coding record number is generated based on a time series;

[0027] Generating third initial watermark information according to the coded record number and / or the homographic characters;

[0028] Encrypting the third initial information to obtain target watermark information;

[0029] After inserting the target watermark information into the text to be processed, the method further includes:

[0030] Record the current version information of the text to be processed after inserting the target watermark information.

[0031] In one of the embodiments, before inserting the target watermark information into the text to be processed, the method further includes:

[0032] Obtaining the historical text to be processed corresponding to the historical version information, and obtaining the historical target watermark information inserted into the historical text to be processed; wherein the historical version information is the previous version information based on the current version information;

[0033] Comparing the historical watermark information with the target watermark information to obtain differential watermark information;

[0034] Using the difference watermark information as new target watermark information;

[0035] The step of inserting the target watermark information into the text to be processed comprises:

[0036] Inserting new target watermark information into the text to be processed.

[0037] In a second aspect, the present application further provides a watermark processing device, the device comprising:

[0038] An acquisition module is used to obtain the text to be processed;

[0039] A first determination module is used to determine target watermark information based on at least one of a zero-width character and a homograph character according to a pre-defined encoding rule; the target watermark information includes at least one of a target zero-width character and a target homograph character;

[0040] The inserting module is used to insert the target watermark information into the text to be processed.

[0041] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0042] In a fourth embodiment, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0043] The watermark processing method, device, computer equipment and computer-readable storage medium first obtain the text to be processed; secondly, according to the pre-established encoding rules, based on at least one of zero-width characters and homograph characters, determine the target watermark information; because the target watermark information generated by using zero-width characters and / or homograph characters is invisible to the naked eye, it is also called a blind watermark, and finally the target watermark information, that is, the blind watermark, is inserted into the text to be processed, which not only inserts the mark information into the text, but also avoids the problem of poor universality caused by the encoding environment or the format problem of the traditional visible watermark itself in practical applications. On the basis of improving the universality of the watermark, the security of the text to be processed can be improved according to the mark information inserted in the text to be processed. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0045] FIG1 is a diagram showing an application environment of a watermark processing method according to an embodiment;

[0046] FIG2 is a schematic diagram of a flow chart of a watermark processing method in one embodiment;

[0047] FIG3 is a schematic diagram of a process of inserting target watermark information into a text to be processed in one embodiment;

[0048] FIG4 is a schematic diagram of a process of inserting target watermark information into a text to be processed in another embodiment;

[0049] FIG5 is a schematic diagram of a process for determining target watermark information in one embodiment;

[0050] FIG6 is a schematic diagram of a process for determining target watermark information in another embodiment;

[0051] FIG7 is a schematic diagram of a process for determining target watermark information in another embodiment;

[0052] FIG8 is a schematic diagram of a process before inserting target watermark information into a text to be processed in one embodiment;

[0053] FIG9 is a structural block diagram of a watermark processing device in one embodiment;

[0054] FIG. 10 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] The watermark processing method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1. The terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server obtains the text to be processed; according to the pre-established encoding rules, based on at least one of the zero-width character and the homograph character, the target watermark information is determined; the target watermark information includes at least one of the target zero-width character and the target homograph character; the target watermark information is inserted into the text to be processed. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0057] In an exemplary embodiment, as shown in FIG2 , a watermark processing method is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps S202 to S206 . Among them:

[0058] Step S202, obtaining the text to be processed.

[0059] The text to be processed may include text, picture text, or a combination of text and picture text. The text to be processed may also include long text type and short text type.

[0060] Optionally, the terminal device sends the text to be processed to the server, and the server obtains the text to be processed sent by the terminal.

[0061] Step S204: Determine the target watermark information based on at least one of zero-width characters and homoglyphic characters according to the pre-established encoding rule; the target watermark information includes at least one of target zero-width characters and target homoglyphic characters.

[0062] Among them, zero-width characters are invisible and non-printable to the naked eye. Among them, zero-width characters include zero-width space (U+200B), zero-width non-breaking space (U+FEFF), zero-width hyphen (U+200D), and zero-width break character (U+200C). Although these characters are invisible in the text, they can be calculated and recognized. Each zero-width character is assigned a specific meaning. For example, the zero-width space (U+200B) is used to represent the data source, and the zero-width non-breaking space (U+FEFF) is used to represent the timestamp. Homoglyphic characters refer to characters that have the same glyph and at least two different encodings in the same character set encoding. As shown in Table 1, there is a mapping relationship between the original characters and the target homoglyphic characters in the same row. The mapping table can be a mapping table of characters or a mapping table of the corresponding encodings of characters. Assuming the original character "A", there are corresponding homoglyphic character 1, homoglyphic character 2, homoglyphic character 3, and homoglyphic character 4, etc. It can also be that the original character encoding "A" has corresponding homoglyphic character encoding 1, homoglyphic character encoding 2, homoglyphic character encoding 3, and homoglyphic character encoding 4, etc. For example, "一" has two encodings, " / u4e00" and " / u2f00".

[0063] It is also possible to use the combination of characters in the half-width state and characters in the full-width state as homoglyphic characters. For example, the full-width comma "," has a corresponding encoding 1, and the corresponding encoding 1 is determined by two or more half-width symbols. For example, it is composed of the encoding corresponding to a half-width comma "," plus the encoding corresponding to a half-width space " "; it can also be composed of the encoding corresponding to a half-width comma "," plus the encoding corresponding to two half-width spaces " ". Another example is the full-width space " ", which has a corresponding encoding 1, and the corresponding encoding 1 is composed of the encodings corresponding to two or more half-width spaces " ".

[0064] Table 1 Homoglyphic Character Mapping Table

[0065]

[0066] The target watermark content can include a timestamp accurate to the second, an encrypted user ID, a data sensitivity level, an access permission level, a data storage location, a coded record number, and a transmission interface identifier, etc. For example, different system transmission interface identifiers can be represented by zero-width characters. In general, binary encoding is used to represent different system interfaces, and the mapping relationship between binary encoding and zero-width characters is used to represent them:

[0067] Formula (1)

[0068] Where b is the binary code, is the corresponding zero-width character.

[0069] Optionally, the encoding rules are pre-established, and the server may add the same target watermark information to all the to-be-processed texts obtained by the server, or may add corresponding target watermark information to different to-be-processed texts. The target watermark information may include only target zero-width characters, only target homograph characters, or both target zero-width characters and target homograph characters.

[0070] Optionally, the server processes at least one of zero-width characters and homograph characters to determine target watermark information; the processing method includes but is not limited to permutation and combination of zero-width characters and selection of corresponding codes for homograph characters.

[0071] As an optional embodiment, the server arranges and combines zero-width characters to obtain target zero-width characters, and uses the target zero-width characters as target watermark information. As another optional embodiment, the server selects the corresponding codes of homomorphic characters to obtain target homomorphic characters, and uses the target homomorphic characters as target watermark information. As another optional embodiment, the server arranges and combines zero-width characters at the same time to obtain target zero-width characters; selects the corresponding codes of homomorphic characters to obtain target homomorphic characters, and uses the target zero-width characters and the target homomorphic characters together as target watermark information.

[0072] Step S206: inserting the target watermark information into the text to be processed.

[0073] Optionally, the server inserts target watermark information into the text to be processed.

[0074] As an optional implementation, if the target watermark information only includes the target zero-width character, and the to-be-processed text includes an ID number, then the target zero-width character is inserted after the nth digit of the ID number, as shown in the following formula:

[0075] Formula (2)

[0076] Where s is the original string, p is the insertion point, is the target zero-width character.

[0077] As an optional implementation, if the text to be processed contains a name, a target zero-width character is inserted between the last name and the first name.

[0078] As an optional implementation, if the target watermark information includes only target homographs, a comparison table such as "0" (U+0030) and "O" (U+004F), "1" (U+0031) and "I" (U+0049) is established, and the target homographs are used to replace keywords or specific positions in the text.

[0079] Formula (3)

[0080] Where s is the original string, s′ is the target homograph character after replacement, and the replacement operation is performed according to the mapping table.

[0081] As an optional implementation method, if the target watermark information includes only the target homograph characters and also the target zero-width characters, there are several paragraphs in the text to be processed, and it contains the ID number, the name, and the original characters corresponding to the target homograph characters. The server inserts the target zero-width character 1 after the nth digit of the ID number, inserts the target zero-width character 2 between the first and last names of the name, replaces all the original characters corresponding to the target homograph characters in the text to be processed with the target homograph characters, and the server can also insert the target zero-width character 3 at the beginning and end of the paragraph.

[0082] In the above watermark processing method, firstly, the text to be processed is obtained; secondly, according to the pre-established encoding rules, based on at least one of zero-width characters and homograph characters, the target watermark information is determined; since the target watermark information generated by zero-width characters and / or homograph characters is invisible to the naked eye, it is also called a blind watermark, and finally the target watermark information, that is, the blind watermark, is inserted into the text to be processed, which not only inserts the mark information into the text, but also avoids the problem of poor universality caused by the encoding environment or the format problem of the traditional visible watermark itself in practical applications. On the basis of improving the universality of the watermark, the security of the text to be processed can be improved according to the mark information inserted in the text to be processed.

[0083] In an exemplary embodiment, as shown in FIG3 , inserting target watermark information into the text to be processed includes steps S302 to S306 . Among them:

[0084] Step S302, obtaining a first zero-width character, a second zero-width character and a third zero-width character in the target zero-width character.

[0085] The first zero-width character is the first target zero-width character, which can be recorded as target zero-width character 1; the second zero-width character is the last target zero-width character, which can be recorded as target zero-width character n ; The third zero-width character is any character except the first zero-width character and the second zero-width character, which can be recorded as the target zero-width character m Among them, 1 <m<n。

[0086] Optionally, the server obtains a total of 5 zero-width characters to determine the target zero-width character, namely, target zero-width character 1, target zero-width character 2, target zero-width character 3, target zero-width character 4, and target zero-width character 5. Among them, the first zero-width character is target zero-width character 1, the second zero-width character is target zero-width character 5, and the third zero-width character is target zero-width character 2, target zero-width character 3, and target zero-width character 4.

[0087] It should be noted that the number of zero-width characters included in the target zero-width characters is not limited and can be any number that meets the requirements.

[0088] Step S304, obtaining the first position, the second position and the third position from the text to be processed.

[0089] The first position, the second position and the third position are arranged in a target order, the first position precedes the second position, and the third position is any position between the first position and the second position.

[0090] Optionally, the server obtains the position before the first paragraph of the text to be processed as the first position, or the position between the character string corresponding to the "surname" and the character corresponding to the "name" in the text to be processed as the first position. The position after the last paragraph in the text to be processed is taken as the second position, or the original position corresponding to the homographic character 1 is taken as the second position. The server can take any position between the first position and the second position as the third position.

[0091] Step S306, inserting the first zero-width character into the first position; inserting the second zero-width character into the second position; and inserting the third zero-width character into the third position.

[0092] Optionally, the server inserts the target zero-width character 1 as the first zero-width character before the first paragraph of the text to be processed. The server inserts the target zero-width character 5 as the second zero-width character after the last paragraph of the text to be processed. The server inserts the target zero-width character 2, the target zero-width character 3, and the target zero-width character 4 as the third zero-width character simultaneously into any three positions between the position before the first paragraph and the position after the last paragraph of the text to be processed.

[0093] As an optional implementation method, the server may also insert the target zero-width character 2 into any position between the position before the first paragraph and the position after the last paragraph of the text to be processed; then insert the target zero-width character 3 into any position between the position before the first paragraph and the position after the last paragraph of the text to be processed except the position where the target zero-width character 2 is located; finally, insert the target zero-width character 4 into any position between the position before the first paragraph and the position after the last paragraph of the text to be processed except the position where the target zero-width character 2 is located and the position where the target zero-width character 3 is located, until all the target zero-width characters are inserted into the text to be processed.

[0094] In an exemplary embodiment, as shown in FIG4 , inserting target watermark information into the text to be processed includes steps S402 to S404. In which:

[0095] Step S402, obtaining the position of the first homograph character in the text to be processed, and taking the position of the first homograph character as the fourth position.

[0096] The target watermark information includes target homographic characters.

[0097] Optionally, the server obtains the position of the first homograph character (original character) in the to-be-processed text, and uses the position of the first homograph character (original character) as the fourth position. If there are ten first homograph characters (original characters) in the to-be-processed text, the positions of the ten first homograph characters (original characters) are all the fourth positions, which can be recorded as fourth sub-position 1, fourth sub-position 2...

[0098] It should be noted that the number of the first homographic characters, ie, the original characters, in the text to be processed is not limited.

[0099] Step S404: Replace the first homograph character at the fourth position with the target homograph character.

[0100] Optionally, the server replaces the first homograph 1 at the fourth subposition 1 with the target homograph 1, and the second homograph 2 at the fourth subposition 2 with the target homograph 2, until all replacements are completed. In practical applications, the server may replace the first homograph at the fourth position with the target homograph at the same time.

[0101] As an optional implementation, the target watermark information includes a target zero-width character and a target homograph character. The server may first insert the target zero-width character into the text to be processed by an adaptive algorithm, and then insert the target homograph character into the text to be processed. The server may also insert the target homograph character into the text to be processed by an adaptive algorithm, and then insert the target zero-width character into the text to be processed. The server may also simultaneously insert the target homograph character into the text to be processed and the target zero-width character into the text to be processed. The execution order of the server is not limited here.

[0102] In this embodiment, a target watermark is generated by inserting at least one of a target zero-width character and a target homograph character into the text to be processed. This can achieve that a mark is inserted into the text to be processed, and the page display of the text to be processed before and after the target watermark information is inserted is completely the same, and the page display of the text to be processed is not affected by the insertion of the target watermark information.

[0103] In an exemplary embodiment, the target watermark information is determined based on at least one of zero-width characters and homograph characters, including: determining the target watermark information based on at least one of the arrangement and combination of zero-width characters and the encoding selection scheme of homograph characters.

[0104] Optionally, the server arranges and combines zero-width characters according to encoding rules, such as arranging and combining at least two of the zero-width characters including zero-width space (U+200B), zero-width non-breaking space (U+FEFF), zero-width hyphen (U+200D) and zero-width hyphen (U+200C), so as to obtain different target zero-width characters.

[0105] Optionally, the server can obtain different target homograph characters according to the encoding selection of the homograph characters according to the encoding rules. Assume that the original character, that is, the first homograph character "A", has corresponding encodings 1, 2, 3, and 4, etc. According to the encoding rules, the server can use encoding 1 as the target homograph character, and can also use encoding 2 as the target homograph character.

[0106] As an optional implementation method, the server arranges and combines at least two of the zero-width characters including zero-width space (U+200B), zero-width non-breaking space (U+FEFF), zero-width hyphen (U+200D) and zero-width hyphen (U+200C) according to the encoding rules, and selects the code 1 corresponding to the first homograph character "A" as the target homograph character.

[0107] In this embodiment, the target watermark information is determined by selecting at least one of the arrangement and combination of zero-width characters and the encoding scheme of characters with the same shape but different codes according to different encoding rules. This can improve the versatility of the watermark without affecting the page display of the text to be processed. It can also extract the target watermark information for tracing when the text to be processed is leaked according to the different information marked by the inserted target watermark information, thereby improving data security.

[0108] In the above exemplary embodiment, as shown in FIG5 , the pre-defined encoding rule includes a mapping relationship between a first homograph character and a second homograph character; based on the encoding selection scheme of the homograph character, determining the target watermark information includes steps S502 to S506. Wherein:

[0109] Step S502: determining, according to the mapping relationship, a second homograph character corresponding to the first homograph character in the text to be processed.

[0110] Optionally, the pre-established encoding rules include a mapping relationship between a first homograph character and a second homograph character, and also include a selection scheme for multiple second homograph characters. The server determines the second homograph character corresponding to the first homograph character in the text to be processed, that is, the original character, based on the acquired mapping relationship, wherein the second homograph character may include only one encoding, or may include multiple encodings. For example, the first homograph character "A" has corresponding encodings 1, 2, 3, and 4. The server selects encoding 2 as the second homograph character according to the encoding rules. That is, the second homograph character corresponding to the first homograph character "A" in the text to be processed is encoding 2.

[0111] It should be noted that there may be multiple first characters with the same shape but different codes in the text to be processed. Accordingly, multiple second characters with the same shape but different codes are also determined.

[0112] Step S504: Generate first initial watermark information based on the second homographic character.

[0113] Optionally, the server generates first initial watermark information based on at least one second homograph character.

[0114] Step S506: encrypt the first initial watermark information to determine the target watermark information.

[0115] Optionally, the server encrypts the first initial watermark information by using an AES-256 encryption algorithm to obtain the target watermark information. The encryption key is rotated regularly by using a key management system. At the same time, a cryptographically secure pseudo-random number generator is used to generate an unpredictable sequence, further enhancing the security of the target watermark information.

[0116] In this embodiment, the target watermark information is obtained by encrypting the first initial watermark information generated by only including the same-shaped but different-coded characters, thereby improving the security of the target watermark information.

[0117] As an embodiment parallel to the previous embodiment, as shown in FIG6 , the pre-defined encoding rules include specifying zero-width characters; determining target watermark information based on the arrangement and combination of zero-width characters, including steps S602 to S604. Among them:

[0118] Step S602: Generate second initial watermark information based on the arrangement and combination of specified zero-width characters.

[0119] Optionally, the pre-defined encoding rule includes specifying zero-width characters; the server arranges and combines the specified zero-width characters to obtain second initial watermark information, and the server can use the second initial watermark information as target watermark information, or perform subsequent encryption processing on the second initial watermark information.

[0120] Step S604: encrypt the second initial watermark information to determine the target watermark information.

[0121] Optionally, the server arranges and combines the designated zero-width characters to generate second initial watermark information, and encrypts the second initial watermark information, thereby determining target watermark information containing only target zero-width characters.

[0122] In this embodiment, the target watermark information generated by specifying the arrangement and combination of zero-width characters facilitates the third party to detect the target watermark information on the processed text, further ensuring data security. At the same time, the initial second watermark information is encrypted using an encryption algorithm, which can further improve data security.

[0123] In an exemplary embodiment, as shown in FIG7 , according to a pre-established encoding rule, based on at least one of a zero-width character and a homograph character, the target watermark information is determined, including steps S702 to S706. In which:

[0124] Step S702, processing the zero-width character to generate a coding record number; the coding record number is generated based on a time series.

[0125] Among them, the coded record number is generated based on the time series and is unique.

[0126] Optionally, the server can generate a coding record number such as "year, month, day, hour, and minute + random number" by processing zero-width characters according to a generation algorithm and formula (4) according to a pre-established coding rule. The server can establish a scheduled task to update the coding record.

[0127] Formula (4)

[0128] Where f is the generation algorithm, timestamp is the timestamp, and random_number is the random number.

[0129] Step S704: Generate third initial watermark information according to the coded record number and / or the homographic characters.

[0130] Optionally, the server generates third initial watermark information according to the encoded record number, and the third initial watermark information may carry the encoded record number.

[0131] Optionally, the server generates third initial watermark information based on the encoded record number and the homographic characters.

[0132] Step S706: encrypt the third initial information to obtain target watermark information.

[0133] Optionally, the server encrypts the third initial information through an encryption algorithm to obtain target watermark information, wherein the encryption algorithm may be AES-256 encryption.

[0134] After the target watermark information is inserted into the text to be processed, the process further includes step S708:

[0135] Step S708, recording the current version information of the text to be processed after the target watermark information is inserted.

[0136] Optionally, the server records the current version information of the text to be processed after the target watermark information is inserted, so as to establish a mapping relationship between the current version information and the target watermark information carrying the encoded record number.

[0137] In this embodiment, by recording the version information of the target watermark information, the target watermark information can be updated at target intervals, and data tracking and management are facilitated.

[0138] Continuing from the previous embodiment, as shown in FIG8 , before inserting the target watermark information into the text to be processed, the process further includes steps S802 to S806 . Among them:

[0139] Step S802, obtaining the historical text to be processed corresponding to the historical version information, and obtaining the historical target watermark information inserted into the historical text to be processed.

[0140] The historical version information is the previous version information based on the current version information.

[0141] Optionally, the server obtains the historical text to be processed corresponding to the historical version information, and obtains the historical target watermark information inserted into the historical text to be processed. For example, the historical target watermark information corresponding to the historical version information is 1234567.

[0142] Step S804: compare the historical watermark information with the target watermark information to obtain differential watermark information.

[0143] Optionally, assuming that the target watermark information corresponding to the current version information is 1244567, the server compares the historical target watermark information 1234567 with the target watermark information 1244567 to obtain differential watermark information, that is, the third bit of information is the differential watermark information.

[0144] Step S806: Use the difference watermark information as new target watermark information.

[0145] Optionally, the server uses the difference information as new target watermark information. The server only uses the third bit of information as new target watermark information, and other historical target watermark information remains unchanged.

[0146] The inserting the target watermark information into the text to be processed includes: step S808, inserting new target watermark information into the text to be processed.

[0147] Optionally, the server inserts new target watermark information, such as the third bit of information "4", into the text to be processed.

[0148] In this embodiment, for watermarks that change frequently, a watermark incremental update strategy is adopted to update only the watermarks of the changed parts to reduce the data update burden.

[0149] In an exemplary embodiment, a server obtains a text to be processed; a pre-defined encoding rule includes a mapping relationship between a first homograph character and a second homograph character, and a designated zero-width character; the server determines a second homograph character corresponding to the first homograph character in the text to be processed according to the mapping relationship; generates a first initial watermark information based on the second homograph character; encrypts the first initial watermark information to determine the first target watermark information. The server generates a second initial watermark information based on an arrangement and combination of designated zero-width characters; encrypts the second initial watermark information to determine the second target watermark information. The first target watermark information and the second target watermark information together constitute the target watermark information. The server obtains the first zero-width character, the second zero-width character, and the third zero-width character in the target zero-width character; wherein the first zero-width character is the first target zero-width character; the second zero-width character is the last target zero-width character; the third zero-width character is any character except the first zero-width character and the second zero-width character; obtains the first position, the second position, and the third position from the text to be processed, wherein the first position, the second position, and the third position are arranged in the target order, the first position precedes the second position, and the third position is any position between the first position and the second position; inserts the first zero-width character into the first position; inserts the second zero-width character into the second position; and inserts the third zero-width character into the third position. The server obtains the position of the first homograph character in the text to be processed, and takes the position of the first homograph character as the fourth position; and replaces the first homograph character at the fourth position with the target homograph character.

[0150] Furthermore, the above method can be deeply integrated with the data loss prevention (DLP) system. Special invisible character watermark detection rules are developed to enable the DLP system to identify and process data containing target watermark information. Through a multi-level detection mechanism, including fast detection based on pattern matching and high-precision detection based on deep learning, as well as an adaptive threshold algorithm, the server can automatically adjust the detection sensitivity according to different documents and data types.

[0151] In addition, the implementation of real-time monitoring and interception mechanisms ensures that the DLP system can identify and intercept unauthorized invisible character watermark data during data transmission. The development of network protocol adapters ensures the effectiveness of the DLP system in various network environments, and data leakage protection is enhanced. According to the data classification rules of invisible character watermarks, data is classified and marked according to sensitivity. The implementation of the policy execution engine can automatically execute data access and transmission policies based on the permission information in the watermark. The development of the data usage behavior analysis module, combined with the watermark information, helps to identify abnormal data access and usage patterns.

[0152] To ensure the accuracy and performance of the system, integration testing and performance optimization were performed. Comprehensive test case design covers various possible watermarking scenarios. Dynamic resource allocation mechanism was developed to automatically adjust computing resources according to system load to meet the needs of different situations.

[0153] The implementation of reporting and analysis functions provides detailed watermark detection reports, including watermark content, detection location, and associated data. The use of data visualization tools intuitively displays the distribution and potential risks of watermarks. The integration of trend analysis functions helps to identify long-term trends and provide a basis for adjusting security policies.

[0154] The implementation of system collaboration and feedback mechanisms strengthens cooperation with other security systems and provides comprehensive security event correlation analysis. The development of automated feedback loops uses the detection results of the DLP system to optimize the watermark generation and embedding strategy. The implementation of dynamic rule update mechanisms automatically updates the detection rules of the DLP system based on newly discovered watermark patterns.

[0155] During the data export phase, the system will add identity tags when exporting data, record information such as export time and recipient identity, and ensure that watermarks are added in a dispersed manner throughout the data set. Performance optimization measures include controlling the number of zero-width characters in short text watermarks, modifying the database field character length limit when necessary, and considering adding watermarks during the data integration output phase to further improve the efficiency and security of the system.

[0156] In the data monitoring and leakage tracking stage, the present invention implements a series of strategies to ensure that data leakage incidents can be discovered and responded to in a timely manner. First, by regularly scanning the internal network and the public network, crawler technology is used to search for potentially leaked data to ensure that potential data leakage can be quickly discovered. Once suspicious data is detected, the system will extract watermark information from the data and apply error correction algorithms to restore the watermark that may have been damaged to ensure the integrity of the watermark. Then, the key information contained in the watermark, such as time, user, permissions, etc., is parsed, which is crucial for the subsequent tracking of the source of the leakage.

[0157] In terms of leak source tracking, watermark information is used to quickly locate the IP address of the device that leaked data, the time when the data was generated, the associated account, etc. Error detection and correction algorithms, such as Hamming code and Reed-Solomon code, are integrated into the watermark extraction process to identify and repair damaged watermarks. In addition, the watermark algorithm is designed with robustness in mind to ensure that useful information can be extracted even when the data is damaged.

[0158] For data leaks involving third parties, use watermark information to track down third parties that may have caused data leaks. Define a structured format for watermarks, such as JSON or XML, for easy parsing. Implement a parser to read and interpret the information in the watermark, extract the metadata in the watermark, and convert it into an actionable format for further analysis.

[0159] Finally, by analyzing the watermark information and system logs, the leakage path is determined and a detailed traceability report is generated. The report includes business link analysis, timeline, data flow diagram and risk assessment of the security vulnerability, providing a basis for taking corresponding emergency response measures and system optimization.

[0160] In the data monitoring and leakage tracking phase, the process at this stage begins with regular scanning of internal and public networks using automated crawler technology to search for potentially leaked data. Once suspicious data is detected, the system begins to extract watermark information from the data and apply error correction algorithms, such as Hamming codes or Reed-Solomon codes, to restore potentially damaged watermarks and ensure the integrity of the watermark information.

[0161] The key information contained in the watermark, including timestamp, user ID, permission level, etc., will be parsed for leak source tracking. Using this information, the system can quickly locate the device IP of the data leak, the data generation time, and the associated account. In addition, considering the possible damage to the data, the watermark algorithm is designed with robustness in mind to ensure that useful information can be extracted even when the data is damaged.

[0162] For data leakage caused by a third party, the system uses watermark information to track down the possible responsible party. A structured format for watermarks, such as JSON or XML, is defined and parsed to facilitate reading and interpreting the information in the watermark. The implemented parser is able to extract the metadata in the watermark and convert it into an actionable format for further analysis.

[0163] After completing the leakage source tracking, the system will comprehensively analyze the watermark information and system logs to determine the specific path of the leakage. Based on these analyses, a detailed tracing report will be generated, which will include the business link analysis, timeline, data flow diagram and risk assessment of the security vulnerability, providing a detailed basis for subsequent emergency response and system optimization.

[0164] Respond and optimize, the final stage of this method, involves initiating emergency response plans based on the sensitivity level of the leaked data and notifying relevant personnel and departments. In this stage, necessary measures are taken to prevent further data leaks, and based on the analysis results of the leak incident, watermark strategies are optimized, data classification standards and access control strategies are updated. At the same time, auditing and monitoring of sensitive operations are strengthened.

[0165] The continuous improvement process includes regularly evaluating the effectiveness of watermark technology, researching new invisible character encoding methods, optimizing the detection rules of the DLP system, and conducting regular security awareness training. This series of measures together constitutes a closed-loop improvement system to ensure that data security strategies and technical support can continuously adapt to new challenges and needs.

[0166] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0167] Based on the same inventive concept, the embodiment of the present application also provides a watermark processing device for implementing the watermark processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more watermark processing device embodiments provided below can refer to the limitations on the watermark processing method above, and will not be repeated here.

[0168] In an exemplary embodiment, as shown in FIG9 , a watermark processing apparatus is provided, including: an acquisition module 901, a first determination module 902 and an insertion module 903, wherein:

[0169] The acquisition module 901 is used to acquire the text to be processed.

[0170] The first determination module 902 is used to determine the target watermark information based on at least one of the zero-width character and the homograph character according to the pre-defined encoding rule; the target watermark information includes at least one of the target zero-width character and the homograph character;

[0171] The inserting module 903 is used to insert the target watermark information into the text to be processed.

[0172] In an exemplary embodiment, the insertion module 903 includes:

[0173] The first insertion unit is used to obtain the first zero-width character, the second zero-width character and the third zero-width character in the target zero-width character; wherein the first zero-width character is the first target zero-width character; the second zero-width character is the last target zero-width character; the third zero-width character is any character except the first zero-width character and the second zero-width character; obtain the first position, the second position and the third position from the text to be processed, wherein the first position, the second position and the third position are arranged in a target order, the first position precedes the second position, and the third position is any position between the first position and the second position; insert the first zero-width character into the first position; insert the second zero-width character into the second position; insert the third zero-width character into the third position.

[0174] The second insertion unit is used to obtain the position of the first homograph character in the text to be processed, take the position of the first homograph character as the fourth position; and replace the first homograph character at the fourth position with the target homograph character.

[0175] In an exemplary embodiment, the first determination module 902 is further configured to determine target watermark information based on at least one of an arrangement and combination of zero-width characters and a coding selection scheme for homographic characters.

[0176] In an exemplary embodiment, the pre-defined encoding rule includes a mapping relationship between a first homograph character and a second homograph character; the first determination module 902 includes:

[0177] The first determination unit is used to determine, according to the mapping relationship, a second homograph character corresponding to the first homograph character in the text to be processed; generate first initial watermark information based on the second homograph character; and encrypt the first initial watermark information to determine the target watermark information.

[0178] In an exemplary embodiment, the pre-defined encoding rule includes specifying zero-width characters; the first determination module 902 includes:

[0179] The second determination unit generates second initial watermark information based on the arrangement and combination of the specified zero-width characters; encrypts the second initial watermark information to determine the target watermark information.

[0180] In an exemplary embodiment, the first determining module 902 includes:

[0181] The third determination unit is used to process the zero-width character to generate a coding record number; the coding record number is generated based on a time series; the third initial watermark information is generated according to the coding record number and / or the homographic characters; the third initial information is encrypted to obtain the target watermark information.

[0182] The watermark processing device further comprises:

[0183] The recording module is used to record the current version information of the text to be processed after the target watermark information is inserted.

[0184] In an exemplary embodiment, the watermark processing apparatus further includes:

[0185] The second determination module is used to obtain the historical text to be processed corresponding to the historical version information, and obtain the historical target watermark information inserted into the historical text to be processed; wherein the historical version information is the previous version information based on the current version information; compare the historical watermark information with the target watermark information to obtain the difference watermark information; and use the difference watermark information as the new target watermark information;

[0186] The insertion module is also used to insert new target watermark information into the text to be processed.

[0187] Each module in the above watermark processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0188] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG10. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store watermark data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a watermark processing method is implemented.

[0189] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0190] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0191] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0192] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0193] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0194] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0195] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A watermark processing method, characterized in that: The method comprises: Get the text to be processed; Determining target watermark information based on at least one of a zero-width character and a homograph character according to a pre-established encoding rule; the target watermark information includes at least one of a target zero-width character and a target homograph character; The target watermark information is inserted into the text to be processed.

2. The method according to claim 1, characterized in that The inserting the target watermark information into the text to be processed includes at least one of the following: Get the first zero-width character, the second zero-width character and the third zero-width character in the target zero-width character; wherein the first zero-width character is the first target zero-width character; the second zero-width character is the last target zero-width character; and the third zero-width character is any character except the first zero-width character and the second zero-width character; Acquire a first position, a second position, and a third position from the text to be processed, wherein the first position, the second position, and the third position are arranged in a target order, the first position precedes the second position, and the third position is any position between the first position and the second position; Insert the first zero-width character into the first position; insert the second zero-width character into the second position; insert the third zero-width character into the third position; or Obtaining the position of a first homograph character in the to-be-processed text, and taking the position of the first homograph character as a fourth position; The first homograph character at the fourth position is replaced by the target homograph character.

3. The method according to claim 1, characterized in that The step of determining target watermark information based on at least one of a zero-width character and a homographic character includes: The target watermark information is determined based on at least one of the arrangement and combination mode of the zero-width characters and the encoding selection scheme of the homographic characters.

4. The method according to claim 3, characterized in that The pre-defined encoding rule includes a mapping relationship between a first homograph character with different codes and a second homograph character with different codes; Based on the encoding selection scheme of homographic characters, the target watermark information is determined, including: According to the mapping relationship, determining the second homograph character corresponding to the first homograph character in the to-be-processed text; Based on the second homographic character, generating first initial watermark information; The first initial watermark information is encrypted to determine target watermark information.

5. The method according to claim 3, characterized in that: The pre-defined encoding rules include specifying zero-width characters; determining target watermark information based on the arrangement and combination of zero-width characters, including: Generate second initial watermark information based on the arrangement and combination of the specified zero-width characters; The second initial watermark information is encrypted to determine the target watermark information.

6. The method according to claim 1, characterized in that The step of determining target watermark information based on at least one of zero-width characters and homographic characters according to a pre-established encoding rule comprises: Processing the zero-width character to generate a coding record number; the coding record number is generated based on a time series; Generating third initial watermark information according to the coded record number and / or the homographic characters; Encrypting the third initial information to obtain target watermark information; After inserting the target watermark information into the text to be processed, the method further includes: Record the current version information of the text to be processed after inserting the target watermark information.

7. The method according to claim 6, characterized in that Before inserting the target watermark information into the to-be-processed text, the method further includes: Obtaining the historical text to be processed corresponding to the historical version information, and obtaining the historical target watermark information inserted into the historical text to be processed; wherein the historical version information is the previous version information based on the current version information; Comparing the historical watermark information with the target watermark information to obtain differential watermark information; Using the difference watermark information as new target watermark information; The step of inserting the target watermark information into the text to be processed comprises: Inserting new target watermark information into the text to be processed.

8. A watermark processing device, characterized in that: The device comprises: An acquisition module is used to obtain the text to be processed; A first determination module is used to determine target watermark information based on at least one of a zero-width character and a homograph character according to a pre-defined encoding rule; the target watermark information includes at least one of a target zero-width character and a target homograph character; The inserting module is used to insert the target watermark information into the text to be processed.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Information source determination method and apparatus, and electronic device

    CN111538923A

  • Watermark embedding method, watermark extracting method and device

    CN114626968A

  • Database watermark embedding method, database watermark tracing method, database watermark embedding device, database watermark tracing device and electronic equipment

    CN115495439A

  • Content generation method, and generative content detection method and device

    CN116595964A

  • Data tamper-proof storage method and verification method based on invisible watermark

    CN117574337A

Cited By

  • Document watermark management method and device, electronic equipment, storage medium and product

    CN121093319A