Information steganography method, device, equipment and storage medium

文档序号:1757173 发布日期:2019-11-29 浏览:37次 中文

阅读说明:本技术 信息隐写方法、装置、设备及存储介质 (Information steganography method, device, equipment and storage medium ) 是由 朱照华 王健宗 于 2019-08-23 设计创作,主要内容包括:本发明涉及信息安全领域,公开一种信息隐写方法、装置、设备及存储介质,包括:获取待嵌入信息以及待嵌入信息对应的信息长度;对信息长度进行进制转换获得待添加信息;将待添加信息添加至待嵌入信息中获得目标信息并对目标信息进行分组获得若干组信息片段;读取载体音乐中预设音符的音高信息,将信息片段写入音高信息以获得新的预设音符;基于新的预设音符对载体音乐进行音符调整,获得目标音乐,由于本发明是将秘密信息分组后分别嵌入到载体音乐预设音符的音高信息中,进而增大了秘密信息传输时的隐秘性,相比于现有的信息隐写技术本发明使得解密者无法察觉何种音符的音高信息中携带秘密信息,因而也无法进行信息解密,保证了信息传递的安全性。(The present invention relates to information security field, a kind of information steganography method, device, equipment and storage medium are disclosed, comprising: obtain information to be embedded and the corresponding message length of information to be embedded;System conversion is carried out to message length and obtains information to be added;Information to be added is added in information to be embedded to obtain target information and be grouped target information and obtains several groups information segment;The pitch information that note is preset in carrier music is read, by information segment write-in pitch information to obtain new default note;Note adjustment is carried out to carrier music based on new default note, obtain target music, since the present invention is to be respectively embedded in carrier music after being grouped secret information to preset in the pitch information of note, and then increase crypticity when secret information transmission, compared to existing information steganography present invention decryption person can not be discovered in the pitch information of which kind of note and carries secret information, information decryption can not be also thus carried out, ensure that the safety of information transmitting.)

1. a kind of information steganography method, which is characterized in that the described method includes:

Obtain information to be embedded and the corresponding message length of the information to be embedded;

System conversion is carried out to the message length, obtains information to be added;

The information to be added is added in the information to be embedded and obtains target information, and the target information is divided Group, to obtain several groups information segment;

The pitch information for presetting note in carrier music is read, it is new to obtain that the pitch information is written into the information segment Default note;

Note adjustment is carried out to the carrier music based on the new default note, obtains target music.

2. the method as described in claim 1, which is characterized in that it is described to the message length carry out system conversion, obtain to Before the step of adding information, the method also includes:

Preset key generator is called based on the message length, to generate key length encryption identical with the message length Key;

The information to be embedded is encrypted by the encryption key, obtains encryption information;

It is described that the information to be added is added in the information to be embedded the step of obtaining target information, comprising:

The information to be added is added in the encryption information and obtains target information.

3. method according to claim 2, which is characterized in that described to call preset key to generate based on the message length Device, the step of to generate key length identical with message length encryption key before, the method also includes:

Carrier music is obtained, and counts the corresponding bat string skill quantity of the carrier music;

Predefined embedding parameter is read, the information is detected according to the predefined embedding parameter and the bat string skill quantity Whether length meets preset condition;

If satisfied, then execute it is described preset key generator is called based on the message length, with generate key length with it is described The step of message length identical encryption key;

Wherein, the preset condition are as follows:

LM≤ min [x* (y-4) * c, 2x*y]

In formula, LMFor message length, x, y are predefined embedding parameter, and c is to clap string skill quantity, and min is to be minimized.

4. the method as described in claim 1, which is characterized in that it is described to the message length carry out system conversion, obtain to The step of adding information, comprising:

Read predefined embedding parameter, according to the predefined embedding parameter by the message length be converted to preset length to Add information.

5. the method as claimed in claim 3 or 4, which is characterized in that described to read the pitch letter for presetting note in carrier music Breath, is written the step of pitch information is to obtain new default note for the information segment, comprising:

The pitch information for presetting note in carrier music is read, the information segment is written by the pitch by preset formula and is believed Breath is to obtain new default note;

