Intdct and homomorphic encryption vector data exchange password watermark method

CN122533733APending Publication Date: 2026-08-07CHINESE ACAD OF SURVEYING & MAPPING
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINESE ACAD OF SURVEYING & MAPPING
Filing Date
2026-07-06
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0007]本发明目的在于克服现有技术不足,提供一种IntDCT与同态加密的矢量数据交换密码水印方法,解决现有技术中存在的频域变换与同态加密算理不兼容、加密与水印操作不可交换、版权验证过程隐私泄露等问题

Benefits of technology

1.实现了加密与水印操作的 "可交换性" 及结果的数学等效性:本发明解决了传统技术中 "必须先解密才能嵌入水印" 的时序限制。无论是在加密前的明文阶段进行嵌入,还是在加密后的密文阶段利用同态特性嵌入,最终生成的密文在解密后的数值偏差及密文随机数所携带的隐式极性特征上均保持一致。这一效果源于本发明构建的双重嵌入机制,利用 Paillier 算法的加法同态特性将明文域的 "量化调制" 转化为密文域的 "模乘" 操作,同时通过对加密随机数雅可比符号特征的控制,确保了两种路径下显式数值特征与隐式极性特征的统一。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122533733A_ABST
    Figure CN122533733A_ABST
Patent Text Reader

Abstract

The application discloses an IntDCT and homomorphic encryption vector data exchange cryptographic watermarking method, and belongs to the technical field of geographic information security and cryptography. The method comprises the following steps: performing integer processing on original vector data; performing dimension separation and sequence padding; performing integer discrete cosine transform to obtain a frequency domain coefficient matrix; selecting medium frequency coefficients as watermark embedding targets and performing integer multiple pre-quantization; generating a Paillier key pair and establishing a random number screening mechanism based on Jacobi symbols; constructing a logical mapping relationship between watermark bits and frequency domain coefficient positions; performing an exchangeable watermark embedding operation, compatible with two mathematically equivalent paths of a plaintext domain and a ciphertext domain, and synchronously embedding explicit numerical watermarking and implicit polarity watermarking; and structurally packaging the watermark-containing ciphertext to generate a watermark-containing encrypted data packet. The application realizes the exchangeability of encryption and watermarking operations, supports zero-knowledge blind detection, and guarantees the geometric losslessness of vector data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a vector data exchange cryptographic watermarking method based on IntDCT (Integer Discrete Cosine Transform) and Paillier homomorphic encryption, belonging to the fields of geographic information security and cryptography technology. Background Technology

[0002] Vector data, carrying high-precision geographic coordinates and complex topological relationships, represents the core foundational achievement in the field of surveying and mapping. With the accelerated market-based allocation of data elements in the digital economy era, the frequency of vector data circulation in cross-departmental sharing, commercial distribution, and cloud collaboration is exploding. In this process, data security faces a dual challenge: it requires both encryption technology to ensure the confidentiality of data during transmission and storage, and digital watermarking technology to achieve copyright verification and traceability.

[0003] However, in current untrusted environments (such as third-party cloud platforms) or multi-node data transfer processes, the traditional serial processing mode of "decrypt first, then embed watermark, then encrypt" is commonly used. This mode requires processing nodes to possess high-privilege decryption keys, resulting in core data being temporarily leaked in plaintext form in memory, which seriously violates the "principle of least privilege" in data security management. Therefore, the industry urgently needs a new protection technology that can break down the plaintext-ciphertext boundary, enabling the compliant embedding of copyright information while keeping the data encrypted, and ensuring the preservation of high-precision geometric features.

[0004] Although research on encryption and watermarking of vector data is relatively mature, three major technical bottlenecks remain when attempting to integrate the two to achieve higher-level protection with "operable ciphertext fields": 1. The "arithmetic incompatibility" between frequency domain transformation algorithms and homomorphic encryption systems: Existing robust vector watermarking algorithms mainly rely on Discrete Cosine Transform (DCT) or Discrete Fourier Transform (DFT), whose mathematical foundation is floating-point arithmetic. However, mainstream homomorphic encryption algorithms that support ciphertext computation (such as Paillier) are built on a large integer ring. This underlying arithmetic conflict between "floating-point and integer" necessitates strong quantization truncation or approximate transformations when forcibly combining them. For vector maps, which are extremely sensitive to precision, the quantization noise introduced during inverse transformation reconstruction can easily cause node drift, leading to serious topological consistency problems such as non-closed polygons and broken line segments.

[0005] 2. Lack of Ciphertext Field Manipulation Capabilities (Non-commutativity): Traditional digital watermarking and encryption technologies are logically separate, lacking the ability to directly modify data characteristics in ciphertext mode. This means that copyright marking operations are strictly locked to the "plaintext stage." If the data is already in encrypted storage, adding or updating the watermark requires a complete "decryption-embedding-reencryption" process. This process is not only inefficient, but more critically, it forces high-value plaintext data and the core private key to be exposed in the memory of untrusted nodes, greatly increasing the risk of data theft during the transfer process and limiting the flexibility of secure data circulation.

[0006] 3. The "Privacy Paradox" of the Verification Process (Verification Equals Leakage): Existing copyright verification schemes generally suffer from a single, simplistic model, requiring the complete decryption and restoration of the encrypted text before watermark extraction can be performed. This mechanism forcibly binds "copyright confirmation" with "content visibility," forcing regulators or evidence collectors to access original, sensitive geographical information in order to verify copyright. This "verification equals leakage" dilemma fails to meet the high-level privacy protection regulatory requirements of "data usable but not visible" in the current circulation of data elements. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption, which solves problems such as incompatibility between frequency domain transformation and homomorphic encryption arithmetic, non-interchangeability of encryption and watermarking operations, and privacy leakage during copyright verification.

[0008] The technical solution adopted by this invention to solve its technical problem is as follows: A cryptographic watermarking method for vector data exchange using IntDCT and homomorphic encryption includes the following steps: Step S1, converting the floating-point coordinates of the original vector data to integer domain coordinates without loss; Step S2, performing dimension separation and sequence padding on the integerized coordinate sequence to make its length an integer multiple of the transformation basis N; Step S3, cutting the padded coordinate sequence into several data segments of length N, reassembling them into a two-dimensional integer matrix, and performing an integer discrete cosine transform to obtain a frequency domain coefficient matrix; Step S4, classifying the frequency domain coefficients, selecting the intermediate frequency coefficients as the watermark embedding target, and performing an integer... Step S5: Generate Paillier key pairs that meet the requirements of homomorphic operations and establish a random number filtering mechanism based on Jacobian symbols. Step S6: Convert the copyright information into a binary bit stream and construct a logical mapping relationship between the watermark bits and the positions of the frequency domain coefficients. Step S7: Perform a commutative watermark embedding operation based on active random number filtering, compatible with two mathematically equivalent paths in the plaintext and ciphertext domains, and simultaneously embed explicit numerical watermarks and implicit polarity watermarks. Step S8: Convert the watermarked ciphertext coefficients into text format and perform structured encapsulation with public key parameters to generate a watermarked encrypted data packet for distribution.

[0009] The method further includes the following steps: Step S9, plaintext domain watermark blind extraction: After reading and deserializing the watermarked encrypted data packet, homomorphic decryption is performed using the Paillier private key to restore the watermarked frequency domain coefficients. The single-bit watermark is extracted by the minimum distance decision of the reconstructed quantization reference anchor point. Finally, the plaintext domain watermark information of the complete copyright is reconstructed through cyclic redundancy majority voting statistics; Step S10, ciphertext domain watermark blind extraction: Under zero-knowledge conditions of no decryption, no possession of the private key, and no contact with the original plaintext, the Jacobian symbol of the target ciphertext is calculated using the public key modulus to extract the implicit polarity feature. Through symbol-bit mapping and cyclic redundancy majority voting statistics, the ciphertext domain watermark information of the complete copyright is directly reconstructed from the ciphertext domain.

