Data watermark generation method and device, electronic equipment and storage medium
By sequentially dividing the target original data and splicing user information to generate data watermarks, the lack of universality, stability and applicability of big data output scenarios in the prior art text digital watermarking methods is solved, and efficient and reliable The data watermark generation of the stick is generated.
Patent Information
- Application Number
- CN202411574140.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-11
AI Technical Summary
The existing text digital watermarking methods have poor versatility and stability when intercepting files, especially in big data output scenarios, and are difficult to develop.
By sequencing the target original data, multiple data sequences are obtained, the data sequence is spliced with user information, the coded value is calculated, the sequence line break map is generated, and the data watermark is generated based on the mapping table.
The generation of data watermarks is realized, the calculation process is simplified, the calculation performance and robustness are improved, the implementation difficulty is reduced, and the watermark loading efficiency and data leakage traceability are improved.
Smart Images

Figure CN119416184A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data watermark application, and in particular to a data watermark generation method, device, electronic device and storage medium. Background Art
[0002] Digital watermark technology is an important part of the field of information hiding technology. It uses digital embedding methods to hide information with special meanings (digital watermark information) in various digital images, sounds, videos, and text digital products. On the one hand, these electronic products with digital watermark information can be used normally without being easily perceived; on the other hand, the digital watermark information embedded in these digital products can be detected through specific technical means.
[0003] The existing text digital watermarking method mainly intercepts the specific operation of the file through the system hook, then obtains the intermediate format file data, completes the watermark information embedding after the font replacement operation, and finally performs the normal file operation. There are many problems and defects, mainly as follows:
[0004] 1) Poor versatility: It is difficult to intercept the screen display operation of electronic files by intercepting files through system hooks, and it is impossible to embed watermark information in the screen display content in real time;
[0005] 2) Poor stability: The method of intercepting files through system hooks has many compatibility issues with system software;
[0006] 3) Poor applicability in big data output scenarios: In big data scenarios, the main output is txt text, the system hook has poor operability, and there is no software plug-in support. Summary of the invention
[0007] The main purpose of the embodiments of the present application is to propose a data watermark generation method, device, electronic device and storage medium, which can realize data watermark generation, simplify the calculation process of data watermark, improve the calculation performance of data watermark, and improve the robustness of data watermark.
[0008] On the one hand, an embodiment of the present application proposes a data watermark generation method, the method comprising the following steps:
[0009] In response to the data acquisition operation, determining target original data and corresponding user information;
[0010] Sequence the target original data to obtain a corresponding plurality of data sequences;
[0011] Concatenate each of the data sequences with the user information, and calculate the encoding value corresponding to each of the data sequences;
[0012] According to the encoding values corresponding to the data sequences, sequence line break mapping is performed to generate a corresponding sequence mapping table;
[0013] According to the sequence mapping table, the encoding sequence value corresponding to each of the data sequences is determined, and according to the encoding sequence value corresponding to each of the data sequences, the data watermark corresponding to each of the data sequences is generated.
[0014] In some embodiments, in response to the data acquisition operation, determining the target original data and the corresponding user information specifically includes:
[0015] In response to the data acquisition operation, determining the target original data from the database cluster and collecting user identity information;
[0016] The user identity information is encrypted to obtain the user information.
[0017] In some embodiments, dividing the target original data into sequences to obtain a corresponding plurality of data sequences specifically includes:
[0018] Dividing the target original data into data rows to determine a plurality of data rows and text data corresponding to each of the data rows;
[0019] The data sequence corresponding to each data row is generated according to the text data corresponding to each data row.
[0020] In some embodiments, the step of concatenating each of the data sequences with the user information and calculating the coding value corresponding to each of the data sequences specifically includes:
[0021] Obtaining the data row number corresponding to each of the data sequences in the target original data;
[0022] The data row number corresponding to each of the data sequences is concatenated with the user information, and a hash function is used to generate the encoding value corresponding to each of the data sequences.
[0023] In some embodiments, performing sequence line break mapping according to the encoding values corresponding to each of the data sequences to generate a corresponding sequence mapping table specifically includes:
[0024] Determining the arrangement order of each of the data sequences according to the code values corresponding to each of the data sequences;
[0025] According to the code values corresponding to the data sequences and the arrangement order of the data sequences, sequence mapping storage is performed to generate the corresponding sequence mapping table, and the sequence mapping table is represented by the following formula:
[0026] rowMap=(hashCode1, hashCode2,..., hashCode n );
[0027] Among them, rowMap represents the sequence mapping table, hashCode n It is the encoding value corresponding to the data sequence ranked at the nth position.
[0028] In some embodiments, the method further comprises:
[0029] Storing the user information and the corresponding storage mapping table in a database;
[0030] In response to the data tracing operation, obtaining the data to be traced and a tracing data storage mapping table corresponding to the data to be traced;
[0031] According to the traceability data storage mapping table, a target storage mapping table matching the traceability data storage mapping table is determined from the multiple storage mapping tables in the database, and the user information corresponding to the target storage mapping table is obtained as the target user information.
[0032] In some embodiments, determining, according to the sequence mapping table, a coding sequence value corresponding to each of the data sequences, and generating, according to the coding sequence value corresponding to each of the data sequences, a data watermark corresponding to each of the data sequences specifically includes:
[0033] Determine the arrangement order and the encoding value corresponding to each of the data sequences according to the sequence mapping table;
[0034] Generate the coding sequence value corresponding to each data sequence according to the arrangement sequence and the coding value corresponding to each data sequence;
[0035] According to the encoding order value corresponding to each of the data sequences, a data watermark corresponding to each of the data sequences is generated, and the data watermark is embedded in the data sequence.
[0036] On the other hand, an embodiment of the present application provides a data watermark generation device, the device comprising:
[0037] A first module is used to determine target original data and corresponding user information in response to a data acquisition operation;
[0038] The second module is used to divide the target original data into sequences to obtain a corresponding plurality of data sequences;
[0039] The third module is used to concatenate each of the data sequences with the user information and calculate the coding value corresponding to each of the data sequences;
[0040] The fourth module is used to perform sequence line break mapping according to the encoding value corresponding to each of the data sequences to generate a corresponding sequence mapping table;
[0041] The fifth module is used to determine the encoding sequence value corresponding to each of the data sequences according to the sequence mapping table, and generate a data watermark corresponding to each of the data sequences according to the encoding sequence value corresponding to each of the data sequences.
[0042] On the other hand, an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the data watermark generation method described above when executing the computer program.
[0043] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data watermark generation method described above is implemented.
[0044] The embodiments of the present application include at least the following beneficial effects: the present application provides a data watermark generation method, device, electronic device and storage medium, which obtains multiple corresponding data sequences by dividing the target original data into sequences, splices each data sequence with user information, calculates the encoding value corresponding to each data sequence, performs sequence line break mapping according to the encoding value corresponding to each data sequence, generates a corresponding sequence mapping table, and generates data watermarks corresponding to each data sequence according to the sequence mapping table. The present application can realize data watermark generation, simplify the calculation process of data watermarks, improve the calculation performance of data watermarks, improve the robustness of data watermarks, reduce the difficulty of implementation, improve the efficiency of watermark loading, and simplify the difficulty of subsequent data leakage tracing. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0047] Figure 1 It is a flow chart of a data watermark generation method provided by an embodiment of the present application;
[0048] Figure 2 is a flowchart of step S101 in an embodiment of the present application;
[0049] Figure 3 is a flowchart of step S102 in an embodiment of the present application;
[0050] Figure 4 is a flowchart of step S103 in an embodiment of the present application;
[0051] Figure 5 is a schematic diagram of determining the encoding value corresponding to the data sequence in an embodiment of the present application;
[0052] Figure 6 is a flowchart of step S104 in an embodiment of the present application;
[0053] Figure 7 is a flowchart of step S105 in an embodiment of the present application;
[0054] Figure 8 is another flow chart of a data watermark generation method provided by an embodiment of the present application;
[0055] Fig. 9 It is a structural schematic diagram of a data watermark generating device provided in an embodiment of the present application;
[0056] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the 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 the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0058] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0059] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0061] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0062] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0063] 1) Big Data: Big data refers to the process of collecting, storing and analyzing large-scale data sets to obtain valuable information and insights. These data sets are usually highly complex and diverse, including structured data (such as database records) and unstructured data (such as text, images, audio and video files, etc.). The processing of big data requires the use of advanced computing technology and analytical tools to discover potential patterns, trends and associations to support decision-making, business optimization and innovation. Big data has a wide range of applications, covering areas including business, scientific research, healthcare, finance, marketing, etc.
[0064] 2) Text digital watermark: Text digital watermark is a technology that embeds digital information into text. It can identify, track and verify text by inserting a specific digital sequence into the text. The main purpose of text digital watermark is to protect the copyright and integrity of the text and prevent unauthorized copying and tampering. It can be used for various forms of text content such as digital documents, e-books, reports, papers, etc.
[0065] 3) Hadoop: Hadoop is an open source distributed computing platform for processing large-scale data sets. Its design goal is to be able to process large amounts of data in parallel on a cluster consisting of multiple computing nodes to achieve efficient data storage and processing.
[0066] 4) Spark computing engine: Spark is a fast and general-purpose big data processing and computing engine that provides an efficient distributed computing framework for processing large-scale data. Compared with traditional MapReduce, Spark has advantages in speed, ease of use, and functionality.
[0067] 5) MD5 (Message Digest Algorithm 5): MD5 is a commonly used hash algorithm used to generate a 128-bit (16-byte) hash value. It is widely used in the field of information security to verify data integrity, password storage, digital signatures, etc.
[0068] 6) HashCode: HashCode is a technology that maps data of any length to a unique identifier of fixed length. In the computer field, HashCode is often used to implement data structures such as hash tables, hash sets, and hash sets. It can also be used for fast search, comparison, and indexing of data.
[0069] 7) Dictionary Order: Dictionary order, also known as alphabetical order, refers to the method of sorting words or strings in alphabetical order. This method is not only used to arrange words in dictionaries, but also used in computer science to compare and sort strings.
[0070] Digital watermarking technology is an important part of the field of information hiding technology. It uses digital embedding methods to hide information with special meanings (digital watermark information) in various digital images, sounds, videos, and text digital products. On the one hand, these electronic products with digital watermark information can be used normally without being easily perceived; on the other hand, the digital watermark information embedded in these digital products can be detected through specific technical means. Digital watermarking technology is widely used in many fields such as copyright protection of digital products, content verification and anti-counterfeiting, prevention of illegal copying, operation tracking, secret data communication, etc. According to the different digital watermark carriers, digital watermarks can be divided into several main categories such as image digital watermarks, sound digital watermarks, video digital watermarks, and text digital watermarks.
[0071] Text files are different from electronic products with rich content such as images, sounds, and videos. The content of text files is relatively compact, and there is not much blank content to hide complex digital watermark information. Therefore, the existing text digital watermark is mainly implemented by modifying the topological structure of characters. That is, by deforming specific characters in different forms to correspond to different watermark information bit strings, the character deformation data will be saved in a specific watermark font library, and the watermark information will be embedded through font replacement during the printing and screen display of electronic text documents. Since the font needs to be replaced when displayed, the real-time loading of watermark information is a key step in text watermark technology based on font replacement. The common practice is to intercept specific file operations through system hooks, then obtain the intermediate format file data, complete the watermark information embedding after the font replacement operation, and finally perform normal file operations; or through software plug-ins. This method is mainly used in specific file formats, such as Microsoft Office office software. However, the above methods all have many problems and defects, mainly as follows:
[0072] 1) Poor versatility: The method of intercepting files through system hooks can well complete the embedding of watermark information during the file printing operation, but it is difficult to intercept the screen display operation of electronic files, and it is impossible to embed watermark information in the screen display content in real time; and the embedding method based on the software plug-in mechanism is related to a specific software system. Not all software systems provide secondary development interfaces, and the related limitations are greater;
[0073] 2) Difficulty in development: In addition, the implementation process of existing methods is relatively complicated, especially the development of plug-ins based on web browsers is more difficult;
[0074] 3) Poor stability: The method of intercepting files through system hooks has many compatibility issues with system software.
[0075] 4) Poor applicability of big data output scenarios: The main application scenario of big data output is to complete data cleaning through big data computing frameworks and engines such as Hadoop and Spark, and finally output the target content. Generally speaking, the main output in big data scenarios is txt text, the operability of system hooks is poor, and there is no software plug-in support. Therefore, the method of modifying the topological structure of characters cannot well meet the big data output scenario.
[0076] Based on this, the embodiments of the present application propose a data watermark generation method, device, electronic device and storage medium, which can collect user information, encrypt, transform and other operations on the user information, combine with the target original data, output a data sequence that is different for each user, and output the target original data according to the specific order of the data sequence. The corresponding data watermark can be hidden without affecting the target original data, thereby realizing data watermark generation, simplifying the calculation process of the data watermark, improving the calculation performance of the data watermark, and improving the robustness of the data watermark.
[0077] Reference Figure 1 , Figure 1 This is an optional flowchart of a data watermark generation method provided in an embodiment of the present application. The method may include but is not limited to steps S101 to S105:
[0078] Step S101, in response to a data acquisition operation, determining target original data and corresponding user information;
[0079] Step S102, dividing the target original data into sequences to obtain a corresponding plurality of data sequences;
[0080] Step S103, concatenating each data sequence with the user information, and calculating the code value corresponding to each data sequence;
[0081] Step S104, performing sequence line break mapping according to the code values corresponding to each data sequence, and generating a corresponding sequence mapping table;
[0082] Step S105: Determine the encoding sequence value corresponding to each data sequence according to the sequence mapping table, and generate a data watermark corresponding to each data sequence according to the encoding sequence value corresponding to each data sequence.
[0083] In some embodiments, reference Figure 2 , Figure 2 This is an optional flowchart of step S101 in the embodiment of the present application. Step S101 may include but is not limited to steps S201 to S202:
[0084] Step S201, in response to a data acquisition operation, determining target original data from a database cluster, and collecting user identity information;
[0085] Step S202, encrypt the user identity information to obtain user information.
[0086] In some embodiments, user identity information is collected through system submission, file upload, etc., including but not limited to user IP address, user email, user identity tag and other information, recorded as userinfo, and then the user identity information userinfo is encrypted to obtain the corresponding user information, wherein the encryption method can be many, including symmetric encryption, asymmetric encryption and hash algorithm encryption, such as MD5 encryption, SHA1 encryption and DES encryption, etc., exemplarily, MD5 is used to encrypt the user information, as follows:
[0087] MD5(ip+email+userid+…);
[0088] Among them, MD5() is the MD5 encryption function, ip is the user's IP address, email is the user's email address, userid is the user's identity tag, and the encrypted user information is recorded as ciphertext.
[0089] In some embodiments, reference Figure 3 , Figure 3 This is an optional flowchart of step S102 in the embodiment of the present application. Step S102 may include but is not limited to steps S301 to S302:
[0090] Step S301, dividing the target original data into data rows, determining a plurality of data rows and text data corresponding to each data row;
[0091] Step S302: Generate a data sequence corresponding to each data row according to the text data corresponding to each data row.
[0092] In some embodiments, optionally, the target original data is text data, and the target original data is divided into data rows according to a preset row sequence rule, such as a dictionary order, etc. The divided target original data is recorded as data, and data includes multiple data rows, each data row has a corresponding data row number and text data.
[0093] In some embodiments, reference Figure 4 , Figure 4 This is an optional flowchart of step S103 in the embodiment of the present application. Step S103 may include but is not limited to steps S401 to S402:
[0094] Step S401, obtaining the data row number corresponding to each data sequence in the target original data;
[0095] Step S402, concatenating the data row number corresponding to each data sequence with the user information, and using a hash function to generate a code value corresponding to each data sequence.
[0096] In some embodiments, the data row number (denoted as num) of the data row corresponding to each data sequence in data is concatenated with ciphertext (the above user information), and the encoding value corresponding to each data sequence, i.e., hashCode, is calculated to obtain a hashCod of the total number of lines of text. e Sequence, the total length of the text line is the number of data lines, optionally, hashCod e The hashCod corresponding to each data sequence in the sequence e The calculation formula is as follows:
[0097] HASH(num+ciphertext)
[0098] Among them, HASH() is a hash function, which is a function that transforms input data of any length into a fixed-length output through a hash algorithm. The fixed-length output of the hash function is called a hash value, such as the encoding value hashCode corresponding to each data sequence mentioned above, num is the data row number corresponding to each data sequence, and ciphertext is the user information.
[0099] For example, refer to Figure 5 , Figure 5 This is an optional schematic diagram for determining the encoding value corresponding to the data sequence in the embodiment of the present application, wherein, assuming that there is a data row X, data row x corresponds to data sequence x, and the corresponding hashCode is generated by concatenating the data row number (denoted as num) of data row X with the ciphertext (the above user information). x , the hashCode x Determine the encoding value corresponding to the data sequence X.
[0100] In some embodiments, reference Figure 6 , Figure 6 This is an optional flowchart of step S104 in the embodiment of the present application. Step S104 may include but is not limited to steps S501 to S502:
[0101] Step S501, determining the arrangement order of each data sequence according to the code value corresponding to each data sequence;
[0102] Step S502, performing sequence mapping storage according to the coding values corresponding to each data sequence and the arrangement order of each data sequence, and generating a corresponding sequence mapping table.
[0103] In some embodiments, hashCod e Sequence according to hashCod eThe sizes are sorted and the line break mapping between the original sequence and the new sequence is recorded to obtain a sequence mapping table, which is represented by the following formula:
[0104] rowMap=(hashCode1, hashCode2,..., hashCode n );
[0105] Among them, rowMap represents the sequence mapping table, hashCode n is the encoding value corresponding to the data sequence ranked at the nth position, hashCode1 <hashCode2<...<hashCode n .
[0106] RowMap is a data structure used to store data in the form of key-value pairs. It can map each row of data in the database to an object in a programming language (such as JAVA). RowMap can map the above data sequence to the hashCode corresponding to the data sequence. e Stored in the form of key-value pairs.
[0107] In some embodiments, reference Figure 7 , Figure 7 This is an optional flowchart of step S105 in the embodiment of the present application. Step S105 may include but is not limited to steps S601 to S603:
[0108] Step S601, determining the arrangement order and coding value corresponding to each data sequence according to the sequence mapping table;
[0109] Step S602, generating a coding sequence value corresponding to each data sequence according to the arrangement sequence and coding value corresponding to each data sequence;
[0110] Step S603: Generate a data watermark corresponding to each data sequence according to the encoding order value corresponding to each data sequence, and embed the data watermark into the data sequence.
[0111] In some embodiments, according to the hashCode of each data sequence stored in the rowMap, the row order of the data is adjusted to determine the arrangement order and the encoding value hashCod of the data sequence corresponding to each data row. e , the order of data sequence is the order of its corresponding hashCode in rowMap.
[0112] Then, according to the arrangement order and encoding value hashCod corresponding to each data sequence e, determine the encoding order value corresponding to each data sequence, generate the data watermark corresponding to each data sequence according to the encoding order value corresponding to each data sequence, and embed the data watermark into the data sequence.
[0113] For example, assume that rowMap = (hashCode1, hashCode2, ..., hashCode n ), the hashCode corresponding to data sequence 1 is hashCode1 in rowMap, which means that the arrangement order of data sequence 1 is 1, and the encoding value is hashCode1. The encoding order value of data sequence 1 is determined by the arrangement order and the encoding value, which can be recorded as (1, hashCode1). Then, according to the encoding order value corresponding to data sequence 1, the digital watermark generation technology is used to generate the data watermark 1 corresponding to each data sequence 1. The user information is hidden in the data watermark 1, and the corresponding user information can only be obtained by subsequent comparison of rowMap. The data watermark 1 is embedded in the data sequence 1, and then the corresponding target data sequence 1 is output. The target data sequence 1 contains the data watermark 1 that hides the user information.
[0114] In some embodiments, reference Figure 8 , Figure 8 This is another optional flow chart of a data watermark generation method provided in an embodiment of the present application. The data watermark generation method may also include but is not limited to steps S701 to S703:
[0115] Step S701, storing user information and corresponding storage mapping table into a database;
[0116] Step S702, in response to the data tracing operation, obtaining the data to be traced and the tracing data storage mapping table corresponding to the data to be traced;
[0117] Step S703: According to the traceability data storage mapping table, a target storage mapping table matching the traceability data storage mapping table is determined from multiple storage mapping tables in the database, and user information corresponding to the target storage mapping table is obtained as target user information.
[0118] In some embodiments, when each user retrieves the target original data, a storage mapping table and user information are generated, and the historically generated user information and the storage mapping table corresponding to each user information are associated and then stored in the database together.
[0119] Optionally, in response to a data traceability operation, the data to be traced is obtained, and operations such as original data sorting and sequence line break mapping are performed in sequence according to the data to be traced, and a traceability data storage mapping table corresponding to the data to be traced is calculated, recorded as the traceability rowMap, and the traceability rowMap is compared one by one with multiple rowMaps stored in the database. According to the comparison result, a target rowMap consistent with the traceability rowMap is determined from multiple rowMaps, and user information associated with the target rowMap is obtained from the database as the target user information.
[0120] Reference Fig. 9 , Fig. 9 : is an optional structural diagram of a data watermark generation device provided in an embodiment of the present application. The device can be used to implement the above-mentioned data watermark generation method. The device may include:
[0121] A first module is used to determine target original data and corresponding user information in response to a data acquisition operation;
[0122] The second module is used to divide the target original data into sequences to obtain corresponding multiple data sequences;
[0123] The third module is used to concatenate each data sequence with the user information and calculate the code value corresponding to each data sequence;
[0124] The fourth module is used to perform sequence line break mapping according to the encoding value corresponding to each data sequence, and generate a corresponding sequence mapping table;
[0125] The fifth module is used to determine the encoding sequence value corresponding to each data sequence according to the sequence mapping table, and generate the data watermark corresponding to each data sequence according to the encoding sequence value corresponding to each data sequence.
[0126] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0127] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above data watermark generation method when executing the computer program. The electronic device can be any smart terminal including a tablet computer.
[0128] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0129] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0130] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0131] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the data watermark generation method of the embodiment of this application;
[0132] Input / output interface 903, used to implement information input and output;
[0133] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0134] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0135] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0136] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned data watermark generation method is implemented.
[0137] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0138] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0139] The embodiments of the present application provide a data watermark generation method, device, electronic device and storage medium, which divide the target original data into sequences to obtain multiple corresponding data sequences, splice each data sequence with user information, calculate the encoding value corresponding to each data sequence, perform sequence line break mapping according to the encoding value corresponding to each data sequence, generate a corresponding sequence mapping table, and generate a data watermark corresponding to each data sequence according to the sequence mapping table. The embodiments of the present application can realize data watermark generation, simplify the calculation process of data watermark, improve the calculation performance of data watermark, improve the robustness of data watermark, reduce the difficulty of implementation, improve the efficiency of watermark loading, and simplify the difficulty of subsequent data leakage tracing.
[0140] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0141] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0142] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0144] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0145] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0146] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0149] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose.
[0150] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0151] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A data watermark generation method, characterized in that: The method comprises the following steps: In response to the data acquisition operation, determining target original data and corresponding user information; Sequence the target original data to obtain a corresponding plurality of data sequences; Concatenate each of the data sequences with the user information, and calculate the encoding value corresponding to each of the data sequences; According to the encoding values corresponding to the data sequences, sequence line break mapping is performed to generate a corresponding sequence mapping table; According to the sequence mapping table, the encoding sequence value corresponding to each of the data sequences is determined, and according to the encoding sequence value corresponding to each of the data sequences, the data watermark corresponding to each of the data sequences is generated.
2. The data watermark generation method according to claim 1, characterized in that: The step of determining the target original data and the corresponding user information in response to the data acquisition operation specifically includes: In response to the data acquisition operation, determining the target original data from the database cluster and collecting user identity information; The user identity information is encrypted to obtain the user information.
3. The data watermark generation method according to claim 1, characterized in that: The step of dividing the target original data into sequences to obtain a plurality of corresponding data sequences specifically includes: Dividing the target original data into data rows to determine a plurality of data rows and text data corresponding to each of the data rows; The data sequence corresponding to each data row is generated according to the text data corresponding to each data row.
4. The data watermark generation method according to claim 3, characterized in that: The step of concatenating each of the data sequences with the user information and calculating the coding value corresponding to each of the data sequences specifically includes: Obtaining the data row number corresponding to each of the data sequences in the target original data; The data row number corresponding to each of the data sequences is concatenated with the user information, and a hash function is used to generate the encoding value corresponding to each of the data sequences.
5. The data watermark generation method according to claim 1, characterized in that: The performing sequence line break mapping according to the code values corresponding to the data sequences to generate a corresponding sequence mapping table specifically includes: Determining the arrangement order of each of the data sequences according to the code values corresponding to each of the data sequences; According to the code values corresponding to the data sequences and the arrangement order of the data sequences, sequence mapping storage is performed to generate the corresponding sequence mapping table, and the sequence mapping table is represented by the following formula: rowMap=(hashCode1,hashCode2,...,hashCode n ); Among them, rowMap represents the sequence mapping table, hashCode n It is the encoding value corresponding to the data sequence ranked at the nth position.
6. The data watermark generation method according to claim 1, characterized in that: The method further comprises: Storing the user information and the corresponding storage mapping table in a database; In response to the data tracing operation, obtaining the data to be traced and a tracing data storage mapping table corresponding to the data to be traced; According to the traceability data storage mapping table, a target storage mapping table matching the traceability data storage mapping table is determined from the multiple storage mapping tables in the database, and the user information corresponding to the target storage mapping table is obtained as the target user information.
7. The data watermark generation method according to claim 5, characterized in that: The step of determining, according to the sequence mapping table, a coding sequence value corresponding to each of the data sequences, and generating, according to the coding sequence value corresponding to each of the data sequences, a data watermark corresponding to each of the data sequences specifically includes: Determine the arrangement order and the encoding value corresponding to each of the data sequences according to the sequence mapping table; Generate the coding sequence value corresponding to each data sequence according to the arrangement sequence and the coding value corresponding to each data sequence; According to the encoding order value corresponding to each of the data sequences, a data watermark corresponding to each of the data sequences is generated, and the data watermark is embedded in the data sequence.
8. A data watermark generating device, characterized in that: The device comprises: A first module is used to determine target original data and corresponding user information in response to a data acquisition operation; The second module is used to divide the target original data into sequences to obtain a corresponding plurality of data sequences; The third module is used to concatenate each of the data sequences with the user information and calculate the coding value corresponding to each of the data sequences; The fourth module is used to perform sequence line break mapping according to the encoding value corresponding to each of the data sequences to generate a corresponding sequence mapping table; The fifth module is used to determine the encoding sequence value corresponding to each of the data sequences according to the sequence mapping table, and generate a data watermark corresponding to each of the data sequences according to the encoding sequence value corresponding to each of the data sequences.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the data watermark generation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data watermark generation method according to any one of claims 1 to 7 is implemented.