Wherein, the preset formula are as follows:

P=af

In formula, f is pitch information, andP is new default note, and a is default note, and m ' is information segment, c To clap string skill quantity.

6. method as claimed in claim 5, which is characterized in that it is described based on the new default note to the carrier music After the step of carrying out note adjustment, obtaining target music, the method also includes:

The target music is obtained, note screening is carried out to the target music to obtain the corresponding candidate sound of the target music Symbol set;

The note that the target music is included is extracted, and by the performance sequence of each note in the target music to the sound of extraction Symbol is ranked up, and obtains note ordered set;

The note ordered set is traversed, and according to the note currently traversed acquisition pair from the candidate note set Answer the pitch information of note;

The pitch information that will acquire is converted into binary sequence, and is spliced the binary sequence to obtain message slot Section;

The information segment of acquisition is combined by presupposed information recovery policy, and is described to be embedded by combined Information recovering Information.

7. method as claimed in claim 6, which is characterized in that it is described to obtain the target music, to the target music into The step of screening of row note is to obtain the target music corresponding candidate note set, comprising:

The note type for obtaining all notes in the target music is screened from the note according to the note type and is not belonged to In the target note of default note type;

The corresponding pitch information of the target note is obtained, note is generated according to the pitch information of acquisition and the target note Pitch set;

Candidate note is chosen from the note pitch set according to the bat string skill quantity, and raw according to the candidate note At candidate note set.

8. a kind of information steganography device, which is characterized in that described device includes:

Data obtaining module, for obtaining information to be embedded and the corresponding message length of the information to be embedded;

The data obtaining module is also used to carry out system conversion to the message length, obtains information to be added;

Information block module obtains target information for the information to be added to be added in the information to be embedded, and right The target information is grouped, to obtain several groups information segment;

Information writing module will be described in information segment write-in for reading the pitch information for presetting note in carrier music Pitch information is to obtain new default note;

Audio generation module obtains target for carrying out note adjustment to the carrier music based on the new default note Music.

9. a kind of information steganography equipment, which is characterized in that the equipment includes: memory, processor and is stored in the storage On device and the information steganography program that can run on the processor, the information steganography program are arranged for carrying out such as claim The step of information steganography method described in any one of 1 to 7.

10. a kind of storage medium, which is characterized in that be stored with information steganography program, the information steganography on the storage medium The step of information steganography method as described in any one of claim 1 to 7 is realized when program is executed by processor.

Technical field

The present invention relates to field of information security technology more particularly to a kind of information steganography method, device, equipment and storage to be situated between Matter.

Background technique

Information security is all by one of issues that need special attention in internet area all the time, and Steganography is information security One important component of technology, it is intended to secret information is embedded among carrier in a manner of not noticeable, Steganography Carrier theoretically can be any carrier, and presently common steganography carrier has image, text, audio, video etc..Steganography Development many fields are suffered from important meaning.

Steganography relevant to audio is the lowest order that secret information is embedded into audio dynamics component, base mostly at present In auditory masking effect, prevent human ear is from effectively distinguishing.But this mode crypticity for computer equipment is insufficient, carries The audio of secret information is easy to be detected and decrypted by counter, and safety is to be improved.

Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.

Summary of the invention

The main purpose of the present invention is to provide a kind of information steganography method, device, equipment and storage mediums, it is intended to solve Certainly the prior art safely and effectively can not carry out steganography, the relatively low technical problem of Information Security to data.

To achieve the above object, it the present invention provides a kind of information steganography method, the described method comprises the following steps:

Obtain information to be embedded and the corresponding message length of the information to be embedded;

System conversion is carried out to the message length, obtains information to be added;

The information to be added is added in the information to be embedded and obtains target information, and to the target information into Row grouping, to obtain several groups information segment;

The pitch information for presetting note in carrier music is read, the pitch information is written into obtain in the information segment New default note;

Note adjustment is carried out to the carrier music based on the new default note, obtains target music.

Preferably, before described the step of carrying out system conversion to the message length, obtaining information to be added, the side Method further include:

Preset key generator is called based on the message length, it is identical with the message length to generate key length Encryption key;