[0010] One of the above technical solutions has the following advantages or beneficial effects: 1. Achieved "commutativity" and mathematical equivalence of encryption and watermarking operations: This invention overcomes the timing constraint of traditional techniques that require "decryption before watermark embedding." Whether embedding occurs in the plaintext stage before encryption or in the ciphertext stage after encryption using homomorphic properties, the final generated ciphertext maintains consistency in both the numerical deviation after decryption and the implicit polarity characteristics carried by the ciphertext random numbers. This effect stems from the dual embedding mechanism constructed in this invention, which utilizes the additive homomorphic properties of the Paillier algorithm to transform the "quantization modulation" of the plaintext domain into a "modular multiplication" operation in the ciphertext domain. Simultaneously, by controlling the Jacobian sign characteristics of the encrypted random numbers, the invention ensures the unification of explicit numerical features and implicit polarity characteristics under both paths.

[0011] 2. Achieving "zero-knowledge" blind detection based on Jacobian symbols enhances privacy protection: This invention supports the extraction and ownership verification of watermark information using only the public key, without decryption, possession of the private key, or access to the original plaintext vector data. This avoids the risk of secondary leakage of sensitive geographical information due to data decryption during copyright supervision or evidence collection. This effect stems from the specifically selected public key generator g=n+1 and the active selection mechanism of random number Jacobian symbols in the scheme, ensuring that the Jacobian symbol of the ciphertext is determined solely by random numbers. The verifier only needs to possess the public key modulus n to directly decode the watermark bits by calculating the Jacobian symbol of the ciphertext.

[0012] 3. This invention resolves the incompatibility issue between floating-point transformation and homomorphic encryption, ensuring the geometric integrity of vector data: Compared to the floating-point rounding error introduced by traditional DCT transformation, this invention ensures that the coordinate values ​​remain accurate throughout the entire process of vector data moving from the spatial domain to the frequency domain and back to the spatial domain, avoiding the problem of broken vector map topological relationships due to precision loss. This effect stems from the introduction of the lifting format integer discrete cosine transform, which constructs an integer-to-integer bijective mapping by decomposing the rotation matrix into three sequential shear matrices and combining them with rounding operations. This eliminates floating-point truncation errors and directly adapts to the Paillier homomorphic encryption algorithm's requirement that it only supports large integer operations.

[0013] 4. The synergy of multiple technologies yielded unexpected technical results: This invention is not a simple superposition of integer discrete cosine transform, Paillier homomorphic encryption, and digital watermarking technology, but rather a synergistic effect achieved through deep integration. Integer discrete cosine transform not only solves the accuracy problem but also provides integer input for homomorphic encryption; Paillier homomorphic encryption not only provides confidentiality protection, but its probabilistic characteristics also provide a carrier for implicit watermark embedding; the random number selection mechanism based on Jacobi symbols breaks down the barriers between plaintext and ciphertext operations, achieving true commutativity. These three technologies work together to form a systematic protection scheme that integrates high precision preservation, flexible ciphertext operations, and privacy security verification, solving multiple technical challenges that existing technologies cannot simultaneously address. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating a vector data exchange cryptographic watermarking method using IntDCT and homomorphic encryption, according to an exemplary embodiment. Figure 2 This is a schematic diagram of a vector data exchange cryptographic watermarking device based on an exemplary embodiment of IntDCT and homomorphic encryption. Figure 3This is a main flowchart illustrating a vector data homomorphic encryption and dual-mode watermark embedding according to an exemplary embodiment; Figure 4 This is a flowchart illustrating the main process of blind extraction and decryption of a plaintext field watermark according to an exemplary embodiment; Figure 5 This is a main flowchart illustrating blind extraction of encrypted watermarks based on Jacobi symbols according to an exemplary embodiment; Figure 6 This is a comparison diagram of the original data and the decrypted watermarked data of this invention. Figure 6 (a) is a schematic diagram of the original data. Figure 6 (b) is a schematic diagram of the decrypted watermarked data. Figure 7 This is a frequency domain comparison diagram of the present invention. Figure 8 This is a comparison diagram of the energy distribution of the present invention. Detailed Implementation

[0015] To more clearly illustrate the technical features of the present invention, the invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, these are merely examples and are not intended to limit the invention.

[0016] Example 1 like Figure 1 As shown in the figure, an embodiment of the present invention provides a cryptographic watermarking method for vector data exchange using IntDCT and homomorphic encryption, which includes the following steps: Step S1: Convert the floating-point coordinates of the original vector data into integer coordinates without loss.

[0017] Step S1 specifically includes the following steps: Step S11: Read the feature set of the original vector data and extract the floating-point coordinate sequence of each geographic feature; Step S12: Determine the precision scaling factor S based on the precision requirements of the vector data for the target application scenario; the precision scaling factor S is a power of 10 and satisfies S≥1 / ,in The maximum allowable coordinate error for vector data; for two-dimensional vector data, the X and Y coordinates use the same precision scaling factor S; for three-dimensional vector data, the X, Y, and Z coordinates can use the same or different precision scaling factors. Step S13: Perform a rounding operation on each coordinate value in the floating-point coordinate sequence to losslessly map the real-number field floating-point coordinates to the integer field coordinates. The conversion formula is as follows: , in, These are the original floating-point coordinate values. The coordinates are the converted integer field values, and Round is the rounding function.

[0018] Step S1 further includes the following after step S13: Step S14: Perform inverse transformation verification on the transformed integer field coordinates and calculate... If the inverse transformation error of all coordinates If so, it is confirmed that the reshaping process is lossless.

[0019] Step S2: Perform dimension separation and sequence padding on the integerized coordinate sequence to make its length an integer multiple of the transformation basis N.

[0020] Step S2 specifically includes the following steps: Step S21: Decouple the integer field coordinate sequence after integerization by dimension, and decompose the multi-dimensional coordinate pairs into independent single-dimensional coordinate sequences. Specifically, the dimension decoupling operation decomposes the two-dimensional (x,y) coordinate pairs into independent X coordinate sequences and Y coordinate sequences, and the three-dimensional (x,y,z) coordinate pairs into independent X, Y, and Z coordinate sequences. Step S22: According to the preset transformation basis N, each single-dimensional coordinate sequence is cut into equal length segments to obtain several initial data segments; the transformation basis N is an integer power of 2, ranging from 8 to 64, and is determined by comprehensively considering the frequency domain energy concentration and the homomorphic encryption computation overhead. Step S23: Detect the length L of each initial data segment. If L is not divisible by the transformation radix N, calculate the length to be padded. indivual; Step S24: Using the last digit copying strategy, read the last valid coordinate value of the initial data segment and repeatedly fill it into the empty space to be filled, so that the length of the data segment after filling is an integer multiple of N.

[0021] Step S2 further includes the following after step S24: Step S25: Record the original length and padding length information of each data segment, and generate padding metadata; Step S26: Perform length verification on all padded data segments to ensure that their lengths are all integer multiples of N.

[0022] Step S3: Cut the completed coordinate sequence into several data segments of length N, reassemble them into a two-dimensional integer matrix, and perform an integer discrete cosine transform to obtain the frequency domain coefficient matrix.

