Watermark embedding-based data transmission method and device, equipment and storage medium
By generating and embedding digital watermarks on the data holder and writing hash values using blockchain technology, the problems of information asymmetry and responsibilities in traditional digital watermark technology are solved, and the security and traceability of the data transmission process are realized, improving the user experience.
Patent Information
- Application Number
- CN202510519425.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-07-25
AI Technical Summary
In traditional digital watermarking technology, the data demander is absent during the embedding process, resulting in information asymmetry, there is a risk of false accusation and denied, and it is difficult to determine the responsible party for piracy, damage the rights and interests of the data holder, and disrupt the order of the data trading market.
The data holder generates and embeds digital watermarks, and uses preset smart contracts to write the target hash value to the blockchain to ensure the security and traceability of the data transmission process. Combined with preset digital watermark generation and embedding algorithms, a unique digital watermark is generated and embedded in the data set, and data verification and traceability are used to use hash value and blockchain technology.
It improves the security and reliability of the data transmission process, clarifies the data responsible subject, and ensures the standardization and user experience of data transactions.
Smart Images

Figure CN120372586A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security, and in particular to a data transmission method, device, equipment and storage medium based on watermark embedding. Background Art
[0002] In the process of data trading and use, the safe circulation of data, anti-piracy and responsibility identification have always been important problems in the field of data security. Traditional digital watermarking technology has exposed serious problems when applied, which has greatly hindered the security and reliability of data transactions. On the one hand, the data demander is completely absent in the process of digital watermark embedding, and the watermark embedding is unilaterally dominated by the data holder, resulting in serious information asymmetry between the two parties. On the other hand, this technical architecture has the risk of false accusation and denial. The data holder can falsely accuse the buyer, and the buyer can also deny the piracy. In addition, due to the lack of an effective traceability system, it is difficult to determine the responsible party for pirated data, which seriously damages the rights and interests of the data holder and disrupts the order of the data trading market.
[0003] Therefore, how to improve the security of data transmission is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a data transmission method, device, equipment and storage medium based on watermark embedding, which can improve the security of data transmission. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a data transmission method based on watermark embedding, which is applied to a terminal device as a data holder, comprising:
[0006] Obtaining a data acquisition certificate sent by a data demander; the data acquisition certificate is a certificate that indicates the data demander's right to obtain the use of the target data set through a preset platform;
[0007] Determine the target data set based on the data acquisition credential, and generate a digital watermark for the data demander using a preset digital watermark generation algorithm, and embed the digital watermark into the target data set using a preset digital watermark embedding algorithm to obtain an embedded data set;
[0008] Determine a corresponding target hash value based on the embedded data set, and write the target hash value to the target blockchain using a preset smart contract, so that the data demander can obtain the target hash value from the target blockchain;
[0009] The embedded data set is sent to the data demander so that the data demander receives the embedded data set.
[0010] Optionally, generating a digital watermark for the data requester by using a preset digital watermark generation algorithm includes:
[0011] Connecting a preset watermark key and the identity identification information of the data requester based on a preset concatenation operation to obtain a target bit string;
[0012] Generating a digital watermark for the data requester by using a preset watermark length, the target bit string, and a preset digital watermark generation algorithm.
[0013] Optionally, embedding the digital watermark into the target data set by using a preset digital watermark embedding algorithm to obtain an embedded data set includes:
[0014] Traversing each data record in the target data set, and processing the preset field data in each data record based on the preset watermark key and a hash algorithm to determine the target embedding position in the target data set;
[0015] Embedding the digital watermark into the target embedding position in the target data set by using a preset digital watermark embedding algorithm to obtain an embedded data set.
[0016] Optionally, determining a corresponding target hash value based on the embedded data set includes:
[0017] Performing data padding on the embedded data set based on a preset hash algorithm, and performing block processing on the obtained padded data to complete a data preprocessing operation;
[0018] Performing a preset number of compression operations on the embedded data set that has completed the data preprocessing operation by using a preset hash value of the preset hash algorithm, and concatenating the obtained hash values after compression to obtain a target hash value.
[0019] Optionally, writing the target hash value to a target blockchain by using a preset smart contract includes:
[0020] Determining a corresponding writing format based on a preset smart contract, and constructing a writing request by using the writing format, the identity identification information of the data holder and the data requester, and the target hash value;
[0021] Signing the writing request by using a local private key, and sending the signed request to the target blockchain to write the target hash value to the target blockchain.
[0022] In a second aspect, the present application provides a data transfer method based on watermark embedding, which is applied to a terminal device as a data requester, and includes:
[0023] Obtain the right to use the target dataset, and then generate a corresponding data acquisition certificate;
[0024] Send the generated data acquisition certificate to the data holder, so that the data holder can obtain the data acquisition certificate sent by the data requester, determine the target dataset based on the data acquisition certificate, generate a digital watermark for the data requester using a preset digital watermark generation algorithm, embed the digital watermark into the target dataset using a preset digital watermark embedding algorithm, and send the obtained embedded dataset to the data requester; wherein, the data acquisition certificate is a certificate representing that the data requester obtains the right to use the target dataset through a preset platform;
[0025] Determine the target hash value from the target blockchain; the target hash value is the hash value determined by the data holder based on the embedded dataset, and the data holder writes the target hash value into the target blockchain using a preset smart contract;
[0026] Obtain the embedded dataset sent by the data holder, determine the test hash value based on the embedded dataset, verify the embedded dataset using the test hash value and the target hash value, and when the verification passes, digitally sign the target hash value based on a preset data reception contract.
[0027] In a third aspect, the present application provides a data transfer device based on watermark embedding, which is applied to a terminal device acting as a data holder, and includes:
[0028] A certificate acquisition module, configured to acquire a data acquisition certificate sent by a data requester; the data acquisition certificate is a certificate representing that the data requester obtains the right to use a target dataset through a preset platform;
[0029] A watermark embedding module, configured to determine the target dataset based on the data acquisition certificate, generate a digital watermark for the data requester using a preset digital watermark generation algorithm, and embed the digital watermark into the target dataset using a preset digital watermark embedding algorithm to obtain an embedded dataset;
[0030] A hash value writing module, configured to determine a corresponding target hash value based on the embedded dataset, and write the target hash value into a target blockchain using a preset smart contract, so that the data requester can obtain the target hash value from the target blockchain;
[0031] A dataset sending module, configured to send the embedded dataset to the data requester, so that the data requester can receive the embedded dataset.
[0032] In a fourth aspect, the present application provides an electronic device, including:
[0033] A memory for storing a computer program;
[0034] A processor for executing the computer program to implement the aforementioned data transfer method based on watermark embedding.
[0035] In a fifth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned data transfer method based on watermark embedding is implemented.
[0036] In the present application, the data holder obtains a data acquisition voucher sent by the data requester; the data acquisition voucher is a voucher representing the right of the data requester to obtain the right to use the target data set through a preset platform; the target data set is determined based on the data acquisition voucher, and a digital watermark is generated for the data requester by using a preset digital watermark generation algorithm, so as to embed the digital watermark into the target data set by using a preset digital watermark embedding algorithm to obtain an embedded data set; a corresponding target hash value is determined based on the embedded data set, and the target hash value is written into a target blockchain by using a preset smart contract, so that the data requester can obtain the target hash value from the target blockchain; the embedded data set is sent to the data requester, so that the data requester can receive the embedded data set. As can be seen from the above, the data holder in the present application first receives the data acquisition voucher sent by the data requester. After obtaining the data acquisition voucher, the target data set is located and determined according to the voucher. Subsequently, a preset digital watermark generation algorithm is enabled to customize a digital watermark for the data requester. After customization, the generated digital watermark is embedded into the target data set by using a preset digital watermark embedding algorithm. After this series of operations, the embedded data set is finally obtained. After obtaining the embedded data set, the target hash value corresponding to the embedded data set is determined. After determining the target hash value, the target hash value is written into the target blockchain with the help of a preset smart contract. The purpose of this is to facilitate the data requester to obtain the target hash value from the target blockchain later. Finally, the embedded data set is sent to the data requester, so that the data requester can receive the embedded data set to meet its data usage requirements. In this way, the present application can improve the security in the data transfer process, thereby enhancing the user experience to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on the provided drawings.
[0038] Figure 1 Flowchart of a data transfer method based on watermark embedding applied to a terminal device as a data holder disclosed in the present application;
[0039] Figure 2 Flowchart of a data transfer method based on watermark embedding applied to a terminal device as a data requester disclosed in the present application;
[0040] Figure 3 Structural schematic diagram of a data transfer device based on watermark embedding applied to a terminal device as a data holder disclosed in the present application;
[0041] Figure 4 Structural schematic diagram of a data transfer device based on watermark embedding applied to a terminal device as a data holder disclosed in the present application;
[0042] Figure 5 Structural diagram of an electronic device disclosed in the present application. Specific embodiments
[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0044] Traditional digital watermarking technology exposes serious problems in application, greatly hindering the security and reliability of data transactions. On the one hand, the data requester is completely absent during the digital watermark embedding process, and the watermark embedding is unilaterally dominated by the data holder, resulting in a serious information asymmetry between the two parties. On the other hand, this technical architecture has the risks of being framed and disavowed. The data holder can frame the purchaser, and the purchaser can also disavow piracy. Coupled with the lack of an effective traceability system, it is difficult to determine the responsible entity of pirated data, seriously damaging the rights and interests of the data holder and disrupting the order of the data trading market. Therefore, the present application provides a data transfer method, device, equipment, and storage medium based on watermark embedding, which can improve the security during the data transfer process.
[0045] See Figure 1As shown in the figure, an embodiment of the present invention discloses a data transfer method based on watermark embedding, which is applied to a terminal device as a data holder, including:
[0046] Step S11: Obtain a data acquisition certificate sent by the data requester; the data acquisition certificate is a certificate representing the data requester's right to use the target data set through a preset platform.
[0047] In this embodiment, first, a data acquisition certificate sent by the data requester is obtained. The data information contained in the data acquisition certificate aims to ensure the security and accuracy of data transfer. In one implementation, the data acquisition certificate includes the unique identifier of the target data set and the identity information of the data requester. Based on this information, the data holder can locate and confirm the target data set to be transferred and the identity of the recipient. In another implementation, the data acquisition certificate may also carry a digital signature generated by the preset platform, which is used to verify the authenticity and integrity of the data acquisition certificate and prevent the data acquisition certificate from being tampered with during transmission.
[0048] After obtaining the data acquisition certificate, subsequent data transfer operations can be prepared based on the certificate information. With the data acquisition certificate, the data holder can not only confirm the legitimate usage rights of the data requester but also lay a foundation for the security and standardization of the entire data transfer process.
[0049] Step S12: Determine the target data set based on the data acquisition certificate, and generate a digital watermark for the data requester using a preset digital watermark generation algorithm, so as to embed the digital watermark into the target data set using a preset digital watermark embedding algorithm to obtain an embedded data set.
[0050] In this embodiment, the data acquisition certificate is parsed to a certain extent. The terminal device as the data holder will match and locate in the data set resources stored locally based on this information, so as to determine the target data set that meets the requirements.
[0051] In addition, in order to ensure the accuracy and integrity of the determined target data set, various verification mechanisms can be adopted. On the one hand, the information in the data acquisition certificate will be compared with the metadata of the data set stored locally to check whether the identifier, data type, data range, etc. are consistent. On the other hand, the integrity of the target data set can also be checked by calculating the hash value of the data set, etc., to verify whether the data set has been damaged or lost during storage.
[0052] Next, based on a preset concatenation operation, the preset watermark key and the identity information of the data requester are connected to obtain a target bit string. The preset watermark key is a key preset by the data holder, which has a certain level of security and uniqueness and plays a crucial role in the generation and verification of digital watermarks. The identity information of the data requester is information that can uniquely identify the requester, such as a specific code, identification symbol, etc. By concatenating the two, a target bit string containing the key and identity information is formed.
[0053] After obtaining the target bit string, a digital watermark is generated for the data requester using the preset watermark length, the target bit string, and a preset digital watermark generation algorithm. Among them, the preset watermark length determines the number of bits of the digital watermark and is reasonably set according to actual security requirements and application scenarios. For example, the preset watermark length can be 64 bits, 128 bits, 160 bits, or 256 bits. The preset digital watermark generation algorithm includes, but is not limited to, hash algorithms (such as SHA256 or SM3), etc. This algorithm processes the target bit string and, in combination with the preset watermark length, generates a digital watermark with specific characteristics and uniqueness.
[0054] Furthermore, all data records in the target dataset are comprehensively traversed. A data record is the basic unit in the target dataset, and each data record contains data in multiple fields. By traversing each data record, it is possible to gain a certain understanding of the structure and content of the entire target dataset, preparing for determining the target embedding location later.
[0055] Next, the preset field data in each data record is processed based on the preset watermark key and a hash algorithm. The preset field data is the pre-specified, representative, and stable fields in the dataset, and the data in these fields can reflect the key characteristics of the data record. Then, the preset watermark key is combined with the preset field data and calculated through a hash algorithm to obtain a hash value.
[0056] Based on the calculated hash value, in combination with preset rules and algorithms, the target embedding location in the target dataset is determined. The target embedding location refers to the specific location where the digital watermark will be embedded in the target dataset. When determining the target embedding location, multiple factors need to be considered, such as the importance of the data, the stability of the data, the impact of embedding the watermark on the original functions and quality of the data, etc. By reasonably selecting the target embedding location, it can be ensured that the embedding of the digital watermark will not affect the normal use of the target dataset and that the digital watermark can be accurately extracted and verified when needed.
[0057] After determining the target embedding position, the generated digital watermark is embedded into the target embedding position in the target dataset using a preset digital watermark embedding algorithm. The preset digital watermark embedding algorithm can embed the digital watermark in a concealed manner into the target dataset without damaging the original structure and content of the target dataset. The algorithm will perform corresponding processing and adjustment on the digital watermark according to the characteristics and requirements of the target embedding position to ensure that the digital watermark can be accurately embedded into the specified position.
[0058] After the embedding operation of the digital watermark, the target dataset becomes the embedded dataset. The embedded dataset is basically the same as the original target dataset in appearance and function, but it already contains hidden digital watermark information. These digital watermark information can be used in subsequent scenarios such as data copyright protection, data source tracing, and data piracy detection.
[0059] In addition, it should be noted that when the data holder conducts market inspections and discovers a suspicious dataset, it will immediately conduct certain inspections with the help of a pre-established digital watermark detection program. This detection program, through systematic steps, confirms whether there is a digital watermark in the suspicious dataset and restores the digital watermark in the suspicious dataset through a certain algorithm process, so as to preliminarily judge the relevance between the suspicious dataset and the data with its own copyright.
[0060] Next, the data holder immediately calls the preset data receiving contract to obtain the list of users who purchased the dataset. By analyzing the identity identification information of the data requester contained in the digital watermark and combining the details of data sending and receiving recorded in the preset data receiving contract, using the pre-set tracing algorithm, the data acquirer of the leaked dataset is locked.
[0061] After identifying the data leaker, the data holder will organize and package the suspicious dataset, the IDs of the involved users, and the on-chain contract data, and submit them to the regulatory agency to report the piracy behavior of the purchaser. After receiving the report, the regulatory agency will immediately initiate the preset verification process. First, the suspicious dataset is stored in the local database, and the suspect_dataset_hash (i.e., the hash value of the suspicious dataset) is calculated. Subsequently, by calling the preset data receiving contract, key on-chain data such as the dataset_hash (i.e., the on-chain dataset hash value), the datamark_hash (i.e., the digital watermark hash value), and the dataset_hash_sign (i.e., the digital signature) corresponding to the on-chain dataset are obtained. By comparing the suspect_dataset_hash with the on-chain dataset_hash value, the consistency between the suspicious dataset and the on-chain dataset is determined. Given the immutability and non-forgeability of blockchain data, as well as the non-repudiation feature of digital signatures, this mechanism effectively maintains the good order of the data market with the dual guarantee of technology and system, and builds a solid defense line for data copyright protection.
[0062] Step S13: Determine the corresponding target hash value based on the embedded dataset, and use a preset smart contract to write the target hash value to the target blockchain so that the data requester can obtain the target hash value from the target blockchain.
[0063] In this embodiment, during the process of generating the target hash value, data preprocessing is first performed on the embedded dataset according to a preset hash algorithm. During the operation of data preprocessing, first is data padding, which is to make the length of the embedded dataset meet the requirements of the preset hash algorithm. For example, some hash algorithms require the input data length to be an integer multiple of a specific number of bytes. If the length of the embedded dataset does not meet this condition, specific characters or bytes need to be padded at the end of the data until the required length is reached. When the data padding is completed, the padded data is then block-processed. This is to split the longer padded data into several data blocks of a fixed size, which is convenient for subsequent hash calculation. The size of each data block is specified by the preset hash algorithm, which helps to improve the efficiency and accuracy of hash calculation.
[0064] Furthermore, the embedded dataset after completing the data preprocessing operation is compressed a preset number of times using the preset hash value of the preset hash algorithm. The preset hash value is the initial value predefined by this hash algorithm, and a specific mathematical operation will be performed with the data block during each compression operation. And through multiple compression operations, the data block can be gradually compressed into a smaller hash value.
[0065] It should be noted that each compression operation generates an intermediate hash value. After completing the preset number of compression operations, these intermediate hash values are concatenated. The concatenation method also follows the rules of the preset hash algorithm, and finally the target hash value is obtained. This target hash value is the unique identifier of the embedded dataset, with uniqueness and stability, and can reflect the content of the embedded dataset.
[0066] After determining the target hash value, the corresponding writing format is determined based on a preset smart contract. Among them, the preset smart contract is a piece of code pre-deployed on the target blockchain, which stipulates the rules and formats for data writing to the blockchain. Then, a writing request is constructed using the writing format, the identity information of the data holder and the data requester, and the target hash value. Combining these information according to the writing format forms the writing request.
[0067] Furthermore, in this embodiment, the writing request is signed using the local private key to obtain the signed request. The local private key is a unique and confidential key owned by the terminal device acting as the data holder. Through private key signing, the authenticity and non-repudiation of the writing request can be guaranteed. The signing process is to encrypt the writing request using the private key to generate a signature value. Then, the signed request is sent to the target blockchain. The target blockchain is a distributed ledger system composed of multiple nodes. The terminal device of the data holder will broadcast the signed request to the network of the target blockchain, and each node will verify the request. The verification content includes the validity of the signature, whether the writing format meets the requirements, whether the identity information is correct, etc.
[0068] It should be noted that once the signed request passes the verification of each node, the target blockchain will write the target hash value into the blockchain ledger so that the data requester can obtain the target hash value from the target blockchain. It should be noted that the writing operation generates a new block, which contains the target hash value, the identity information of the data holder and the data requester, and other relevant metadata. Moreover, the target hash value written to the blockchain has the characteristics of being immutable and traceable. Any modification to the target hash value will leave a trace on the blockchain, and the source and operation process of the data can be traced through the blockchain's historical records.
[0069] Step S14: Send the embedded dataset to the data requester so that the data requester can receive the embedded dataset.
[0070] In this embodiment, the embedded dataset is sent to the data requester. To ensure the secure and complete transmission of data, a series of safeguard measures can be taken. For example, before sending, the embedded dataset can be checked again to confirm that the digital watermark is embedded correctly and the dataset is not damaged. At the same time, according to the pre-negotiated transmission protocol and encryption algorithm, the embedded dataset is encrypted to prevent the data from being stolen or tampered with during transmission. When sending, the terminal device will select a secure and reliable network channel for transmission. During the data transmission process, a data transmission monitoring mechanism can also be set up to monitor the status of data transmission in real time. If a transmission interruption or error occurs, retransmission or adjustment can be carried out in a timely manner.
[0071] As can be seen from the above, the data holder in this application first receives the data acquisition voucher sent by the data requester. After obtaining the data acquisition voucher, the target dataset is located and determined based on the voucher. Subsequently, a preset digital watermark generation algorithm is enabled to customize a digital watermark for the data requester. When the customization is completed, the generated digital watermark is embedded into the target dataset by using the preset digital watermark embedding algorithm. After this series of operations, the embedded dataset is finally obtained. After obtaining the embedded dataset, the target hash value corresponding to the embedded dataset is determined. After determining the target hash value, with the help of a preset smart contract, the target hash value is written into the target blockchain. The purpose of doing this is to facilitate the data requester to obtain the target hash value from the target blockchain later. Finally, the embedded dataset is sent to the data requester, enabling the data requester to receive the embedded dataset to meet its data usage requirements. In this way, this application can improve the security during the data transfer process, thereby enhancing the user experience to a certain extent.
[0072] See Figure 2 As shown, an embodiment of this application also provides a data transfer method based on watermark embedding, which is applied to a terminal device acting as a data requester and includes:
[0073] Step S21, obtain the right to use the target dataset, and then generate a corresponding data acquisition voucher.
[0074] In this embodiment, the data requester determines the target dataset according to its own data requirements. The data requirements may involve various considerations such as business analysis and project planning. For example, an e-commerce enterprise may need to obtain user behavior data as the target dataset to optimize its marketing strategy.
[0075] To obtain the right to use the target dataset, the data requester will operate through a preset platform. The preset platform can be a data sharing platform within an industry. On this platform, the data requester needs to abide by the platform's rules and processes, which may include filling out an application form, stating the purpose of data use, and committing to data use specifications. When the platform approves the data requester's application, the data requester successfully obtains the right to use the target dataset. At this time, the data requester will generate a corresponding data acquisition voucher according to the requirements of the platform and relevant standards.
[0076] Step S22: Send the generated data acquisition voucher to the data holder, so that the data holder can obtain the data acquisition voucher sent by the data requester, determine the target dataset based on the data acquisition voucher, generate a digital watermark for the data requester using a preset digital watermark generation algorithm, embed the digital watermark into the target dataset using a preset digital watermark embedding algorithm, and send the obtained embedded dataset to the data requester; wherein, the data acquisition voucher is a voucher representing that the data requester obtains the right to use the target dataset through the preset platform.
[0077] In this embodiment, the data requester sends the generated data acquisition voucher to the data holder. This process can be carried out through a secure network channel to prevent the data acquisition voucher from being stolen or tampered with during transmission.
[0078] After sending the generated data acquisition voucher to the data holder, the processes or steps executed by the data holder can refer to the content disclosed in the foregoing embodiments and will not be elaborated here.
[0079] Step S23: Determine the target hash value from the target blockchain; the target hash value is the hash value determined by the data holder based on the embedded dataset, and the data holder writes the target hash value into the target blockchain using a preset smart contract.
[0080] In this embodiment, the data requester can determine the target hash value from the target blockchain through an interaction interface with the target blockchain. When obtaining the target hash value, the data requester will verify it to ensure the accuracy and integrity of the obtained hash value. For example, the data requester can check whether the format of the hash value is correct and whether it is consistent with the expected hash value.
[0081] Step S24: Obtain the embedded dataset sent by the data holder, determine the test hash value based on the embedded dataset, verify the embedded dataset using the test hash value and the target hash value, and when the verification passes, perform a digital signature on the target hash value based on a preset data reception contract.
[0082] In this embodiment, after obtaining the embedded dataset sent by the data holder, the data requester determines the test hash value based on this dataset. The method for determining the test hash value is the same as the method used by the data holder to generate the target hash value, that is, the same hash algorithm is used to calculate the embedded dataset.
[0083] Then, the data requester compares whether the test hash value is the same as the target hash value to obtain the verification result of the embedded dataset. If the two are the same, it indicates that the embedded dataset has not been tampered with during the transmission process, and the integrity of the data is guaranteed; if they are different, it indicates that the dataset may have been tampered with or an error occurred during the transmission process.
[0084] If the verification result shows that the test hash value is the same as the target hash value, the data requester signs the target hash value on the target blockchain based on the private key in the preset data reception contract and the digital certificate. Among them, the preset data reception contract stipulates the rights and obligations of the data requester after receiving the data, as well as the usage specifications of the data. The private key in the digital certificate is the unique identifier of the data requester. Signing with the private key can prove that the data requester has confirmed the receipt of this dataset and recognized the integrity and legality of the data. Moreover, the signed information will be recorded on the target blockchain to form a traceable record, providing a basis for subsequent data management.
[0085] As can be seen from the above, this embodiment focuses on the operation process of the data requester. The data requester determines the target dataset on the preset platform and obtains its usage right, then generates a data acquisition voucher. After sending the data acquisition voucher to the data holder, it guides the data holder to complete operations such as digital watermark embedding, generating the target hash value, and writing it into the blockchain, greatly enhancing the security and traceability of the data. Then, the data requester obtains the target hash value from the target blockchain, and determines the test hash value for comparison and verification after receiving the embedded dataset, effectively avoiding receiving tampered data and ensuring the integrity of the data transmission process. If the verification passes, the data requester signs the target hash value based on the preset data reception contract and the private key. In this way, this application builds a safe and reliable bridge between the data requester and the data holder by combining blockchain and digital watermark technology, not only ensuring the security and integrity of data transmission, but also clarifying the rights and obligations of data usage, providing a solid guarantee for the standardized management and reasonable use of data.
[0086] Correspondingly, as shown in Figure 3 This application embodiment provides a data transfer device based on watermark embedding, which is applied to a terminal device acting as a data holder, including:
[0087] A voucher acquisition module 11 for acquiring a data acquisition voucher sent by a data requester; the data acquisition voucher is a voucher representing the right of the data requester to obtain the right to use a target data set through a preset platform;
[0088] A watermark embedding module 12 for determining the target data set based on the data acquisition voucher, and using a preset digital watermark generation algorithm to generate a digital watermark for the data requester, so as to use a preset digital watermark embedding algorithm to embed the digital watermark into the target data set to obtain an embedded data set;
[0089] A hash value writing module 13 for determining a corresponding target hash value based on the embedded data set, and using a preset smart contract to write the target hash value to a target blockchain, so that the data requester can obtain the target hash value from the target blockchain;
[0090] A data set sending module 14 for sending the embedded data set to the data requester, so that the data requester can receive the embedded data set.
[0091] As can be seen from the above, the data holder in this application first receives the data acquisition voucher sent by the data requester. After obtaining the data acquisition voucher, the target data set is located and determined according to the voucher. Subsequently, a preset digital watermark generation algorithm is enabled to customize a digital watermark for the data requester. After customization, the generated digital watermark is embedded into the target data set by using a preset digital watermark embedding algorithm. After this series of operations, an embedded data set is finally obtained. After obtaining the embedded data set, the target hash value corresponding to the embedded data set is determined. After determining the target hash value, the target hash value is written into the target blockchain with the help of a preset smart contract. The purpose of this is to facilitate the data requester to obtain the target hash value from the target blockchain subsequently. Finally, the embedded data set is sent to the data requester, so that the data requester receives the embedded data set to meet its data usage requirements. In this way, this application can improve the security in the data transmission process, thereby improving the user experience to a certain extent.
[0092] In some specific embodiments, the watermark embedding module 12 specifically includes:
[0093] A data connection unit for connecting a preset watermark key and the identity identification information of the data requester based on a preset concatenation operation to obtain a target bit string;
[0094] A watermark generation unit for generating a digital watermark for the data requester by using a preset watermark length, the target bit string, and a preset digital watermark generation algorithm.
[0095] In some specific embodiments, the watermark embedding module 12 specifically includes:
[0096] A data processing unit, configured to traverse each data record of the target data set, and process the preset field data in each data record based on the preset watermark key and hash algorithm to determine the target embedding position in the target data set;
[0097] A watermark embedding unit, configured to use a preset digital watermark embedding algorithm to embed the digital watermark into the target embedding position in the target data set to obtain an embedded data set.
[0098] In some specific embodiments, the hash value writing module 13 specifically includes:
[0099] A data chunking unit, configured to perform data padding on the embedded data set based on a preset hash algorithm, and perform chunking processing on the obtained padded data to complete the data preprocessing operation;
[0100] A hash value splicing unit, configured to perform a preset number of compression operations on the embedded data set that has completed the data preprocessing operation by using the preset hash value of the preset hash algorithm, and splice the obtained hash values after compression to obtain a target hash value.
[0101] In some specific embodiments, the hash value writing module 13 specifically includes:
[0102] A request construction unit, configured to determine a corresponding writing format based on a preset smart contract, and construct a writing request by using the writing format, the identity identification information of the data holder and the data requester, and the target hash value;
[0103] A hash value writing unit, configured to sign the writing request by using a local private key, and send the signed request to a target blockchain to write the target hash value into the target blockchain.
[0104] See Figure 4 As shown, an embodiment of the present application provides a data transfer device based on watermark embedding, which is applied to a terminal device as a data requester, and includes:
[0105] A credential generation module 21, configured to obtain the usage right of the target data set, and then generate a corresponding data acquisition credential;
[0106] The voucher sending module 22 is configured to send the generated data acquisition voucher to the data holder, so that the data holder can obtain the data acquisition voucher sent by the data requester, determine the target data set based on the data acquisition voucher, generate a digital watermark for the data requester by using a preset digital watermark generation algorithm, embed the digital watermark into the target data set by using a preset digital watermark embedding algorithm, and send the obtained embedded data set to the data requester; wherein, the data acquisition voucher is a voucher representing the right of the data requester to obtain the use right of the target data set through a preset platform.
[0107] The hash value determination module 23 is configured to determine a target hash value from the target blockchain; the target hash value is the hash value determined by the data holder based on the embedded data set, and the data holder writes the target hash value into the target blockchain by using a preset smart contract.
[0108] The data verification module 24 is configured to obtain the embedded data set sent by the data holder, determine a test hash value based on the embedded data set, verify the embedded data set by using the test hash value and the target hash value, and perform a digital signature on the target hash value based on a preset data reception contract when the verification is passed.
[0109] In some specific embodiments, the data verification module 24 specifically includes:
[0110] The hash value comparison unit is configured to compare whether the test hash value and the target hash value are consistent to obtain a verification result of the embedded data set;
[0111] The hash value signature unit is configured to, if the verification result indicates that the test hash value and the target hash value are consistent, sign the target hash value on the target blockchain based on a preset data reception contract and the private key in the digital certificate.
[0112] Furthermore, an embodiment of the present application also discloses an electronic device. Figure 5 It is a structural diagram of an electronic device 30 shown according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation to the use scope of the present application. The electronic device 30 may specifically include: at least one processor 31, at least one memory 32, a power supply 33, a communication interface 34, an input / output interface 35, and a communication bus 36. Wherein, the memory 32 is used to store a computer program, and the computer program is loaded and executed by the processor 31 to implement the relevant steps in the data transfer method based on watermark embedding disclosed in any of the foregoing embodiments. In addition, the electronic device 30 in this embodiment may specifically be an electronic computer.
[0113] In this embodiment, the power supply 33 is used to provide operating voltages for the various hardware devices on the electronic device 30; the communication interface 34 can create a data transmission channel between the electronic device 30 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and no specific limitation is imposed thereon here; the input / output interface 35 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application requirements, and no specific limitation is made here.
[0114] In addition, the memory 32, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, an optical disk, etc., and the resources stored thereon can include an operating system 321, a computer program 322, etc., and the storage method can be transient storage or permanent storage.
[0115] Among them, the operating system 321 is used to manage and control the various hardware devices and the computer program 322 on the electronic device 30, and it can be Windows Server, Netware, Unix, Linux, etc. The computer program 322, in addition to including a computer program capable of implementing the data transfer method based on watermark embedding executed by the electronic device 30 disclosed in any of the foregoing embodiments, may further include a computer program capable of performing other specific tasks.
[0116] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the data transfer method based on watermark embedding disclosed above. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
[0117] In this specification, the various embodiments are described in a progressive manner, and the key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0118] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0119] The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented directly in hardware, in software modules executed by a processor, or in a combination thereof. The software modules may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0120] Finally, it should also be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0121] The technical solutions provided in this application have been introduced in detail above. Specific examples are used herein to illustrate the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A data transfer method based on watermark embedding, characterized in that, Applied to a terminal device acting as a data holder, including: Obtain a data acquisition certificate sent by a data requester; the data acquisition certificate is a certificate representing that the data requester obtains the right to use a target data set through a preset platform; Determine the target data set based on the data acquisition certificate, and use a preset digital watermark generation algorithm to generate a digital watermark for the data requester, so as to use a preset digital watermark embedding algorithm to embed the digital watermark into the target data set to obtain an embedded data set; Determine a corresponding target hash value based on the embedded data set, and use a preset smart contract to write the target hash value into a target blockchain, so that the data requester can obtain the target hash value from the target blockchain; Send the embedded data set to the data requester, so that the data requester can receive the embedded data set.
2. The data transfer method based on watermark embedding according to claim 1, characterized in that, The generating a digital watermark for the data requester by using a preset digital watermark generation algorithm includes: Connect a preset watermark key and the identity identification information of the data requester based on a preset concatenation operation to obtain a target bit string; Use a preset watermark length, the target bit string, and a preset digital watermark generation algorithm to generate a digital watermark for the data requester.
3. The data transfer method based on watermark embedding according to claim 2, wherein The embedding the digital watermark into the target data set by using a preset digital watermark embedding algorithm to obtain an embedded data set includes: Traverse each data record of the target data set, and process the preset field data in each data record based on the preset watermark key and a hash algorithm to determine the target embedding position in the target data set; Use a preset digital watermark embedding algorithm to embed the digital watermark into the target embedding position in the target data set to obtain an embedded data set.
4. The data transfer method based on watermark embedding according to any one of claims 1 to 3, characterized in that, The determining a corresponding target hash value based on the embedded data set includes: Perform data padding on the embedded data set based on a preset hash algorithm, and perform block processing on the obtained padded data to complete the data preprocessing operation; Use the preset hash value of the preset hash algorithm to perform a preset number of compression operations on the embedded data set after completing the data preprocessing operation, and splice the obtained hash values after compression to obtain a target hash value.
5. The data transfer method based on watermark embedding according to claim 1, wherein The writing the target hash value into the target blockchain by using a preset smart contract includes: Determine a corresponding writing format based on a preset smart contract, and construct a writing request by using the writing format, the identity identification information of the data holder and the data requester, and the target hash value; Sign the writing request by using a local private key, and send the signed request to the target blockchain to write the target hash value into the target blockchain.
6. A data transmission method based on watermark embedding, characterized in that, Applied to a terminal device acting as a data requester, including: Obtain the right to use a target data set, and then generate a corresponding data acquisition certificate; Send the generated data acquisition voucher to the data holder so that the data holder can obtain the data acquisition voucher sent by the data requester, determine the target data set based on the data acquisition voucher, generate a digital watermark for the data requester using a preset digital watermark generation algorithm, embed the digital watermark into the target data set using a preset digital watermark embedding algorithm, and send the obtained embedded data set to the data requester; wherein, the data acquisition voucher is a voucher representing the right of the data requester to obtain the use right of the target data set through a preset platform. Determine a target hash value from the target blockchain; the target hash value is the hash value determined by the data holder based on the embedded data set, and the data holder writes the target hash value into the target blockchain using a preset smart contract. Obtain the embedded data set sent by the data holder, determine a test hash value based on the embedded data set, verify the embedded data set using the test hash value and the target hash value, and when the verification passes, perform a digital signature on the target hash value based on a preset data reception contract.
7. The data transfer method based on watermark embedding according to claim 6, characterized in that The step of verifying the embedded data set using the test hash value and the target hash value and, when the verification passes, performing a digital signature on the target hash value based on a preset data reception contract includes: Compare whether the test hash value and the target hash value are the same to obtain a verification result of the embedded data set. If the verification result indicates that the test hash value and the target hash value are the same, then sign the target hash value on the target blockchain based on the private key in the preset data reception contract and the digital certificate.
8. A data transfer device based on watermark embedding, characterized in that, Applied to a terminal device as a data holder, it includes: A voucher acquisition module, configured to acquire a data acquisition voucher sent by a data requester; the data acquisition voucher is a voucher representing the right of the data requester to obtain the use right of a target data set through a preset platform. A watermark embedding module, configured to determine the target data set based on the data acquisition voucher, generate a digital watermark for the data requester using a preset digital watermark generation algorithm, and embed the digital watermark into the target data set using a preset digital watermark embedding algorithm to obtain an embedded data set. A hash value writing module, configured to determine a corresponding target hash value based on the embedded data set, and write the target hash value into the target blockchain using a preset smart contract so that the data requester can obtain the target hash value from the target blockchain. A data set sending module, configured to send the embedded data set to the data requester so that the data requester can receive the embedded data set.
9. An electronic device, characterized in that, It includes: A memory, configured to store a computer program. A processor, configured to execute the computer program to implement the data transfer method based on watermark embedding according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by the processor, it implements the data transfer method based on watermark embedding according to any one of claims 1 to 7.
Citation Information
Cited By
Outgoing data management method and device, electronic equipment, storage medium and product
CN121093320A