The information to be embedded is encrypted by the encryption key, obtains encryption information;

It is described that the information to be added is added in the information to be embedded the step of obtaining target information, comprising:

The information to be added is added in the encryption information and obtains target information.

Preferably, described that preset key generator is called based on the message length, to generate key length and the letter Before the step of ceasing length identical encryption key, the method also includes:

Carrier music is obtained, and counts the corresponding bat string skill quantity of the carrier music;

Predefined embedding parameter is read, according to the predefined embedding parameter and bat string skill quantity detection Whether message length meets preset condition;

If satisfied, then execute it is described preset key generator is called based on the message length, with generate key length with The step of message length identical encryption key;

Wherein, the preset condition are as follows:

LM≤ min [x* (y-4) * c, 2x*y]

In formula, LMFor message length, x, y are predefined embedding parameter, and c is to clap string skill quantity, and min is to be minimized.

Preferably, described the step of system conversion is carried out to the message length, obtains information to be added, comprising:

Predefined embedding parameter is read, the message length is converted to by preset length according to the predefined embedding parameter Information to be added.

Preferably, described to read the pitch information that note is preset in carrier music, the sound is written into the information segment The step of high information is to obtain new default note, comprising:

The pitch information for presetting note in carrier music is read, the information segment is written by the sound by preset formula High information is to obtain new default note;

Wherein, the preset formula are as follows:

P=af

In formula, f is pitch information, andP is new default note, and a is default note, and m ' is information Segment, c are to clap string skill quantity.

Preferably, described that note adjustment is carried out to the carrier music based on the new default note, obtain target sound After happy step, the method also includes:

The target music is obtained, note screening is carried out to obtain the corresponding time of the target music to the target music Select note set;

The note that the target music is included is extracted, and by the performance sequence of each note in the target music to extraction Note be ranked up, obtain note ordered set;

The note ordered set is traversed, and is obtained from the candidate note set according to the note currently traversed Take the pitch information of corresponding note;

The pitch information that will acquire is converted into binary sequence, and is spliced the binary sequence to obtain information Segment;

The information segment of acquisition is combined by presupposed information recovery policy, and by combined Information recovering be it is described to Embedding information.

Preferably, described to obtain the target music, note screening is carried out to obtain the target to the target music The step of music corresponding candidate note set, comprising:

The note type for obtaining all notes in the target music is screened from the note according to the note type It is not belonging to the target note of default note type;

The corresponding pitch information of the target note is obtained, is generated according to the pitch information of acquisition and the target note Note pitch set;

Candidate note is chosen from the note pitch set according to the bat string skill quantity, and according to the candidate sound Symbol generates candidate note set.

In addition, to achieve the above object, the present invention also proposes a kind of information steganography device, described device includes:

Data obtaining module, for obtaining information to be embedded and the corresponding message length of the information to be embedded;

The data obtaining module is also used to carry out system conversion to the message length, obtains information to be added;

Information block module obtains target information for the information to be added to be added in the information to be embedded, And the target information is grouped, to obtain several groups information segment;

The information segment is written for reading the pitch information for presetting note in carrier music for information writing module The pitch information is to obtain new default note;

Audio generation module is obtained for carrying out note adjustment to the carrier music based on the new default note Target music.

In addition, to achieve the above object, the present invention also proposes a kind of information steganography equipment, the equipment include: memory, Processor and it is stored in the information steganography program that can be run on the memory and on the processor, the information steganography journey Sequence is arranged for carrying out the step of information steganography method as described above.

In addition, to achieve the above object, the present invention also proposes a kind of storage medium, information is stored on the storage medium The step of steganography program, the information steganography program realizes information steganography method as described above when being executed by processor.

The present invention is by obtaining information to be embedded and the corresponding message length of information to be embedded;To message length carry out into System conversion obtains information to be added;By information to be added be added in information to be embedded obtain target information and to target information into Row grouping, to obtain several groups information segment;The pitch information for presetting note in carrier music is read, sound is written into information segment High information is to obtain new default note;Note adjustment is carried out to carrier music based on new default note, obtains target music, Since the present invention is to be respectively embedded in carrier music after being grouped secret information to preset in the pitch information of note, and then increase Crypticity when secret information transmits, makes which kind of sound decryption person can not discover compared to existing information steganography present invention Secret information is carried in the pitch information of symbol, thus can not also carry out information decryption, ensure that the safety of information transmitting.

