CN104168435B - The method and system that a kind of audio file batch merges and played - Google Patents

The method and system that a kind of audio file batch merges and played Download PDF

Info

Publication number
CN104168435B
CN104168435B CN201410402102.6A CN201410402102A CN104168435B CN 104168435 B CN104168435 B CN 104168435B CN 201410402102 A CN201410402102 A CN 201410402102A CN 104168435 B CN104168435 B CN 104168435B
Authority
CN
China
Prior art keywords
audio file
block
data
file block
audio
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.)
Active
Application number
CN201410402102.6A
Other languages
Chinese (zh)
Other versions
CN104168435A (en
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.)
BEIJING CLOUDS POWER EDUCATION&TECHNOLOGY Co Ltd
Original Assignee
BEIJING CLOUDS POWER EDUCATION&TECHNOLOGY 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 BEIJING CLOUDS POWER EDUCATION&TECHNOLOGY Co Ltd filed Critical BEIJING CLOUDS POWER EDUCATION&TECHNOLOGY Co Ltd
Priority to CN201410402102.6A priority Critical patent/CN104168435B/en
Publication of CN104168435A publication Critical patent/CN104168435A/en
Application granted granted Critical
Publication of CN104168435B publication Critical patent/CN104168435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The method and system that a kind of audio file batch provided by the present invention merges and played, unified formatting is carried out by the audio file merged to needs first, and it is divided into audio file block, audio file block is encrypted, it thereby may be ensured that the security of voice data, prevent audio data content and steal, and generate track index table always according to the storage location of audio file block, positioned according to the position that the track index table is stored to audio file block, the loss of audio file, which can not only be prevented, can also realize the data message for fast and accurately reading the audio file, therefore method and system provided by the present invention not only facilitate the storage of audio file to also assures that the security of the audio file.

Description

