Dynamic text watermark addition method, dynamic text watermark tracing method, dynamic text watermark processing system and apparatus, and medium

By dynamically determining the watermark injection ratio and encoding, and combining conversion functions and similarity calculations, the compatibility issues of text data watermarking and tracing methods are resolved, achieving efficient and tamper-proof text data tracing and improving data security and timeliness.

WO2025222765A1PCT designated stage Publication Date: 2025-10-30CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/125813
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-22
Filing Date
2024-10-18
Publication Date
2025-10-30

AI Technical Summary

Technical Problem

Existing methods for adding and tracing watermarks to text data have low compatibility and are difficult to effectively trace responsibility for data leaks in dynamic environments.

Method used

This paper provides a method for adding dynamic watermarks to text. By obtaining terminal information and sensitive indicators, the watermark injection ratio and encoding are dynamically determined. The watermark encoding is added to the database using a conversion function. The paper also provides a method for tracing dynamic watermarks to trace the source watermark encoding through similarity calculation.

Benefits of technology

It achieves high compatibility, tamper-proofness, and high timeliness of text data watermarking, improves the success rate of data traceability, and reduces system complexity and storage requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024125813_30102025_PF_FP_ABST
    Figure CN2024125813_30102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a dynamic text watermark addition method, a dynamic text watermark tracing method, a system, an apparatus and a medium. The addition method comprises: acquiring a query request sent by a terminal and terminal information of the terminal, parsing the query request to obtain storage information and sensitive indicator information of text data to be subjected to watermark injection, and on the basis of the storage information, matching said text data in a database; on the basis of the sensitive indicator information, determining a watermark injection ratio, and on the basis of the terminal information, obtaining watermark codes to be injected, wherein said watermark codes comprise authentic watermark codes and dummy watermark codes; and on the basis of the watermark injection ratio, obtaining a conversion function, and sending the conversion function to the database, such that the database executes the conversion function to add said watermark codes into said text data, so as to obtain text data subjected to watermark addition, and sends to the terminal the text data subjected to watermark addition.
Need to check novelty before this filing date? Find Prior Art

Description

Text dynamic watermarking, tracking methods, processing systems, devices and media

[0001] Related applications

[0002] This application claims priority to Chinese patent application filed on April 22, 2024, with application number 2024104880150, entitled "Text Dynamic Watermarking Addition, Traceability Method, Processing System, Apparatus and Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of data processing technology, and in particular to methods, systems, devices and media for adding and tracing dynamic watermarks to text. Background Technology

[0004] With the continuous development of the digital economy, information exchange between different departments, regions, and data entities is gradually increasing. Data is flowing, reorganizing, and being used more and more frequently in the form of structured data at various stages. The use of data in a dynamic environment poses a significant risk of data breaches. Once a data breach occurs, it is necessary to accurately pinpoint the responsible parties to trace the security responsibilities of relevant personnel and to strengthen security controls at vulnerable points.

[0005] Data watermarking enables data traceability after a data breach and has a wide range of applications, including digital images, audio, video, documents, and databases. For example, digital watermarks can be used to embed author and copyright information into digital images to ensure copyright protection, while structured data watermarks can be used to embed identification information in databases to ensure data integrity and security. However, there are currently few implementations for text data watermarking, and existing technologies still have many problems.

[0006] Existing methods for adding and tracing watermarks to text data suffer from low compatibility issues.

[0007] Summary of the Invention

[0008] This application provides a method, system, apparatus, and medium for adding and tracing dynamic text watermarks.

[0009] On the one hand, this application provides a method for adding dynamic watermarks to text, including:

[0010] Obtain the query request sent by the terminal and the terminal information of the terminal, parse the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected, and match the watermark text data to be injected in the preset database according to the storage information;

[0011] The watermark injection ratio is determined based on the sensitive indicator information, and the watermark code to be injected is obtained based on the terminal information; the watermark code to be injected includes a real watermark code and a decoy watermark code.

[0012] A conversion function is obtained based on the watermark injection ratio and the watermark code to be injected. The conversion function is then sent to a preset database so that the preset database executes the conversion function to add the watermark code to the watermark text data, thereby obtaining watermarked text data and sending the watermarked text data to the terminal.

[0013] In one embodiment, determining the watermark injection ratio based on the sensitive indicator information includes:

[0014] Determine the sensitivity level of sensitive indicator information;

[0015] The watermark injection ratio is determined based on the sensitivity level; wherein the watermark injection ratio corresponding to the highest sensitivity level is the largest.

[0016] In one embodiment, obtaining the watermark code to be injected based on the terminal information includes:

[0017] Generate a real watermark code based on the terminal information;

[0018] Obtain the virtual watermark configuration, determine the virtual watermark length based on the virtual watermark configuration, and generate the virtual watermark code based on the virtual watermark length;

[0019] The virtual watermark code is inserted into the real watermark code to obtain the watermark code to be injected.

[0020] In one embodiment, obtaining the conversion function based on the watermark injection ratio and the watermark encoding to be injected includes:

[0021] According to the watermark injection ratio, several result fields of the watermark to be injected are randomly selected from the watermark to be injected data;

[0022] The conversion function is obtained based on the watermark encoding to be injected and the result field of each watermark to be injected.

[0023] On the other hand, this application provides a method for tracing dynamic text watermarks, including:

[0024] Obtain the watermark similarity threshold between the watermark data to be traced and the terminal setting, and extract the predicted watermark code from the watermark data to be traced; the watermark data to be traced includes the text data with watermark added obtained by the above-described addition method;

[0025] The similarity between the predicted watermark code and the stored watermark code to be matched is calculated.

[0026] The watermark tracing result is obtained based on the watermark codes to be matched whose similarity is greater than the watermark similarity threshold.

[0027] In one embodiment, extracting the predicted watermark code from the watermark data to be traced includes:

[0028] If the watermark data to be traced is determined to be file text, each line of data in the file text is traversed, and the real watermark code of each line of data is extracted as the predicted watermark code by using character matching.

[0029] In one embodiment, extracting the predicted watermark code from the watermark data to be traced includes:

[0030] If it is determined that the watermark data to be traced is paragraph text, the real watermark code in the paragraph text is extracted using character matching as the predicted watermark code.

[0031] On the other hand, this application provides a watermark injection module, including:

[0032] The receiving and processing module is used to obtain the query request sent by the terminal and the terminal information of the terminal, parse the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected, and match the watermark text data to be injected in the preset database according to the storage information.

[0033] The encoding processing module is used to determine the watermark injection ratio based on the sensitive indicator information and to obtain the watermark code to be injected based on the terminal information; the watermark code to be injected includes a real watermark code and a dummy watermark code.

[0034] The sending processing module is used to obtain a conversion function based on the watermark injection ratio and the watermark code to be injected, send the conversion function to a preset database, so that the preset database executes the conversion function to add the watermark code to be injected to the watermark text data, obtain the watermarked text data, and send the watermarked text data to the terminal.

[0035] On the other hand, this application provides a watermark tracing module, including:

[0036] The predicted watermark encoding acquisition module is used to acquire the watermark data to be traced and the watermark similarity threshold set by the terminal, and extract the predicted watermark encoding from the watermark data to be traced; the watermark data to be traced includes text data with added watermark obtained by the watermark injection module as described in claim 8.

[0037] The similarity calculation module is used to calculate the similarity between the predicted watermark code and the stored watermark code to be matched;

[0038] The watermark tracing result acquisition module is used to obtain the watermark tracing result based on the watermark codes to be matched whose similarity is greater than the watermark similarity threshold.

[0039] On the other hand, this application provides a text dynamic watermarking processing system, including the above-mentioned watermark injection module and the above-mentioned watermark tracing module; the watermark tracing module is connected to the watermark tracing module.

[0040] On the other hand, this application provides a text dynamic watermarking processing system, including a watermark injection module and a watermark tracing module, wherein the watermark tracing module is connected to the watermark tracing module, wherein...

[0041] The watermark injection module is used to implement the above-mentioned method for adding dynamic text watermarks.

[0042] The watermark tracing module is used to implement the above-mentioned dynamic text watermark tracing method.

[0043] In one embodiment, the text dynamic watermarking processing system provided by this application further includes:

[0044] A watermark storage module is provided, which is connected to the watermark injection module and the watermark tracing module respectively. The watermark storage module is used to store the watermark code to be matched and send the watermark code to be matched to the watermark tracing module during watermark tracing.

[0045] In one embodiment, the text dynamic watermarking processing system provided by this application further includes a watermark activation module, which is connected to the watermark injection module;

[0046] The watermark enabling module is used to enable or disable the watermark injection module according to the user's settings.

[0047] On the other hand, this application provides a text dynamic watermarking processing device, comprising:

[0048] At least one processor;

[0049] At least one memory for storing at least one program;

[0050] When the at least one program is executed by the at least one processor, the at least one processor implements the text dynamic watermarking method and the text dynamic watermark tracing method as described above.

[0051] On the other hand, this application provides a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the text dynamic watermarking method and the text dynamic watermark tracing method as described above.

[0052] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features, objects, and advantages of this application will become apparent from the specification, drawings, and claims. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the disclosed drawings without creative effort.

[0054] Figure 1 is a schematic diagram of an implementation environment provided in this application;

[0055] Figure 2 is a flowchart illustrating a method for adding dynamic text watermarks provided in this application;

[0056] Figure 3 is a schematic diagram of the result of multiple injections of watermark data provided in this application;

[0057] Figure 4 is a schematic diagram of the structure of a watermark code to be injected according to this application;

[0058] Figure 5 is a flowchart illustrating a text dynamic watermarking traceability method provided in this application;

[0059] Figure 6 is a flowchart illustrating a method for adding dynamic text watermarks using SQL queries, as provided in this application.

[0060] Figure 7 illustrates a text dynamic watermarking system provided in this application;

[0061] Figure 8 is a schematic diagram of a system architecture including different databases provided in this application;

[0062] Figure 9 is a schematic diagram of the storage of a watermark code to be matched in the watermark storage module provided in this application;

[0063] Figure 10 shows a text dynamic watermarking processing device provided in this application. Detailed Implementation

[0064] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0065] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.

[0066] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0067] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that terms such as "first / S2100 / S1100," "second / S1200," "third / S1300," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0068] To better understand the technical solution of this application, the following technical terms are explained:

[0069] Data watermarking refers to embedding identifying information into data so that the source, usage, and modification of the data can be tracked without affecting the data itself. Data watermarking can be used to protect intellectual property rights, ensure data security and integrity, and prevent data tampering.

[0070] Structured Query Language (SQL) is a database query and programming language used to access, query, update, and manage relational database systems. It is also the file extension for database script files. SQL is a high-level, non-procedural programming language that allows users to work on high-level data structures. It does not require users to specify how data is stored, nor does it require users to understand the specific data storage methods. Therefore, different database systems with completely different underlying structures can use the same Structured Query Language as an interface for data input and management. SQL statements can be nested, giving it great flexibility and powerful functionality.

[0071] It is understood that the text dynamic watermarking method and traceability method provided in this application embodiment can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some examples, the terminal is a smartphone, tablet, laptop, or desktop computer, but it is not limited to these.

[0072] Figure 1 illustrates an implementation environment according to an embodiment of the invention. Referring to Figure 1, the implementation environment includes at least one terminal 1, a text watermarking processing terminal 2, and a database 3. The terminal 1, the text watermarking processing terminal 2, and the database 3 can be connected via a network using wireless or wired means to complete data transmission and exchange. The text watermarking processing terminal 2 can be deployed on a device with computing capabilities. The device includes a server or a server cluster.

[0073] Specifically, the watermarking process can be, but is not limited to, as follows: Terminal 1 needs to query the original data in database 3 and sends a query request to text watermark processing terminal 2. Text watermark processing terminal 2 parses the query request to obtain relevant information about the original data and generates a watermark code based on the information from terminal 1. In text watermark processing terminal 2, watermarking rules are set according to the watermark injection ratio, etc., and an addition function is obtained according to the rules. Based on the relevant information, database 3 storing the original data is located, and the original data is found in database 3. The original data found in database 3 is rewritten according to the addition function to obtain the watermarked data. Database 3 directly sends the watermarked data to terminal 1. Here, the query request and the addition function can be implemented through an interface to achieve data transmission and data rewriting.

[0074] The watermark tracing process can be, but is not limited to, the following: Terminal 1 sends the text data of the watermark to be traced to Text Watermark Processing Terminal 2; Text Watermark Processing Terminal 2 identifies the watermark code in the text data of the watermark to be traced, obtains the tracing result, and returns the tracing result to Terminal 1. It is worth noting that all terminal information and database access involved in this application were obtained with authorization.

[0075] As shown in Figure 2, Figure 2 is a flowchart of a method for adding a dynamic text watermark. In some embodiments, this application provides a method for adding a dynamic text watermark, including:

[0076] S1100: Obtain the query request sent by the terminal and the terminal information, parse the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected, and match the watermark text data to be injected in the database according to the storage information.

[0077] Specifically, the system obtains the query request sent by the terminal and the terminal information, parses the query request according to the communication protocol used by the terminal, obtains the storage information of the watermark text data to be injected in the database and the sensitive indicator information of the watermark text data to be injected, and finds the watermark text data to be injected in the database based on the storage information.

[0078] S1200 determines the watermark injection ratio based on sensitive indicator information and obtains the watermark code to be injected based on terminal information.

[0079] The watermark code to be injected includes real watermark code and virtual watermark code.

[0080] Specifically, the process of determining the watermark injection ratio can be as follows: first, determine the sensitivity level of the watermark code to be injected based on the sensitivity index information obtained in step S1100; then, determine the watermark injection ratio based on the sensitivity level, wherein the watermark injection ratio corresponding to the highest sensitivity level is the largest.

[0081] The process of obtaining the watermark code to be injected can be as follows: generate a real watermark code based on terminal information, including but not limited to terminal name, terminal ID, etc.; determine the length of the virtual watermark based on the virtual watermark configuration; generate a virtual watermark code based on the virtual watermark length; insert the virtual watermark code into the real watermark code to obtain the watermark code to be injected.

[0082] In other embodiments, the virtual watermark configuration may include, but is not limited to, the number of virtual watermark codes and the position of the virtual watermark codes relative to the real watermark codes.

[0083] S1300: Based on the watermark injection ratio and the watermark code to be injected, a conversion function is obtained. The conversion function is sent to a preset database so that the preset database executes the conversion function to add the watermark code to be injected into the watermark text data, thereby obtaining the watermarked text data and sending the watermarked text data to the terminal.

[0084] Specifically, based on the watermark injection ratio, several result fields of the watermark to be injected are randomly selected from the watermark to be injected data. An initial conversion function is obtained for each result field of the watermark to be injected based on the watermark encoding. The initial conversion function is converted into a statement that can be executed by a preset database. The converted conversion function is sent to the database so that the database executes the conversion function to add the watermark encoding to the watermark to be injected text data, and then sends the watermarked text data to the terminal.

[0085] The watermarked text data does not need to be saved in the database. Instead, it is sent directly to the terminal, while the original text data is saved in the database.

[0086] If a terminal accesses the same watermark data to be injected, the original data is used as the watermark data to be injected, and the above watermark addition method is executed, as shown in Figure 3. Figure 3 is a schematic diagram of the result of multiple watermark injections. For example, if terminal 1 queries the original data Abcdefg, the watermark to be injected is XXXX, and the result after watermark addition is XXXXAbcdefg, when terminal 1 queries the original data Abcdefg again (receiving the query request again), instead of sending the XXXXAbcdefg from the first query to terminal 1, the steps of this application are executed again to obtain a new watermark-added result of AbcXXXXdefg, and AbcXXXXdefg is sent to the terminal, and so on.

[0087] Through steps S1100-S1300, this application can parse the query request to obtain relevant information when a query request is received, and dynamically inject watermarks into the text data queried by the query request, resulting in more timely returned data.