Detailed description of the invention

Fig. 1 is the structural schematic diagram of the information steganography equipment for the hardware running environment that the embodiment of the present invention is related to;

Fig. 2 is the flow diagram of information steganography method first embodiment of the present invention;

Fig. 3 is the flow diagram of information steganography method second embodiment of the present invention;

Fig. 4 is the flow diagram of information steganography method 3rd embodiment of the present invention;

Fig. 5 is the structural block diagram of information steganography device first embodiment of the present invention.

The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.

Specific embodiment

It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.

Referring to Fig.1, Fig. 1 is the information steganography device structure signal for the hardware running environment that the embodiment of the present invention is related to Figure.

As shown in Figure 1, the information steganography equipment may include: processor 1001, such as central processing unit (Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, Communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include that the wired of standard connects Mouth, wireless interface.Network interface 1004 optionally may include standard wireline interface and wireless interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random access memory (Random of high speed Access Memory, RAM) memory, be also possible to stable nonvolatile memory (Non-Volatile Memory, ), such as magnetic disk storage NVM.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.

It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the restriction to information steganography equipment, it can To include perhaps combining certain components or different component layouts than illustrating more or fewer components.

As shown in Figure 1, as may include operating system, data storage mould in a kind of memory 1005 of storage medium Block, network communication module, Subscriber Interface Module SIM and information steganography program.

In information steganography equipment shown in Fig. 1, network interface 1004 is mainly used for logical with network server progress data Letter;User interface 1003 is mainly used for carrying out data interaction with user;Processor 1001 in information steganography equipment of the present invention is deposited Reservoir 1005 can be set in information steganography equipment, and the information steganography equipment calls memory 1005 by processor 1001 The information steganography program of middle storage, and execute information steganography method provided in an embodiment of the present invention.

It is information steganography method of the present invention the referring to Fig. 2, Fig. 2 the embodiment of the invention provides a kind of information steganography method The flow diagram of one embodiment.

In the present embodiment, the information steganography method the following steps are included:

Step S10: information to be embedded and the corresponding message length of the information to be embedded are obtained;

It should be noted that the executing subject of present implementation can be with data processing, network communication and program The calculating service equipment (such as mobile phone, tablet computer, PC) of operation function, hereinafter referred to as ciphering terminal.It is described to embedding Entering information needs steganography to enter the initial secret information in carrier music, and for the safety for guaranteeing this category information, the present embodiment adds Close terminal will also encrypt the information to be embedded before information to be embedded is written in carrier music.Institute in this step State the information aggregate M={ m that secret information to be embedded can be denoted as binary formati=0or 1 | i=1,2 ..., LM, wherein LMTable Show the length for needing secret information to be embedded, i.e., the described message length.

In the concrete realization, it is corresponding can to obtain the information to be embedded when getting information to be embedded for ciphering terminal Message length.

Step S20: system conversion is carried out to the message length, obtains information to be added;

It should be understood that the system conversion is to be carried out according to the corresponding data format of information to be embedded to message length Conversion, if such as information to be embedded is binary format, the corresponding information that message length is converted to binary format;If to Embedding information is hexadecimal format, then the corresponding information that message length is converted to hexadecimal format, specific system turn It is without restriction to change mode this embodiment.

In view of binary system is a kind of numeral system being widely used in computing technique, current computer system is essentially all Binary system, therefore Binary Conversion preferably is carried out to message length in the present embodiment and obtains binary message, then it will turn Binary message after changing, which is added in information to be embedded, obtains target information, then is grouped to target information, obtains several Group information segment.

Specifically, ciphering terminal can first read predefined embedding parameter x and y, then according to the predefined embedding parameter x And y, the message length is converted to binary message (information i.e. to be added) R={ r of preset length (i.e. x*y length)i= 0or 1 | i=1,2 ... x*y }.

Step S30: the information to be added is added in the information to be embedded and obtains target information, and to the mesh Mark information is grouped, to obtain several groups information segment;

In the concrete realization, ciphering terminal can be added to information to be embedded after getting information R to be added Head position, to obtain secret information to be grouped (the i.e. described target information) M '={ m '1,m’2,…,m’LM+x*y}={ r1, r2,…,rx*y,m*1,…,m*LM, then the target information is grouped again and obtains several groups information segment M '={ M '1,M ’2,…,M’e, M 'i={ m 'k| x* (i-1)+1≤k≤x*i }, e=(LM+x*y)/c.E is the number of information segment after grouping in formula Amount, c are the corresponding bat string skill quantity of carrier music, that is to say, that how many bat string note in carrier music, just to clap String note is grouped target information.Certainly, the packet mode of target information described in the present embodiment is also possible to others Packet mode is not specifically limited this.

Step S40: reading the pitch information that note is preset in carrier music, and the pitch is written in the information segment and is believed Breath is to obtain new default note;

It should be understood that musical instrument digital interface (Musical Instrument Digital Interface, MIDI) lattice Formula is a kind of file format for storing instructions of note information, and storage is all performance instructions of music, is instructed in all MIDI It is then that note opens (Note on) and note closes (Note off) these two types of instructions that instruction the closest is presented with music in the middle, Beginning and ending time of the different notes in music is determined respectively, after SEQ sequencer has known relevant instruction, so that it may by sound Happy complete play comes out.

It should be noted that the information steganography method that the present embodiment and following each embodiments provide can be one kind based on Ji He claps the information steganography method of string.So-called bat string, refer to the slap in guitar through finger and string issue " crash " sound one Kind playing technique, for building specific emotional environment, in MIDI, this sound effect is usually very short by the duration Sound realize that the bat string skill that is, in MIDI generally also indicated by multiple sound for having specific pitch, only not The time for crossing sound go is extremely short so that sound has just stopped before being not yet aware of specific pitch.This programme combines lucky He claps representation of the string skill in MIDI and realizes insertion of the secret information in MIDI file.Carrier sound in the present embodiment Happy is the MIDI file.

In addition, in the present embodiment, the default note be in all notes of carrier music in addition to guitar claps string note Note.Pitch refers to that the sound of various different height, the i.e. height of sound, the height of sound are determined by vibration frequency, frequency Gao Zeyin "high", on the contrary then " low ".Pitch information described in the present embodiment can be the information of characterization note pitch height.

In order to guarantee that safety and the crypticity of data transmission, the present embodiment information steganography method are corresponding by information to be embedded Information segment be embedded into the different default corresponding pitch informations of note.Specifically, ciphering terminal can be according to the letter got The breath segment pitch information original to default note is rewritten, to obtain the new default note with new pitch information.

Specifically, the pitch information that note is preset in carrier music can be read in ciphering terminal, it will be described by preset formula The pitch information is written to obtain new default note in information segment;

Wherein, the preset formula are as follows:

P=af

In formula, f is pitch information, andP is new default note, and a is default note, and m ' is information Segment, c are to clap string skill quantity.

Information segment after grouping is respectively embedded in the pitch information of default note by the present embodiment, until all letters Segment insertion is ceased to complete.The present embodiment carry out information segment insertion when, can according to default note pitch sequence again or The performance sequence of default note carries out, scheme to this with no restriction.

Step S50: note adjustment is carried out to the carrier music based on the new default note, obtains target music.

In the concrete realization, ciphering terminal is after acquisition has carried the new default note of information segment, Ji Keji Note adjustment is carried out to the carrier music in the new default note, obtains target music.The note adjustment will carry Original default note replaces with the new default note in body music.

The present embodiment obtains information to be embedded and the corresponding message length of information to be embedded;System is carried out to message length Conversion obtains information to be added;Information to be added is added in information to be embedded and obtains target information and target information is carried out Grouping, to obtain several groups information segment;The pitch information for presetting note in carrier music is read, pitch is written into information segment Information is to obtain new default note;Note adjustment is carried out to carrier music based on new default note, obtains target music, by Then it is respectively embedded in carrier music after secret information being grouped to preset in the pitch information of note, and then increases secret information Crypticity when transmission makes decryption person that can not discover the pitch of which kind of note compared to existing information steganography present invention Secret information is carried in information, thus can not also carry out information decryption, ensure that the safety of information transmitting.

With reference to Fig. 3, Fig. 3 is the flow diagram of information steganography method second embodiment of the present invention.

Based on above-mentioned first embodiment, the present embodiment before the step S20, the method also includes:

Step S101: preset key generator is called based on the message length, to generate key length and the information The identical encryption key of length;

It should be noted that preset key generator described in the present embodiment can be can generate for complete encryption, The plug-in unit of the information such as decryption, integrity verification.

In the concrete realization, ciphering terminal can call preset key generator based on the corresponding message length of information to be embedded To generate key length encryption key S identical with the message length.

Step S102: encrypting the information to be embedded by the encryption key, obtains encryption information;

It is encrypted specifically, embedding information can be treated by following cryptographic operation, the secret information after being encrypted M* (the i.e. described encryption information);

In actual encrypted, ciphering terminal can pass through encryption key S={ si| i=1,2 ..., LMTreat embedding information M= {mi=0or 1 | i=1,2 ..., LMEach of information miIt is encrypted, obtains corresponding encryption information mi*, then root According to all encryption information mi* encryption information M* is generated.

Correspondingly, the step S30 in above-described embodiment may particularly include:

Step S301: the information to be added is added in the encryption information and obtains target information, and to the mesh Mark information is grouped, to obtain several groups information segment.

In the concrete realization, information R to be added can be added in the encryption information M* by ciphering terminal obtains target letter Cease M '={ m '1,m’2,…,m’LM+x*y}={ r1,r2,…,rx*y,m*1,…,m*LM, then the target information is divided Group, to obtain several groups information segment.

Further, before step S101 described in the present embodiment information steganography method, further includes:

Step S01: carrier music is obtained, and counts the corresponding bat string skill quantity of the carrier music;

It should be noted that the quantity for clapping the bat string skill note occurred in string skill quantity, that is, carrier music.

In the concrete realization, ciphering terminal is after getting carrier music, the bat string skill occurred in statistics available carrier music The quantity of skilful note.

Step S02: reading predefined embedding parameter, according to the predefined embedding parameter and the bat string skill quantity Detect whether the message length meets preset condition;Wherein, the preset condition are as follows:

LM≤ min [x* (y-4) * c, 2x*y]

In formula, LMFor message length, x, y are predefined embedding parameter, and c is to clap string skill quantity, and min is to be minimized.

It should be understood that in order to completely be embedded in secret information, the corresponding information of information to be embedded in the present embodiment Length needs to meet above-mentioned preset condition, if being unsatisfactory for above-mentioned preset condition, shows that the carrier music information currently chosen is hidden Off-capacity is hidden, carrier music is needed replacing.

Step S03: if satisfied, preset key generator is called based on the message length described in then executing, it is close to generate The step of key length identical with message length encryption key;

In the concrete realization, ciphering terminal shows currently to choose when detecting that message length meets the preset condition Carrier music can be used to hide information to be embedded, the corresponding behaviour of the step S101 can be performed in ciphering terminal at this time Make.

The present embodiment counts the corresponding bat string skill quantity of carrier music by obtaining carrier music;It reads predefined Embedding parameter according to predefined embedding parameter and claps whether string skill quantity detection information length meets preset condition;If full Foot then executes and calls preset key generator based on the message length, and to generate, key length is identical with message length to be added The step of key, the present embodiment are carried out by the corresponding bat string skill quantity of carrier music and embedding parameter predetermined The verifying of message length can guarantee for secret information to be embedded to be smoothly embedded into carrier music, improve information steganography Success rate and efficiency.

With reference to Fig. 4, Fig. 4 is the flow diagram of information steganography method 3rd embodiment of the present invention.

Based on the various embodiments described above, in the present embodiment, after the step S50, the method also includes:

Step S60: obtaining target music, and it is corresponding to obtain the target music to carry out note screening to the target music Candidate note set;

It should be noted that the recipient that the present embodiment information steganography method application scenarios are mainly target music (solves Close terminal) target music is decrypted to extract the secret information being embedded in target music.Adding in certain above-described embodiment Close terminal also has the function of decryption terminal.

Specifically, the acquisition modes of the set of candidate's note described in the present embodiment, which may is that, first obtains the target music In all notes note type, the target for being not belonging to default note type is screened from the note according to the note type Note;Then the corresponding pitch information of the target note is obtained, it is raw according to the pitch information of acquisition and the target note At note pitch set;Choose candidate note from the note pitch set further according to the bat string skill quantity, and according to Candidate's note generates candidate note set.

Wherein, the note type is the note type of all notes in carrier music, and the default note type is Ji He claps string note.The mode of the screening of note described in the present embodiment may is that the note class of all notes in statistics carrier music Type, and screen the target note for being not belonging to preset note type from all notes according to the note type and (filter out not Belong to the target note that guitar claps string note), note pitch set A={ a is then generated according to the pitch information of target note1, a2,…,an, wherein n indicates the quantity of the note type occurred in the carrier music, a1, anIt is illustrated respectively in the carrier music The highest note and minimum note of middle appearance, according to clap string skill quantity is chosen from note pitch set candidate note A '= {a1,a2,…,acCandidate note set as hiding information.

Step S70: the note that the target music is included is extracted, and suitable by the performance of each note in the target music The note that ordered pair extracts is ranked up, and obtains note ordered set;

In the concrete realization, decryption terminal, can be according to target sound after extracting all notes that target music is included The performance sequence of each note is ranked up the note of extraction in pleasure, obtains note ordered set O={ o1,o2,…,ou, u is mesh The quantity of happy the included note of mark with phonetic symbols.

Step S80: traversing the note ordered set, and according to the note currently traversed from the candidate note The pitch information of corresponding note is obtained in set;

In the concrete realization, decryption terminal can be by note ordered set O={ o1,o2,…,ouIn note sequence to note Each of ordered set note is traversed, and often traverses a note in candidate note set A '={ a1,a2,…,ac} It is middle to match corresponding candidate note, the pitch information for the candidate note being matched to is obtained if successful match, is then converted For binary sequence (information).

Step S90: the pitch information that will acquire is converted into binary sequence, and to the binary sequence spliced with Obtain information segment;

In the concrete realization, decryption terminal corresponding pitch information of each candidate's note in getting candidate note set Afterwards, the pitch information that can be will acquire is converted into binary sequence, then according to the matching order of candidate note to getting All binary sequences are spliced to obtain information segment M '={ M '1,M’2,…,M’e}。

Step S100: the information segment of acquisition is combined by presupposed information recovery policy, and combined information is extensive It is again the information to be embedded.

In the concrete realization, then decryption terminal extracts preceding x*y therein and calculates letter after getting information segment Length is ceased, and information segment M ' is combined by M* according to message length, is finally decrypted most by the key sequence S generated again The information to be embedded is obtained eventually.

The present embodiment decryption terminal carries out note screening by obtaining target music, to target music to obtain target music Corresponding candidate's note set;The note that target music is included is extracted, and according to target the performance sequence of each note is right in music The note of extraction, which is ranked up, obtains note ordered set;Note ordered set is traversed, and according to the note currently traversed The pitch information of corresponding note is obtained from candidate note set;The pitch information that will acquire is converted into binary sequence, and right Binary sequence is spliced to obtain information segment;The information segment of acquisition is combined by presupposed information recovery policy, And by combined Information recovering be information to be embedded, can be realized the smooth acquisition to the secret information of steganography in target music, Improve the safety of information transmitting.

In addition, the embodiment of the present invention also proposes a kind of storage medium, information steganography program is stored on the storage medium, The step of information steganography program realizes information steganography method as described above when being executed by processor.

It is the structural block diagram of information steganography device first embodiment of the present invention referring to Fig. 5, Fig. 5.

As shown in figure 5, the information steganography device that the embodiment of the present invention proposes includes:

Data obtaining module 501, for obtaining information to be embedded and the corresponding message length of the information to be embedded;

The data obtaining module 501 is also used to carry out system conversion to the message length, obtains information to be added;

Information block module 502 obtains target letter for the information to be added to be added in the information to be embedded Breath, and the target information is grouped, to obtain several groups information segment;

Information writing module 503 writes the information segment for reading the pitch information for presetting note in carrier music Enter the pitch information to obtain new default note;

Audio generation module 504 is obtained for carrying out note adjustment to the carrier music based on the new default note Obtain target music.

The present embodiment obtains information to be embedded and the corresponding message length of information to be embedded;System is carried out to message length Conversion obtains information to be added;Information to be added is added in information to be embedded and obtains target information and target information is carried out Grouping, to obtain several groups information segment;The pitch information for presetting note in carrier music is read, pitch is written into information segment Information is to obtain new default note;Note adjustment is carried out to carrier music based on new default note, obtains target music, by Then it is respectively embedded in after secret information being grouped in the pitch information of default note of carrier music, and then increases secret letter Crypticity when breath transmission makes decryption person that can not discover the sound of which kind of note compared to existing information steganography present invention Secret is carried in high information, thus can not also carry out information decryption, ensure that the safety of information transmitting.

Based on above- mentioned information steganography device first embodiment of the present invention, propose that the second of information steganography device of the present invention is implemented Example.

In the present embodiment, the data obtaining module 501 is also used to call preset key raw based on the message length It grows up to be a useful person, to generate key length encryption key identical with the message length;By the encryption key to described to be embedded Information is encrypted, and encryption information is obtained;The information to be added is added in the encryption information and obtains target information.

Further, the data obtaining module 501, is also used to obtain carrier music, and counts the carrier music pair The bat string skill quantity answered;Predefined embedding parameter is read, according to the predefined embedding parameter and the bat string skill number Amount detects whether the message length meets preset condition;If satisfied, then executing described preset based on message length calling Key generator, the step of to generate key length identical with message length encryption key;Wherein, the preset condition Are as follows:

LM≤ min [x* (y-4) * c, 2x*y]

In formula, LMFor message length, x, y are predefined embedding parameter, and c is to clap string skill quantity, and min is to be minimized.

Further, the data obtaining module 501, is also used to read predefined embedding parameter, according to described predefined The message length is converted to the information to be added of preset length by embedding parameter.

Further, the information writing module 503 is also used to read the pitch information that note is preset in carrier music, The pitch information is written into obtain new default note in the information segment by preset formula;Wherein, the default public affairs Formula are as follows:

P=af

In formula, f is pitch information, andP is new default note, and a is default note, and m ' is information Segment, c are to clap string skill quantity.

Further, in this embodiment the information steganography device further include: information deciphering module;The information decrypts mould Block carries out note screening to the target music for obtaining the target music to obtain the corresponding time of the target music Select note set;The note that the target music is included is extracted, and right by the performance sequence of each note in the target music The note of extraction is ranked up, and obtains note ordered set;The note ordered set traversed, and according to currently traversing Note obtains the pitch information of corresponding note from the candidate note set;The pitch information that will acquire is converted into binary system sequence Column, and the binary sequence is spliced to obtain information segment;By presupposed information recovery policy by the message slot of acquisition Section is combined, and is the information to be embedded by combined Information recovering.

Further, the information deciphering module is also used to obtain the note type of all notes in the target music, The target note for being not belonging to default note type is screened from the note according to the note type;Obtain the target note Corresponding pitch information generates note pitch set according to the pitch information of acquisition and the target note;According to the bat String skill quantity chooses candidate note from the note pitch set, and generates candidate note collection according to the candidate note It closes.

The other embodiments or specific implementation of information steganography device of the present invention can refer to above-mentioned each method embodiment, this Place repeats no more.

It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.

The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.

Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as read-only memory/random access memory, magnetic disk, CD), including some instructions are used so that a terminal device (can To be mobile phone, computer, server, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.

The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于选择第一编码算法与第二编码算法中的一个的装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类