Audio file encryption method and system based on chaotic mapping

Through the audio file encryption method based on chaotic mapping, the audio file is segmented and encrypted using chaotic sequences, which solves the problems of large and long time consumption of audio file encryption in the prior art, and realizes efficient audio file encryption and copyright protection.

CN119483898APending Publication Date: 2025-02-18SHAANXI HOURUN YUZE INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411617038.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, the encryption algorithm is used to encrypt audio files directly, resulting in excessive consumption and long encryption time.

Method used

The audio file encryption method based on chaos mapping is adopted. By obtaining the audio file and user ID, the number of iterations and chaos parameters are determined, the chaos sequence is generated, and the audio file is segmented and encrypted using the chaos sequence.

Benefits of technology

It realizes effective encryption of audio files while consumption is small and encryption speed is fast, ensuring that the divided audio files can only be played on the copyrighted player, reducing merchant losses, and conducive to copyright protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119483898A_ABST
    Figure CN119483898A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data transmission, in particular to an audio file encryption method and system based on chaotic mapping. The encryption method comprises the following steps: determining the number of iterations according to a key stream of an audio file, and converting a user ID into a chaotic parameter; obtaining the number of iterations and chaotic parameter data, and generating a chaotic sequence; segmenting the audio file, and outputting encrypted audio data; the encryption system comprises a parameter acquisition module, a chaotic sequence generation module and a data segmentation module. The encryption process and the audio segmentation process are combined, the parameters of the chaotic system and the generated chaotic sequence are generated by using the ID of the user, and the audio file is segmented, so that the segmented audio file can only be played on a player with copyright, the segmentation results of different users are different, the loss of merchants can be reduced, and the user experience is improved. The method is beneficial to copyright protection, and can achieve the purposes of low consumption and high encryption speed in the process of encrypting the audio file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of data transmission, and in particular to an audio file encryption method based on chaos mapping and a system thereof. Background Art

[0002] With the rapid development of information technology, the secure transmission and storage of audio files has become increasingly important.

[0003] Currently, audio encryption methods are used to protect audio files. The main principle is to add random dry signals to the audio, calculate the digital summary, obtain the digital signature, use the public key to generate a digital certificate, and directly use the encryption algorithm to encrypt the audio. At the same time, it is necessary to upload the intermediate file with the digital signature and the digital certificate to the server. During playback, the user can obtain the digital certificate and result file from the server only after verification.

[0004] In the above method, the audio is directly encrypted using an encryption algorithm, which consumes too much energy and takes a long time to encrypt. Summary of the invention

[0005] The purpose of the present invention is to provide an audio file encryption method and system based on chaotic mapping, aiming to solve the technical problems in the prior art of directly using encryption algorithms to encrypt audio, which consumes too much energy and takes a long time to encrypt.

[0006] To achieve the above object, the present invention adopts an audio file encryption method based on chaotic mapping, which includes the following steps: obtaining an audio file and a user ID respectively, determining the number of iterations according to a key stream of the audio file, and converting the user ID into a chaotic parameter;

[0007] Obtain the number of iterations and chaotic parameter data to generate a chaotic sequence;

[0008] The chaotic sequence is used to segment the audio file and output the encrypted audio data.

[0009] Wherein, in the step of determining the number of iterations according to the key stream of the audio file:

[0010] Calculate the hash value of the audio file, generate the key stream of the audio file, and obtain the binary string;

[0011] Extract the value in the binary string, use the value as the number of iterations, and output the number of iterations.

[0012] Among them, in the step of converting the user ID into chaos parameters:

[0013] Obtain user ID data and preprocess the user ID data; the preprocessing process includes removing spaces and converting formats;

[0014] The preprocessed user ID data is converted into a key and the chaotic parameters are output.

[0015] Among them, in the step of obtaining the number of iterations and chaotic parameter data and generating a chaotic sequence:

[0016] Adopt the chaotic mapping formula, input the iteration times and chaotic parameters, and output the chaotic sequence.

[0017] Among them, in the steps of adopting the chaotic mapping formula, inputting the number of iterations and chaotic parameters, and outputting the chaotic sequence:

[0018] The chaotic mapping formula is:

[0019]

[0020] Among them, j ≥ 1 represents the number of chaotic sequence items, x(n), y(n), z(n) are the values ​​of the generated chaotic sequence after n iterations, the number of iterations is n, ν is the fractional order in the chaotic map, and the value range is 0 < ν ≤ 1. k ∈ (3.5699, 4), β ∈ (3.1, 33), r ∈ (4, 5.7) are all chaotic parameters.

[0021] Among them, in the step of using chaotic sequence to segment the audio file and output encrypted audio data:

[0022] Determine the split value;

[0023] According to the segmentation value, the audio file is segmented and encrypted, and the encrypted audio data is output.

[0024] Among them, in the step of determining the segmentation value:

[0025] Get the length of the chaotic sequence and convert it into a segmentation value.

[0026] The present invention also provides an audio file encryption system based on chaotic mapping, comprising a parameter acquisition module, a chaotic sequence generation module, and a data segmentation module; wherein:

[0027] The parameter acquisition module is used to respectively acquire the audio file and the user ID, determine the number of iterations according to the key stream of the audio file, and convert the user ID into a chaotic parameter;

[0028] The chaotic sequence generation module is used to obtain the number of iterations and chaotic parameter data to generate a chaotic sequence;

[0029] The data segmentation module is used to segment the audio file using a chaotic sequence and output encrypted audio data.

[0030] The present invention discloses an audio file encryption method based on chaotic mapping and a system thereof, which respectively adopts the parameter acquisition module, the chaotic sequence generation module and the data segmentation module to perform the following operations: respectively acquire the audio file and the user ID, determine the number of iterations according to the key stream of the audio file, and convert the user ID into a chaotic parameter; acquire the number of iterations and the chaotic parameter data to generate a chaotic sequence; use the chaotic sequence to segment the audio file and output the encrypted audio data; by combining the encryption process with the audio segmentation process, use the user ID to generate the parameters of the chaotic system and the generated chaotic sequence, and segment the audio file, so that the segmented audio file can only be played on a player that owns the copyright, and the segmentation results of different users are different, which can reduce the loss of merchants, is beneficial to copyright protection, and can achieve the purpose of low consumption and fast encryption speed in the process of encrypting the audio file. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 It is a flow chart of the audio file encryption method based on chaotic mapping of the present invention.

[0033] Figure 2 The present invention is a flowchart of the steps of the audio file encryption method based on chaotic mapping.

[0034] Figure 3 It is a flow chart of the steps of determining the number of iterations of the present invention.

[0035] Figure 4 It is a flow chart of the steps of converting user ID into chaos parameters of the present invention.

[0036] Figure 5 It is a flow chart of the steps of segmenting an audio file of the present invention.

[0037] Figure 6 It is a structural principle diagram of the audio file encryption system based on chaotic mapping of the present invention.

[0038] Figure 7 It is a structural principle diagram of the electronic equipment of the present invention.

[0039] 401- parameter acquisition module, 402- chaotic sequence generation module, 403- data segmentation module. DETAILED DESCRIPTION

[0040] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0041] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0042] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0043] See also Figure 1 to Figure 5 The present invention provides an audio file encryption method based on chaotic mapping, comprising the following steps:

[0044] S100: obtaining an audio file and a user ID respectively, determining the number of iterations according to the key stream of the audio file, and converting the user ID into a chaotic parameter;

[0045] In this embodiment, the audio file and the user ID are obtained respectively, the number of iterations is determined according to the key stream of the audio file, and the user ID is converted into a chaotic parameter. The chaotic system generates a chaotic sequence through the number of iterations and the chaotic parameters.

[0046] The specific steps for determining the number of iterations based on the key stream of the audio file are:

[0047] S111: Import the original audio file V. After importing into the computer, the audio file is a 1×N sequence. Calculate the hash value of the audio file, generate the key stream of the audio file, and obtain a binary string, whose value v(i) can be positive or negative, i=1,...,N);

[0048] S112: using the user ID, generating parameters suitable for chaotic mapping to generate chaotic sequences as user secret keys k′, β′, r′;

[0049] S113: Extract the value in the binary string, use the value as the number of iterations, and output the number of iterations. Specifically: calculate the hash value of the audio file, take the modulus of each element v(i) of the hash value sequence representing the encrypted audio file, and obtain the sequence m(i)=|v(i)|;

[0050] S114: Select appropriate constants L1, L2 and L3. Multiply m(i) by L1 and round to get R, i.e. R = round(m(i)·L1); take R modulo L2 to get R1, i.e. R1 = mod(R, L2) (for example, L1 = 1000, L2 = 20, L3 = 10); substitute the parameters k′, β′, r′ into the chaotic system (1) and iterate R1 times to get the chaotic sequence x(R1+1), and take the final value of the chaotic sequence as the output value Rand(i) = x(R1+1) of the process;

[0051] In addition, in the above steps, a hash function such as SHA-256 can also be used to obtain a binary string of fixed length, and the hash value is the key stream of the audio file. A random number generator is used to randomly extract a value from the binary string, and the value is used as the iteration number to iterate the system (1) and generate a chaotic sequence.

[0052] The specific steps of converting user ID into chaos parameters in the above process are:

[0053] S121: Obtain user ID data and preprocess the user ID data; the preprocessing process includes removing spaces and converting the format; using the user ID, here it is assumed to be the mobile phone number J, for example J = 18888886666;

[0054] S122: Perform key conversion on the pre-processed user ID data and output chaotic parameters. For example, perform the following operation on the user's mobile phone number J:

[0055]

[0056] We get J1∈(0,1). Analysis shows that when ν=1 and k∈[3.5699,4] in equation (1), a stable chaotic sequence can be generated;

[0057] S123: Perform the following calculations to obtain a new parameter k′ of the chaotic system, k′=0.4301*J1+3.5699; obtain a new parameter β′ of the chaotic system, β′=29.9*J1+33; obtain a new parameter r′ of the chaotic system, r′=1.7*J1+4;

[0058] S124: Substitute k′, β′, r′ into system (1), iterate in step S114 to obtain the chaotic sequence, and complete the remaining audio segmentation and encryption steps.

[0059] In the above steps, the user ID is the unique identifier of the user. The user ID data includes the user's username, account number, password, etc. After obtaining the user ID data, in order to ensure the standardization and consistency of the user ID and facilitate the subsequent key conversion process, the user ID data is preprocessed. The preprocessing process includes removing spaces and format conversion. Select an encryption algorithm, perform key conversion on the preprocessed user ID data, and obtain key parameters, which are chaos parameters.

[0060] The steps to generate a user key include:

[0061] S200: Obtaining the number of iterations and chaotic parameter data to generate a chaotic sequence;

[0062] In this embodiment, the number of iterations and chaotic parameter data are obtained, the chaotic mapping formula is adopted, the number of iterations and chaotic parameters are input, and the chaotic sequence is output;

[0063] The chaotic mapping formula is:

[0064]

[0065]

[0066] This mapping can select different parameters to generate chaotic sequences. When k∈[3.9566,4],β=3.5,r=5.5, a stable chaotic sequence can be generated.

[0067] This mapping can select different parameters to generate chaotic sequences. Among them, j≥1 represents the number of terms in the chaotic sequence, x(n), y(n), z(n) are all the values ​​of the generated chaotic sequence after n iterations, the number of iterations is n, ν is the fractional order in the chaotic mapping, and the value range is 0<ν≤1. k∈(3.5699, 4), β∈(3.1, 33), r∈(4, 5.7) are all chaotic parameters. When the parameters are selected in the above range, a highly random and stable chaotic sequence can be generated.

[0068] S300: Segment the audio file using a chaotic sequence and output encrypted audio data.

[0069] In this embodiment, the chaotic sequence is used to segment the audio file, and the audio file is encrypted and then the encrypted audio data is output.

[0070] The specific steps are:

[0071] S301: Determine the segmentation value; specifically: substitute the parameters k′, β′, r′ in step S123 into the chaotic system (1) and iterate R1 times to obtain the chaotic sequence x(R1+1), and take the end value of the chaotic sequence as the output value Rand(i)=x(R1+1) of the process as the segmentation value;

[0072] S302: Segment and encrypt the audio file according to the segmentation value, and output the encrypted audio data. The specific process is: take the output value Rand(i) of the S301 process, and perform the following calculation on the sound sequence element v(i) to obtain S(i), S(i)=v(i)+Rand(i)*L3, where L3 is the constant selected in step S114, and S(i) is the encrypted segmented audio sequence.

[0073] In the above steps, by analyzing the dynamic behavior of the chaotic system, appropriate parameters are selected. For example, in formula (1), 0 < ν ≤ 1, k ∈ (3.5699, 4), β ∈ (3.1, 33), r ∈ (4, 5.7) are selected to enable the system to generate a chaotic sequence with good randomness and stability. If a stable chaotic sequence can be generated, the segmentation value is calculated by S301. According to the segmentation value, the audio file is segmented and encrypted, and the encrypted audio data is output. A random sequence is generated by chaotic mapping, and the audio is randomly segmented by using the random sequence, which reduces the step of generating interference signals and achieves the effect of combining interference and encryption steps into one.

[0074] In the present invention, firstly, the audio file and the user ID are obtained respectively, the number of iterations is determined according to the key stream of the audio file, and the user ID is converted into a chaotic parameter; then the number of iterations and the chaotic parameter data are obtained to generate a chaotic sequence; finally, the audio file is segmented using the chaotic sequence, and the encrypted audio data is output. By combining the encryption process with the audio segmentation process, the parameters of the chaotic system and the generated chaotic sequence are generated using the user ID, and the audio file is segmented, so that the segmented audio file can only be played on a player with copyright, and the segmentation results of different users are different, which can reduce the loss of merchants, is conducive to copyright protection, and can achieve the purpose of low consumption and fast encryption speed in the process of encrypting the audio file.

[0075] Corresponding to the aforementioned embodiment of the audio file encryption method based on chaotic mapping, the present application also provides an embodiment of an audio file encryption system based on chaotic mapping.

[0076] Figure 6 FIG. 1 is a block diagram of an audio file encryption system based on chaos mapping according to an exemplary embodiment. Figure 6 The system may include: a parameter acquisition module 401, a chaotic sequence generation module 402, and a data segmentation module 403; wherein:

[0077] The parameter acquisition module 401 is used to respectively acquire the audio file and the user ID, determine the number of iterations according to the key stream of the audio file, and convert the user ID into a chaotic parameter;

[0078] The chaotic sequence generation module 402 is used to obtain the number of iterations and chaotic parameter data to generate a chaotic sequence;

[0079] The data segmentation module 403 is used to segment the audio file using a chaotic sequence and output encrypted audio data.

[0080] In this embodiment, the parameter acquisition module 401 obtains the audio file and the user ID respectively, determines the number of iterations according to the key stream of the audio file, and converts the user ID into chaotic parameters. The chaotic sequence generation module 402 obtains the number of iterations and chaotic parameter data to generate a chaotic sequence. The data segmentation module 403 uses the chaotic sequence to segment the audio file and outputs encrypted audio data. By combining the encryption process with the audio segmentation process, the parameters of the chaotic system and the generated chaotic sequence are generated using the user's ID, and the audio file is segmented, so that the segmented audio file can only be played on a player that owns the copyright, and the segmentation results of different users are different, which can reduce the loss of merchants, is beneficial to copyright protection, and can achieve the purpose of low consumption and fast encryption speed in the process of encrypting audio files.

[0081] Regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0082] For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art can understand and implement it without creative work.

[0083] Accordingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned chaotic mapping-based audio file encryption method. Figure 7 As shown in FIG. 1 , a hardware structure diagram of an audio file encryption system based on chaotic mapping provided by an embodiment of the present invention is provided for any device with data processing capability, except Figure 7In addition to the processor, memory and network interface shown, any device with data processing capability in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capability, which will not be described in detail.

[0084] Accordingly, the present application also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the audio file encryption method based on chaotic mapping as described above is implemented. The computer-readable storage medium can be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Further, the computer-readable storage medium can also include both an internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and can also be used to temporarily store data that has been output or is to be output.

[0085] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0086] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. An audio file encryption method based on chaotic mapping, characterized in that: The steps include: The audio file and the user ID are obtained respectively, the number of iterations is determined according to the key stream of the audio file, and the user ID is converted into a chaotic parameter; Obtain the number of iterations and chaotic parameter data to generate a chaotic sequence; The chaotic sequence is used to segment the audio file and output the encrypted audio data.

2. The audio file encryption method based on chaotic mapping as claimed in claim 1, characterized in that: In the step of determining the number of iterations based on the key stream of the audio file: Calculate the hash value of the audio file, generate the key stream of the audio file, and obtain the binary string; Extract the value in the binary string, use the value as the number of iterations, and output the number of iterations.

3. The audio file encryption method based on chaotic mapping as claimed in claim 1, characterized in that: In the step of converting user ID to chaos parameters: Obtain user ID data and pre-process the user ID data; The preprocessing process includes removing spaces and format conversion; The preprocessed user ID data is converted into a key and the chaotic parameters are output.

4. The audio file encryption method based on chaotic mapping as claimed in claim 1, characterized in that: In the steps of obtaining the number of iterations and chaotic parameter data and generating a chaotic sequence: Adopt the chaotic mapping formula, input the iteration times and chaotic parameters, and output the chaotic sequence.

5. The audio file encryption method based on chaotic mapping as claimed in claim 4, characterized in that: In the steps of adopting the chaotic mapping formula, inputting the number of iterations and chaotic parameters, and outputting the chaotic sequence: The chaotic mapping formula is: Among them, j ≥ 1 represents the number of chaotic sequence items, x(n), y(n), z(n) are the values ​​of the generated chaotic sequence after n iterations, the number of iterations is n, ν is the fractional order in the chaotic map, and the value range is 0 < ν ≤ 1. k ∈ (3.5699, 4), β ∈ (3.1, 33), r ∈ (4, 5.7) are all chaotic parameters.

6. The audio file encryption method based on chaotic mapping as claimed in claim 1, characterized in that: In the step of using chaotic sequence to segment the audio file and output encrypted audio data: Determine the split value; According to the segmentation value, the audio file is segmented and encrypted, and the encrypted audio data is output.

7. The audio file encryption method based on chaotic mapping as claimed in claim 5, characterized in that: In the step of determining the split value: Get the length of the chaotic sequence and convert it into a segmentation value.

8. An audio file encryption system based on chaotic mapping, applied to the audio file encryption method based on chaotic mapping as claimed in claim 1, characterized in that: It includes parameter acquisition module, chaotic sequence generation module and data segmentation module; among which: The parameter acquisition module is used to respectively acquire the audio file and the user ID, determine the number of iterations according to the key stream of the audio file, and convert the user ID into a chaotic parameter; The chaotic sequence generation module is used to obtain the number of iterations and chaotic parameter data to generate a chaotic sequence; The data segmentation module is used to segment the audio file using a chaotic sequence and output encrypted audio data.