[0023] Step S3 specifically includes the following steps: Step S31: Cut the single-dimensional coordinate sequence after dimensional separation and sequence completion into several independent data segments of length N; Step S32, reassemble each data segment of length N into For a two-dimensional integer matrix, when the length of the data segment cannot be reassembled into a square matrix, the length of the data segment is extended to the nearest perfect square by zero padding. Step S33: Using the lifting scheme principle, the planar rotation matrix of the discrete cosine transform is decomposed into three sequential triangular shearing matrices; the decomposition formula of the planar rotation matrix is: , Where u is the boundary shear factor, calculated using the following formula: v is the intermediate shearing factor, calculated using the following formula: ; Step S34: Perform three iterative shearing calculations on each element pair in the two-dimensional integer matrix to obtain the integer frequency domain coefficient matrix. The original values ​​can be completely restored by performing the inverse transformation and subtraction operations in reverse order. The specific steps of the three iterative shearing calculations are as follows: First horizontal shear: Calculate the intermediate value , where a and b are the number of the two intermediate nodes involved in the butterfly transformation; Second vertical shear: based on the updated Calculate the intermediate value ; Third horizontal shear: based on the updated Calculate the final output value .

[0024] Step S4: Classify the frequency domain coefficients, select the intermediate frequency coefficients as the watermark embedding target, and perform integer multiple prequantization.

[0025] Step S4 specifically includes the following steps: Step S41: Perform a Zig-Zag scan on the two-dimensional frequency domain coefficient matrix obtained by integer discrete cosine transform, and rearrange it into a one-dimensional energy sequence; Step S42: Divide the one-dimensional energy sequence into a DC coefficient region, a high-frequency AC coefficient region, and a mid-frequency AC coefficient region based on frequency characteristics. The DC coefficient region includes the DC coefficient at the beginning of the sequence, which represents the global absolute position of the sub-block and is designated as a protected area, strictly prohibited from use for watermark embedding. The high-frequency AC coefficient region includes the High-AC coefficient at the end of the sequence, which represents minute details and noise and is not used for watermark embedding. The mid-frequency AC coefficient region includes the Mid-AC coefficient in the middle of the sequence, which represents the local relative position and main texture and is used for watermark embedding. Step S43: Select the coefficients in the intermediate frequency AC coefficient region as the target carrier for watermark embedding. The number of selected intermediate frequency coefficients accounts for 10% to 30% of the total number of coefficients and is evenly distributed in the intermediate frequency AC coefficient region. Step S44, according to the preset quantization step size The target intermediate frequency coefficients are prequantized to integer multiples, and then forcibly aligned to a value of 1. For grid nodes with intervals that are integer multiples of each other; the formula for calculating integer multiple prequantization is: , in, For the target intermediate frequency coefficient, These are the prequantized, standardized frequency domain coefficients. This is the quantization step size parameter.

[0026] Step S5: Generate Paillier key pairs that meet the requirements of homomorphic operations and establish a random number filtering mechanism based on Jacobi symbols.

[0027] Step S5 specifically includes the following steps: Step S51: Based on the preset security level, select two independent large prime numbers p and q with equal bit lengths, wherein the bit lengths of the large prime numbers p and q are 1024 bits or 2048 bits, and satisfy the following conditions: , The function is the greatest common divisor. Step S52, calculate the modulus and Specifically, g=n+1 is selected as the public key generator; Step S53, calculate private key parameters and , where auxiliary functions , It is a function of least common multiple; Step S54: Establish a random number selection mechanism based on Jacobian symbols, defining a one-to-one mapping relationship between watermark bits and random number Jacobian symbols; the mapping relationship between watermark bits and random number Jacobian symbols is as follows: watermark bit 1 corresponds to Jacobian symbol -1, watermark bit 0 corresponds to Jacobian symbol 1; the specific rules of the random number selection mechanism are: cyclically generate random numbers r that are coprime to the modulus n, and calculate their Jacobian symbols with respect to n. This continues until a random number that meets the preset symbol requirements is obtained.

[0028] Step S6: Convert the copyright information into a binary bit stream and construct a logical mapping relationship between the watermark bits and the positions of the frequency domain coefficients.

[0029] Step S6 specifically includes the following steps: Step S61: Obtain the copyright information to be embedded and convert it into binary data. The copyright information includes at least one of numeric ID, string, and hash value. Step S62: Fill the binary data into a fixed-length binary bit stream. , where L is the length of the watermark bitstream, which ranges from 16 to 256 bits and matches the size of the vector data and the robustness requirements of the watermark; during the process of filling the binary data into a fixed-length binary bitstream, error correction coding is performed on the binary bitstream, and Hamming code or cyclic redundancy code is used to improve the anti-interference capability of the watermark. Step S63: Based on the total number of blocks of vector data and the available intermediate frequency coefficient capacity of each block, establish a cyclic redundancy mapping relationship between the watermark bits and the positions of the frequency domain coefficients. The formula for calculating the cyclic redundancy mapping relationship is as follows: Where i is the global index of the target coefficient, and b is the watermark bit value that should be embedded at that position; Step S64: Generate a logical allocation list containing "data block ID - coefficient index - target bit value" as a precise guide for subsequent watermark embedding operations.

[0030] Step S7: Perform a commutative watermark embedding operation based on active random number selection, compatible with two mathematically equivalent paths in the plaintext and ciphertext fields, and simultaneously embed explicit numerical watermarks and implicit polarity watermarks.

[0031] Step S7 specifically includes the following steps: Step S71: Obtain the pre-quantized intermediate frequency coefficients, Paillier key pairs, and watermark logic allocation list; Step S72: Select the watermark embedding path according to the data processing stage, including plaintext field embedding path and ciphertext field embedding path; Step S73: Under the selected path, execute explicit numerical watermark embedding and implicit polar watermark embedding simultaneously: explicit numerical watermarking is achieved by modifying the quantization amplitude of the intermediate frequency coefficient, and implicit polar watermarking is achieved by selecting random numbers with specific Jacobian symbols to participate in encryption. The explicit numerical watermark is used for copyright self-checking after decryption, and the implicit polar watermark is used for zero-knowledge confirmation of rights in the ciphertext domain. Step S74: In the plaintext embedding path, first perform quantization modulation (QIM) to modify the intermediate frequency coefficients, and during encryption, select random numbers corresponding to the Jacobian symbols according to the watermark bits; in the ciphertext embedding path, first uniformly encrypt the initial ciphertext using random numbers with Jacobian symbols of +1, and then determine whether to homomorphically multiply by the watermark bits. Simultaneously, it is replaced with a random number with a Jacobian sign of -1. The two paths ultimately yield the watermarked ciphertext. Mathematically, it satisfies: (1) The decrypted values ​​are exactly the same, that is... = (2) The ciphertext Jacobi symbol is entirely determined by the embedded bits: if w=1 then If w=0, then This property directly proves the strong commutative equivalence of encryption operations and watermarks embedded in Paillier ciphertext fields, without needing to distinguish the timing of operations.

[0032] Preferably, the specific steps of the plaintext field embedding path are as follows: Locate the target plaintext mid-frequency coefficient based on the logical allocation list. and its corresponding watermark bits ; like ,implement , This is the quantization step size; if ,Keep ; In the When performing Paillier encryption, random numbers r that meet the requirements of the corresponding Jacobian symbol are selected for the calculation.

[0033] Preferably, the specific steps of the ciphertext field embedding path are as follows: Paillier encryption is applied to all original plaintext coefficients, using a random number with a Jacobian sign of 1 to generate the initial ciphertext. ; Lock the target ciphertext based on the logical allocation list and its corresponding watermark bits ; like Select random number pairs with a Jacobian sign of -1 for quantization step size Encryption is performed, combining the initial ciphertext with... Perform modular multiplication; if w=0, directly retain the initial ciphertext; the formula for the modular multiplication operation is: , in, It contains watermarked encrypted text. This is the initial ciphertext. This is the ciphertext for quantizing the step size.

[0034] Step S8: Convert the watermarked ciphertext coefficients into text format and combine them with the public key parameters for structured encapsulation to generate a watermarked encrypted data packet for distribution.

