CN109784006A - Watermark insertion and extracting method and terminal device - Google Patents

Watermark insertion and extracting method and terminal device Download PDF

Info

Publication number
CN109784006A
CN109784006A CN201910008098.8A CN201910008098A CN109784006A CN 109784006 A CN109784006 A CN 109784006A CN 201910008098 A CN201910008098 A CN 201910008098A CN 109784006 A CN109784006 A CN 109784006A
Authority
CN
China
Prior art keywords
watermark
polynomial function
value
watermark information
embedded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910008098.8A
Other languages
Chinese (zh)
Inventor
朱照华
王健宗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910008098.8A priority Critical patent/CN109784006A/en
Publication of CN109784006A publication Critical patent/CN109784006A/en
Priority to PCT/CN2019/118688 priority patent/WO2020140636A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The present invention relates to field of computer technology, a kind of watermark insertion and extracting method and terminal device are provided.This method comprises: the default division number according to watermark information determines the number of polynomial function to be built, and chooses multiple numerical value as coefficient every in the polynomial function, the polynomial function is constructed;Functional value of the polynomial function when independent variable takes zero is the decimal representation value of watermark information;Multiple real number values are chosen as element, form real number set;Element each in the real number set is substituted into the polynomial function respectively, calculate and saves the corresponding functional value of each element;Element each in the real number set is embedded into file destination;Each element and the corresponding functional value of each element are for extracting the watermark information.The present invention can enhance the ability that attack is resisted in watermark, so that still therefrom can completely extract the content of watermark after file destination is subject to biggish change.

Description

Watermark insertion and extracting method and terminal device
Technical field
The present invention relates to field of computer technology more particularly to a kind of watermark insertion and extracting method and terminal devices.
Background technique
Copyright protection always has been since digital times by one of people institute issues that need special attention, is nowadays emphasizing to count According in the epoch with resource-sharing, any data uploaded in internet have by the risk that the third party steals and distorts, Even if the publisher of these data and resource is illustrated the right to use of these data when issuing data, but these Data carry out version by the method that can not be also proved to its real owner after the unauthorized use of third party, therefore seek Power protection is an important research direction of current data security arts, especially in nowadays more and more concerned music copyright Protection field.
Digital watermark technology is a kind of strong copy-right protection method, and presently, existing digital watermark can divide For two classes, the first kind is visible watermarking technique, as its name suggests, it is seen that watermark can be seen by third party, although it can be one Determine to protect file in degree, but the presence of itself is easy to incur the attack of malicious third parties, and sometimes may be used Water breakthrough prints the feature that can destroy data script, such as the visible watermark in picture, audio and document more or less can all influence Its vision or auditory effect;Another kind of is invisible watermark technology, other people are very other than insertion person for this digital watermark Its presence of hardly possible discovery, therefore can be to data offer preferably protection compared to its for visible watermark, and will not influence data The feature of script.But the ability that the file after current insertion invisible watermark information resists attack is poor, by such as secondary Coding, audio interception etc. attack operations when, watermark is difficult to restore.
Summary of the invention
In view of this, the embodiment of the invention provides watermark insertion and extracting method and terminal device, it is embedding at present to solve File after entering invisible watermark information resists the poor problem of ability of attack.
The first aspect of the embodiment of the present invention provides watermark embedding method, comprising:
The number of polynomial function to be built is determined according to the default division number of watermark information, and chooses multiple numerical value As coefficient every in the polynomial function, the polynomial function is constructed;The polynomial function takes zero in independent variable When functional value be watermark information decimal representation value;
Multiple real number values are chosen as element, composition building real number set;The number of element is equal in the real number set The default division number;
Element each in the real number set is substituted into the polynomial function respectively, calculate and saves each element is corresponding Functional value;
Element each in the real number set is embedded into file destination;Each element and each element pair The functional value answered is for extracting the watermark information.
The second aspect of the embodiment of the present invention provides watermark extracting method, comprising:
From the element for extracting at least predetermined number being embedded into the file destination in file destination;
Obtain the corresponding functional value of element of at least predetermined number described in saving in watermark information telescopiny;
It is determined according to the corresponding functional value of the element of the element of at least predetermined number and at least predetermined number Polynomial function in watermark information telescopiny;
The watermark letter for being embedded in the file destination is determined according to functional value of the polynomial function when independent variable takes zero Breath.
The third aspect of the embodiment of the present invention provides watermark embedding device, comprising:
First building module, time of polynomial function to be built is determined for the default division number according to watermark information Number, and multiple numerical value are chosen as coefficient every in the polynomial function, construct the polynomial function;The multinomial Functional value of the function when independent variable takes zero is the decimal representation value of watermark information;
Second building module forms real number set for choosing multiple real number values as element;It is first in the real number set The number of element is equal to the default division number;
Memory module is calculated and is protected for element each in the real number set to be substituted into the polynomial function respectively Deposit the corresponding functional value of each element;
It is embedded in module, for element each in the real number set to be embedded into file destination;Each element and The corresponding functional value of each element is for extracting the watermark information.
The fourth aspect of the embodiment of the present invention provides watermark extraction apparatus, comprising:
Extraction module, for from the member for extracting at least predetermined number being embedded into the file destination in file destination Element;
Obtain module, for obtains saved in watermark information telescopiny described at least predetermined number element correspondence Functional value;
First processing module, for the element pair according at least element of predetermined number and at least predetermined number The functional value answered determines the polynomial function in watermark information telescopiny;
Second processing module, for being determined described in insertion according to functional value of the polynomial function when independent variable takes zero The watermark information of file destination.
5th aspect of the embodiment of the present invention provides computer readable storage medium, the computer readable storage medium It is stored with computer program, the watermark embedding method in first aspect is realized when the computer program is executed by processor, or Person realizes the watermark extracting method in second aspect.
6th aspect of the embodiment of the present invention provides terminal device, including memory, processor and is stored in described In memory and the computer program that can run on the processor, the processor are realized when executing the computer program Watermark embedding method in first aspect, or realize the watermark extracting method in second aspect.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention passes through building multinomial Function and real number set, wherein functional value of the polynomial function when independent variable takes zero is the decimal representation of watermark information Value;Element each in real number set is embedded into file destination, calculate and saves the corresponding functional value of each element so as to right Watermark information extracts, and realizes the insertion of watermark information, can enhance the ability that attack is resisted in watermark, so that in file destination Be subject to biggish change still therefrom can completely extract the content of watermark later.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart of watermark embedding method provided in an embodiment of the present invention;
Fig. 2 is that element each in real number set is embedded into target text in watermark embedding method provided in an embodiment of the present invention Implementation flow chart in part;
Fig. 3 is in watermark embedding method provided in an embodiment of the present invention by the corresponding binary system of element each in real number set Numerical value is embedded into the implementation flow chart of the instructions of note in MIDI file;
Fig. 4 is the implementation flow chart of watermark extracting method provided in an embodiment of the present invention;
Fig. 5 is to extract to be embedded into file destination from file destination in watermark extracting method provided in an embodiment of the present invention In at least predetermined number element implementation flow chart;
Fig. 6 is the schematic diagram of watermark embedding device provided in an embodiment of the present invention;
Fig. 7 is the schematic diagram of watermark extraction apparatus provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
In the present embodiment, the executing subject of watermark embedding method and the executing subject of watermark extracting method can be same Terminal device, or different terminal devices is not limited thereto.For example, water can be executed in first terminal equipment It prints embedding grammar and watermark insertion is carried out to file destination, and execute watermark extracting method to target text in first terminal equipment Part carries out watermark extracting;Or can be executed in first terminal equipment watermark embedding method to file destination carry out watermark it is embedding Enter, watermark extracting method is executed in second terminal equipment, watermark extracting is carried out to file destination.
For purposes of illustration only, being illustrated for carrying out watermark insertion and watermark extracting to MIDI file.First to needs The parameter of explanation does a definition: defining A={ a1,a2,…,aLAIt is the instructions of note information stored in MIDI file, including Note opens (Note-on), note closes the instruction of (Note-off) two class, LAFor the quantity of instructions of note in MIDI file.At one In instructions of note, usually there is two-part information to may be used as the insertion of watermark, is dynamics field v and time identifier respectively Field d, wherein the length of dynamics field is 8bit, and the length of time identifier field is uncertain;The watermark information W=for needing to be embedded in {wi=0 or 1 | i=1,2 ... LW, LWFor the length of watermark information.
Music content is the form tissue instructed with MIDI in the file of midi format, for a note It says, includes following information in corresponding MIDI instruction: channel number (MIDI channel), pitch (pitch), dynamics (velocity), event type (event type) and duration (delta tine).In these information channel number, Content in event type field is stringent related to MIDI coding, is likely to result in code error if modification;Pitch field What is reflected in music is the sound that we can hear, the basic unit of this field is semitone in MIDI, therefore to this The modification of a field can cause bigger influence to final music effect;Dynamics and the two fields of duration it is basic Unit very little is modified the two fields in general not recognizing in human ear by a small margin and, so the two Field is relatively appropriate for watermark insertion.
Fig. 1 is the implementation flow chart of watermark embedding method provided in an embodiment of the present invention, and details are as follows:
S101 determines the number of polynomial function to be built according to the default division number of watermark information, and chooses more A numerical value constructs the polynomial function as coefficient every in the polynomial function;The polynomial function is becoming certainly Functional value when measuring zero is the decimal representation value of watermark information.
In the present embodiment, the default division number of watermark information can be obtained first.Default division part of watermark information Number refers to the number for being divided into watermark information, which can be randomly provided or set according to other rules It sets, is not limited thereto.There are relationships between the default division number and the number of polynomial function to be built of watermark information Formula can determine the number of polynomial function to be built according to the default division number of relational expression and watermark information.It can be by According to default selection rule or multiple numerical value are randomly selected as coefficient every in polynomial function, wherein default selection rule It can determine, be not limited thereto according to actual needs.Polynomial function is used for the decomposer as watermark information to watermark information It decomposes.
S102 chooses multiple real number values as element, composition building real number set.The number of element in the real number set Equal to the default division number.
In the present embodiment, multiple real number values can be randomly selected in default value range as element, composition building Real number set.The number of element is equal to the default division number of watermark information in real number set.If such as watermark information is pre- If dividing number is 12 parts, then 12 real number value composition real number sets can be randomly selected, i.e. the real number set includes 12 members Element, each element are a real number value.Element in real number set is for being embedded into file destination, to realize that watermark is embedded in.
Optionally, the number of the polynomial function is k-1 times, and the total number of element is u in the real number set, wherein U=2k -1;K is the integer greater than 1.
In the present embodiment, the number u for dividing the watermark information can be determined at random first, wherein u > 1, then at random A k -1 order polynomial function f (x) is constructed, so that f (0)=b, b are watermark information decimal representation value, following formula can be passed through It is calculated:
Wherein, W={ wi=0 or 1 | i=1,2 ... LWIt is the watermark information for needing to be embedded in, LWFor the length of watermark information Degree.
Element each in the real number set is substituted into the polynomial function respectively, calculates and save each member by S103 The corresponding functional value of element.
It in the present embodiment, can be respectively using each element in real number set as the unknown quantity of polynomial function Value, is updated in polynomial function, the functional value of corresponding polynomial function is calculated, and save these functional values.
Optionally, the real number set is X={ x1,x2,…,xu,Wherein, U is the total number of element in the real number set;Lw is the data length of the watermark information;P is embedding parameter.
In the present embodiment, p is embedding parameter, is determined by actual parameter selected in telescopiny, is expressed as target The digit for the element being embedded among each instructions of note information of file, value can be defaulted as 2.In addition, in real number set X In, each element is different.
Wherein, why setting such value range is to guarantee all xiValue after being converted into binary system all Length having the same, to facilitate the extraction operation of watermark.Value other than this range can also be chosen in principle, Bu Guoru Fruit needs additional information to record each watermark location information if choosing, and extraction process is more cumbersome, in this respect So by xiValue constrains in the range.
The value range of real number set interior element is determined by the length of embedding parameter and watermark information, can make set of real numbers It closes interior element and is converted into length having the same after binary system, it is convenient to member convenient for determining the length of element during the extraction process The extraction operation of element.
Element each in the real number set is embedded into file destination by S104;Each element and described each The corresponding functional value of element is for extracting the watermark information.
For example, for each of set X element xi, its corresponding value in f (x) is calculated, Y={ y is denoted as1, y2,…,yu}.For each of set X element xi, embed it in MIDI file, for each of set Y Element yi, can be recorded in local storage or server, for the extraction to watermark information.
In watermark information extraction process, each element can be extracted from file destination, then according to each element And the corresponding functional value of each element of record determines the polynomial function in telescopiny, determines further according to polynomial function Watermark information realizes the extraction of watermark information.
The embodiment of the present invention is by building polynomial function and real number set, and wherein polynomial function takes zero in independent variable When functional value be watermark information decimal representation value;Element each in real number set is embedded into file destination, is calculated And the corresponding functional value of each element is saved to extract to watermark information, it realizes the insertion of watermark information, can enhance The ability of attack is resisted in watermark, so that still therefrom can completely extract water outlet after file destination is subject to biggish change The content of print.
As an embodiment of the present invention, the file destination is MIDI file, as shown in Fig. 2, S104 may include:
Element each in the real number set is converted to corresponding binary numeral by S201.
S202, it is successively that element each in the real number set is corresponding according to the time sequencing of instructions of note in MIDI file Binary numeral be embedded into the instructions of note in the MIDI file.
It in the present embodiment, can be according to the time sequencing that instructions of note in MIDI file occurs successively by real number set X In element insertion, be that element each in real number set X is converted to binary data by real number value to be then inserted into herein.
As an embodiment of the present invention, the instructions of note includes dynamics parameter and/or time identifier parameter;Such as figure Shown in 3, S202 may include:
S301, according to the time sequencing of instructions of note in MIDI file determine in each instructions of note dynamics parameter and/or The corresponding bit numerical value of time identifier parameter;Wherein, the bit numerical value is that each element is corresponding in the real number set Binary numeral one digit number value;
S302 replaces with last bit value of dynamics parameter in each instructions of note and/or time identifier parameter pair The bit numerical value answered.
In the present embodiment, for each of MIDI file instructions of note ai, watermark information is in insertion wherein Journey can be divided into two parts:
For dynamics parameter v, last parameter v of its binary representation is modified8, specific modification process is
Wherein ojIndicate the watermark bit bit value being embedded in required for the position.
For time identifier parameter d, modifies by the way of as dynamics parameter, specifically modify process For
Wherein ojIndicate the watermark bit bit value being embedded in required for the position, dj indicates last of time identifier parameter The binary value of position.
Citing is illustrated this telescopiny, it is assumed that a MIDI instructions of note dynamics parameter value is 94, time identifier Parameter value is 1024, and corresponding binary data is respectively ' 01011110 ' and ' 10000000000 '.If in this note ' 10 ' are embedded in instruction, then the parameter after insertion becomes 95 (01011111) and 1024 (10000000000).
The present embodiment replaces with last bit value of dynamics parameter in each instructions of note and/or time identifier parameter Corresponding bit numerical value, this embedded mode are smaller for the modification of carrier, facilitate insertion, and are embedded in the file after watermark Substantially it will not be discovered by human ear, hearer will not be influenced to the auditory effect of MIDI file because of insertion watermark.
Fig. 4 is the implementation flow chart of watermark extracting method provided in an embodiment of the present invention, and details are as follows:
S401, from the element for extracting at least predetermined number being embedded into the file destination in file destination.
In the present embodiment, in watermark extraction process, at least predetermined number can be extracted from file destination first Element.Wherein, the Partial Elements that watermark extracting method provided in this embodiment only needs to be embedded in can be achieved with extracting, wherein presetting Number is that required minimum element number is successfully extracted in watermark, and lower than predetermined number, then watermark extracting fails.Predetermined number can To be determined according to the element total number of insertion.
Optionally, the total number of the element being embedded into the file destination is u, and the predetermined number is k, wherein U=2k -1;K is the integer greater than 1.
It in the present embodiment, can be true by the total number for the element being embedded into file destination according to relational expression u=2k -1 Make the value of predetermined number k.
As an embodiment of the present invention, the file destination is MIDI file, the instructions of note of the MIDI file Including dynamics parameter and/or time identifier parameter;As shown in figure 5, S401 may include:
S501 extracts last bit value of the dynamics parameter of each instructions of note in MIDI file, forms First ray; And/or last bit value of the duration parameters of each instructions of note in MIDI file is extracted, form the second sequence.
For example, last bit value that MIDI file each of works as the dynamics parameter of instructions of note can be extracted, it will It is combined as a string of binary code m1;Each instructions of note duration parameters is last in extraction MIDI file One digit number value is combined into a string of binary sequence m2.
S502, according to the data length information in watermark information telescopiny to the First ray and/or described Two sequences are divided, and obtain being embedded into each element in the file destination.
In the present embodiment, the data length information in watermark information telescopiny may include being embedded into file destination The total number u of element, the data length lw of watermark information and embedding parameter p.It can be according in watermark information telescopiny In data length information determine the data length of each element, then First ray and/or the second sequence are divided.
For example, can successively extract the element being embedded into instructions of note information, then basis by taking MIDI file as an example Length of element formulaObtain each element in real number set X, wherein the relevant information for calculating elements length P and u is used as in local storage or server record after determining in telescopiny assists extraction.Basis is drawn in m1 and m2 The length of element divided, which carries out data division, can be obtained each element.
S503 chooses the element of predetermined number from each element being embedded into the file destination.
In the present embodiment, the member of predetermined number can be randomly selected from each element being embedded into file destination Element, or according to the element of certain rule selection predetermined number, be not limited thereto.
S402 obtains the corresponding function of element of at least predetermined number described in saving in watermark information telescopiny Value.
In the present embodiment, the corresponding functional value of calculated each element can be stored in watermark information telescopiny In local storage or in the database of server, can be obtained from local storage or server in watermark extraction process to The corresponding functional value of element of few predetermined number.
For example, choosing k element { x in the element of division1,x2,…,xkAnd in local or server to find its right Functional value { the y answered1,y2,…,yk}。
S403, the corresponding functional value of element according to the element of at least predetermined number and at least predetermined number are true The polynomial function being scheduled in watermark information telescopiny.
It in the present embodiment, can be according to the corresponding function of element of the element and at least predetermined number of at least predetermined number Value determines in watermark information telescopiny as the polynomial function of decomposer.
It is alternatively possible to according to the element of at least predetermined number, the corresponding letter of element of at least predetermined number Numerical value and Lagrangian difference value equation determine the polynomial function in watermark information telescopiny.
S404 determines the water for being embedded in the file destination according to functional value of the polynomial function when independent variable takes zero Official seal breath.
For example, formula can be passed throughThe formula of evaluator function, wherein The binary form for finally reverting to the constant term of polynomial function formula is exactly watermark information Binary value.
The embodiment of the present invention is by from the member for extracting at least predetermined number being embedded into file destination in file destination Element is determined according to the corresponding functional value of the element of the element of at least predetermined number and at least predetermined number and was embedded in watermark information Polynomial function in journey determines the watermark information of insertion file destination further according to polynomial function, realizes mentioning for watermark information It takes.The embodiment of the present invention can be achieved with the extraction to watermark information according to the element of at least predetermined number, without whole members Element can enhance the ability that attack is resisted in watermark, so that still can be therefrom complete after file destination is subject to biggish change The whole content for extracting watermark.
The embodiment of the present invention is embedded in using a kind of MIDI file self-adapting watermarking based on Shamir algorithm and extracting method, The main masking effect using human auditory controls the code field of the partial redundance in MIDI file format coding and part The code field of acoustic information processed carries out the insertion of watermark, while being shared to watermark in MIDI file not using Shamir algorithm The ability attacked is resisted to enhance watermark in the code field of note, is allowed to be subject to biggish change in bearer documents The content of watermark still therefrom can be completely extracted afterwards, and advantage is:
1) this method watermark belongs to invisible watermark, therefore this method has good invisibility, the third party of malice The presence of watermark can not be judged by the sense of hearing, therefore better copyright protection can be provided to a certain extent.
2) watermark information dispersion has been embedded into the various pieces of MIDI music file by this method, and only needs therein Partial information can complete the extraction of watermark information, therefore even if the file after insertion watermark information is intercepted or because of secondary Coding loss partial information, we still can be by watermark recovery.The watermark has stronger robustness, can resist common Attack, such as secondary coding, the attack operations such as audio interception, therefore there is good practicability.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Corresponding to watermark embedding method described in foregoing embodiments, it is embedding that Fig. 6 shows watermark provided in an embodiment of the present invention Enter the schematic diagram of device.For ease of description, only the parts related to this embodiment are shown.
Referring to Fig. 6, which includes that the first building module 61, second constructs module 62, memory module 63 and insertion module 64。
First building module 61, for determining polynomial function to be built according to the default division number of watermark information Number, and multiple numerical value are chosen as coefficient every in the polynomial function, construct the polynomial function;It is described multinomial Functional value of the formula function when independent variable takes zero is the decimal representation value of watermark information.
Second building module 62 forms real number set for choosing multiple real number values as element;In the real number set The number of element is equal to the default division number.
Memory module 63 calculates simultaneously for element each in the real number set to be substituted into the polynomial function respectively Save the corresponding functional value of each element.
It is embedded in module 64, for element each in the real number set to be embedded into file destination;Each element Functional value corresponding with each element is for extracting the watermark information.
Optionally, the file destination is MIDI file, and the insertion module 64 is used for:
Element each in the real number set is converted into corresponding binary numeral;
According to the time sequencing of instructions of note in MIDI file successively by element corresponding two each in the real number set Binary value is embedded into the instructions of note in the MIDI file.
Optionally, the instructions of note includes dynamics parameter and/or time identifier parameter;The insertion module 64 is used for:
Dynamics parameter and/or time mark in each instructions of note are determined according to the time sequencing of instructions of note in MIDI file Know the corresponding bit numerical value of parameter;Wherein, the bit numerical value be the real number set in each element corresponding two into The one digit number value of numerical value processed;
Last bit value of dynamics parameter in each instructions of note and/or time identifier parameter is replaced with into corresponding ratio Special bit value.
The embodiment of the present invention is by building polynomial function and real number set, and wherein polynomial function takes zero in independent variable When functional value be watermark information decimal representation value;Element each in real number set is embedded into file destination, is calculated And the corresponding functional value of each element is saved to extract to watermark information, it realizes the insertion of watermark information, can enhance The ability of attack is resisted in watermark, so that still therefrom can completely extract water outlet after file destination is subject to biggish change The content of print.
Corresponding to watermark extracting method described in foregoing embodiments, Fig. 7 shows watermark provided in an embodiment of the present invention and mentions Take the schematic diagram of device.For ease of description, only the parts related to this embodiment are shown.
Referring to Fig. 7, which includes extraction module 71, obtains module 72, first processing module 73 and Second processing module 74。
Extraction module 71, for from extracting at least predetermined number being embedded into the file destination in file destination Element.
Obtain module 72, for obtain saved in watermark information telescopiny described at least predetermined number element pair The functional value answered.
First processing module 73, for the element according at least element of predetermined number and at least predetermined number Corresponding functional value determines the polynomial function in watermark information telescopiny.
Second processing module 74, for determining insertion institute according to functional value of the polynomial function when independent variable takes zero State the watermark information of file destination.
Optionally, the file destination be MIDI file, the instructions of note of the MIDI file include dynamics parameter and/or Time identifier parameter;The extraction module 71 is used for:
Last bit value of the dynamics parameter of each instructions of note in MIDI file is extracted, First ray is formed;With/ Or, extracting last bit value of the duration parameters of each instructions of note in MIDI file, the second sequence is formed;
According to the data length information in watermark information telescopiny to the First ray and/or second sequence It is divided, obtains being embedded into each element in the file destination;
The element of predetermined number is chosen from each element being embedded into the file destination.
Optionally, the first processing module 73 is used for:
It is bright according to the element of at least predetermined number, the corresponding functional value of element of at least predetermined number and glug Polynomial function of the day difference value equation determination in watermark information telescopiny.
The embodiment of the present invention is by from the member for extracting at least predetermined number being embedded into file destination in file destination Element is determined according to the corresponding functional value of the element of the element of at least predetermined number and at least predetermined number and was embedded in watermark information Polynomial function in journey determines the watermark information of insertion file destination further according to polynomial function, realizes mentioning for watermark information It takes.The embodiment of the present invention can be achieved with the extraction to watermark information according to the element of at least predetermined number, without whole members Element can enhance the ability that attack is resisted in watermark, so that still can be therefrom complete after file destination is subject to biggish change The whole content for extracting watermark.
Fig. 8 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in figure 8, the terminal of the embodiment is set Standby 8 include: processor 80, memory 81 and are stored in the meter that can be run in the memory 81 and on the processor 80 Calculation machine program 82, such as program.The processor 80 realizes that above-mentioned watermark embedding method is real when executing the computer program 82 Apply the step in example, such as step of the step 101 shown in FIG. 1 into 104, and/or the above-mentioned watermark extracting method embodiment of realization Suddenly, such as step 401 shown in Fig. 4 is to 404.Alternatively, the processor 80 realized when executing the computer program 82 it is above-mentioned The function of each module/unit in each Installation practice, such as module shown in the function and/or Fig. 7 of module 61 to 64 shown in Fig. 6 71 to 74 function.
Illustratively, the computer program 82 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 81, and are executed by the processor 80, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 82 in the terminal device 8 is described.
The terminal device 8 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 80, memory 81.It will be understood by those skilled in the art that Fig. 8 The only example of terminal device 8 does not constitute the restriction to terminal device 8, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net Network access device, bus, display etc..
Alleged processor 80 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 81 can be the internal storage unit of the terminal device 8, such as the hard disk or interior of terminal device 8 It deposits.The memory 81 is also possible to the External memory equipment of the terminal device 8, such as be equipped on the terminal device 8 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 81 can also both include the storage inside list of the terminal device 8 Member also includes External memory equipment.The memory 81 is for storing needed for the computer program and the terminal device Other programs and data.The memory 81 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the meter The content that calculation machine readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, Such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and electricity Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of watermark embedding method characterized by comprising
The number of polynomial function to be built is determined according to the default division number of watermark information, and chooses multiple numerical value conducts Every coefficient in the polynomial function, constructs the polynomial function;The polynomial function is when independent variable takes zero Functional value is the decimal representation value of the watermark information;
Multiple real number values are chosen as element, form real number set;The number of element is equal to described default in the real number set Divide number;
Element each in the real number set is substituted into the polynomial function respectively, calculate and saves the corresponding letter of each element Numerical value;
Element each in the real number set is embedded into file destination;Each element and each element are corresponding Functional value is for extracting the watermark information.
2. the watermark embedding method as described in claim 1, which is characterized in that the file destination is MIDI file, described Element each in the real number set is embedded into file destination and includes:
Element each in the real number set is converted into corresponding binary numeral;
According to the time sequencing of instructions of note in MIDI file successively by the corresponding binary system of element each in the real number set Numerical value is embedded into the instructions of note in the MIDI file.
3. watermark embedding method as claimed in claim 2, which is characterized in that the instructions of note include dynamics parameter and/or Time identifier parameter;The time sequencing according to instructions of note in MIDI file is successively by element each in the real number set The instructions of note that corresponding binary numeral is embedded into the MIDI file includes:
Dynamics parameter and/or time identifier ginseng in each instructions of note are determined according to the time sequencing of instructions of note in MIDI file The corresponding bit numerical value of number;Wherein, the bit numerical value is the corresponding binary number of element each in the real number set The one digit number value of value;
Last bit value of dynamics parameter in each instructions of note and/or time identifier parameter is replaced with into corresponding bit Numerical value.
4. a kind of watermark extracting method characterized by comprising
From the element for extracting at least predetermined number being embedded into the file destination in file destination;
Obtain the corresponding functional value of element of at least predetermined number described in saving in watermark information telescopiny;
It is determined according to the corresponding functional value of the element of the element of at least predetermined number and at least predetermined number in watermark Polynomial function in information telescopiny;
The watermark information for being embedded in the file destination is determined according to functional value of the polynomial function when independent variable takes zero.
5. watermark extracting method as claimed in claim 4, which is characterized in that the file destination is MIDI file, described The instructions of note of MIDI file includes dynamics parameter and/or time identifier parameter;Described extract from file destination is embedded into The element of at least predetermined number in the file destination includes:
Last bit value of the dynamics parameter of each instructions of note in MIDI file is extracted, First ray is formed;And/or it mentions Last bit value of the duration parameters of each instructions of note in MIDI file is taken, the second sequence is formed;
The First ray and/or second sequence are carried out according to the data length information in watermark information telescopiny It divides, obtains being embedded into each element in the file destination;
The element of predetermined number is chosen from each element being embedded into the file destination.
6. watermark extracting method as described in claim 4 or 5, which is characterized in that at least predetermined number according to The corresponding functional value of the element of element and at least predetermined number determines the polynomial function in watermark information telescopiny Include:
It is poor according to the element of at least predetermined number, the corresponding functional value of element of at least predetermined number and Lagrange It is worth formula and determines the polynomial function in watermark information telescopiny.
7. a kind of watermark embedding device characterized by comprising
First building module, the number of polynomial function to be built is determined for the default division number according to watermark information, And multiple numerical value are chosen as coefficient every in the polynomial function, construct the polynomial function;The multinomial letter Functional value of the number when independent variable takes zero is the decimal representation value of watermark information;
Second building module forms real number set for choosing multiple real number values as element;Element in the real number set Number is equal to the default division number;
Memory module, it is each for element each in the real number set to be substituted into the polynomial function respectively, calculate and is saved The corresponding functional value of a element;
It is embedded in module, for element each in the real number set to be embedded into file destination;Each element and described The corresponding functional value of each element is for extracting the watermark information.
8. a kind of watermark extraction apparatus characterized by comprising
Extraction module, for from the element for extracting at least predetermined number being embedded into the file destination in file destination;
Obtain module, for obtain saved in watermark information telescopiny described at least predetermined number the corresponding letter of element Numerical value;
First processing module, for corresponding according at least element of the element of predetermined number and at least predetermined number Functional value determines the polynomial function in watermark information telescopiny;
Second processing module is embedded in the target for determining according to functional value of the polynomial function when independent variable takes zero The watermark information of file.
9. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In, when the computer program is executed by processor the step of any one of such as claims 1 to 3 of realization the method, Huo Zheshi Now such as the step of any one of claim 4 to 6 the method.
10. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claims 1 to 3 when executing the computer program The step of any one the method, or realize such as the step of any one of claim 4 to 6 the method.
CN201910008098.8A 2019-01-04 2019-01-04 Watermark insertion and extracting method and terminal device Pending CN109784006A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910008098.8A CN109784006A (en) 2019-01-04 2019-01-04 Watermark insertion and extracting method and terminal device
PCT/CN2019/118688 WO2020140636A1 (en) 2019-01-04 2019-11-15 Watermark embedding and extracting methods and apparatuses, and terminal device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008098.8A CN109784006A (en) 2019-01-04 2019-01-04 Watermark insertion and extracting method and terminal device

Publications (1)

Publication Number Publication Date
CN109784006A true CN109784006A (en) 2019-05-21

Family

ID=66499263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008098.8A Pending CN109784006A (en) 2019-01-04 2019-01-04 Watermark insertion and extracting method and terminal device

Country Status (2)

Country Link
CN (1) CN109784006A (en)
WO (1) WO2020140636A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020140636A1 (en) * 2019-01-04 2020-07-09 平安科技(深圳)有限公司 Watermark embedding and extracting methods and apparatuses, and terminal device and medium
WO2021035978A1 (en) * 2019-08-23 2021-03-04 平安科技(深圳)有限公司 Information steganography method, apparatus and device, and storage medium
WO2021035963A1 (en) * 2019-08-23 2021-03-04 平安科技(深圳)有限公司 Music-based information embedding method, extraction method, apparatus, terminal, and storage medium
CN112613045A (en) * 2020-11-30 2021-04-06 全球能源互联网研究院有限公司 Data watermark embedding method and system for target data
CN113688601A (en) * 2021-10-26 2021-11-23 北京凯睿数加科技有限公司 Watermark generation method and device based on form, electronic equipment and computer medium
CN116150716A (en) * 2023-04-24 2023-05-23 中国科学技术大学 Database watermark embedding method, extraction method, storage medium and electronic device
CN116975246A (en) * 2023-08-03 2023-10-31 深圳市博锐高科科技有限公司 Data acquisition method, device, chip and terminal

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11327547A (en) * 1998-05-20 1999-11-26 Victor Co Of Japan Ltd Watermark information processor and its method
CN101105832A (en) * 2007-08-13 2008-01-16 浙江工业大学 Relational database water mark embed and extraction method based on (t,n) threshold
CN101231742A (en) * 2008-01-08 2008-07-30 北京大学 Apparatus and method for abstracting and imbedding digital watermarking in two value text image
CN101236645A (en) * 2008-02-28 2008-08-06 上海交通大学 Damage-free digital watermarking based image tampering detection and positioning method
CN101847411A (en) * 2010-05-28 2010-09-29 中国科学技术大学 MIDI (Musical Instrument Digital Interface) audio hidden information analysis method and device
CN102855425A (en) * 2012-08-13 2013-01-02 贵州大学 Electronic evidence preservation method based on threshold digital signature
CN107330306A (en) * 2017-06-28 2017-11-07 百度在线网络技术(北京)有限公司 Text Watermarking is embedded in and extracting method, device, electronic equipment and storage medium
CN107798249A (en) * 2017-07-24 2018-03-13 平安科技(深圳)有限公司 The dissemination method and terminal device of behavioral pattern data
CN107885565A (en) * 2017-10-31 2018-04-06 平安科技(深圳)有限公司 Watermark embedding method, device, equipment and the storage medium at financial APP interfaces
CN108665403A (en) * 2017-03-29 2018-10-16 腾讯科技(深圳)有限公司 Data waterprint embedded method, extracting method, device and digital watermarking system
CN108806657A (en) * 2018-06-05 2018-11-13 平安科技(深圳)有限公司 Music model training, musical composition method, apparatus, terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007193280A (en) * 2006-01-23 2007-08-02 Tokyo Univ Of Science Information embedding device, control method of information embedding device, and program
CN109784006A (en) * 2019-01-04 2019-05-21 平安科技(深圳)有限公司 Watermark insertion and extracting method and terminal device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11327547A (en) * 1998-05-20 1999-11-26 Victor Co Of Japan Ltd Watermark information processor and its method
CN101105832A (en) * 2007-08-13 2008-01-16 浙江工业大学 Relational database water mark embed and extraction method based on (t,n) threshold
CN101231742A (en) * 2008-01-08 2008-07-30 北京大学 Apparatus and method for abstracting and imbedding digital watermarking in two value text image
CN101236645A (en) * 2008-02-28 2008-08-06 上海交通大学 Damage-free digital watermarking based image tampering detection and positioning method
CN101847411A (en) * 2010-05-28 2010-09-29 中国科学技术大学 MIDI (Musical Instrument Digital Interface) audio hidden information analysis method and device
CN102855425A (en) * 2012-08-13 2013-01-02 贵州大学 Electronic evidence preservation method based on threshold digital signature
CN108665403A (en) * 2017-03-29 2018-10-16 腾讯科技(深圳)有限公司 Data waterprint embedded method, extracting method, device and digital watermarking system
CN107330306A (en) * 2017-06-28 2017-11-07 百度在线网络技术(北京)有限公司 Text Watermarking is embedded in and extracting method, device, electronic equipment and storage medium
CN107798249A (en) * 2017-07-24 2018-03-13 平安科技(深圳)有限公司 The dissemination method and terminal device of behavioral pattern data
CN107885565A (en) * 2017-10-31 2018-04-06 平安科技(深圳)有限公司 Watermark embedding method, device, equipment and the storage medium at financial APP interfaces
CN108806657A (en) * 2018-06-05 2018-11-13 平安科技(深圳)有限公司 Music model training, musical composition method, apparatus, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨帆: ""MIDI音频隐写分析研究"", 《中国优秀硕士学位论文全文数据库》, pages 1 - 96 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020140636A1 (en) * 2019-01-04 2020-07-09 平安科技(深圳)有限公司 Watermark embedding and extracting methods and apparatuses, and terminal device and medium
WO2021035978A1 (en) * 2019-08-23 2021-03-04 平安科技(深圳)有限公司 Information steganography method, apparatus and device, and storage medium
WO2021035963A1 (en) * 2019-08-23 2021-03-04 平安科技(深圳)有限公司 Music-based information embedding method, extraction method, apparatus, terminal, and storage medium
CN112613045A (en) * 2020-11-30 2021-04-06 全球能源互联网研究院有限公司 Data watermark embedding method and system for target data
CN113688601A (en) * 2021-10-26 2021-11-23 北京凯睿数加科技有限公司 Watermark generation method and device based on form, electronic equipment and computer medium
CN116150716A (en) * 2023-04-24 2023-05-23 中国科学技术大学 Database watermark embedding method, extraction method, storage medium and electronic device
CN116975246A (en) * 2023-08-03 2023-10-31 深圳市博锐高科科技有限公司 Data acquisition method, device, chip and terminal
CN116975246B (en) * 2023-08-03 2024-04-26 深圳市博锐高科科技有限公司 Data acquisition method, device, chip and terminal

Also Published As

Publication number Publication date
WO2020140636A1 (en) 2020-07-09

Similar Documents

Publication Publication Date Title
CN109784006A (en) Watermark insertion and extracting method and terminal device
CN111783875B (en) Abnormal user detection method, device, equipment and medium based on cluster analysis
CN108062629B (en) Transaction event processing method, terminal device and medium
Memon et al. Hybrid watermarking of medical images for ROI authentication and recovery
CN107181797B (en) Block compression method and system of block chain
Hong et al. Behavioral synthesis techniques for intellectual property protection
CN108090567A (en) Power communication system method for diagnosing faults and device
CN109766479B (en) Data processing method and device, electronic equipment and storage medium
CN101201939B (en) Method and system for generating picture identifying code
CN113489584B (en) Method and device for processing random numbers in block chain and electronic equipment
JP2008293034A (en) Method and device for executing decrypting mechanism through calculating standardized modular exponentiation for thwarting timing attack
CN112527273A (en) Code completion method, device and related equipment
CN109492590A (en) A kind of distance detection method, distance detection device and terminal device
CN110489826A (en) Rock mass slope safety coefficient calculation method, device and terminal device
CN114818000A (en) Privacy protection set confusion intersection method, system and related equipment
Anshul et al. PSO based exploration of multi-phase encryption based secured image processing filter hardware IP core datapath during high level synthesis
KR20220107420A (en) Pairing-based zero-knowledge proof protocol system for proves and verifies calculation results
CN111506313A (en) Program control flow confusion method and system based on neural network
CN102082700B (en) Detection method of network intrusion
CN113886863B (en) Data encryption method and data encryption device
CN111539028B (en) File storage method and device, storage medium and electronic equipment
CN111325032B (en) Standardization method and device for name of 5G+ intelligent banking institution
CN107358032A (en) A kind of upgrade method of product, device and product upgrading system
Sakai A linear space algorithm for computing a longest common increasing subsequence
Picard et al. Neural networks functions for public key watermarking

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination