Coding method, decoding method, data generation method, device and electronic device
By converting the encoded information into a binary sequence and embedding it in the target object, combined with cyclic shift and frequency analysis, the problem of low watermark decoding success rate in the existing technology is solved, and efficient decoding is achieved in the case of partial damage.
Patent Information
- Application Number
- CN202011303765.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2040-11-19
AI Technical Summary
Existing digital watermark decoding methods have a low decoding success rate when the string sequence is damaged and cannot effectively extract the complete watermark information.
The encoding method is used to convert the encoded information into a binary sequence, and a shift sequence is generated through cyclic shift. A target number of binary sequences are added to the target object as watermark embedded information. During decoding, the decoding result is determined through screening and frequency analysis.
Even when the watermark embedded information is partially damaged, it can still be effectively decoded, which improves the success rate of watermark decoding.
Smart Images

Figure CN114519172B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an encoding method, a decoding method, a data generation method, an encoding device, a decoding device, an electronic device, and a storage medium. Background Art
[0002] A digital watermark is a protective information embedded in a carrier file using a computer algorithm. Digital watermarking technology is a content-based, non-cryptographic computer information hiding technique. It embeds identifying information (i.e., a digital watermark) directly into a digital carrier (including multimedia, documents, software, etc.). This information does not affect the original carrier's usability and is difficult to detect or modify. However, it can be identified and recognized by the manufacturer. This hidden information can be used to authenticate content creators and purchasers, transmit confidential information, or determine whether the carrier has been tampered with.
[0003] An existing method for embedding watermark information in data is to convert the watermark information into a binary string sequence, convert the data (taking image data as an example) into a grayscale image, extract the grayscale value of each pixel, and then add the string sequence to the corresponding pixel.
[0004] However, using the above method, if the string sequence is damaged, the complete string sequence cannot be extracted, and the success rate of watermark decoding is low. Summary of the Invention
[0005] The embodiment of the present application provides an encoding method to improve the success rate of watermark decoding.
[0006] Correspondingly, an embodiment of the present application also provides a decoding method, a data generation method, an encoding device, a decoding device, an electronic device and a storage medium to ensure the implementation and application of the above system.
[0007] In order to solve the above problems, an embodiment of the present application discloses a coding method, which includes: obtaining coding information; determining a binary sequence corresponding to the coding information, wherein the binary sequence belongs to a binary sequence group of the coding information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting of the binary sequence, and the coding information has a binary sequence group that is different from other coding information; determining a target number corresponding to the coding information, and adding the target number of binary sequences in the target object as watermark embedding information.
[0008] To solve the above-mentioned problem, an embodiment of the present application discloses a decoding method, which includes: obtaining watermark embedding information from a target object, wherein the watermark embedding information consists of a binary sequence; screening a sequence to be analyzed based on the binary sequence in the watermark embedding information; determining the frequency of occurrence of the sequence to be analyzed in the watermark embedding information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence; screening the sequence to be analyzed according to the frequency of occurrence to determine a target sequence for decoding; and determining corresponding encoding information based on the target sequence.
[0009] To solve the above problems, an embodiment of the present application discloses a data generation method, including: obtaining a sequence length condition of a binary sequence; determining a binary sequence that meets the sequence length condition; performing a cyclic shift process on the binary sequence that meets the sequence length condition to obtain a shifted sequence; matching the binary sequence and the shifted sequence with other binary sequences in a coding comparison table respectively; and when the matching result meets a preset matching condition, binding the binary sequence with the information to be encoded and adding it to the coding comparison table, until a binary sequence that meets the sequence length condition is traversed.
[0010] In order to solve the above problems, an embodiment of the present application discloses an encoding method, including: obtaining live broadcast data to be processed and encoding information of the anchor; determining a binary sequence corresponding to the encoding information, wherein the binary sequence belongs to a binary sequence group of the encoding information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting of the binary sequence, and the encoding information has a binary sequence group that is different from other encoding information; determining a target number corresponding to the encoding information, and adding the target number of binary sequences as watermark embedding information in the live broadcast data to obtain encoded live broadcast data.
[0011] To solve the above problems, an embodiment of the present application discloses a decoding method, comprising: obtaining watermark embedding information from encoded live broadcast data, the watermark embedding information consisting of a binary sequence; screening a sequence to be analyzed based on the binary sequence in the watermark embedding information; determining the frequency of occurrence of the sequence to be analyzed in the watermark embedding information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence; screening the sequence to be analyzed according to the frequency of occurrence to determine a target sequence for decoding; and determining corresponding encoding information based on the target sequence to determine the host corresponding to the live broadcast data.
[0012] In order to solve the above problems, an embodiment of the present application discloses a coding method, including: obtaining voice data to be processed and user coding information; determining a binary sequence corresponding to the coding information, wherein the binary sequence belongs to a binary sequence group of the coding information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting of the binary sequence, and the coding information has a binary sequence group that is different from other coding information; determining a target number corresponding to the coding information, and adding the target number of binary sequences as watermark embedding information to the audio data of the voice data to obtain encoded voice data.
[0013] To solve the above problems, an embodiment of the present application discloses a decoding method, comprising: obtaining watermark embedding information from encoded voice data, the watermark embedding information consisting of a binary sequence; screening a sequence to be analyzed based on the binary sequence in the watermark embedding information; determining an occurrence frequency of the sequence to be analyzed in the watermark embedding information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence; screening the sequence to be analyzed according to the occurrence frequency to determine a target sequence for decoding; and determining corresponding encoding information based on the target sequence to determine the user corresponding to the voice data.
[0014] In order to solve the above problems, an embodiment of the present application discloses an encoding method, including: obtaining a target object to be processed and copyright information to be added; determining a binary sequence corresponding to the copyright information, wherein the binary sequence belongs to a binary sequence group of the copyright information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the copyright information has a binary sequence group that is different from other copyright information; determining the target number corresponding to the copyright information, and adding the target number of binary sequences as watermark embedding information in the target object to obtain the encoded target object.
[0015] To solve the above problems, an embodiment of the present application discloses a decoding method, comprising: obtaining watermark embedding information from an encoded target object, the watermark embedding information consisting of a binary sequence; screening a sequence to be analyzed based on the binary sequence in the watermark embedding information; determining the frequency of occurrence of the sequence to be analyzed in the watermark embedding information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence; screening the sequence to be analyzed according to the frequency of occurrence to determine a target sequence for decoding; and determining corresponding copyright information based on the target sequence.
[0016] In order to solve the above problems, an embodiment of the present application discloses a coding device, including: an information acquisition module, used to obtain coding information; a sequence acquisition module, used to determine a binary sequence corresponding to the coding information, the binary sequence belongs to a binary sequence group of the coding information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting of the binary sequence, and the coding information has a binary sequence group that is different from other coding information; a coding object acquisition module, used to determine the target number corresponding to the coding information, and add the target number of binary sequences in the target object as watermark embedding information.
[0017] To solve the above problems, an embodiment of the present application discloses a decoding device, comprising: a watermark acquisition module, configured to acquire watermark embedding information from a target object, wherein the watermark embedding information consists of a binary sequence; a sequence to be analyzed screening module, configured to screen out a sequence to be analyzed based on the binary sequence in the watermark embedding information; a sequence frequency acquisition module, configured to determine, based on the binary sequence and the binary sequence group to which it belongs, the frequency of occurrence of the sequence to be analyzed in the watermark embedding information, wherein other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence; a sequence screening module, configured to screen the sequence to be analyzed according to the frequency of occurrence to determine a target sequence for decoding; and a decoding result acquisition module, configured to determine corresponding encoding information based on the target sequence.
[0018] In order to solve the above problems, an embodiment of the present application discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the method described in the above embodiment.
[0019] In order to solve the above problems, the embodiments of the present application disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes the method described in the above embodiments.
[0020] Compared with the prior art, the embodiments of the present application have the following advantages:
[0021] During the encoding process, this embodiment can convert the encoded information into a binary sequence, where the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is distinct from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the target object as watermark embedded information. Correspondingly, during the decoding process, the binary sequence in the watermark embedded information can be extracted, and then the sequence to be analyzed within the binary sequence can be determined. The binary sequence is then cyclically shifted to determine the frequency of occurrence of each sequence to be analyzed, and the decoding result is determined based on the frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the success rate of watermark decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a structural diagram of a data processing system according to an embodiment of the present application;
[0023] Figure 2 This is a flowchart of an encoding method according to an embodiment of the present application;
[0024] Figure 3 is a flowchart of an encoding method according to another embodiment of the present application;
[0025] Figure 4A This is a flowchart of a decoding method according to an embodiment of the present application;
[0026] Figure 4B is a flowchart of a decoding method according to another embodiment of the present application;
[0027] Figure 5 1 is a flowchart of a decoding method according to another embodiment of the present application;
[0028] Figure 6 This is a flow chart of a data generation method according to an embodiment of the present application;
[0029] Figure 7 1 is a flow chart of an encoding method according to another embodiment of the present application;
[0030] Figure 8 1 is a flowchart of a decoding method according to another embodiment of the present application;
[0031] Figure 9 1 is a flow chart of an encoding method according to another embodiment of the present application;
[0032] Figure 10 1 is a flowchart of a decoding method according to another embodiment of the present application;
[0033] Figure 11 1 is a flow chart of an encoding method according to another embodiment of the present application;
[0034] Figure 12 1 is a flowchart of a decoding method according to another embodiment of the present application;
[0035] Figure 13 This is a schematic structural diagram of an encoding device according to an embodiment of the present application;
[0036] Figure 14 This is a schematic structural diagram of a decoding device according to an embodiment of the present application;
[0037] Figure 15 It is a structural diagram of a data generating device according to an embodiment of the present application;
[0038] Figure 16 is a structural diagram of an encoding device according to another embodiment of the present application;
[0039] Figure 17 is a schematic structural diagram of a decoding device according to another embodiment of the present application;
[0040] Figure 18 is a structural diagram of an encoding device according to another embodiment of the present application;
[0041] Figure 19 is a structural diagram of a decoding device according to another embodiment of the present application;
[0042] Figure 20 is a structural diagram of an encoding device according to another embodiment of the present application;
[0043] Figure 21 is a structural diagram of a decoding device according to another embodiment of the present application;
[0044] Figure 22 It is a structural diagram of an exemplary device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0046] The embodiments of the present application can be applied to the field of data security. During the encoding process, a target number of binary sequences can be added to the data as watermark embedding information. During the decoding process, the decoding result is determined according to the frequency of occurrence of the binary sequence in the watermark embedding information, which can improve the decoding success rate of the watermark in the data. For example, it can be applied to the data security scenario of audio data, and a digital watermark can be embedded in the audio data (such as voice data) to ensure the security of the audio data. For another example, it can be applied to the data security scenario of image data (such as short videos), and a digital watermark can be embedded in the image data to ensure the security of the image data. For another example, it can be applied to the data security scenario of live broadcast data, and a digital watermark can be embedded in the live broadcast data to ensure the security of the live broadcast data. It should be noted that the watermark in the embodiment of the present application can be an explicit watermark, such as the watermark can be displayed in the data background; the watermark can also be an implicit watermark, such as the image data can be converted into a grayscale image, and the grayscale value of each pixel is determined, and then the binary sequence corresponding to the watermark is added to the grayscale value.
[0047] like Figure 1 As shown, during the encoding process, this embodiment can convert the encoded information (watermark information) into a binary sequence according to the encoding comparison table, wherein the binary sequence belongs to a binary sequence group of the encoded information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the encoded information has a binary sequence group that is different from other encoded information; after the binary sequence is determined, a target number of binary sequences can be added as watermark embedding information to the target object (data) to protect the target object. During the decoding process, watermark embedded information can be obtained from the target object, and the binary sequence in the watermark embedded information can be extracted. Then, based on the extracted binary sequence, the sequence to be analyzed in the encoding comparison table can be screened out, and the extracted binary sequence can be cyclically shifted to obtain a shifted sequence. Then, based on the binary sequence and the shifted sequence, the occurrence frequency of each sequence to be analyzed can be determined, and screening and analysis can be performed according to the occurrence frequency of each sequence to be analyzed to obtain a decoding result. For example, the ratio between the sequence to be analyzed with the highest occurrence frequency and the sequence to be analyzed with the second highest occurrence frequency (second highest) can be determined. When the ratio reaches a threshold, the sequence to be analyzed with the highest occurrence frequency is determined to be the watermark and converted into watermark information. In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclically shifted. The binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its occurrence frequency. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the decoding success rate of the watermark.
[0048] In an embodiment of the present application, a coding comparison table contains a correspondence between coding information and a binary sequence. The coding comparison table can be pre-generated. Specifically, the sequence length of the binary sequence corresponding to the coding information can be set first, and then the corresponding binary sequence can be determined according to the sequence length. The binary sequence that meets the sequence length can be cyclically shifted and deduplicated in ascending order. Circular shift deduplication refers to performing a cyclic shift operation on the binary sequence, and matching the binary sequence and the shifted sequence after the cyclic shift with other binary sequences in the coding comparison table, and deduplicating according to the matching results. When the binary sequence and the shifted sequence do not match other binary sequences, the binary sequence is bound to the coding information and added to the coding comparison table. Among them, the cyclic shift operation is an operation that cyclically shifts the binary sequence. In an embodiment of the present application, the operation can be performed by cyclic right shift and / or cyclic left shift.
[0049] The embodiment of the present application provides an encoding method that can be executed by a processing end, which can be a terminal that obtains data, such as an electronic device that takes images, an electronic device that collects audio, etc. The processing end can also be a server that transfers or stores data, such as a server that connects to a terminal to forward data, a server that connects to a terminal to store data, etc. Figure 2 As shown, the encoding method includes:
[0050] Step 202, obtain coding information. The coding information can be understood as watermark information to be added to the data. The watermark information can be related to the user's digital identification. The digital identification can be obtained by converting a combination of images, letters, and numbers. In an optional example, the digital identification can contain type information, and users can be classified by type information. For example, different types of identification can be assigned to different companies for classification. In addition, in some enterprise scenarios, the coding information can also be related to the user identification information of the user in the company. The processing end can determine the corresponding coding information based on the user identification information of the user. For example, in an enterprise scenario, the user identification information (such as the work number) can be used as coding information to add the watermark embedding information corresponding to the work number in the target object. The processing end can obtain the user's request for watermark embedding and extract the identification in the user's request as coding information.
[0051] Step 204: Determine a binary sequence corresponding to the coded information. The binary sequence belongs to a binary sequence group for the coded information. Other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The coded information has a binary sequence group that is distinct from other coded information. In this embodiment, the coded information may correspond to a unique binary sequence group, which includes at least one binary sequence. Other binary sequences in the binary sequence group are obtained by cyclically shifting a binary sequence in the binary sequence group. Furthermore, any binary sequence in the binary sequence group is different from any binary sequence in any other binary sequence group. In an optional example, this embodiment may extract any binary sequence in the binary sequence group as the binary sequence corresponding to the coded information.
[0052] To more efficiently determine the binary sequence corresponding to the coded information, in one optional example, the processing end may pre-set a coding comparison table that stores the correspondence between the coded information and the binary sequence. The processing end may then search the coding comparison table for the corresponding binary sequence based on the coded information. Specifically, determining the binary sequence corresponding to the information to be coded includes: obtaining a coding comparison table that contains the correspondence between the coded information and the binary sequence; and determining the corresponding binary sequence based on the coded information and the coding comparison table. The processing end may pre-generate the coding comparison table, and during the process of determining the binary sequence, the coding information may be directly used to search the coding comparison table, thereby more quickly determining the corresponding binary sequence.
[0053] In the process of generating the coding comparison table, the processing end can pre-set a sequence length condition, and perform cyclic shift deduplication processing on the binary sequences that meet the sequence length condition in sequence, thereby obtaining the coding comparison table. Specifically, as an optional embodiment, the steps of generating the coding comparison table include: determining the sequence length condition; determining the binary sequence that meets the sequence length condition; performing cyclic shift processing on the binary sequence that meets the sequence length condition to obtain a shifted sequence, wherein the shifted sequence is obtained by cyclic shifting the binary sequence; matching the binary sequence and the shifted sequence with other binary sequences in the coding comparison table respectively; when the matching result meets the preset matching condition, adding the binary sequence to the coding comparison table until the binary sequence that meets the sequence length condition is traversed. A sequence length condition may be pre-set, and then cyclic shift deduplication processing may be performed on the binary sequences in order. For example, cyclic shift deduplication processing may be performed on the binary sequences that meet the sequence length condition in ascending order. Cyclic shift deduplication processing refers to performing a cyclic shift operation on the binary sequence to obtain a shifted sequence of the binary sequence, and using the binary sequence and the binary sequence as a binary sequence group. Subsequently, analysis is performed to determine whether any binary sequence in the binary sequence group matches other binary sequences in a coding comparison table, and deduplication is performed based on the matching results. If neither the binary sequence nor the shifted sequence matches other binary sequences, the binary sequence (or other binary sequences in the binary sequence group) is bound to the information to be encoded and added to the coding comparison table. If one of the binary sequence and the shifted sequence matches other binary sequences in the coding comparison table, cyclic shift deduplication processing is performed on the next binary sequence until binary sequences that meet the sequence length condition are traversed.
[0054] After determining the binary sequence corresponding to the information to be encoded, the processing end can determine the target number corresponding to the encoded information in step 206, and add the target number of binary sequences as watermark embedding information to the target object. The processing end can repeatedly add the binary sequence to the target object. In the event that part of the watermark embedding information is damaged, lost, or replaced, the processing end can still extract multiple binary sequences from it as decoding results. The processing end can add watermark embedding information to audio data and image data. Specifically, as an optional embodiment, the target object includes at least one of audio data and image data. In addition to including audio data and image data, the target object in the embodiment of the present application can also include compressed data. In the embodiment of the present application, a watermark can be added to the data during the data compression process.
[0055] The processing end may determine the number of binary sequences that can be added based on the length of the watermark at the watermarkable position in the target object. Specifically, as an optional embodiment, determining the target number corresponding to the encoded information includes determining the corresponding target number based on the watermark length and the sequence length of the binary sequence. The processing end may obtain the target watermark addition position and the watermark length in the target object, determine the target number of binary sequences that can be added based on the watermark length and the sequence length of the binary sequence, and add the target number of binary sequences to the target addition position in the target object as watermark embedded information.
[0056] During the encoding process, this embodiment can convert the encoded information into a binary sequence, wherein the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is different from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the target object as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the target object, and the binary sequence in the watermark embedding information can be extracted. Then, a sequence to be analyzed in the binary sequence can be determined, and the extracted binary sequence can be cyclically shifted to obtain a shifted sequence. Then, based on the binary sequence and the shifted sequence, the occurrence frequency of each sequence to be analyzed can be determined, and a screening analysis can be performed based on the occurrence frequency of each sequence to be analyzed to obtain a decoding result. For example, the ratio between the most frequently occurring sequence to be analyzed and the next most frequently occurring sequence to be analyzed can be determined. If the ratio reaches a threshold, the most frequently occurring sequence to be analyzed is determined as the watermark and converted into watermark information (information to be encoded). In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding.
[0057] On the basis of the above embodiments, the embodiment of the present application further provides an encoding method that can be executed by a processing end, such as Figure 3 As shown, the encoding method includes:
[0058] Step 302: Obtain coding information.
[0059] Step 304: Obtain a coding comparison table, wherein the coding comparison table includes a correspondence between coding information and binary sequences.
[0060] Step 306: Determine a corresponding binary sequence based on the encoding information and the encoding comparison table. The binary sequence belongs to a binary sequence group of the encoding information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence. The encoding information has a binary sequence group that is different from other encoding information.
[0061] Step 308: Determine the corresponding target quantity according to the watermark length of the watermark and the sequence length of the binary sequence.
[0062] Step 310: Add a target number of binary sequences as watermark embedding information to the target object. As an optional embodiment, the target object includes at least one of audio data and image data.
[0063] During the encoding process, this embodiment can convert the encoded information into a binary sequence according to the encoding comparison table, wherein the binary sequence belongs to a binary sequence group of the encoded information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the encoded information has a binary sequence group that is different from other encoded information; after determining the binary sequence, the corresponding target number is determined according to the watermark length and the binary sequence length of the watermark, and then the target number of binary sequences can be added to the target object as watermark embedding information. During the decoding process, the watermark embedded information can be obtained from the target object, and the binary sequence in the watermark embedded information can be extracted. Then, the sequence to be analyzed in the binary sequence is determined, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. After that, the occurrence frequency of each sequence to be analyzed can be determined based on the binary sequence and the shifted sequence, and screening and analysis can be performed according to the occurrence frequency of each sequence to be analyzed to obtain a decoding result. For example, the ratio between the sequence to be analyzed with the highest occurrence frequency and the sequence to be analyzed with the second highest occurrence frequency (second highest) can be determined. When the ratio reaches a threshold, the target sequence with the highest occurrence frequency is determined as the watermark and converted into watermark information (information to be encoded). In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclically shifted. The binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its occurrence frequency. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the decoding success rate of the watermark.
[0064] The embodiment of the present application also provides a decoding method that can be executed by a processing end, which can be a server end for data transfer and data storage; a processing end can also be an analysis device for data analysis; or a terminal device for data output, such as a terminal device for audio data playback and image data display. Figure 4A As shown, the decoding method includes:
[0065] Step 402: Acquire watermark embedded information from the target object. The watermark embedded information consists of a binary sequence. In the embodiment of the present application, the target object can be audio data, image data, or compressed data. The present application can acquire the watermark embedded information from the target object and decompose the watermark embedded information to obtain a binary sequence.
[0066] The processing end may extract the watermark embedded information from the target object based on the watermark length of the watermark embedded information added to the target object. Specifically, as an optional embodiment, obtaining the watermark embedded information from the target object includes: extracting the corresponding watermark embedded information from the target object based on the watermark length, where the target object includes at least one of audio data and image data. The processing end may obtain the watermark length and target adding position of the target object, and extract the corresponding watermark embedded information from the target adding position of the target object based on the watermark length.
[0067] After extracting the watermark embedded information, the processing end can, in step 404, filter out sequences to be analyzed based on the binary sequence in the watermark embedded information. The processing end can extract the binary sequence from the watermark embedded information and determine the sequence to be analyzed based on the extracted binary sequence. Specifically, the binary sequence can be decomposed from the watermark embedded information according to a preset binary sequence length, and the sequence to be analyzed that exists in the binary sequence and is filtered out from the encoding comparison table. Specifically, as an optional embodiment, filtering out sequences to be analyzed based on the binary sequence in the watermark embedded information includes: traversing the watermark embedded information according to the sequence length to extract the corresponding binary sequence; and filtering out sequences to be analyzed that exist in the encoding comparison table based on the extracted binary sequence, wherein the encoding comparison table contains the correspondence between the encoding information and the binary sequence. The processing end can set a sliding window that matches the binary sequence length, extract the sequence within the sliding window as the binary sequence, and slide the sliding window until the sliding window traverses the watermark embedded information and obtains the binary sequence in the watermark embedded information. After extracting the binary sequence from the watermark embedded information, the binary sequence can be compared with the sequences in the coding comparison table to screen out the sequence to be analyzed that exists in the coding comparison table. In this embodiment, the extracted binary sequence itself can be matched with the sequences in the coding comparison table to determine the sequence to be analyzed. Alternatively, the extracted binary sequence can be cyclically shifted, and the shifted binary sequence can be matched with the sequences in the coding comparison table to determine the sequence to be analyzed, so as to analyze the frequency of occurrence of the sequence to be analyzed.
[0068] After extracting the binary sequence from the watermark embedded information, the processing end may determine, in step 406, the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where the other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence. In an optional embodiment, the processing end may obtain the binary sequence group corresponding to the sequence to be analyzed, then determine the binary sequence group of the extracted binary sequence, and further determine the frequency of occurrence of each sequence to be analyzed. Specifically, determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs includes: obtaining the binary sequence group of the sequence to be analyzed; determining the binary sequence group to which the binary sequence belongs; and updating the frequency of occurrence of the sequence to be analyzed. The binary sequence group of the sequence to be analyzed can be generated in advance or obtained by performing a cyclic shift process on the sequence to be analyzed. When analyzing the binary sequence extracted from the watermark embedded information, the binary sequence group of the sequence to be analyzed to which the extracted binary sequence belongs can be analyzed, and the occurrence frequency of the corresponding sequence to be analyzed can be increased by one until the extracted binary sequence is traversed, thereby obtaining the occurrence frequency of each sequence to be analyzed.
[0069] In another optional embodiment, the processing end may perform a cyclic shift on the extracted binary sequence to determine a corresponding shifted sequence, then form a corresponding binary sequence group based on the binary sequence and the shifted sequence, and then match each binary sequence in the binary sequence group with the sequence to be analyzed to obtain the frequency of occurrence of the sequence to be analyzed. Specifically, determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs includes: performing a cyclic shift on the binary sequence to obtain a shifted sequence; determining a binary sequence group of the binary sequence based on the binary sequence and the shifted sequence of the binary sequence; analyzing each binary sequence in the binary sequence group to determine a matching sequence to be analyzed, and updating the frequency of occurrence of the matching sequence to be analyzed. After extracting the binary sequence from the watermark embedded information, the extracted binary sequence can be cyclically shifted to obtain a shifted sequence. Then, based on the binary sequence and the shifted sequence, a binary sequence group is determined, and the sequence to be analyzed that matches each binary sequence in the binary sequence group. After the binary sequence in the binary sequence group matches the sequence to be analyzed, the occurrence frequency of the corresponding sequence to be analyzed is increased by one, until all binary sequence groups are traversed to obtain the occurrence frequency of each sequence to be analyzed.
[0070] After determining the frequency of occurrence of the sequence to be analyzed, the processing end can, in step 408, filter the sequences to be analyzed according to the frequency of occurrence to determine a target sequence for decoding. In step 410, the corresponding encoding information is determined based on the target sequence. This solution can filter out the sequence to be analyzed with the highest frequency of occurrence as the target sequence, or can filter out several sequences to be analyzed with the highest frequency of occurrence as the target sequences to determine the decoding result. When a single sequence to be analyzed is filtered out, whether the decoding is successful can be determined based on whether the frequency of occurrence of the sequence to be analyzed exceeds a preset value. If it exceeds the preset value, the encoding information of the target sequence can be determined based on the encoding comparison table as the decoding result; if it does not exceed the preset value, the decoding failure can be determined. When multiple sequences to be analyzed are filtered out, such as when two sequences are filtered out, the sequence with the highest frequency of occurrence can be compared with a sequence with a lower frequency of occurrence (such as the next highest sequence) to determine the decoding result based on the comparison result. If the comparison result meets the conditions (such as the ratio between the sequences exceeds a threshold), the encoding information of the target sequence can be determined based on the encoding comparison table as the decoding result. If the comparison result does not meet the conditions, the decoding failure can be determined.
[0071] The processing end can sort the binary sequence according to its frequency of occurrence for screening. Specifically, as an optional embodiment, screening the sequence to be analyzed according to its frequency of occurrence to determine the target sequence for decoding includes: sorting the sequence to be analyzed according to its corresponding frequency of occurrence; and screening the target sequence whose ranking meets preset conditions. The sorting rule can be sorting from high to low frequency of occurrence, or from low to high frequency of occurrence. The processing end can sort the binary sequence according to its frequency of occurrence in the watermark embedded information and the corresponding sorting rule, and screen out the target sequence that meets the preset conditions based on the sorting result and the corresponding screening conditions.
[0072] In the case where multiple sequences to be analyzed are screened out as target sequences, the processing end can determine the decoding result of the target sequence according to the ratio, difference and other data of the frequency of occurrence between the target sequences. Specifically, as an optional embodiment, the screened target sequences include a first sequence with the highest frequency of occurrence and a second sequence with the second highest frequency of occurrence; the determination of the corresponding coding information based on the target sequence includes: determining the ratio information between the first frequency of occurrence of the first sequence and the second frequency of occurrence of the second sequence; in the case where the ratio information exceeds a preset threshold, determining the coding information corresponding to the first sequence according to the coding comparison table. The processing end can determine whether the ratio information meets the preset threshold according to the ratio information. In the case where the ratio information meets the preset threshold, it is determined that the decoding is successful, and the coding information of the first sequence is used as the decoding result. In the case where the ratio information does not meet the preset threshold, it is determined that the decoding failed. The embodiment of the present application can determine whether the decoding is successful by judging whether the ratio information between the binary sequence with the highest frequency of occurrence and the binary sequence with the second highest frequency of occurrence meets the preset threshold. It can still perform decoding even when the watermark embedded information is partially damaged, thereby improving the decoding success rate. For example, in the case where Figure 4B In the example shown, the highest-frequency binary sequence contained in the original watermark embedded information appears 17 times. This embodiment can determine that the highest-frequency sequence (target sequence) appears 8 times if the watermark embedded information is partially damaged, such as if the watermark embedded information is partially randomly deleted. Furthermore, if the watermark embedded information is randomly inserted, the highest-frequency sequence appears 7 times. Furthermore, if the watermark embedded information is partially randomly flipped, the highest-frequency sequence appears 9 times. If the reference sequence appears 2 times, the ratio between the target and reference sequence appearance frequencies is compared with a preset threshold (e.g., 3) to determine that decoding is successful, and the encoded information of the target sequence is output as the decoding result.
[0073] During the decoding process, this embodiment can obtain watermark embedded information from the target object and extract the binary sequence in the watermark embedded information. Then, the sequence to be analyzed in the binary sequence is determined, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. Thereafter, the frequency of occurrence of the sequence to be analyzed can be determined based on the binary sequence and the shifted sequence, and screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to obtain a decoding result (encoded information). In this embodiment of the application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclically shifted. The binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the success rate of watermark decoding.
[0074] On the basis of the above embodiments, the present application also provides a decoding method that can be executed by a processing terminal, such as Figure 5 As shown, the decoding method includes:
[0075] Step 502: Extract corresponding watermark embedding information from a target object according to the watermark length, where the target object includes at least one of audio data and image data.
[0076] Step 504: Determine the sequence length.
[0077] Step 506: traverse the watermark embedded information according to the sequence length and extract the corresponding binary sequence.
[0078] Step 508: Filter out the sequences to be analyzed that are in the coding comparison table based on the extracted binary sequence. The coding comparison table contains the correspondence between coding information and binary sequences.
[0079] Step 510: Determine the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. As an optional embodiment, determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs includes: obtaining the binary sequence group of the sequence to be analyzed; determining the binary sequence group to which the binary sequence belongs, and updating the frequency of occurrence of the sequence to be analyzed. As another optional embodiment, determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs includes: cyclically shifting the binary sequence to obtain a shifted sequence; determining the binary sequence group of the binary sequence based on the binary sequence and the shifted sequence of the binary sequence; analyzing each binary sequence in the binary sequence group to determine a matching sequence to be analyzed, and updating the frequency of occurrence of the matching sequence to be analyzed.
[0080] Step 512: Sort the sequences to be analyzed according to their corresponding frequencies of occurrence.
[0081] Step 514: Filter target sequences whose rankings meet preset conditions.
[0082] Step 516: Determine corresponding coding information according to the target sequence.
[0083] During the encoding process, this embodiment can convert the encoded information into a binary sequence, wherein the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is different from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the target object as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the target object according to the watermark length, and the binary sequence in the watermark embedding information can be extracted according to the sequence length. Then, a sequence to be analyzed in the binary sequence is determined, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. Then, based on the binary sequence and the shifted sequence, the occurrence frequency of the sequence to be analyzed can be determined. Then, based on the occurrence frequency of the sequence to be analyzed, the target sequence can be determined, and the encoded information corresponding to the target sequence can be determined. In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding.
[0084] On the basis of the above embodiments, the embodiment of the present application further provides a data generation method, by which a coding comparison table containing the correspondence between information to be encoded and binary sequences can be generated, so that in the process of adding watermarks to data, the binary sequence corresponding to the information to be encoded can be quickly determined. The method of this embodiment can be executed by a processing end, which can be a server or terminal device that performs data preprocessing, such as Figure 6 As shown, the data generation method includes:
[0085] Step 602: Obtain a sequence length condition of the binary sequence.
[0086] Step 604: Determine a binary sequence that meets the sequence length condition.
[0087] Step 606: Perform cyclic shift processing on the binary sequence that meets the sequence length condition to obtain a shifted sequence.
[0088] Step 608: Match the binary sequence and the shift sequence with other binary sequences in the coding comparison table respectively.
[0089] Step 610: If the matching result meets the preset matching condition, the binary sequence is bound to the coding information and added to the coding comparison table until a binary sequence meeting the sequence length condition is traversed.
[0090] The method of the embodiment of the present application is similar to the implementation method of the above embodiment, and the specific implementation method can refer to the implementation method of the method in the above method embodiment.
[0091] In an embodiment of the present application, the processing end can perform cyclic shift deduplication processing on binary sequences that meet the sequence length condition in sequence according to the set sequence length condition until the binary sequence that meets the sequence length condition is traversed, wherein cyclic shift deduplication refers to performing a cyclic shift operation on the binary sequence, and matching the binary sequence and the shifted sequence after the cyclic shift with other binary sequences in the coding comparison table, and deduplication is performed according to the matching results. If the binary sequence and the shifted sequence do not match the other binary sequences, the binary sequence is bound to the coding information and added to the coding comparison table. The embodiment of the present application can pre-generate the coding comparison table so that the binary sequence corresponding to the coding information can be quickly determined.
[0092] On the basis of the above embodiments, the embodiments of the present application also provide a coding method that can be applied to data security scenarios of live broadcast data. The embodiments of the present application can collect live broadcast data of users, which may include audio data and image data. The live broadcast data in the embodiments of the present application may include real-time live broadcast data of the anchor and data stored in the server for on-demand playback. The embodiments of the present application can encode the audio data and / or image data in the live broadcast data to add a target number of binary sequences as watermark embedding information in the live broadcast data to protect the live broadcast data. The method of the embodiments of the present application can be executed by a processing end, which can be a terminal for collecting data or a server for data forwarding and data storage, such as Figure 7 As shown, the encoding method includes:
[0093] Step 702: Obtain the live broadcast data to be processed and the host's encoding information.
[0094] Step 704: Determine a binary sequence corresponding to the coded information, where the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information.
[0095] Step 706: Determine the target number corresponding to the encoding information, and add a binary sequence of the target number as watermark embedding information to the live broadcast data to obtain the encoded live broadcast data.
[0096] The method of the embodiment of the present application is similar to the implementation method of the above embodiment, and the specific implementation method can refer to the implementation method of the method in the above method embodiment.
[0097] During the encoding process, this embodiment can convert the live broadcast user's information to be encoded into a binary sequence, wherein the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is different from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the live broadcast data as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the live broadcast data, and the binary sequence in the watermark embedding information can be extracted. The sequence to be analyzed in the binary sequence is then filtered out, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. The frequency of occurrence of the sequence to be analyzed can then be determined based on the binary sequence and the shifted sequence. Screening and analysis can then be performed based on the frequency of occurrence of the sequence to be analyzed to obtain the encoding information of the target sequence, thereby determining the host of the live broadcast data. In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the live broadcast data. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the success rate of watermark decoding.
[0098] On the basis of the above embodiments, the embodiments of the present application also provide a decoding method, which can decode the encoded live broadcast data, extract the watermark embedded information in the live broadcast data, and determine the corresponding decoding result according to the frequency of occurrence of each binary sequence in the watermark embedded information. In the case where the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding. The decoding method of the embodiment of the present application can be executed by a processing end, which can be a server end for data transfer and data storage, or a terminal device for displaying live broadcast data. Figure 8 As shown, the decoding method includes:
[0099] Step 802: Acquire watermark embedding information from the encoded live broadcast data, where the watermark embedding information consists of a binary sequence.
[0100] Step 804: Filter out the sequence to be analyzed based on the binary sequence in the watermark embedded information.
[0101] Step 806: Determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where the other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence.
[0102] Step 808: Screen the sequences to be analyzed according to the frequency of occurrence to determine the target sequence for decoding.
[0103] Step 810: Determine corresponding coding information based on the target sequence to determine the host corresponding to the live broadcast data.
[0104] The method of the embodiment of the present application is similar to the implementation method of the above embodiment, and the specific implementation method can refer to the implementation method of the method in the above method embodiment.
[0105] During the decoding process, this embodiment can obtain watermark embedded information from the encoded live broadcast data, extract the binary sequence in the watermark embedded information, and then filter out the sequence to be analyzed in the binary sequence, and perform a circular shift on the extracted binary sequence to obtain a shifted sequence; then, based on the binary sequence and the shifted sequence, the frequency of occurrence of the sequence to be analyzed can be determined, and screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to determine the encoding information corresponding to the target sequence, so as to determine the host corresponding to the live broadcast data. In this embodiment of the application, during the encoding process, the binary sequence is repeatedly added to the data, and during the decoding process, the binary sequence is extracted and circularly shifted, so that the binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoding information, thereby improving the decoding success rate of the watermark.
[0106] On the basis of the above embodiments, the embodiments of the present application also provide a coding method that can be applied to data security scenarios of voice data. Voice data refers to data recorded by voice. For example, voice data can be music data, voice data of voice courses, etc. The embodiments of the present application can collect the voice data of users. The embodiments of the present application can encode the audio data in the voice data to add a target number of binary sequences as watermark embedding information in the voice data to protect the voice data. The method of the embodiments of the present application can be executed by a processing end. The processing end can be a terminal for collecting data, or a service end for forwarding data and storing data, such as Figure 9 As shown, the encoding method includes:
[0107] Step 902: Acquire the voice data to be processed and the user's coding information.
[0108] Step 904: Determine a binary sequence corresponding to the coded information, where the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information.
[0109] Step 906: Determine the target number corresponding to the encoding information, and add the target number of binary sequences to the audio data of the speech data as watermark embedding information to obtain encoded speech data.
[0110] The method of the embodiment of the present application is similar to the implementation method of the above embodiment, and the specific implementation method can refer to the implementation method of the method in the above method embodiment.
[0111] During the encoding process, this embodiment can convert the user's encoded information into a binary sequence, where the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is different from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the voice data as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the voice data, and the binary sequence in the watermark embedding information can be extracted. The sequence to be analyzed in the binary sequence is then filtered out, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. The frequency of occurrence of the sequence to be analyzed can then be determined based on the binary sequence and the shifted sequence. The sequence to be analyzed can then be filtered and analyzed based on the frequency of occurrence of the sequence to be analyzed to determine the encoding information of the target sequence, thereby identifying the user corresponding to the voice data. In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the voice data. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the success rate of watermark decoding.
[0112] On the basis of the above embodiments, the embodiments of the present application also provide a decoding method, which can decode the encoded voice data, extract the watermark embedded information in the voice data, and determine the corresponding decoding result according to the frequency of occurrence of each binary sequence in the watermark embedded information. In the case where the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding. The decoding method of the embodiments of the present application can be executed by a processing end, which can be a server end for data transfer and data storage, or a terminal device for playing voice data. Figure 10 As shown, the decoding method includes:
[0113] Step 1002: Acquire watermark embedding information from the encoded speech data, where the watermark embedding information consists of a binary sequence.
[0114] Step 1004: Filter out the sequence to be analyzed based on the binary sequence in the watermark embedded information.
[0115] Step 1006: Determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where the other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence.
[0116] Step 1008: Screen the sequences to be analyzed according to the frequency of occurrence to determine the target sequence for decoding.
[0117] Step 1010: Determine corresponding coding information according to the target sequence to determine the user corresponding to the voice data.
[0118] The method of the embodiment of the present application is similar to the implementation method of the above embodiment, and the specific implementation method can refer to the implementation method of the method in the above method embodiment.
[0119] During the decoding process, this embodiment can obtain watermark embedded information from the encoded voice data and extract the binary sequence in the watermark embedded information. Then, the sequence to be analyzed in the binary sequence is screened out, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. Thereafter, the frequency of occurrence of the sequence to be analyzed can be determined based on the binary sequence and the shifted sequence. Screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to determine the encoding information corresponding to the target sequence, thereby determining the user corresponding to the voice data. In this embodiment of the application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclically shifted. The binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoding information, thereby improving the success rate of watermark decoding.
[0120] On the basis of the above embodiments, the embodiment of the present application further provides an encoding method that can be applied in data security scenarios, which can convert copyright information into a corresponding binary sequence, and add a target number of binary sequences as watermark embedding information to the target object. Correspondingly, during the decoding process, the corresponding copyright information can be determined based on the decoding result of the target object. The embodiment of the present application can be executed by a processing end, which can be a terminal for collecting data or a server for forwarding data and storing data, such as Figure 11 As shown, the encoding method includes:
[0121] Step 1102: Obtain the target object to be processed and the copyright information to be added.
[0122] Step 1104: Determine a binary sequence corresponding to the copyright information, where the binary sequence belongs to a binary sequence group of the copyright information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence. The copyright information has a binary sequence group that is different from other copyright information.
[0123] Step 1106: Determine the target quantity corresponding to the copyright information, and add a binary sequence of the target quantity as watermark embedding information in the target object to obtain an encoded target object.
[0124] The method of the embodiment of the present application is similar to the implementation method of the above embodiment, and the specific implementation method can refer to the implementation method of the method in the above method embodiment.
[0125] During the encoding process, this embodiment can convert the user's copyright information into a binary sequence, where the binary sequence belongs to a binary sequence group of the copyright information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The copyright information has a binary sequence group that is different from other copyright information. After determining the binary sequence, a target number of binary sequences can be added to the target object as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the target object, and the binary sequence in the watermark embedding information can be extracted. The sequence to be analyzed in the binary sequence is then filtered out, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. The frequency of occurrence of the sequence to be analyzed can then be determined based on the binary sequence and the shifted sequence. Screening and analysis can then be performed based on the frequency of occurrence of the sequence to be analyzed to determine the copyright information corresponding to the target sequence. In an embodiment of the present application, during the encoding process, the binary sequence corresponding to the copyright information is repeatedly added to the target object. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Based on the decoding result, the corresponding copyright information is determined. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding.
[0126] On the basis of the above-mentioned embodiments, the embodiments of the present application also provide a decoding method, which can decode the encoded target object, extract the watermark embedded information in the target object, and determine the corresponding decoding result according to the frequency of occurrence of each binary sequence in the watermark embedded information, and obtain the corresponding copyright information according to the decoding result. In the case where the watermark embedded information is partially damaged, the embodiments of the present application can still be decoded to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding. The decoding method of the embodiments of the present application can be executed by a processing end, which can be a server end for data transfer and data storage, or a terminal device for outputting the target object, such as Figure 12 As shown, the decoding method includes:
[0127] Step 1202: Acquire watermark embedding information from the encoded target object, where the watermark embedding information consists of a binary sequence.
[0128] Step 1204: Filter out the sequence to be analyzed based on the binary sequence in the watermark embedded information.
[0129] Step 1206: Determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where the other binary sequences in the binary sequence group are shifted sequences obtained by performing cyclic shift processing on the binary sequence.
[0130] Step 1208: Screen the sequences to be analyzed according to the frequency of occurrence to determine the target sequence for decoding.
[0131] Step 1210: Determine corresponding copyright information based on the target sequence.
[0132] The method of the embodiment of the present application is similar to the implementation method of the above embodiment, and the specific implementation method can refer to the implementation method of the method in the above method embodiment.
[0133] During the decoding process, this embodiment can obtain watermark embedded information from the encoded target object and extract the binary sequence in the watermark embedded information. Then, the sequence to be analyzed in the binary sequence is screened and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. The frequency of occurrence of the sequence to be analyzed can be determined based on the binary sequence and the shifted sequence. Screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to determine the copyright information corresponding to the target sequence. In this embodiment of the application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclically shifted. The binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its frequency of occurrence. Then, the corresponding copyright information can be determined based on the decoding result. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding.
[0134] It should be noted that for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0135] Based on the above embodiment, this embodiment also provides an encoding device, such as Figure 13 As shown, the following modules may be included:
[0136] The information acquisition module 1302 is used to acquire coding information.
[0137] The sequence acquisition module 1304 is configured to determine a binary sequence corresponding to the coded information, where the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information.
[0138] The coding object acquisition module 1306 is used to determine the target quantity corresponding to the coding information and add a binary sequence of the target quantity to the target object as watermark embedding information.
[0139] In summary, during the encoding process, this embodiment can convert the encoded information into a binary sequence, wherein the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is distinct from other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the target object as watermark embedded information. Correspondingly, during the decoding process, the binary sequence in the watermark embedded information can be extracted, and then the sequence to be analyzed within the binary sequence can be determined. The binary sequence is then cyclically shifted to determine the frequency of occurrence of each sequence to be analyzed, and the decoding result is determined based on the frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the success rate of watermark decoding.
[0140] Based on the above embodiment, this embodiment further provides an encoding device, which may specifically include the following modules:
[0141] The module for determining information to be encoded is used to obtain encoding information.
[0142] The coding comparison table determination module is used to obtain a coding comparison table, where the coding comparison table contains a correspondence between coding information and binary sequences.
[0143] A binary sequence determination module is configured to determine a corresponding binary sequence based on the coding information and the coding comparison table, wherein the binary sequence belongs to a binary sequence group of the coding information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coding information has a binary sequence group that is different from other coding information.
[0144] The target quantity determination module is used to determine the corresponding target quantity according to the watermark length of the watermark and the sequence length of the binary sequence.
[0145] The watermark embedding processing module is used to add a target number of binary sequences as watermark embedding information to the target object. As an optional embodiment, the target object includes at least one of audio data and image data.
[0146] During the encoding process, this embodiment can convert the encoded information into a binary sequence according to the encoding comparison table, wherein the binary sequence belongs to a binary sequence group of the encoded information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the encoded information has a binary sequence group that is different from other encoded information; after determining the binary sequence, the corresponding target number is determined according to the watermark length and the binary sequence length of the watermark, and then the target number of binary sequences can be added to the target object as watermark embedding information. During the decoding process, the watermark embedded information can be obtained from the target object, and the binary sequence in the watermark embedded information can be extracted. Then, the sequence to be analyzed in the binary sequence is determined, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. After that, the occurrence frequency of each sequence to be analyzed can be determined based on the binary sequence and the shifted sequence, and screening and analysis can be performed according to the occurrence frequency of each sequence to be analyzed to obtain a decoding result. For example, the ratio between the sequence to be analyzed with the highest occurrence frequency and the sequence to be analyzed with the second highest occurrence frequency (second highest) can be determined. When the ratio reaches a threshold, the target sequence with the highest occurrence frequency is determined as the watermark and converted into watermark information (information to be encoded). In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclically shifted. The binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its occurrence frequency. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the decoding success rate of the watermark.
[0147] Based on the above embodiment, this embodiment also provides a decoding device, such as Figure 14 As shown, the following modules may be included:
[0148] The watermark acquisition module 1402 is configured to acquire watermark embedding information from the target object, where the watermark embedding information consists of a binary sequence.
[0149] The sequence to be analyzed screening module 1404 is used to screen out the sequence to be analyzed based on the binary sequence in the watermark embedded information.
[0150] The sequence frequency acquisition module 1406 is used to determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence.
[0151] The sequence screening module 1408 is used to screen the sequences to be analyzed according to the frequency of occurrence to determine the target sequence for decoding.
[0152] The decoding result acquisition module 1410 is configured to determine corresponding coding information according to the target sequence.
[0153] In summary, during the decoding process, this embodiment can obtain watermark embedded information from the target object and extract the binary sequence in the watermark embedded information, then determine the sequence to be analyzed in the binary sequence, and perform a cyclic shift on the extracted binary sequence to obtain a shifted sequence; then, based on the binary sequence and the shifted sequence, the frequency of occurrence of the sequence to be analyzed can be determined, and screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to obtain a decoding result (encoded information). In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data, and during the decoding process, the binary sequence is extracted and cyclically shifted, so that the binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the decoding success rate of the watermark.
[0154] Based on the above embodiment, this embodiment further provides a decoding device, which may specifically include the following modules:
[0155] The watermark embedding information determination module is used to extract corresponding watermark embedding information from a target object according to the watermark length, and the target object includes at least one of audio data and image data.
[0156] The sequence length determination module is used to determine the sequence length.
[0157] The binary sequence extraction module is used to traverse the watermark embedded information according to the sequence length and extract the corresponding binary sequence.
[0158] The to-be-analyzed sequence acquisition module is used to screen out the to-be-analyzed sequence existing in the coding comparison table based on the extracted binary sequence, wherein the coding comparison table contains the correspondence between coding information and binary sequences.
[0159] The sequence occurrence frequency determination module is used to determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, wherein the other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence.
[0160] The sequence sorting processing module is used to sort the sequences to be analyzed according to the corresponding occurrence frequencies of the sequences to be analyzed.
[0161] The sequence screening processing module is used to screen target sequences whose rankings meet preset conditions.
[0162] The decoding result determination module is used to determine the corresponding coding information according to the target sequence.
[0163] During the encoding process, this embodiment can convert the encoded information into a binary sequence, wherein the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is different from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the target object as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the target object according to the watermark length, and the binary sequence in the watermark embedding information can be extracted according to the sequence length. Then, a sequence to be analyzed in the binary sequence is determined, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. Then, based on the binary sequence and the shifted sequence, the occurrence frequency of the sequence to be analyzed can be determined. Then, based on the occurrence frequency of the sequence to be analyzed, the target sequence can be determined, and the encoded information corresponding to the target sequence can be determined. In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding.
[0164] Based on the above embodiment, this embodiment also provides a data generating device, such as Figure 15 As shown, the following modules may be included:
[0165] The sequence length obtaining module 1502 is used to obtain a sequence length condition of a binary sequence.
[0166] The sequence shift processing module 1504 is configured to determine a binary sequence that meets the sequence length requirement.
[0167] The shift sequence acquisition module 1506 is configured to perform cyclic shift processing on the binary sequence that meets the sequence length condition to obtain a shifted sequence, wherein the shifted sequence is obtained by performing cyclic shift on the binary sequence.
[0168] The sequence matching processing module 1508 is used to match the binary sequence and the shift sequence with other binary sequences in the coding comparison table respectively.
[0169] The sequence binding processing module 1510 is used to bind the binary sequence with the coding information and add it to the coding comparison table when the matching result meets the preset matching condition, until the binary sequence that meets the sequence length condition is traversed.
[0170] In summary, in an embodiment of the present application, the processing end can perform cyclic shift deduplication processing on binary sequences that meet the sequence length condition in sequence according to the set sequence length condition until the binary sequence that meets the sequence length condition is traversed, wherein cyclic shift deduplication refers to performing a cyclic shift operation on the binary sequence, and matching the binary sequence and the shifted sequence after the cyclic shift with other binary sequences in the coding comparison table, and deduplication is performed according to the matching results. When the binary sequence and the shifted sequence do not match other binary sequences, the binary sequence is bound to the coding information and added to the coding comparison table. The embodiment of the present application can pre-generate a coding comparison table so that the binary sequence corresponding to the coding information can be quickly determined.
[0171] Based on the above embodiment, this embodiment also provides an encoding device, such as Figure 16 As shown, the following modules may be included:
[0172] The live broadcast information acquisition module 1602 is used to obtain the live broadcast data to be processed and the encoding information of the anchor.
[0173] The live sequence acquisition module 1604 is used to determine the binary sequence corresponding to the coding information, where the binary sequence belongs to the binary sequence group of the coding information, and other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence. The coding information has a binary sequence group that is different from other coding information.
[0174] The live broadcast coded data acquisition module 1606 is used to determine the target number corresponding to the coding information, and add the binary sequence of the target number as watermark embedding information in the live broadcast data to obtain the coded live broadcast data.
[0175] In summary, during the encoding process, this embodiment can convert the live broadcast user's information to be encoded into a binary sequence, wherein the binary sequence belongs to the binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is different from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the live broadcast data as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the live broadcast data, and the binary sequence in the watermark embedding information can be extracted. The sequence to be analyzed in the binary sequence is then filtered out, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. The frequency of occurrence of the sequence to be analyzed can then be determined based on the binary sequence and the shifted sequence. Screening and analysis can then be performed based on the frequency of occurrence of the sequence to be analyzed to obtain the encoding information of the target sequence, thereby determining the host of the live broadcast data. In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the live broadcast data. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the success rate of watermark decoding.
[0176] Based on the above embodiment, this embodiment also provides a decoding device, such as Figure 17 As shown, the following modules may be included:
[0177] The live broadcast watermark acquisition module 1702 is used to obtain watermark embedding information from the encoded live broadcast data, where the watermark embedding information consists of a binary sequence.
[0178] The sequence to be analyzed determining module 1704 is configured to select a sequence to be analyzed based on the binary sequence in the watermark embedded information.
[0179] The live sequence frequency acquisition module 1706 is used to determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence.
[0180] The live sequence screening module 1708 is used to screen the sequences to be analyzed according to the frequency of occurrence and determine the target sequence for decoding.
[0181] The live broadcast information determination module 1710 is used to determine the corresponding coding information according to the target sequence to determine the anchor corresponding to the live broadcast data.
[0182] In summary, during the decoding process, this embodiment can obtain watermark embedded information from the encoded live broadcast data, extract the binary sequence in the watermark embedded information, and then filter out the sequence to be analyzed in the binary sequence, and perform a circular shift on the extracted binary sequence to obtain a shifted sequence; then, based on the binary sequence and the shifted sequence, the frequency of occurrence of the sequence to be analyzed can be determined, and screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to determine the encoding information corresponding to the target sequence, so as to determine the host corresponding to the live broadcast data. In the embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data, and during the decoding process, the binary sequence is extracted and circularly shifted, so that the binary sequence in the watermark embedded information can be extracted, and the decoding result can be determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoding information, thereby improving the decoding success rate of the watermark.
[0183] Based on the above embodiment, this embodiment also provides an encoding device, such as Figure 18 As shown, the following modules may be included:
[0184] The voice information acquisition module 1802 is used to acquire the voice data to be processed and the user's coding information.
[0185] The speech sequence acquisition module 1804 is configured to determine a binary sequence corresponding to the coded information, where the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information.
[0186] The speech coding data acquisition module 1806 is used to determine the target number corresponding to the coding information and add the target number of binary sequences as watermark embedding information to the audio data of the speech data to obtain the encoded speech data.
[0187] In summary, during the encoding process, this embodiment can convert the user's encoded information into a binary sequence, wherein the binary sequence belongs to a binary sequence group of the encoded information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The encoded information has a binary sequence group that is different from the other encoded information. After determining the binary sequence, a target number of binary sequences can be added to the voice data as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the voice data, and the binary sequence in the watermark embedding information can be extracted. The sequence to be analyzed in the binary sequence is then filtered out, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. The frequency of occurrence of the sequence to be analyzed can then be determined based on the binary sequence and the shifted sequence. Screening and analysis can then be performed based on the frequency of occurrence of the sequence to be analyzed to determine the encoding information of the target sequence, thereby identifying the user corresponding to the voice data. In an embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the voice data. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoded information, thereby improving the success rate of watermark decoding.
[0188] Based on the above embodiment, this embodiment also provides a decoding device, such as Figure 19 As shown, the following modules may be included:
[0189] The speech watermark acquisition module 1902 is used to acquire watermark embedding information from the encoded speech data, where the watermark embedding information consists of a binary sequence.
[0190] The module 1904 for obtaining a sequence to be analyzed is used to select a sequence to be analyzed based on the binary sequence in the watermark embedded information.
[0191] The speech sequence frequency acquisition module 1906 is used to determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence.
[0192] The speech sequence screening module 1908 is used to screen the sequence to be analyzed according to the frequency of occurrence and determine the target sequence for decoding.
[0193] The voice user information acquisition module 1910 is configured to determine corresponding coding information according to the target sequence to determine user information corresponding to the voice data.
[0194] In summary, during the decoding process, this embodiment can obtain watermark embedded information from the encoded voice data, extract the binary sequence in the watermark embedded information, and then filter out the sequence to be analyzed in the binary sequence, and perform a cyclic shift on the extracted binary sequence to obtain a shifted sequence; then, based on the binary sequence and the shifted sequence, the frequency of occurrence of the sequence to be analyzed can be determined, and screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to determine the encoding information corresponding to the target sequence, so as to determine the user corresponding to the voice data. In this embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data, and during the decoding process, the binary sequence is extracted and cyclically shifted, so that the binary sequence in the watermark embedded information can be extracted and the decoding result can be determined according to its frequency of occurrence. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding encoding information, thereby improving the decoding success rate of the watermark.
[0195] Based on the above embodiment, this embodiment also provides an encoding device, such as Figure 20 As shown, the following modules may be included:
[0196] The copyright information acquisition module 2002 is used to acquire the target object to be processed and the copyright information to be added;
[0197] a copyright sequence acquisition module 2004 configured to determine a binary sequence corresponding to the copyright information, wherein the binary sequence belongs to a binary sequence group of the copyright information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the copyright information has a binary sequence group that is distinct from other copyright information;
[0198] The copyright encoding object acquisition module 2006 is used to determine the target quantity corresponding to the copyright information and add a binary sequence of the target quantity as watermark embedding information in the target object to obtain the encoded target object.
[0199] In summary, during the encoding process, this embodiment can convert a user's copyright information into a binary sequence, wherein the binary sequence belongs to a binary sequence group of the copyright information, and the other binary sequences in the binary sequence group are shifted sequences obtained by cyclically shifting the binary sequence. The copyright information has a binary sequence group that is distinct from other copyright information. After determining the binary sequence, a target number of binary sequences can be added to the target object as watermark embedding information. During the decoding process, the watermark embedding information can be obtained from the target object, and the binary sequence in the watermark embedding information can be extracted. The sequence to be analyzed in the binary sequence is then filtered out, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. The frequency of occurrence of the sequence to be analyzed can then be determined based on the binary sequence and the shifted sequence. Screening and analysis can then be performed based on the frequency of occurrence of the sequence to be analyzed to determine the copyright information corresponding to the target sequence. In an embodiment of the present application, during the encoding process, the binary sequence corresponding to the copyright information is repeatedly added to the target object. During the decoding process, the binary sequence is extracted and cyclic shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result is determined according to its frequency of occurrence. Based on the decoding result, the corresponding copyright information is determined. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding.
[0200] Based on the above embodiment, this embodiment also provides a decoding device, such as Figure 21 As shown, the following modules may be included:
[0201] The copyright watermark acquisition module 2102 is used to obtain watermark embedding information from the encoded target object, where the watermark embedding information consists of a binary sequence.
[0202] The sequence extraction module 2104 is used to select the sequence to be analyzed based on the binary sequence in the watermark embedded information.
[0203] The copyright sequence frequency acquisition module 2106 is used to determine the occurrence frequency of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, where other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence.
[0204] The copyright sequence screening module 2108 is used to screen the sequences to be analyzed according to the frequency of occurrence and determine the target sequence for decoding.
[0205] The copyright information determination module 2110 is configured to determine corresponding copyright information based on the target sequence.
[0206] In summary, during the decoding process, this embodiment can obtain watermark embedded information from the encoded target object and extract the binary sequence in the watermark embedded information. Then, the sequence to be analyzed in the binary sequence is screened, and the extracted binary sequence is cyclically shifted to obtain a shifted sequence. Thereafter, the frequency of occurrence of the sequence to be analyzed can be determined based on the binary sequence and the shifted sequence. Screening and analysis can be performed according to the frequency of occurrence of the sequence to be analyzed to determine the copyright information corresponding to the target sequence. In this embodiment of the present application, during the encoding process, the binary sequence is repeatedly added to the data. During the decoding process, the binary sequence is extracted and cyclically shifted. The binary sequence in the watermark embedded information can be extracted, and the decoding result can be determined according to its frequency of occurrence. Then, the corresponding copyright information can be determined based on the decoding result. Even if the binary sequence in the watermark embedded information is partially damaged, decoding can still be performed to obtain the corresponding watermark information, thereby improving the success rate of watermark decoding.
[0207] An embodiment of the present application further provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.
[0208] The present application provides one or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In the present application, the electronic device includes a server, a terminal device, and the like.
[0209] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as a server (cluster), a terminal, etc. Figure 22 An exemplary apparatus 2200 that can be used to implement various embodiments described in this application is schematically illustrated.
[0210] For one embodiment, Figure 22 An exemplary apparatus 2200 is shown having one or more processors 2202, a control module (chip set) 2204 coupled to at least one of the processor(s) 2202, a memory 2206 coupled to the control module 2204, a non-volatile memory (NVM) / storage device 2208 coupled to the control module 2204, one or more input / output devices 2210 coupled to the control module 2204, and a network interface 2212 coupled to the control module 2204.
[0211] The processor 2202 may include one or more single-core or multi-core processors, and the processor 2202 may include any combination of general-purpose processors or dedicated processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 2200 can serve as a server, terminal, or other device described in the embodiments of the present application.
[0212] In some embodiments, the apparatus 2200 may include one or more computer-readable media (e.g., memory 2206 or NVM / storage 2208) having instructions 2214 and one or more processors 2202 configured in conjunction with the one or more computer-readable media to execute the instructions 2214 to implement a module to perform the actions described in the present disclosure.
[0213] For one embodiment, the control module 2204 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 2202 and / or any suitable device or component in communication with the control module 2204 .
[0214] The control module 2204 may include a memory controller module to provide an interface to the memory 2206. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0215] The memory 2206 can be used, for example, to load and store data and / or instructions 2214 for the device 2200. For one embodiment, the memory 2206 can include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 2206 can include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0216] For one embodiment, the control module 2204 may include one or more input / output controllers to provide an interface to the NVM / storage device 2208 and the input / output device(s) 2210 .
[0217] For example, NVM / storage 2208 may be used to store data and / or instructions 2214. NVM / storage 2208 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0218] The NVM / storage device 2208 may include storage resources that are part of the device on which the apparatus 2200 is installed, or it may be accessible to the device without being part of the device. For example, the NVM / storage device 2208 may be accessible over a network via the input / output device(s) 2210.
[0219] (One or more) input / output devices 2210 may provide an interface for the apparatus 2200 to communicate with any other appropriate device. The input / output device 2210 may include a communication component, an audio component, a sensor component, etc. The network interface 2212 may provide an interface for the apparatus 2200 to communicate via one or more networks. The apparatus 2200 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.
[0220] For one embodiment, at least one of the processor(s) 2202 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 2204. For one embodiment, at least one of the processor(s) 2202 may be packaged together with the logic of one or more controllers of the control module 2204 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 2202 may be integrated on the same die with the logic of one or more controllers of the control module 2204. For one embodiment, at least one of the processor(s) 2202 may be integrated on the same die with the logic of one or more controllers of the control module 2204 to form a system-on-chip (SoC).
[0221] In various embodiments, the apparatus 2200 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the apparatus 2200 may have more or fewer components and / or a different architecture. For example, in some embodiments, the apparatus 2200 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0222] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in the memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.
[0223] An embodiment of the present application further provides an electronic device, comprising: a processor; and a memory on which executable code is stored. When the executable code is executed, the processor executes one or more methods described in the embodiments of the present application.
[0224] The embodiments of the present application further provide one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.
[0225] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0226] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0227] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0228] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0229] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0230] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0231] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only 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 terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0232] The above is a detailed introduction to an encoding method, a decoding method, a data generation method, an encoding device, a decoding device, a data generation device, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A coding method, characterized in that: The method includes: Get the encoding information; Determining a binary sequence corresponding to the coded information, where the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information; Determine the target number corresponding to the coded information, and repeat the binary sequence in the target object according to the target number as watermark embedded information, so that in the decoding process, the sequence to be analyzed existing in the coding comparison table is screened out from the watermark embedded information according to the sequence length, and determine the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, and determine the decoding result according to the frequency of occurrence of the binary sequence.
2. The method according to claim 1, characterized in that The determining of the binary sequence corresponding to the coded information includes: Obtaining a coding comparison table, wherein the coding comparison table includes a correspondence between coding information and binary sequences; Determine a corresponding binary sequence based on the coding information and the coding comparison table.
3. The method according to claim 2, characterized in that It also includes the steps for generating the encoding comparison table: Determine the sequence length condition; Determine a binary sequence that meets the sequence length condition; Performing cyclic shift processing on the binary sequence that meets the sequence length condition to obtain a shifted sequence; Match the binary sequence and the shift sequence with other binary sequences in the encoding comparison table respectively; When the matching result meets the preset matching condition, the binary sequence is added to the encoding comparison table until the binary sequence that meets the sequence length condition is traversed.
4. The method according to claim 1, wherein Determining the target quantity corresponding to the coded information includes: The corresponding target quantity is determined according to the watermark length of the watermark and the sequence length of the binary sequence.
5. The method according to claim 1, wherein The target object includes at least one of audio data and image data.
6. A decoding method, characterized in that: The method includes: Acquire watermark embedding information from a target object, wherein the watermark embedding information consists of a binary sequence; Traversing the watermark embedded information according to the sequence length to extract the corresponding binary sequence; based on the extracted binary sequence, screening out the sequence to be analyzed that exists in the coding comparison table, wherein the coding comparison table contains the correspondence between the coding information and the binary sequence; Determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by performing cyclic shift processing on the binary sequence; Sort the sequences to be analyzed according to their corresponding frequencies of occurrence; Screening and ranking target sequences that meet preset conditions; Corresponding coding information is determined according to the target sequence.
7. The method according to claim 6, characterized in that The determining, based on the binary sequence and the binary sequence group to which it belongs, the occurrence frequency of the sequence to be analyzed in the watermark embedded information includes: Obtain a binary sequence group of the sequence to be analyzed; Determine the binary sequence group to which the binary sequence belongs, and update the occurrence frequency of the sequence to be analyzed.
8. The method according to claim 6, characterized in that The determining, based on the binary sequence and the binary sequence group to which it belongs, the occurrence frequency of the sequence to be analyzed in the watermark embedded information includes: Performing a cyclic shift process on the binary sequence to obtain a shifted sequence; determining a binary sequence group of a binary sequence according to the binary sequence and a shift sequence of the binary sequence; Each binary sequence in the binary sequence group is analyzed to determine a matching sequence to be analyzed, and the occurrence frequency of the matching sequence to be analyzed is updated.
9. The method according to claim 6, characterized in that The step of obtaining watermark embedding information from the target object includes: According to the watermark length, corresponding watermark embedding information is extracted from a target object, where the target object includes at least one of audio data and image data.
10. A data generation method, characterized in that: include: Get the sequence length condition of the binary sequence; Determine a binary sequence that meets the sequence length condition; Performing cyclic shift processing on the binary sequence that meets the sequence length condition to obtain a shifted sequence; Match the binary sequence and the shift sequence with other binary sequences in the encoding comparison table respectively; When the matching result meets the preset matching conditions, the binary sequence is bound to the information to be encoded and added to the encoding comparison table until the binary sequence that meets the sequence length condition is traversed. The binary sequence corresponding to the encoded information is repeated as watermark embedded information according to the target number during the encoding process, and the sequence to be analyzed in the encoding comparison table is screened out from the watermark embedded information according to the sequence length during the decoding process. The frequency of occurrence of the sequence to be analyzed in the watermark embedded information is determined based on the binary sequence and the binary sequence group to which it belongs, and the decoding result is determined according to the frequency of occurrence of the binary sequence.
11. A coding method, characterized in that: include: Get the live broadcast data to be processed and the host's encoding information; Determining a binary sequence corresponding to the coded information, where the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information; A target number corresponding to the encoding information is determined, and the binary sequence is repeated in the live broadcast data as watermark embedded information according to the target number to obtain the encoded live broadcast data, so that during the decoding process, the sequence to be analyzed existing in the encoding comparison table is screened out from the watermark embedded information according to the sequence length, and the frequency of occurrence of the sequence to be analyzed in the watermark embedded information is determined based on the binary sequence and the binary sequence group to which it belongs, and the decoding result is determined according to the frequency of occurrence of the binary sequence.
12. A decoding method, characterized in that: include: Acquire watermark embedding information from the encoded live broadcast data, wherein the watermark embedding information consists of a binary sequence; Traversing the watermark embedded information according to the sequence length to extract the corresponding binary sequence; based on the extracted binary sequence, screening out the sequence to be analyzed that exists in the coding comparison table, wherein the coding comparison table contains the correspondence between the coding information and the binary sequence; Determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by performing cyclic shift processing on the binary sequence; Sort the sequences to be analyzed according to their corresponding frequencies of occurrence; Screening and ranking target sequences that meet preset conditions; The corresponding coding information is determined according to the target sequence to determine the anchor corresponding to the live broadcast data.
13. A coding method, characterized in that: include: Obtain the voice data to be processed and the user's encoding information; Determining a binary sequence corresponding to the coded information, where the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information; A target number corresponding to the coding information is determined, and the binary sequence is repeated as watermark embedding information in the audio data of the speech data according to the target number to obtain the coded speech data, so that in the decoding process, the sequence to be analyzed existing in the coding comparison table is screened out from the watermark embedding information according to the sequence length, and the frequency of occurrence of the sequence to be analyzed in the watermark embedding information is determined based on the binary sequence and the binary sequence group to which it belongs, and the decoding result is determined according to the frequency of occurrence of the binary sequence.
14. A decoding method, characterized in that: include: Obtaining watermark embedding information from the encoded speech data, wherein the watermark embedding information consists of a binary sequence; Traversing the watermark embedded information according to the sequence length to extract the corresponding binary sequence; based on the extracted binary sequence, screening out the sequence to be analyzed that exists in the coding comparison table, wherein the coding comparison table contains the correspondence between the coding information and the binary sequence; Determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by performing cyclic shift processing on the binary sequence; Sort the sequences to be analyzed according to their corresponding frequencies of occurrence; Screening and ranking target sequences that meet preset conditions; Corresponding coding information is determined according to the target sequence to determine the user corresponding to the voice data.
15. A coding method, characterized in that: include: Get the target object to be processed and the copyright information to be added; Determining a binary sequence corresponding to the copyright information, where the binary sequence belongs to a binary sequence group of the copyright information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the copyright information has a binary sequence group that is different from other copyright information; The target number corresponding to the copyright information is determined, and the binary sequence is repeated in the target object according to the target number as watermark embedding information to obtain the encoded target object, so that in the decoding process, the sequence to be analyzed existing in the encoding comparison table is screened out from the watermark embedding information according to the sequence length, and the frequency of occurrence of the sequence to be analyzed in the watermark embedding information is determined based on the binary sequence and the binary sequence group to which it belongs, and the decoding result is determined according to the frequency of occurrence of the binary sequence.
16. A decoding method, characterized in that: include: Acquire watermark embedding information from the encoded target object, wherein the watermark embedding information consists of a binary sequence; Traversing the watermark embedded information according to the sequence length to extract the corresponding binary sequence; based on the extracted binary sequence, screening out the sequence to be analyzed that exists in the coding comparison table, wherein the coding comparison table contains the correspondence between the coding information and the binary sequence; Determining the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on the binary sequence and the binary sequence group to which it belongs, wherein other binary sequences in the binary sequence group are shifted sequences obtained by performing cyclic shift processing on the binary sequence; Sort the sequences to be analyzed according to their corresponding frequencies of occurrence; Screening and ranking target sequences that meet preset conditions; According to the target sequence, corresponding copyright information is determined.
17. An encoding device, characterized in that: include: An information acquisition module, used to obtain coding information; a sequence acquisition module, configured to determine a binary sequence corresponding to the coded information, wherein the binary sequence belongs to a binary sequence group of the coded information, other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence, and the coded information has a binary sequence group that is different from other coded information; The coding object acquisition module is used to determine the target number corresponding to the coding information and repeat the binary sequence in the target object according to the target number as watermark embedding information, so that during the decoding process, the sequence to be analyzed existing in the coding comparison table can be screened out from the watermark embedding information according to the sequence length, and the frequency of occurrence of the sequence to be analyzed in the watermark embedding information can be determined based on the binary sequence and the binary sequence group to which it belongs, and the decoding result can be determined according to the frequency of occurrence of the binary sequence.
18. A decoding device, characterized in that: include: A watermark acquisition module is used to obtain watermark embedding information from a target object, wherein the watermark embedding information consists of a binary sequence; A sequence screening module for analysis is used to traverse the watermark embedded information according to the sequence length and extract the corresponding binary sequence; based on the extracted binary sequence, the sequence to be analyzed that exists in the coding comparison table, wherein the coding comparison table contains the correspondence between the coding information and the binary sequence; a sequence frequency acquisition module, configured to determine the frequency of occurrence of the sequence to be analyzed in the watermark embedded information based on a binary sequence and a binary sequence group to which it belongs, wherein the other binary sequences in the binary sequence group are shifted sequences obtained by cyclic shifting the binary sequence; The sequence screening module is used to sort the sequences to be analyzed according to the corresponding occurrence frequency of the sequences to be analyzed; and to screen the target sequences that meet the preset conditions; The decoding result acquisition module is used to determine the corresponding encoding information according to the target sequence.
19. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to perform the method according to any one of claims 1 to 16.
20. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
PDF format based adaptive text watermarking method
CN105303075A