[0035] Step S8 specifically includes the following steps: Step S81: Traverse the watermarked ciphertext coefficients of all encrypted blocks and convert the ciphertext coefficients in large integer format into a general text format, wherein the general text format is a hexadecimal string or a Base64 encoded string. Step S82: Construct a structured data container and encapsulate the non-confidential parameters required for decryption and computation in the container header. The structured data container adopts JSON or XML format and does not contain the private key parameter used for decryption. Step S83: Fill the payload portion of the data container with the serialized watermarked ciphertext; Step S84 generates a standardized watermarked encrypted data packet containing header parameters and ciphertext payload for cross-platform transmission and distribution.

[0036] Preferably, the non-classified parameters include: Grid dimension parameters: the grid width, height, and block size of the vector data within the quantized coordinate domain; Public key parameters: the modulus n and generator g of the Paillier algorithm; Watermark parameters: transform basis N, quantization step size The length of the watermark bitstream is L.

[0037] Preferably, the step S84 is further included before the following step: The hash value based on the national cryptographic SM3 hash algorithm is calculated for the encrypted data packet, and the SM3 hash value is appended to the end of the data packet for integrity verification; then the data packet is subjected to lossless compression to reduce transmission and storage overhead.

[0038] Example 2 like Figure 2 As shown, the vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption provided in this embodiment of the invention includes, in addition to the steps in Embodiment 1, the following steps: Step S9, Plaintext Domain Watermark Blind Extraction: After reading and deserializing the watermarked encrypted data packet, homomorphic decryption is performed using the Paillier private key to restore the watermarked frequency domain coefficients. The single-bit watermark is extracted by reconstructing the minimum distance decision of the quantization reference anchor point. Finally, the plaintext domain watermark information of the complete copyright is reconstructed through cyclic redundancy majority voting statistics.

[0039] The plaintext field watermark blind extraction specifically includes the following steps: Step S91: Read and parse the encrypted data packet, and reconstruct the hexadecimal ciphertext stream into a data object in large integer format; Step S92: Use Paillier's private key to perform homomorphic decryption on the ciphertext coefficients to restore the watermarked frequency domain integer coefficients. Step S93: Perform quantization index modulation on the decrypted intermediate frequency coefficients and extract the binary watermark bits by minimum distance decision. Step S94: Based on the cyclic redundancy coding strategy, perform bit-by-bit majority voting statistics on all extracted bit streams to reconstruct the final watermark information.

[0040] Step S10, Blind extraction of ciphertext watermark: Under zero-knowledge conditions of not decrypting, not holding the private key, and not touching the original plaintext, the implicit polarity feature is extracted by calculating the Jacobian symbol of the target ciphertext using only the public key modulus. After symbol-bit mapping and cyclic redundancy majority voting statistics, the complete copyright ciphertext watermark information is directly reconstructed from the ciphertext domain.

[0041] The blind extraction of the encrypted field watermark specifically includes the following steps: Step S101: Read the encrypted data packet and parse its metadata to obtain the public key modulus n and block index information, and lock the target intermediate frequency ciphertext coefficient; Step S102: Perform a deserialization operation on the hexadecimal ciphertext data stream to reconstruct it into a mathematical object that supports large number operations; Step S103: Without decryption, perform Jacobian symbol calculation on the ciphertext object using the public key modulus n to extract implicit polarity features; Step S104: Map the symbol feature value to binary watermark bits according to the symbol-bit mapping relationship, and reconstruct the final watermark information through cyclic redundancy majority voting.

[0042] Example 1 provides a vector data exchange cryptographic watermarking method based on integer discrete cosine transform and Paillier homomorphic encryption. Example 2 provides corresponding blind watermark extraction methods for the plaintext and ciphertext fields. Examples 1 and 2 achieve commutativity of encryption and watermarking operations, support zero-knowledge blind detection, and ensure the geometrical losslessness of vector data. They are suitable for secure distribution of high-precision vector data in untrusted environments, ciphertext operations, privacy protection, and copyright supervision applications.

[0043] Example 3 The core of this invention lies in constructing a lossless mapping channel from "floating-point coordinate space" to "encrypted integer space" and a mechanism for "interchangeable encryption and watermarking operations." First, through source pre-quantization and integer discrete cosine transform (IntDCT), vector data is accurately mapped to integer frequency domain coefficients (i.e., the transformed coefficients are directly integers without truncating decimals, thus matching the input requirements of homomorphic encryption). This overcomes the constraint that Paillier homomorphic encryption only supports integer operations and completely eliminates the truncation error of traditional floating-point transformation by utilizing the integer invertibility property of IntDCT. Secondly, leveraging the probabilistic characteristics of the Paillier encryption algorithm, an active selection mechanism for random Jacobi symbols was constructed: each watermarking operation not only modifies the frequency domain coefficients to quantize the amplitude as an explicit numerical watermark for copyright self-checking after decryption, but also forcibly selects random numbers with specific Jacobi symbols (+1 or -1) to participate in the calculation during the encryption generation process, directly "physically encoding" the watermark bits into the random perturbation term of the ciphertext as an implicit polarity watermark for zero-knowledge ownership confirmation of the ciphertext.

[0044] Building upon this foundation, this invention constructs a two-dimensional collaborative mechanism of "numerical modulation" and "random number polarity homomorphic permutation," proving that this mechanism possesses complete "commutativity": whether quantization modulation (QIM) is directly performed in the plaintext state before encryption, combined with random number polarity filtering for encryption, or the numerical step size is simultaneously superimposed and the random number polarity feature of the ciphertext is embedded using homomorphic properties in the encrypted ciphertext state, the ciphertext ultimately generated by both paths maintains strict consistency in the quantization deviation value after decryption and the Jacobian sign polarity carried by the random number in the ciphertext. This not only verifies the mathematical equivalence of plaintext and ciphertext operations but also ensures that high-precision data can be losslessly distributed and monitored through a unified standard at different stages of "plaintext preprocessing" and "ciphertext blind operation."

[0045] (a) Encryption and watermark embedding methods: like Figure 3 As shown, the specific process of vector data homomorphic encryption and dual-mode watermark embedding is as follows.

[0046] Step 1: Read the original vector data features, obtain their coordinate sequence, and introduce a precision scaling factor. This converts floating-point coordinates to integers without loss.

[0047] Given that the Paillier homomorphic encryption algorithm only supports integer operations, its compatibility with the double-precision floating-point storage format of vector data needs to be addressed. Directly truncating the decimal part would lead to significant errors. Therefore, a scaling factor is introduced. Construct a lossless transformation from the real number field to the integer field:

[0048] in, Represents the floating-point coordinates of the original vector data. Represents the mapped integer field coordinates. This indicates a rounding operation, where S is the precision scaling factor.

[0049] scaling factor As a key parameter for precision control, it can be flexibly selected and set according to the actual requirements of vector data precision in specific application scenarios.

[0050] Step 2: Perform dimensional separation on the integerized coordinate sequence, decomposing it into independent X-coordinate and Y-coordinate sequences, and then pad the sequences to make their length equal to the transformation basis. Integer multiples of.

[0051] To construct a block input matrix adapted for two-dimensional frequency domain transformation and to ensure the independence of each coordinate dimension, the following preprocessing operations are performed on the integerized coordinate sequence: (1) Dimensional decoupling: The coordinate pairs are decomposed into two independent sequences. In cryptographic processing, the numerical ranges and distributions of the X and Y axes may differ. Processing them independently can prevent simultaneous errors in X and Y during decryption anomalies, thus avoiding irreparable geometric distortions.

[0052] (2) Data block division: based on the transformation basis Cut the coordinate sequence. The selection of the value needs to take into account both the frequency domain energy concentration and the computational cost of homomorphic encryption to ensure the best watermark carrying capacity.

[0053] (3) End-of-sequence padding: Detect the length of the data segment at the end of the sequence. .like Cannot be transformed by a basis If the result is divisible, the last digit is copied, meaning the last valid coordinate value in the sequence is read and used to fill the remaining bits. In each empty space, until the length of the data block reaches... .

[0054] Step 3: Cut the padded X and Y sequences into several segments of length . Independent data segments, and based on preset dimension parameters ( Each data segment is reorganized into a two-dimensional integer matrix, and an integer discrete cosine transform (IntDCT) is performed on each matrix to obtain the frequency domain coefficient matrix.

[0055] First, this invention selects Discrete Cosine Transform (DCT) as the basic frequency domain framework for watermark embedding. Compared with spatial domain methods that directly modify coordinates, frequency domain watermarking has stronger resistance to compression and noise. Among many frequency domain transform algorithms, DCT has the best "energy concentration" characteristic, which can concentrate the main vector data energy in the low-frequency part, thus providing an ideal masking environment for embedding watermarks in the mid-frequency band.

[0056] However, to address the precision limitations of traditional Discrete Cosine Transform (DCT) due to its reliance on floating-point arithmetic, Integer Discrete Cosine Transform (IntDCT) is employed for frequency domain transformation. Since the inverse transformation of traditional DCT inevitably introduces truncation errors under the limited precision of computers, it can lead to topological consistency breakdown when processing vector data. In contrast, IntDCT, by constructing an integer-to-integer bijective mapping, fundamentally eliminates floating-point rounding errors, ensuring the lossless reversibility of vector data.

[0057] To achieve the aforementioned lossless transformation, the planar rotation matrix in the DCT core operator is decomposed into three sequential triangular shear matrices using the lifting scheme principle. For any rotation angle... Its decomposition formula is as follows: , The above decomposition only involves the rotation angle Two key rotational control coefficients determined and Among them, the coefficient The boundary shear factor is used for the horizontal shearing in the first and third steps, and its calculation formula is as follows: ;coefficient The intermediate shear factor is used for the vertical shearing in the second step, and its calculation formula is as follows: .

[0058] Let the two input components in the transformation process be respectively and (Note: here) , This refers to the number of two intermediate nodes participating in the butterfly transformation within the same dimension sequence. During computer execution, the matrix multiplication described above is transformed into three sequential iterative computation steps. To ensure integer closure, a rounding function is introduced at each step. The specific steps are as follows: First iteration (horizontal shear): Calculate intermediate values The formula is ; Second iteration (vertical shear): based on the updated Calculate the intermediate value The formula is ; Third iteration (horizontal shear): based on the updated Calculate the final output value The formula is .

[0059] Based on the structural reversibility of the lifting format, its inverse transformation process can completely restore the original value simply by performing subtraction operations in reverse order. That is, the third, second, and first iterations are canceled in sequence, thus mathematically guaranteeing the lossless restoration of vector data after undergoing the "spatial domain-frequency domain-spatial domain" transformation.

[0060] Step 4: Classify the frequency domain coefficients, select the intermediate frequency coefficients (Mid-AC) as the watermark embedding target, and follow the preset step size. Perform integer multiple prequantization on it.

[0061] To establish a standardized watermark-embedded data carrier, the transformed frequency domain coefficients are screened and structured to construct a standardized data state with a clear distribution pattern.

[0062] (1) Coefficient Optimization Strategy Based on Energy Distribution: To achieve the best balance between the concealment and robustness of the watermark, a Zig-Zag scan is first performed on the two-dimensional frequency domain coefficient matrix to rearrange it into a one-dimensional energy sequence. The coefficients are then partitioned according to their frequency characteristics: DC coefficient: Located at the beginning of the sequence, it represents the global absolute position of the current sub-block. Any modification to its magnitude will cause a global translation of the geometric features within this region, compromising the accuracy of the vector data. Therefore, it is listed as a protected area and is strictly prohibited from use for watermark embedding.

[0063] High-AC coefficients: Located at the end of the sequence, they represent minute details and noise. Their values ​​are unstable and easily lost during compression, making them unsuitable as vectors.

[0064] Mid-AC coefficients: Located in the middle of the sequence, they represent local relative positions and main textures. This frequency band has moderate energy, possessing both strong anti-interference capabilities and the ability to effectively mask minor quantization modifications. Therefore, coefficients in this frequency band are selected as the target carrier for watermark embedding.

[0065] (2) Integer multiple prequantization: For the selected Mid-AC coefficients ,implement .in: (Target Coefficient): Represents the target intermediate frequency coefficient selected from the frequency domain coefficient matrix after IntDCT transformation, which is used to carry watermark information.

[0066] (Quantization Step): This parameter represents the preset quantization step size. It controls the depth of watermark embedding; the larger the value, the stronger the watermark robustness, but the greater the modification to the original data.

[0067] (Pre-quantized Coefficient): Represents the normalized frequency domain coefficients after pre-quantization, which serve as the reference carrier for subsequent watermark embedding.

[0068] Physical meaning: to target coefficient Force alignment to This operation, performed on grid nodes at intervals that are integer multiples of each other, effectively eliminates the random distribution interference of the original coefficients, constructing a standardized data state with a clear distribution pattern. This provides a basis for subsequent analysis based on whether the data deviates from the grid center. "This provides a deterministic mathematical benchmark for determining the watermark bits."

[0069] Step 5: Generate Paillier key pairs that meet the requirements of homomorphic operations, based on security needs. During this process, generators are specifically selected. Furthermore, a random number selection mechanism based on Jacobi symbols was established, providing a mathematical basis for achieving blind detection based on symbolic features.

[0070] This invention selects the Paillier public-key cryptography scheme as the encryption method, primarily based on its unique homomorphic properties and probabilistic security, to adapt to the special protection requirements of vector data. On one hand, the Paillier algorithm possesses additive homomorphic properties, meaning it satisfies... This mathematical property forms the basis for the mathematical equivalence between "ciphertext field watermark embedding" and "plaintext field watermark embedding" in this invention. It enables the system to achieve equivalent watermark signal superposition by performing modular multiplication on the ciphertext without revealing the private key or plaintext content. Furthermore, addressing the high repetition rate of local coordinate values ​​in vector data, the Paillier algorithm introduces a random interference factor. Semantic security is achieved. Even when the exact same coordinate values ​​are encrypted multiple times, the resulting ciphertext bitstreams are distinct, effectively resisting statistical frequency analysis attacks targeting vector data. Third, the Paillier algorithm's unique ciphertext structure allows for the construction of a ciphertext feature binding mechanism based on Jacobi symbols. Through specific parameter configuration, the Jacobi symbols of the ciphertext can be made to depend only on random interference factors. This provides a mathematical possibility for "zero-knowledge blind detection." Based on the above selection, the specific key generation and parameter configuration are as follows: (1) Large prime number screening and coprime detection: Based on the preset security level, two independent large prime numbers with equal bit lengths are selected using a cryptographic random number generator. and In the screening process, in addition to performing primality testing, it is also necessary to calculate the greatest common divisor (GCD). ), and ensure This step aims to ensure that the order of the modulus and the group are coprime, which is a mathematical prerequisite for subsequent calculation of multiplicative inverses and for ensuring the effectiveness of the algorithm.

[0071] (2) Public key construction: Calculate the modulus and Unlike the traditional Paillier algorithm, which randomly selects integers... In this way, the present invention specifically selects As a public key generator.

[0072] In the model In the group, The order is And its relation to The Jacobian symbol is always This setting eliminates interference from plaintext on the ciphertext Jacobian symbols, ensuring subsequent use of random numbers. Independence and determinism in watermark encoding. The final public key is... It is used for encryption and ciphertext watermark embedding operations.

[0073] (3) Private key generation: Calculated using the least common multiple (LCM). And calculate its relation to the modulus Multiplicative inverse Private key It is stored locally by the data owner and used for final data decryption and display of numerical watermark extraction.

[0074] Step 6: Generate watermark information. Convert copyright information (such as a numeric ID or string) into a binary bit stream and use a cyclic redundancy strategy to establish a logical mapping relationship between the watermark bit sequence and the position of the frequency domain coefficients.

[0075] This step aims to construct a standardized copyright data carrier and pre-calculate the distribution logic of watermark bits in the frequency domain. The specific process is as follows: (1) Watermark information serialization and binary conversion: Convert the copyright information to be embedded (such as a numeric ID or string) into a fixed-length binary bit sequence. (in (where the sequence length is 1), serving as a unique "digital fingerprint".

[0076] (2) Establishment of logical mapping relationship: Without touching the actual coefficient values, a logical mapping index between the watermark bits and the frequency domain positions is constructed based on the total number of blocks of vector data and the available coefficient capacity of each block. Specifically, using a cyclic redundancy strategy, the global index is calculated as follows: The watermark bit logic value that should be associated with the target coefficient position The process outputs a logical allocation list containing "data block ID - coefficient index - target bit value", which serves as a precise guide for plaintext or ciphertext embedding operations in subsequent steps.

[0077] Step 7: Perform a commutative watermark embedding operation based on active random number selection, compatible with both plaintext field (path A) and ciphertext field (path B).

[0078] Both paths, while performing quantization modulation (QIM) embedding of explicit numerical watermarks, also use a forced selection of random numbers with specific Jacobian symbols (+1 / -1) to participate in the computation, directly physically encoding the watermark bits into the ciphertext random perturbation term, thus achieving the synchronous embedding of explicit numerical features and implicit polarity features.

[0079] Based on different stages of the data processing flow, this invention provides two mathematically equivalent implementation paths. One path allows for direct embedding of the watermark in the plaintext field before encryption (Path A), while the other embeds it in the ciphertext field after encryption through homomorphic operations (Path B). Furthermore, both paths actively select Jacobi symbols for the encrypted random numbers, simultaneously modifying the plaintext values ​​and embedding the Jacobi symbol features of the ciphertext. The specific implementation is as follows: (1) Path A: Plaintext field embedding strategy (embedding first, then encryption): ① Plaintext frequency coefficient watermark embedding: First, based on the logical allocation list generated in step 6, locate the global index as... Target plaintext mid-frequency coefficients (Mid-AC) and its corresponding watermark bits .like Perform integer addition ( (for quantization step size); if Keep the coefficients unchanged .

[0080] ② Implicit watermark embedding based on random number selection: When performing Paillier encryption on the coefficients, the target watermark bit at that position is selected. Perform random number polarity filtering: when Time: Generate random numbers in a loop Select the one that satisfies of Participate in encryption operations. When Time: Generate random numbers in a loop Select the one that satisfies of It participates in the encryption operation, and the Jacobian symbol of the ciphertext itself strictly corresponds to the watermark information planned in step 6.

[0081] Note: The above It indicates the Jacobi symbol operation, not the division operation.

[0082] (2) Path B: Ciphertext field embedding strategy (encrypt first, then embed): ① Homomorphic encryption of all original data and unified initial state: When performing Paillier encryption on all original plaintext coefficients C, a unified method is adopted that satisfies A random number is generated, and the Jacobian symbol signature of all initial ciphertexts is defaulted to "+1". Then, the initial ciphertext is generated using the public key: .

[0083] Note: Here This refers to all frequency domain coefficients, when they correspond to the intermediate frequency position. .

[0084] ②Blind Embedding of Ciphertext: Without decryption, the target ciphertext is locked according to the logical allocation list in step 6. And read the watermark bits that should be embedded at that location. Follow these steps to perform the operation: When the target watermark bits First, a random number generator is used to generate random numbers in a loop, and then numbers that satisfy the Jacobian sign are selected. A random number is generated; then this random number is used to adjust the positive vectorization step size. Encryption is performed to obtain ciphertext. Finally, using the homomorphic addition property, a modular multiplication operation is performed between the initial ciphertext and the ciphertext with the step size: , At this point, the decrypted value has increased. And the Jacobian symbol of the ciphertext is flipped to .

[0085] When the target watermark bits At this time, no additional homomorphic modular multiplication operation is required; the target ciphertext at that position can be directly retained. As the final watermarked ciphertext Since the Jacobian symbol of the initial ciphertext has been uniformly constrained to +1, and when Since no new random number perturbation or numerical offset is introduced, the Jacobian sign of the final ciphertext remains +1.

[0086] Through the above operations, this step completes the modification of data and the synchronous writing of symbolic features within the ciphertext field, and the decrypted numerical effect is completely equivalent to that of path A.

[0087] Step 8: Serialization and encapsulation of ciphertext data. Convert the watermarked ciphertext coefficients into hexadecimal strings and encapsulate them with the public key parameters to generate a "watermarked encrypted data packet" for distribution.

[0088] This step aims to solve the problem that large integer encrypted data cannot be directly stored and transmitted across platforms. Specifically, it converts the encrypted coefficients, which exist as data objects in large integer format, into a common text format (such as hexadecimal strings), and then combines this with public key parameters for structured encapsulation to form a standardized encrypted data packet. The specific implementation process is as follows: (1) Text encoding of ciphertext coefficients: The ciphertext coefficients after homomorphic encryption are represented in large integer format. The system traverses all encrypted blocks and converts each ciphertext coefficient into a hexadecimal string. This step solves the compatibility problem that the underlying large integer values ​​cannot be directly written to text files.

[0089] (2) Public key and parameter encapsulation: Construct a structured data container (such as a JSON object), and encapsulate the non-confidential parameters required for decryption and computation in the container header: ① Grid dimension parameters: Record the grid width, height, and block size of the vector data within the quantized coordinate domain. These parameters define the logical structure of the frequency domain transformation, used for subsequent spatial reconstruction of the data.

[0090] ② Public key parameter: Records the modulus of the Paillier algorithm. with generator .

[0091] ③ Security isolation: The data packet does not contain the private key parameter used for decryption; only the public key is distributed to support subsequent operations.

[0092] (3) Generation of encrypted data packets: Constructing a watermarked encrypted data packet: The serialized "watermarked homomorphic ciphertext" is filled into a container to generate a distribution data packet. This file is then distributed to downstream users via network channels.

[0093] (II) Watermark Verification and Decryption Process: like Figure 4 As shown, the specific process for blind extraction and decryption of plaintext watermarks is as follows.

[0094] Step 1: Read and parse the encrypted data packet, perform deserialization to reconstruct the hexadecimal ciphertext stream into a data object in large integer format, and restore its mathematical operation capability for homomorphic decryption.

[0095] As a necessary prerequisite for decryption, the watermarked ciphertext data packet is parsed and converted into a large integer data object capable of performing homomorphic operations. The specific implementation process is as follows: (1) Deserialization and parameter initialization: Read encrypted data packets in a standard format (such as JSON files) and extract the public key parameter by parsing the header metadata. And grid dimension parameters. Based on these parameters, the system allocates the corresponding structure space in memory and completes the initialization, building the necessary mathematical context environment for subsequent homomorphic decryption.

[0096] (2) Numerical type conversion of encrypted payload: Parse the encrypted payload array in the data packet, iterating through each hexadecimal string. Perform format conversion and object instantiation operations, reverse-parse the "text" hexadecimal string and reconstruct it into a "numeric" Big Integer Object.

[0097] Physical meaning: This process achieves "memory reconstruction" of data. The hexadecimal string before conversion is merely a sequence of characters and lacks mathematical operation characteristics; the reconstructed object regains the mathematical properties of performing homomorphic operations such as modular exponentiation and modular inversion, thus providing an operable computational entity for subsequent Paillier decryption.

[0098] Step 2: Use Paillier's private key to perform homomorphic decryption on the ciphertext coefficients, remove random perturbation terms, and restore the watermarked frequency domain integer coefficients.

[0099] The Paillier probabilistic homomorphic decryption algorithm is used to recover a specific plaintext value from the ciphertext. The specific implementation includes: (1) Remove randomness: using private key components ( ), for ciphertext Perform modular exponentiation. According to Carmichael's Theorem, in modular... Properties on the ring of residues, for any and Coprime random numbers Hengyou Therefore, this operation eliminates the probabilistic random factor introduced during encryption, generating intermediate parameters that contain only plaintext information. : , The above derivation shows that, after After the exponentiation operation, the random component in the ciphertext Successfully removed, only plaintext retained. With public key generator exponential relationship .

[0100] (2) Extract plaintext: The obtained plaintext Substitute the terms into the auxiliary function And combined with private key parameters Reconstruct plaintext from index position The preliminary decryption value is calculated as follows: , (3) Negative inverse mapping: Given that the frequency domain coefficients may be negative, and the homomorphic decryption result It will inevitably manifest as a model Positive integers (ranges) over a field Check according to the two's complement principle. The numerical range of: like If the result is a positive integer, output it directly. ; like If the value is determined to be a negative integer (i.e., the value is the two's complement form of a negative number in the modulo field), then execute... Restore the true negative frequency domain coefficients.

[0101] Step 3: Perform Quantization Index Modulation (QIM) on the decrypted intermediate frequency coefficients, reconstruct the local quantization reference anchor point, calculate the Euclidean distance between the coefficients and the "embedded state" (i.e., the reference superimposed quantization step size) and the "original state" (i.e., the reference value is maintained), and extract the binary watermark bits through the minimum distance decision.

[0102] To address the potential slight fluctuations in the coefficients after decryption, this step makes a decision by reconstructing the local quantization benchmark and calculating the distance of the coefficients relative to the "embedded state" and the "original state." The specific implementation is as follows: Let... For a certain intermediate frequency coefficient after decryption, This is the preset quantization step size.

[0103] (1) Reconstructing the quantization benchmark anchor point: Since the coefficients have been pre-quantized before embedding... For integer multiples of a certain value, the decryption coefficient must first be considered. Restore its quantization grid center (i.e., reference anchor point) The calculation formula is as follows: , in This represents the rounding function. This step aims to eliminate the periodic effects of Quantization Index Modulation (QIM) and lock the decision range within the local grid.

[0104] (2) Calculate the two-way hypothesis distance: calculate the current coefficients respectively. Euclidean distance to the theoretical centers of "Logical State 1" and "Logical State 0": State 1 distance: Theoretical center is ,distance ; State 0 distance: Theoretical center is ,distance .

[0105] (3) Minimum distance comparison decision: direct comparison and The numerical value is used to make a decision based on the minimum distance rule: like This indicates that the coefficient is closer to the embedding offset state, and the extracted watermark bit is determined to be 1. like This indicates that the coefficient is closer to the original baseline state, and the extracted watermark bit is determined to be 0.

[0106] Step 4: Based on the cyclic redundancy coding strategy, perform bit-by-bit majority voting statistics on all extracted bit streams, calculate the confidence level, and reconstruct the unique watermark information.

[0107] To resist geometric clipping and local noise attacks, cyclic redundancy coding and statistical decision mechanisms are employed. The specific implementation is as follows: (1) Logical mapping: based on the preset watermark bit length Establish a bit index from the block. To watermark bit index Circular mapping relationship The extracted long bitstreams are aggregated into the corresponding... In the ticket box. (2) Statistical decision: Calculate the percentage of bits "1" in each ticket box. If the percentage is higher than the preset high threshold (e.g., 0.7), the bit is determined to be 1; if it is lower than the low threshold (e.g., 0.3), it is determined to be 0. (3) Confidence calculation: The proportion of all valid votes to the total sample size is used as the final watermark extraction confidence, which is used to quantitatively evaluate the credibility level of the extraction results.

[0108] like Figure 5 As shown, the specific process for blind extraction of encrypted watermarks based on Jacobi symbols is as follows.

[0109] Step 1: Read the "watermarked encrypted data packet" and parse its metadata to obtain the public key modulus. The block index information directly locks the mid-frequency encrypted coefficients of the target to be detected.

[0110] To achieve compliance testing without the need for a private key or relying on the original plaintext, the standardized encrypted data packet is first read, and the metadata encapsulated in the header is parsed to extract the public key modulus. This parameter serves as the sole mathematical benchmark for subsequent Jacobian symbolic operations, and requesting or loading any form of private key parameter is strictly prohibited throughout the entire process. Combined with the block ID in the data packet, the target mid-frequency ciphertext coefficients embedded with the watermark are directly located in the ciphertext stream. .

[0111] Step 2: Perform a deserialization operation on the hexadecimal ciphertext data stream, reconstructing it in memory into a mathematical object that supports large number operations to restore its ability to participate in homomorphic operations.

[0112] Step 3: Without decryption, utilize the public key modulus. Jacobi symbol feature calculation is performed on the reconstructed large integer ciphertext object, and the implicit polarity feature injected during the encryption stage by actively filtering by random numbers is extracted through a recursive reduction algorithm.

[0113] Using public key modulus For large integer ciphertext The calculation of the Jacobi symbol is performed, and the process is based on rigorous mathematical proof, which includes two aspects: principle derivation and recursive implementation. (1) Mathematical principle of watermark extractability: Public key generators selected based on the specificity of the key generation phase. According to the binomial theorem, we know Therefore, regarding The Jacobian symbol is always For standard Paillier ciphertext structures Based on the multiplication property of the Jacobian symbol, the symbolic characteristics of the ciphertext can be derived as follows: , Substitution And considering odd number ( The above formula simplifies to: , The above derivation proves the ciphertext The Jacobian notation is completely equivalent to encrypted random numbers. The Jacobian symbol, and the plaintext message. Irrelevant. Therefore, the computation of ciphertext... The value is essentially the polarity feature embedded in the random number during encryption.

[0114] (2) Computational implementation based on recursive reduction: Without decomposing the modulus Under the premise of this, the generalized Euclidean algorithm is adopted to process the large amount of ciphertext through the following three rules. Recursive rules are : Modulus reduction rule: using , ciphertext Reduced to modulus Within the range.

[0115] Factor extraction rules: using If the numerator is even, then a factor of 2 is extracted. The value depends only on .

[0116] Quadratic reciprocity rule: using Swap the numerator and denominator, and determine whether to flip the sign based on the remainders modulo 4. Repeat the above "modulo-extraction-reversal" operation until the final result is obtained by reduction. .

[0117] Step 4: Based on the "symbol-bit" mapping relationship, calculate the symbol characteristic value ( or It is directly mapped to binary watermark bits to complete blind extraction of a single block.

[0118] The abstract symbolic features calculated in step 3 are mapped to concrete binary watermark information. Based on the "bidirectional modulation and random number filtering rules" established in the embedding stage, the following reverse logic decision is executed: If the calculation result This indicates that the ciphertext was forcibly filtered to meet certain criteria during generation. The negative polarity random number is used to determine the watermark bit extracted at that position as 1 according to the encoding protocol.

[0119] If the calculation result This indicates that the ciphertext carries the following: Based on the positive polarity random number characteristic and the encoding protocol, the watermark bit extracted at this position is determined to be 0.

[0120] This decision logic enables the direct reconstruction of the copyright bitstream from the implicit polarity features carried by the ciphertext random number without decrypting any coordinate data.

[0121] Step 5: Based on the cyclic redundancy coding strategy, aggregate the decision results of all blocks, perform bit-by-bit majority voting, calculate the confidence level, and output the final watermark information.

[0122] Figure 6 This shows a comparison between the original data and the decrypted watermarked data. Figure 6 In the diagram, (a) represents the original data, and (b) represents the decrypted data with the watermark. It can be seen that the decrypted data is visually almost indistinguishable from the original data, proving that the method of this invention can guarantee the geometrical integrity of vector data.

[0123] like Figure 7 As shown, ① represents the frequency domain characteristics of the original plaintext, ② represents the frequency domain characteristics of the unwatermarked ciphertext, and ③ represents the frequency domain characteristics of the watermarked ciphertext; for example... Figure 8 As shown, ① represents the energy distribution amplitude of the original plaintext, ② represents the energy distribution amplitude of the unwatermarked ciphertext, and ③ represents the energy distribution amplitude of the watermarked ciphertext. It can be seen that the energy distribution of the encrypted data exhibits uniform noise characteristics, effectively hiding the structure; while the energy distribution of the watermarked ciphertext is basically consistent with that of the unwatermarked ciphertext, proving that the watermark embedding has good concealment.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A vector data exchange cryptographic watermarking method using IntDCT and homomorphic encryption, characterized in that, Includes the following steps: Step S1: Convert the floating-point coordinates of the original vector data to integer coordinates without loss. Step S2: Perform dimension separation and sequence padding on the integerized coordinate sequence to make its length an integer multiple of the transformation basis N; Step S3: Cut the completed coordinate sequence into several data segments of length N, reassemble them into a two-dimensional integer matrix, and perform an integer discrete cosine transform to obtain the frequency domain coefficient matrix. Step S4: Classify the frequency domain coefficients, select the intermediate frequency coefficients as the watermark embedding target, and perform integer multiple prequantization; Step S5: Generate Paillier key pairs that meet the requirements of homomorphic operations and establish a random number filtering mechanism based on Jacobian symbols; Step S6: Convert the copyright information into a binary bit stream and construct a logical mapping relationship between the watermark bits and the positions of the frequency domain coefficients; Step S7: Perform a commutative watermark embedding operation based on active selection of random numbers, which is compatible with two mathematically equivalent paths in the plaintext and ciphertext fields, and simultaneously embeds explicit numerical watermarks and implicit polarity watermarks. Step S8: Convert the watermarked ciphertext coefficients into text format and combine them with the public key parameters for structured encapsulation to generate a watermarked encrypted data packet for distribution.

2. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Read the feature set of the original vector data and extract the floating-point coordinate sequence of each geographic feature; Step S12: Determine the precision scaling factor S based on the precision requirements of the target application scenario for vector data; Step S13: Perform a rounding operation on each coordinate value in the floating-point coordinate sequence to losslessly map the floating-point coordinates in the real number field to the integer field coordinates.

3. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: Decouple the integer field coordinate sequence after integerization by dimension, and decompose the multi-dimensional coordinate pairs into independent single-dimensional coordinate sequences. Step S22: According to the preset transformation basis N, each single-dimensional coordinate sequence is cut into equal length segments to obtain several initial data segments; Step S23: Detect the length L of each initial data segment. If L is not divisible by the transformation radix N, calculate the length to be padded. indivual; Step S24: Using the last digit copying strategy, read the last valid coordinate value of the initial data segment and repeatedly fill it into the empty space to be filled, so that the length of the data segment after filling is an integer multiple of N.

4. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Cut the single-dimensional coordinate sequence after dimensional separation and sequence completion into several independent data segments of length N; Step S32, reassemble each data segment of length N into A two-dimensional integer matrix; Step S33: Using the lifting scheme principle, the planar rotation matrix of the discrete cosine transform is decomposed into three sequential triangular shearing matrices. Step S34: Perform three iterative shearing calculations on each element pair in the two-dimensional integer matrix to obtain the integer frequency domain coefficient matrix. Perform the inverse transformation by performing the subtraction operation in the reverse order to completely restore the original values.

5. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S4 includes the following steps: Step S41: Perform a Zig-Zag scan on the two-dimensional frequency domain coefficient matrix obtained by integer discrete cosine transform, and rearrange it into a one-dimensional energy sequence; Step S42: Divide the one-dimensional energy sequence into a DC coefficient region, a high-frequency AC coefficient region, and a medium-frequency AC coefficient region based on frequency characteristics; Step S43: Select the coefficients of the intermediate frequency AC coefficient region as the target carrier for watermark embedding; Step S44, according to the preset quantization step size The target intermediate frequency coefficients are prequantized to integer multiples, forcibly aligned to a value of 2. On grid nodes that are integer multiples of the interval.

6. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S5 includes the following steps: Step S51: Select two independent large prime numbers p and q with equal bit lengths according to the preset security level; Step S52, calculate the modulus and Specifically, g=n+1 is selected as the public key generator; Step S53, calculate private key parameters and , where auxiliary functions , It is a function of least common multiple; Step S54: Establish a random number filtering mechanism based on Jacobi symbols and define a one-to-one mapping relationship between watermark bits and random number Jacobi symbols.

7. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S6 includes the following steps: Step S61: Obtain the copyright information to be embedded and convert it into binary data; Step S62: Fill the binary data into a fixed-length binary bit stream. , where L is the length of the watermark bitstream; Step S63: Based on the total number of blocks of vector data and the available intermediate frequency coefficient capacity of each block, establish a cyclic redundancy mapping relationship between the watermark bits and the positions of the frequency domain coefficients. Step S64: Generate a logical allocation list containing "data block ID - coefficient index - target bit value" as a precise guide for subsequent watermark embedding operations.

8. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S7 includes the following steps: Step S71: Obtain the pre-quantized intermediate frequency coefficients, Paillier key pairs, and watermark logic allocation list; Step S72: Select the watermark embedding path according to the data processing stage, including plaintext field embedding path and ciphertext field embedding path; Step S73: Under the selected path, explicit numerical watermarking and implicit polarity watermarking are executed simultaneously: explicit numerical watermarking is achieved by modifying the quantization amplitude of the intermediate frequency coefficient, and implicit polarity watermarking is achieved by selecting random numbers with specific Jacobian symbols to participate in encryption. Step S74 verifies the commutative mathematical properties of encryption and watermarking operations: regardless of whether the plaintext is embedded first and then encrypted, or the ciphertext is encrypted first and then homomorphically embedded, the watermarked ciphertexts generated by the two paths mathematically satisfy the commutative equivalence relation, that is, the mid-frequency coefficient values ​​after decryption by the Paillier private key are strictly consistent, and the Jacobian symbolic features of the ciphertext itself completely correspond to the embedded watermark bits, thus proving that the encryption operation and the watermark embedding operation have complete strong commutativity in the integer frequency domain and the homomorphic ciphertext domain.

9. The vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to claim 1, characterized in that, Step S8 includes the following steps: Step S81: Traverse all watermarked ciphertext coefficients of encrypted blocks and convert the ciphertext coefficients in large integer format to a common text format. Step S82: Construct a structured data container and encapsulate the non-confidential parameters required for decryption and computation in the container header. The non-confidential parameters include grid dimension parameters, key parameters, and watermark parameters. Step S83: Fill the payload portion of the data container with the serialized watermarked ciphertext; Step S84 generates a standardized watermarked encrypted data packet containing header parameters and ciphertext payload for cross-platform transmission and distribution.

10. A vector data exchange cryptographic watermarking method based on IntDCT and homomorphic encryption according to any one of claims 1-9, characterized in that, It also includes the following steps: Step S9, Plaintext domain watermark blind extraction: After reading the watermarked encrypted data packet and deserializing it, homomorphic decryption is performed using the Paillier private key to restore the watermarked frequency domain coefficients. The single-bit watermark is extracted by the minimum distance decision of the reconstructed quantization reference anchor point. Finally, the plaintext domain watermark information of the complete copyright is reconstructed through cyclic redundancy majority voting statistics. Step S10, Blind extraction of ciphertext watermark: Under zero-knowledge conditions of not decrypting, not holding the private key, and not touching the original plaintext, the implicit polarity feature is extracted by calculating the Jacobian symbol of the target ciphertext using the public key modulus. After symbol-bit mapping and cyclic redundancy majority voting statistics, the complete copyright ciphertext watermark information is directly reconstructed from the ciphertext domain.