[0088] It should be understood that although the steps in the flowchart shown in Figure 2 are displayed sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in Figure 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0089] In some embodiments, in step S1100, the terminal may be, but is not limited to, electronic devices such as computers, mobile phones and tablets used by users, or a business system that provides services.

[0090] Terminal information includes, but is not limited to, the terminal's identification number (ID), the account used by the terminal, and the account name used by the terminal. The account name can be, but is not limited to, one or more combinations of Arabic numerals, symbols, emoticons, and letters. The letters can be uppercase letters, lowercase letters, or a combination of lowercase and uppercase letters.

[0091] Storage information may include, but is not limited to, database type, database name, storage path of the watermark data to be injected in the database, and the language syntax used by the database, such as SQL; storage information may also include storage time, text data size, etc.

[0092] The query request may also include the communication protocol used by the terminal. When parsing the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected, the query request can be parsed directly according to the communication protocol in the query request.

[0093] Additionally, it is understandable that query requests may not include the communication protocol used by the terminal. A set of communication protocols can be maintained within the server, which includes multiple different communication protocols. During parsing, the query request can be parsed one by one using the multiple different communication protocols in the set of communication protocols according to the principle of random matching or the principle of sequence, so as to obtain the stored information and sensitive indicator information.

[0094] Sensitive indicator information can be, but is not limited to, data types such as numbers, letters, and text data to be injected with watermarks. The numbers and letters can be set in order of their sensitivity, for example, number 1 represents the most sensitive data, and number 2 is the next most sensitive.

[0095] Database types can include, but are not limited to, relational databases, non-relational databases, and key-value databases.

[0096] Since the databases containing the watermark text data to be injected are different, in step S1300, the addition function needs to be converted into database-executable syntax according to the syntax used by the database, and then sent to the corresponding database.

[0097] In some embodiments, step S1200 of this application determines the watermark injection ratio based on sensitive indicator information, including:

[0098] S1210, Determine the sensitivity level of sensitive indicator information.

[0099] Specifically, the sensitivity level of the watermarked text data queried by the terminal can be determined based on the sensitive indicator information obtained from parsing the query request.

[0100] In this embodiment, there may be several sensitivity levels. The sensitivity level can be reduced by increasing the sensitivity index information or increased by decreasing the sensitivity index information. For example, there may be 10 sensitivity levels. The corresponding sensitivity index information may be numbers 0-9. The sensitivity corresponding to numbers 0-9 gradually decreases or gradually increases. Generally, the sensitivity corresponding to numbers 0-9 gradually increases, that is, when the sensitivity index information is 0, the sensitivity level is 0.

[0101] In some embodiments, to better ensure the traceability of sensitive data, a more granular watermark injection ratio strategy can be formulated based on factors such as the sensitivity of the shared data.

[0102] S1220, the watermark injection ratio is determined according to the sensitivity level.

[0103] Among them, the highest sensitivity level corresponds to the largest proportion of watermark injection.

[0104] It is understandable that the watermark injection ratio is the proportion of the watermark field in the text field. For example, a watermark injection ratio of 10% means that the text field is divided into 10 parts, and watermark codes are added to each part of the text field.

[0105] Specifically, each sensitivity level corresponds to a watermark injection ratio. For example, if the sensitivity level is 0, the watermark injection ratio is 0%.

[0106] As shown in Figure 4, Figure 4 is a schematic diagram of the structure of a watermark code to be injected. In some embodiments, the watermark code to be injected is obtained based on terminal information, including:

[0107] S1230 generates a real watermark code based on terminal information.

[0108] Specifically, the interpretation of the terminal information is the same as the interpretation of step S1100 above, and will not be repeated here.

[0109] The above terminal information can be encoded to obtain the true watermark code.

[0110] The encoding methods include, but are not currently included, the American Standard Code for Information Interchange (ASCII).

[0111] S1240, obtain the virtual watermark configuration, determine the virtual watermark length according to the virtual watermark configuration, and generate the virtual watermark code according to the virtual watermark length.

[0112] The virtual watermark configuration can be set by the terminal or preset in server 1. In addition, the virtual watermark configuration can be determined according to the length of the real watermark code or randomly. The virtual watermark configuration can also be determined according to the sensitive indicator information of the watermark text data to be injected.

[0113] Specifically, this application can provide the terminal with virtual watermark configuration options, such as virtual watermark configuration 1, virtual watermark configuration 2... virtual watermark configuration n, where each virtual watermark configuration can include virtual watermark encoding length, virtual watermark encoding position and virtual watermark encoding number. The virtual watermark encoding position can be before or after the real watermark encoding. When two virtual watermark encodings are included, as shown in Figure 3, the virtual watermark encodings can be at both ends of the real watermark encoding.

[0114] This application can maintain a set of preset virtual watermark configurations, and randomly select one of the virtual watermark configurations when adding a watermark.

[0115] This application can also determine the virtual watermark configuration based on the sensitive indicator information of the text data to be injected with watermark. For example, the higher the sensitivity level corresponding to the sensitive indicator information, the longer the length of the virtual watermark code, including at least two virtual watermark codes, and adding them before and after the real watermark code.

[0116] S1250, insert the virtual watermark code into the real watermark code to obtain the watermark code to be injected.

[0117] Specifically, the virtual watermark code is inserted into the real watermark code according to the virtual watermark configuration in step S1240 to obtain the watermark code to be injected.

[0118] In some embodiments, step S1300 obtains a conversion function based on the watermark injection ratio and the watermark encoding to be injected, including:

[0119] S1310, randomly select several result fields of the watermark to be injected from the watermark injection data according to the watermark injection ratio.

[0120] Specifically, based on the watermark injection ratio, the result field of the watermark to be injected is randomly selected from the data to be injected with watermarks. The algorithm is as follows:

[0121] Assuming the number of result fields in the returned result field set is m, then the result field set can be represented as follows:

[0122] (c1, c2, c3, ..., cm)

[0123] The pseudocode for the result field selection algorithm is as follows:

[0124] TargetColumns = ()

[0125] For i in [0,m)

[0126] This code snippet generates random numbers in the range (c1-cm) and adds them to the target field set.

[0127] targetColumns+=Random(0,m).

[0128] For example, given a text dataset containing n lines of text, where n is greater than or equal to m, the above process can be understood as randomly selecting m result fields from each line of text and then adding a watermark, or it can be understood as randomly selecting m lines of data from the n lines of text as m result fields and then adding a watermark.

[0129] S1320, obtain the conversion function based on the watermark code to be injected and the result field of each watermark to be injected.

[0130] Specifically, based on the generated target field set, a conversion function is obtained to rewrite the result fields. This function adds the watermark encoding to be injected to each result field. The conversion function is then converted into syntax executable by the corresponding database (the database containing the watermark text data). Finally, the corresponding database is accessed, and the converted function is executed within that database.

[0131] The database does not need to save the watermarked text data in the database; it can directly send the watermarked text data to the terminal while the database saves the original text data.

[0132] By adding virtual watermarks at both ends of the real watermark encoding through the above steps S1230-S1250 and S1310-S1320, the possibility of watermark loss caused by data truncation (such as substring extraction) is reduced. Combining virtual watermark encoding and random watermark position technologies can further improve the anti-tampering properties of dynamic watermark addition and traceability in this application.

[0133] In some embodiments, as shown in Figure 5, which is a flowchart of a text dynamic watermark tracing method, this application provides a text dynamic watermark tracing method, including:

[0134] S2100: Obtain the watermark similarity threshold between the watermark data to be traced and the watermark set by the terminal, and extract the predicted watermark code from the watermark data to be traced.

[0135] The watermarked data to be traced includes the watermarked text data obtained by adding watermarks using the previous dynamic text watermarking method.

[0136] Specifically, this application provides a watermark similarity threshold setting for the terminal, which can set the watermark similarity threshold.

[0137] Extracting the predicted watermark code from the watermark data to be traced specifically includes:

[0138] S2200, Determine whether the watermark data to be traced is document text or paragraph text.

[0139] It is understood that document text includes, but is not limited to, documents of file types such as CSV, Excel, and PDF. Paragraph text can be a text containing several lines of data. For example, a paragraph such as "This application provides a dynamic text data watermark and its traceability method, apparatus, and system. This scheme uses virtual watermark encoding, random watermarking, and other technologies, which can effectively prevent watermark tampering to a certain extent. This scheme supports variable watermark ratios and can flexibly control data watermark density. This scheme can perform data watermark traceability based on the smallest traceability data unit, which can greatly ensure the success rate of watermark traceability. In addition, the dynamic watermark used in this scheme, that is, it does not rely on third-party storage for temporary storage of watermark results, but directly performs data watermarking on the original data, which can effectively ensure data timeliness, has very little impact on system latency, and has excellent performance." is an example of paragraph text.

[0140] S2210a, if the watermark data to be traced is file text, iterate through each line of data in the file text and use character matching to extract the real watermark code of each line of data as the predicted watermark code.

[0141] Specifically, if the watermark data to be traced is a file text, each line of the file text is traversed, and the real watermark code in each line of data is extracted using string matching. For example, assuming a line of data is zbccvczx, where ccv is the real watermark code, matching zbccczx with ccv will extract the "ccv" field from zbccczx.

[0142] By using step S2210a, watermark tracing of text data can be performed based on the smallest traceability data unit, which can improve the success rate of watermark tracing.

[0143] S2210b: If the watermark data to be traced is paragraph text, the real watermark code in the paragraph text is extracted using character matching as the predicted watermark code.

[0144] Specifically, if the watermark data to be traced is paragraph text, the entire field of the paragraph text is directly matched using the structure of the watermark encoding to obtain the real watermark encoding as the predicted watermark encoding. The character matching method is the same as described above.

[0145] S2300 calculates the similarity between the predicted watermark code and the stored watermark code to be matched.

[0146] The stored watermark codes to be matched are obtained by storing the watermark codes to be injected generated based on the terminal information. In addition, the system also stores the terminal information that generated the watermark codes to be matched.

[0147] Specifically, in steps S2210a and S2210b, multiple predicted watermark codes may be obtained. The similarity between the extracted predicted watermark codes and the stored watermark codes to be matched is calculated. The stored watermark codes to be matched are then sorted in reverse order based on the similarity.

[0148] S2400: The watermark tracing result is obtained based on the watermark codes to be matched that have a similarity greater than the watermark similarity threshold.

[0149] Specifically, the watermark codes to be matched with a similarity greater than the watermark similarity threshold are taken as the identified watermark codes, and the identified watermark codes to be matched are converted into an encoding format to obtain the watermark tracing result.

[0150] In another feasible approach, watermark codes with similarity greater than the watermark similarity threshold can be selected based on the result data volume threshold to obtain watermark tracing results. For example, if there are 10 watermark codes with similarity greater than the watermark similarity threshold and the result data volume threshold is 3, then the 3 codes with the highest similarity can be selected as the watermark tracing results.

[0151] The text dynamic watermarking and traceability method proposed in the embodiments of this application has high compatibility, specifically including:

[0152] This application offers high flexibility. Compared to existing data watermarking solutions, this application can dynamically add watermarks to text data when receiving a query request, dynamically adjust the proportion of watermark data, and re-add watermarks to the original data when querying data again, thus providing greater flexibility.

[0153] This application has strong anti-tampering capabilities. It adds a virtual watermark code to the real watermark code and randomly selects the result field of the watermark code, which can effectively prevent watermark tampering to a certain extent. The randomness of the watermark insertion position makes it impossible for the sensitive data acquisition party to remove or tamper with the watermark using the same tampering scheme, thus improving the watermark's anti-tampering capability.

[0154] This application uses a dynamic watermarking method, which returns data with higher timeliness. Compared with the existing static watermarking method, this application can directly add watermarks to the latest original data in real time when a query request is received, which solves the problem of low data timeliness, improves data integrity, and ensures the security of incremental data.

[0155] This application adopts dynamic watermarking technology, which has a higher storage utilization rate. Compared with the existing static watermarking method, this solution directly uses the original data. Except for a small amount of watermark encoding information and watermark encoding configuration information, no additional storage space is required, which has a higher storage utilization rate and is more economical and efficient. In addition, since there is no additional storage, there is no need to maintain the mapping relationship between the original data and the static watermark data, which reduces the complexity of the system.

[0156] When adding and tracing watermarks, this application uses the smallest watermark processing unit to add and trace the data watermark. The smallest watermark processing unit can be understood as a row of data, which can maximize the success rate of watermark tracing. For the watermark data to be injected that needs to be queried, the target data unit of each row will be used as the smallest watermark injection unit. Correspondingly, during tracing, each target data unit will become the smallest tracing unit, so as to achieve the best tracing effect with the least amount of data.

[0157] In some embodiments, as shown in Figure 6, which is a flowchart of a text dynamic watermarking method using SQL query as an example, this application provides a specific embodiment using SQL query as an example, including: inputting SQL statement, database type, watermark injection ratio, watermark encoding, etc.; determining whether the returned field list is all *, t.*; if the returned field list is all *, t.*, confirming that no watermark needs to be added to the text data queried by the terminal; if the returned field list is not all *, t.*, adding watermark according to step S1300 and its sub-steps of the aforementioned text dynamic watermarking method.

[0158] In some embodiments, this application provides a watermark injection module, including:

[0159] The receiving and processing module is used to obtain the query request and terminal information sent by the terminal, parse the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected, and match the watermark text data to be injected in the preset database according to the storage information.

[0160] The encoding processing module is used to determine the watermark injection ratio based on sensitive indicator information and to obtain the watermark code to be injected based on terminal information; the watermark code to be injected includes real watermark code and dummy watermark code.

[0161] The sending processing module is used to obtain a conversion function based on the watermark injection ratio and the watermark code to be injected, and send the conversion function to a preset database so that the preset database executes the conversion function to add the watermark code to be injected into the watermark text data, obtain the watermarked text data, and send the watermarked text data to the terminal.

[0162] In some embodiments, this application provides a watermark tracing module, including:

[0163] The predicted watermark encoding acquisition module is used to acquire the watermark data to be traced and the watermark similarity threshold set by the terminal, and extract the predicted watermark encoding from the watermark data to be traced; the watermark data to be traced includes text data with added watermark obtained by the watermark injection module of claim 8.

[0164] The similarity calculation module is used to calculate the similarity between the predicted watermark code and the stored watermark code to be matched;

[0165] The watermark tracing result acquisition module is used to obtain watermark tracing results based on the watermark codes to be matched with a similarity greater than the watermark similarity threshold.

[0166] In some embodiments, this application provides a text dynamic watermarking processing system, including the above-described watermark injection module and the above-described watermark tracing module; the watermark tracing module is connected to the watermark tracing module.

[0167] In some embodiments, as shown in Figure 7, which illustrates a dynamic text watermarking system, this application also provides a dynamic text watermarking system, including a watermark injection module and a watermark tracing module. The watermark tracing module is connected to the watermark tracing module.

[0168] The watermark injection module is used to implement the previous method of dynamically adding watermarks to text;

[0169] The watermark tracing module is used to implement the previous text dynamic watermark tracing method.

[0170] The text dynamic watermark addition method implemented by the watermark injection module and the text dynamic watermark tracing method implemented by the watermark tracing module are the same as those mentioned above, and will not be repeated here.

[0171] In one embodiment, as shown in Figure 7, the text dynamic watermarking processing system further includes a watermark storage module, which is connected to the watermark injection module and the watermark tracing module. The watermark storage module is used to store the watermark code to be matched and to send the watermark code to be matched to the watermark tracing module during watermark tracing.

[0172] The watermark storage module is a storage module set up in this system to store the watermark codes to be matched and terminal information.

[0173] It is evident that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0174] In some embodiments, the text dynamic watermarking processing system also includes different interfaces, including but not limited to call interfaces such as HTTP and RPC, so that different terminals or business systems can integrate the addition and tracking of text dynamic watermarks through interface calls.

[0175] As shown in Figure 8, Figure 8 is a schematic diagram of a system architecture including different databases. In the figure, the watermark tracing layer can be the watermark tracing module of this application, the watermark injection layer can be the watermark adding module of this application, and the watermark management layer can be the storage module of this application.

[0176] The storage layer is an external structure for storing raw data, such as an external database. It is not part of the dynamic text watermarking system of this application. The dynamic text watermarking system of this application can transmit data with the storage layer by calling an interface.

[0177] The watermark management layer is used to store preset watermark encoding configuration information and watermark encodings to be matched, and to obtain watermark similarity thresholds set by users, etc.

[0178] The watermark tracing layer includes a watermark tracing engine, which can add watermarks to documents, databases, web page data, and other data. It is used to obtain watermark data to be traced, extract the predicted watermark code from the watermark data to be traced, calculate the similarity between the predicted watermark code and the stored watermark code to be matched, and obtain the watermark tracing result based on the watermark code to be matched with a similarity greater than the watermark similarity threshold.

[0179] The watermark injection layer includes a SQL parsing engine, a watermark encoding engine, and a watermark injection engine. It is worth noting that the SQL parsing engine is only used to illustrate the structure of the watermark injection layer. It can not only parse SQL statements, but also query requests obtained by other statements.

[0180] The SQL parsing engine is used to obtain the query request sent by the terminal and the terminal information. It parses the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected. Based on the storage information, it finds the watermark text data to be injected in the database. The specific process is as described above and will not be repeated here.

[0181] The watermark encoding engine is used to determine the watermark injection ratio based on sensitive indicator information and to obtain the watermark code to be injected based on terminal information. The specific process is as described above and will not be traced back here.

[0182] The watermark injection engine is used to add the watermark code to be injected into the text data to be injected according to the watermark injection ratio, so as to obtain the watermarked text data. The watermarked text data is then sent to the terminal. The specific process is as described above and will not be repeated here.

[0183] In some embodiments, the watermarking encoding engine is specifically used to determine the sensitivity level of sensitive indicator information and determine the watermark injection ratio based on the sensitivity level. The specific process is as described above and will not be repeated here.

[0184] In some embodiments, the watermark encoding engine is further used to generate a real watermark code based on terminal information, determine the virtual watermark length based on the virtual watermark configuration, generate a virtual watermark code based on the virtual watermark length, insert the virtual watermark code into the real watermark code, and obtain the watermark code to be injected. The specific process is as described above and will not be traced back here.

[0185] In some embodiments, the watermark injection engine is specifically used to randomly select several result fields of watermark to be injected from the watermark data to be injected according to the watermark injection ratio, obtain a conversion function according to the watermark encoding of each result field of watermark to be injected, and add the watermark encoding to the watermark text data to be injected according to the conversion function to obtain the watermarked text data. The specific process is as described above and will not be repeated here.

[0186] As shown in Figure 9, which is a schematic diagram of the storage of the watermark code to be matched in the watermark storage module, dacp_datams_watermark_info represents the watermark code structure table, ABC represents the prefix, id is the identification number of the watermark code to be matched in the watermark storage module, watermark_code is the watermark code to be matched, watermark_content is the directory of the watermark code to be matched, user_id is the identification number of the terminal, and team_name is the organization name.

[0187] By implementing the above modules, this application constructs a watermark injection and traceability system. Through interface calls and other methods, it can dynamically support data watermarking and dynamically adjust the watermark ratio, offering convenience and flexibility. This system solves the data pollution problems caused by adding watermarks using existing methods and the inability to trace the source due to watermark data loss. Furthermore, by setting different communication protocols and parsing different query requests, this application provides friendly support for various databases and data warehouses, covering and supporting text data watermark injection for most structured databases currently on the market.

[0188] Potential future applications of this application include, but are not limited to, adding and tracing dynamic data watermarks in intelligent computing platforms.

[0189] In some embodiments, the text dynamic watermarking processing system further includes a watermarking activation module, which is connected to the watermark injection module.

[0190] The watermark enable module is used to enable or disable the watermark injection module based on the user's settings.

[0191] As shown in Figure 10, this application also provides a text dynamic watermarking processing device, including:

[0192] At least one processor;

[0193] At least one memory for storing at least one program;

[0194] When the at least one program is executed by the at least one processor, the at least one processor implements the steps of the text dynamic watermarking method and the text dynamic watermark tracing method described in the above method embodiments.

[0195] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. The memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include remote memory located remotely relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0196] It is evident that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented in the present device embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0197] Furthermore, embodiments of this application also disclose a computer program product or computer program stored in a computer-readable storage medium. A processor of a computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the computer device to perform the methods described above.

[0198] This application also provides a computer-readable storage medium storing a processor-executable program that, when executed by a processor, is used to implement the above-described method.

[0199] It is understood that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0200] It is evident that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0201] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0202] The above is a detailed description of the preferred embodiments of this application. However, the invention of this application is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

[0203] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 specification.

[0204] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for adding dynamic watermarks to text, comprising: Obtain the query request sent by the terminal and the terminal information of the terminal, parse the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected, and match the watermark text data to be injected in the preset database according to the storage information; The watermark injection ratio is determined based on the sensitive indicator information, and the watermark code to be injected is obtained based on the terminal information. The watermark code to be injected includes a real watermark code and a dummy watermark code; A conversion function is obtained based on the watermark injection ratio and the watermark code to be injected. The conversion function is then sent to a preset database so that the preset database executes the conversion function to add the watermark code to the watermark text data, thereby obtaining watermarked text data and sending the watermarked text data to the terminal.

2. The adding method according to claim 1, wherein, The step of determining the watermark injection ratio based on the sensitive indicator information includes: Determine the sensitivity level of sensitive indicator information; The watermark injection ratio is determined based on the sensitivity level; wherein the watermark injection ratio corresponding to the highest sensitivity level is the largest.

3. The adding method according to claim 1, wherein, The step of obtaining the watermark code to be injected based on the terminal information includes: Generate a real watermark code based on the terminal information; Obtain the virtual watermark configuration, and determine the virtual watermark length based on the virtual watermark configuration; Generate a virtual watermark code based on the virtual watermark length; The virtual watermark code is inserted into the real watermark code to obtain the watermark code to be injected.

4. The adding method according to claim 1, wherein, The step of obtaining the conversion function based on the watermark injection ratio and the watermark encoding to be injected includes: According to the watermark injection ratio, several result fields of the watermark to be injected are randomly selected from the watermark to be injected data; The conversion function is obtained based on the watermark encoding to be injected and the result field of each watermark to be injected.

5. A method for tracing dynamic watermarks in text, comprising: Obtain the watermark similarity threshold between the watermark data to be traced and the watermark set by the terminal, and extract the predicted watermark code from the watermark data to be traced. The watermark data to be traced includes data obtained by adding watermarks using any one of the methods described in claims 1-4. Watermarked text data; The similarity between the predicted watermark code and the stored watermark code to be matched is calculated. The watermark tracing result is obtained based on the watermark codes to be matched whose similarity is greater than the watermark similarity threshold.

6. The traceability method according to claim 5, wherein, The step of extracting the predicted watermark code from the watermark data to be traced includes: If the watermark data to be traced is determined to be file text, each line of data in the file text is traversed, and the real watermark code of each line of data is extracted using character matching as the predicted watermark code.

7. The traceability method according to claim 5, wherein, The step of extracting the predicted watermark code from the watermark data to be traced includes: If it is determined that the watermark data to be traced is paragraph text, the real watermark code in the paragraph text is extracted using character matching as the predicted watermark code.

8. A watermark injection module, comprising: The receiving and processing module is used to obtain the query request sent by the terminal and the terminal information of the terminal, parse the query request to obtain the storage information and sensitive indicator information of the watermark text data to be injected, and match the watermark text data to be injected in the preset database according to the storage information. The encoding processing module is used to determine the watermark injection ratio based on the sensitive indicator information and to obtain the watermark code to be injected based on the terminal information. The watermark code to be injected includes a real watermark code and a dummy watermark code; The sending processing module is used to obtain a conversion function based on the watermark injection ratio and the watermark code to be injected, send the conversion function to a preset database, so that the preset database executes the conversion function to add the watermark code to be injected to the watermark text data, obtain the watermarked text data, and send the watermarked text data to the terminal.

9. A watermark tracing module, comprising: The predicted watermark code acquisition module is used to acquire the watermark data to be traced and the watermark similarity threshold set by the terminal, and extract the predicted watermark code from the watermark data to be traced. The watermarked data to be traced includes text data with added watermark obtained through the watermark injection module described in claim 8; The similarity calculation module is used to calculate the similarity between the predicted watermark code and the stored watermark code to be matched; The watermark tracing result acquisition module is used to obtain the watermark tracing result based on the watermark codes to be matched whose similarity is greater than the watermark similarity threshold.

10. A text dynamic watermarking processing system, comprising the watermark injection module of claim 8 and the watermark tracing module of claim 9; wherein the watermark tracing module is connected to the watermark tracing module.

11. A text dynamic watermarking processing system, comprising a watermark injection module and a watermark tracing module, wherein the watermark tracing module is connected to the watermark tracing module, wherein, The watermark injection module is used to implement the addition method according to any one of claims 1-4; The watermark tracing module is used to implement the tracing method according to any one of claims 5-7.

12. The system according to claim 11, wherein, Also includes: A watermark storage module is provided, which is connected to the watermark injection module and the watermark tracing module respectively. The watermark storage module is used to store the watermark code to be matched and send the watermark code to be matched to the watermark tracing module during watermark tracing.

13. The system according to claim 12, wherein, It also includes a watermark activation module, which is connected to the watermark injection module; The watermark enabling module is used to enable or disable the watermark injection module according to the user's settings.

14. A text dynamic watermarking processing device, comprising: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method as described in any one of claims 1-7.

15. A computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the method as claimed in any one of claims 1-7.

Citation Information

Patent Citations

  • Watermark information extended coding, embedding, evaluating and detection extracting method and device thereof

    CN101930587A

  • Digital watermark adding method, digital watermark extracting method, digital watermark adding device, digital watermark extracting device, electronic equipment and readable medium

    CN114692099A

  • Information hiding method and device based on Excel file, equipment and storage medium

    CN115048665A

  • Document processing method and device, electronic equipment and storage medium

    CN115982675A

  • Text dynamic watermark adding method, text dynamic watermark tracing method, text dynamic watermark processing system, text dynamic watermark processing device and medium

    CN118277971A