The method and system that a kind of audio file batch merges and played
Technical field
The present invention relates to moving communicating field, more particularly to the method and system that a kind of audio file batch preserves.
Background technology
With the popularization of electronic product, the use of audio file is also more and more extensive, such as when being read on the net, greatly The audio video file of amount can more give the preferable reading effect of user than word.
In order to store more audio files, traditional method is stores after the merging of batch, but in the prior art Method problems be present:
1st, after traditional batch audio merges, can is generally handled by simple analysis and reads voice data, easily quilt People steals audio data content.
2nd, after traditional batch audio merges, data do not carry out storage strategy control, can not accurately read wherein single Audio section.
3rd, after traditional batch audio merges, the metadata of original audio is easily damaged, causes loss of data or damage.
Therefore, prior art is improved up for further.
The content of the invention
In view of above-mentioned weak point of the prior art, it is an object of the invention to provide the user a kind of audio file batch The method and system that amount merges and played, to solve, the audio file security after batch merges in the prior art is low and data are easy The problem of loss.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of method that audio file batch merges and played, wherein, it the described method comprises the following steps:
A, the audio file by the audio file Batch conversion that needs merge into form of the same race;
B, the data of the audio file are split using data value set in advance as cutting unit, segmentation is obtained Audio file block be encrypted after, merge storage into data file;
C, the data message of the audio file block included in the data file is read, the audio file block is decrypted After play out.
The method that the audio file batch merges and played, wherein, the step B includes:
B1, the audio file block being partitioned into is randomly assigned to storage order, and track rope is generated according to the storage order Draw table;
The step C includes:
C1, according to the track index table obtain data file in each audio file block information.
The method that the audio file batch merges and played, wherein, the step B includes:
B2, by the data message included in the audio file block in plain text, according to encryption key set in advance, make The audio file block is encrypted with AES encryption algorithm.
The method that the audio file batch merges and played, wherein, also include in the step B:
B3, the storage of the audio file block after storage order result will be randomly assigned preserved.
The method that the audio file batch merges and played, wherein, also include in the step C:
C2, using the encryption key audio file block is decrypted, and read according to the track index table The information of the audio file block, rearrangement combine the audio file block, has complete audio data to what is read Audio file plays out.
The system that a kind of audio file batch merges and played, wherein, including:
Formatting module, for the audio file by the audio file Batch conversion that needs merge into form of the same race;
Split encrypting module, for the data of the audio file being carried out using data value set in advance as cutting unit Segmentation, after the audio file block that segmentation obtains is encrypted, merge storage into data file;
Playing module is decrypted, for reading the data message of the audio file block included in the data file, by institute Played out after stating the decryption of audio file block.
The system that the audio file batch merges and played, wherein, it is single that the segmentation encrypting module includes index generation Member, the decryption playing module include reading information unit;
The index generation unit, for the audio file being partitioned into block to be randomly assigned into storage order, and according to described Storage order generates track index table;
The reading information unit, for obtaining each audio file block in data file according to the track index table Information.
The system that the audio file batch merges and played, wherein, the segmentation encrypting module also includes encryption Unit;
The cryptographic processing unit, for being plaintext by the data message included in the audio file block, according to pre- The encryption key first set, the audio file block is encrypted using AES encryption algorithm.
The system that the audio file batch merges and played, wherein, the segmentation encrypting module also includes information and stored Unit;
Described information memory cell, protected for the storage of the audio file block after storage order result will to be randomly assigned Deposit.
The system that the audio file batch merges and played, wherein, the decryption playing module reads single including decryption Member;
The decryption reading unit, for the audio file block to be decrypted using the encryption key, and according to The track index table reads the information of the audio file block, and the audio file block is combined in rearrangement, to what is read Audio file with complete audio data plays out.
Beneficial effect, the method and system that a kind of audio file batch provided by the present invention merges and played, by right The audio file for needing to merge carries out unified formatting first, and is divided into audio file block, and audio file block is carried out Encryption, thereby may be ensured that the security of voice data, prevents audio data content and steal, and always according to audio file block Storage location generation track index table, the position that can be quickly stored according to the track index table to audio file block Positioned, can not only prevent the loss of audio file from can also realize the data letter for fast and accurately reading the audio file Breath, therefore method and system provided by the present invention not only facilitate the storage of audio file to also assures that the peace of the audio file Quan Xing.
Brief description of the drawings
Fig. 1 is the step flow chart of a kind of audio file batch merging of the present invention and the method played.
Fig. 2 is the concrete application embodiment schematic diagram of the method for the invention.
Fig. 3 is the system principle structural representation that a kind of audio file batch of the present invention merges and played.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings The present invention is further described.It should be appreciated that specific embodiment described herein is used only for explaining the present invention, and do not have to It is of the invention in limiting.
The invention provides a kind of audio file batch merge and play method, as shown in figure 1, methods described include with Lower step:
S1, the audio file by the audio file Batch conversion that needs merge into form of the same race.
Multiple audio file batches that needs are merged first by conversion software, by the sound of original different-format Frequency file is converted to the audio file of same format, causes to merge the number after storing because of format differences between reduction audio file According to damage.
S2, using data value set in advance as cutting unit the data of the audio file are split, will be split To audio file block be encrypted after, merge storage into data file.
After audio file batch format, the data included to audio file are split.
The method of above-mentioned data segmentation can be:Three kinds of fixed size piecemeal, sliding shoe piecemeal and variable partitioned blocks.Below Data segmentation explanation is carried out by taking fixed size partition strategy as an example, i.e., according to default size by file division into multiple audio files Block, this can be preset and be sized to 512 bytes, 1024 bytes, 2048 bytes etc..For example, being changed in previous step Audio file 1 afterwards is divided into audio file block a1, b1 and c1 according to 1024 bytes.In the piecemeal size unit according to setting File is carried out in piecemeal processing procedure, if last block piecemeal is less than the piecemeal size unit of setting, takes last block The actual size processing of piecemeal.
After audio file completes data segmentation, obtained audio file block is encrypted, merges after encryption and deposits Store up into a data file.
Specifically, the audio file, which is encrypted, can use multiple encryption algorithms, it is preferred that to institute in this step To state audio file block encryption and use AES symmetric encipherment algorithms, the algorithm has been analyzed in many ways and widely the whole world uses, AES encryption algorithmic technique mature and reliable, feature are that algorithm discloses, amount of calculation is small, enciphering rate is fast, encryption efficiency is high, security. In a symmetric encryption algorithm, by audio plaintext initial data and encryption key together by special AES processing after, make it The encrypted cipher text for becoming complicated is exported, and can be to read and write audio file block while audio file block is encrypted, After the completion of encryption, the rearrangement of audio file block is combined in a larger data storage section, is stored as one individually Data file in.
The data message of audio file block included in S3, the reading data file, by the audio file block solution Played out after close.
The data message of the audio file block included in the data file is read, obtains the audio file block after encryption Information, after the audio file block is decrypted using the AES used in above-mentioned steps S2, play out.
In order to preferably ensure the integrality of the security of audio file and data, and carrying out to the number after merging Positioned faster according to file middle pitch frequency file, in the basic row of the above method, there can also be following improvement, wherein, the step Rapid S2 includes:
S21, the audio file block being partitioned into is randomly assigned to storage order, and track rope is generated according to the storage order Draw table;
The step S3 includes:
S31, according to the track index table obtain data file in each audio file block information.
By to carrying out the audio file being partitioned into block to be randomly assigned storage order in this step, and it is suitable according to its storage Sequence generates track index table, so as to can not only avoid passing through audio file of the simple analysis can after must merge, Avoid audio file from losing data, quickly audio file block can also be positioned by track index table, read wherein Data message.
And also include in this step, the storage of the audio file block after storage order result will be randomly assigned and preserved.
The storage result includes:Audio file name, each audio file block name, segmentation order, the word of audio file block Save size, the byte point that segmentation starts, the segmentation byte point terminated, the storage order being randomly assigned.Pass through the note of these information Record, merge storage for follow-up file block and piecemeal assembles the associative operation read and prepared, finally with reference to audio file The size of the quantity of block and audio file itself, the track index table for the object information that derived record has piecemeal to store is calculated, its Below middle concordance list structure:
<files>
<file name="1.mp3" size="24576">
<data_block blockindex="1" name="a1" beginbyte="1" endbyte="1024" size="1024" saveindex="3"></data_block>
<data_block blockindex="2" name="b1" beginbyte="1025" endbyte="2048" size="1024" saveindex="2"></data_block>
<data_block blockindex="3" name="c1" beginbyte="2049" endbyte="3072" size="1024" saveindex="1"></data_block>
</file>
<file name="2.mp3" size="24500">
<data_block blockindex="1" name="a2" beginbyte="1" endbyte="1024" size="1024" saveindex="6"></data_block>
<data_block blockindex="2" name="b2" beginbyte="1025" endbyte="2048" size="1024" saveindex="5"></data_block>
<data_block blockindex="3" name="c2" beginbyte="2049" endbyte="2996" size="948" saveindex="4"></data_block>
</file>
<files>
Audio file block can be positioned according to the track index table in above-mentioned steps S3.
The step S2 includes:
S22, by the data message included in the audio file block in plain text, according to encryption key set in advance, The audio file block is encrypted using AES encryption algorithm.
The method that the audio file batch merges and played, wherein, also include in the step S3:
S32, using the encryption key audio file block is decrypted, and read according to the track index table The information of the audio file block, rearrangement combine the audio file block, has complete audio data to what is read Audio file plays out.
Due to the audio file block having been carried out being randomly assigned storage order in above-mentioned steps S2, therefore in this step It is middle to need, by the audio file block after decryption, rearrangement combination, after a complete audio file is read, to carry out it Play.
In order to carry out more detailed explanation to the present invention, as described in Figure 2, the concrete application of the inventive method is implemented to illustrate It is intended to, as illustrated, treating the audio file that batch merges:First by audio 1, audio 2 ... audio n, unified form is converted into, And the audio file is split according to above-mentioned dividing method, such as:Audio 1 is divided into audio file block:Piecemeal A1, piecemeal b1 and piecemeal c1, audio 2 are divided into audio file block:Piecemeal a2, piecemeal b2 and piecemeal c2 ... split audio n Into audio file block:Piecemeal an, piecemeal bn and piecemeal bn, the audio file block being partitioned into is carried out being randomly assigned storage region, Such as:The audio file piecemeal c2 gone out in storage region corresponding to position 1 for the file division of audio 2, it is sound that position 2 is corresponding Frequently the 1 audio file piecemeal a1 ... being partitioned into then according to the storage location of above-mentioned audio file block export track concordance list, After the audio file block is encrypted with reference to AES symmetric encipherment algorithms, merge storage to the data of a storage data field In file.
It is then first to obtain the data needing to play out the audio file being merged into a data file Audio file block message in file, each audio file block is accurately positioned according to the track index table, it is entered After row decryption, play out.
As described in Figure 3, based on the above method, merge and play the invention also discloses a kind of audio file batch System, as illustrated, the system include with lower module:
Formatting module 10, for the audio file by the audio file Batch conversion that needs merge into form of the same race;
Split encrypting module 20, for entering the data of the audio file using data value set in advance as cutting unit Row segmentation, after the audio file block that segmentation obtains is encrypted, merge storage into data file;
Playing module 30 is decrypted, will for reading the data message of the audio file block included in the data file Played out after the audio file block decryption.
The system that the audio file batch merges and played, wherein, it is single that the segmentation encrypting module includes index generation Member, the decryption playing module include reading information unit;
The index generation unit, for the audio file being partitioned into block to be randomly assigned into storage order, and according to described Storage order generates track index table;
The reading information unit, for obtaining each audio file block in data file according to the track index table Information.
The system that the audio file batch merges and played, wherein, the segmentation encrypting module also includes encryption Unit;
The cryptographic processing unit, for being plaintext by the data message included in the audio file block, according to pre- The encryption key first set, the audio file block is encrypted using AES encryption algorithm.
The system that the audio file batch merges and played, wherein, the segmentation encrypting module also includes information and stored Unit;
Described information memory cell, protected for the storage of the audio file block after storage order result will to be randomly assigned Deposit.
The system that the audio file batch merges and played, wherein, the decryption playing module reads single including decryption Member;
The decryption reading unit, for the audio file block to be decrypted using the encryption key, and according to The track index table reads the information of the audio file block, and the audio file block is combined in rearrangement, to what is read Audio file with complete audio data plays out.
Beneficial effect, the method and system that a kind of audio file batch provided by the present invention merges and played, by right The audio file for needing to merge carries out unified formatting first, and is divided into audio file block, and audio file block is carried out Encryption, thereby may be ensured that the security of voice data, prevents audio data content and steal, and always according to audio file block Storage location generation track index table, the position that can be quickly stored according to the track index table to audio file block Positioned, can not only prevent the loss of audio file from can also realize the data letter for fast and accurately reading the audio file Breath, therefore method and system provided by the present invention not only facilitate the storage of audio file to also assures that the peace of the audio file Quan Xing.
It is understood that for those of ordinary skills, can be with technique according to the invention scheme and its hair Bright design is subject to equivalent substitution or change, and all these changes or replacement should all belong to the guarantor of appended claims of the invention Protect scope.

Claims (6)

1. a kind of method that audio file batch merges and played, it is characterised in that the described method comprises the following steps:
A, the audio file by the audio file Batch conversion that needs merge into form of the same race;
B, the data of the audio file are split using data value set in advance as cutting unit, the sound that segmentation is obtained After frequency file block is encrypted, merge storage into data file;
C, the data message of the audio file block included in the data file is read, the audio file block is decrypted laggard Row plays;
The step B includes:
B1, the audio file block being partitioned into is randomly assigned to storage order, and track index table is generated according to the storage order;
The step C includes:
C1, according to the track index table obtain data file in each audio file block information;According to the track rope Draw table to position audio file block;
C2, using encryption key the audio file block is decrypted, and the audio is read according to the track index table The information of blocks of files, the audio file block is combined in rearrangement, to the audio file with complete audio data read Play out.
2. the method that audio file batch merges and played according to claim 1, it is characterised in that wrapped in the step B Include:
B2, by the data message included in the audio file block in plain text, according to encryption key set in advance, to use The audio file block is encrypted AES encryption algorithm.
3. the method that audio file batch merges and played according to claim 1, it is characterised in that in the step B also Including:
B3, the storage of the audio file block after storage order result will be randomly assigned preserved.
A kind of 4. system that audio file batch merges and played, it is characterised in that including:
Formatting module, for the audio file by the audio file Batch conversion that needs merge into form of the same race;
Split encrypting module, for being divided the data of the audio file using data value set in advance as cutting unit Cut, after the audio file block that segmentation obtains is encrypted, merge storage into data file;
Playing module is decrypted, for reading the data message of the audio file block included in the data file, by the sound Played out after the decryption of frequency file block;
The segmentation encrypting module includes index generation unit, and the decryption playing module includes reading information unit;
The index generation unit, for the audio file being partitioned into block to be randomly assigned into storage order, and according to the storage It is sequentially generated track index table;
The reading information unit, for obtaining the letter of each audio file block in data file according to the track index table Breath;Audio file block is positioned according to the track index table;
The decryption playing module includes decryption reading unit;
The decryption reading unit, for the audio file block to be decrypted using encryption key, and according to the track Concordance list reads the information of the audio file block, and the audio file block is combined in rearrangement, has completely to what is read The audio file of voice data plays out.
5. the system that audio file batch merges and played according to claim 4, it is characterised in that the segmentation encryption mould Block also includes cryptographic processing unit;
The cryptographic processing unit, for by the data message included in the audio file block in plain text, according to setting in advance Fixed encryption key, the audio file block is encrypted using AES encryption algorithm.
6. the system that audio file batch merges and played according to claim 4, it is characterised in that the segmentation encryption mould Block also includes information memory cell;
Described information memory cell, preserved for the storage of the audio file block after storage order result will to be randomly assigned.
CN201410402102.6A 2014-08-15 2014-08-15 The method and system that a kind of audio file batch merges and played Active CN104168435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410402102.6A CN104168435B (en) 2014-08-15 2014-08-15 The method and system that a kind of audio file batch merges and played

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410402102.6A CN104168435B (en) 2014-08-15 2014-08-15 The method and system that a kind of audio file batch merges and played

Publications (2)

Publication Number Publication Date
CN104168435A CN104168435A (en) 2014-11-26
CN104168435B true CN104168435B (en) 2018-01-12

Family

ID=51912043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410402102.6A Active CN104168435B (en) 2014-08-15 2014-08-15 The method and system that a kind of audio file batch merges and played

Country Status (1)

Country Link
CN (1) CN104168435B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897587A (en) * 2017-02-27 2017-06-27 百度在线网络技术(北京)有限公司 The method and apparatus of reinforcement application, loading reinforcement application
CN108834037B (en) * 2018-06-12 2019-09-13 广州酷狗计算机科技有限公司 The method and apparatus of playing audio-fequency data
CN110008185B (en) * 2018-10-12 2021-02-05 和宇健康科技股份有限公司 Cloud information classification processing system utilizing processing redundancy
CN109949792B (en) * 2019-03-28 2021-08-13 优信拍(北京)信息科技有限公司 Multi-audio synthesis method and device
CN113824735B (en) * 2021-11-19 2022-03-11 航天宏图信息技术股份有限公司 Remote sensing image encryption transmission method and system
CN115378590B (en) * 2022-10-27 2023-02-07 国网浙江义乌市供电有限公司 Energy data safe storage method and system based on block chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1383326A (en) * 2001-04-20 2002-12-04 安科数码媒体有限公司 Device and method for processing digital audio-video medium
CN102238179A (en) * 2010-04-07 2011-11-09 苹果公司 Real-time or near real-time streaming
CN103200425A (en) * 2013-03-29 2013-07-10 天脉聚源(北京)传媒科技有限公司 Device and method of multimedia processing
CN103279693A (en) * 2013-05-30 2013-09-04 付弦 File encryption method
CN103605709A (en) * 2013-11-12 2014-02-26 天脉聚源(北京)传媒科技有限公司 Distributed audio and video processing device and distributed audio and video processing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8738163B2 (en) * 2010-12-28 2014-05-27 Channel D Corporation Proxy file pointer method for redirecting access for incompatible file formats

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1383326A (en) * 2001-04-20 2002-12-04 安科数码媒体有限公司 Device and method for processing digital audio-video medium
CN102238179A (en) * 2010-04-07 2011-11-09 苹果公司 Real-time or near real-time streaming
CN103200425A (en) * 2013-03-29 2013-07-10 天脉聚源(北京)传媒科技有限公司 Device and method of multimedia processing
CN103279693A (en) * 2013-05-30 2013-09-04 付弦 File encryption method
CN103605709A (en) * 2013-11-12 2014-02-26 天脉聚源(北京)传媒科技有限公司 Distributed audio and video processing device and distributed audio and video processing method

Also Published As

Publication number Publication date
CN104168435A (en) 2014-11-26

Similar Documents

Publication Publication Date Title
CN104168435B (en) The method and system that a kind of audio file batch merges and played
US10740474B1 (en) Systems and methods for generation of secure indexes for cryptographically-secure queries
WO2017148316A1 (en) File encryption method, file decryption method, electronic device, and storage medium
CN101800811B (en) Mobile phone data security protection method
CN107609418A (en) Desensitization method, device, storage device and the computer equipment of text data
CN106878013B (en) File encryption and decryption method and device
CN111310222B (en) File encryption method
EP4235475A3 (en) Systems and methods of database encryption in a multitenant database management system
CN108848058A (en) Intelligent contract processing method and block catenary system
CN101582109A (en) Data encryption method and device, data decryption method and device and solid state disk
TW201243643A (en) Hierarchical encryption/decryption device and method thereof
CN103095449B (en) A kind of dynamic encryption decryption method based on stream cipher
GB2512513A (en) System for determining whether character string has been accepted by automaton
CN106960156A (en) Data encryption and access method based on application program, device
CN107612683A (en) A kind of encipher-decipher method, device, system, equipment and storage medium
CN107733904A (en) A kind of method, apparatus and platform of virtual-machine data encryption and decryption
CN108183973A (en) A kind of Streaming Media quantum flow block data structure and encipher-decipher method
CN103488915A (en) Double-secret-key-encryption resource encryption and decryption method with combination of software and hardware
CN103914662A (en) Access control method and device of file encrypting system on the basis of partitions
CN106446697A (en) Method and device for saving private data
KR100936937B1 (en) Database encryption and query methods keeping order within bucket partially
CN106778371A (en) A kind of plug type hardware encryption storage method, system
CN104881613A (en) Disk global data encryption system and method
CN102480353A (en) Method of password authentication and secret key protection
CN105357206A (en) Secure video transmission method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant