A data encryption and decryption method, device, equipment and medium
By using acoustic signals for key generation and data encryption and decryption in parallel computing systems, the problems of complex key management and low computing efficiency in the prior art are solved, and efficient and secure data encryption and decryption are achieved to meet real-time requirements.
Patent Information
- Application Number
- CN202510315548.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-03-18
AI Technical Summary
Existing encryption technologies are less efficient in key management and large-scale data encryption and decryption, making it difficult to meet real-time requirements.
By collecting and preprocessing the sound wave signal, extracting its frequency characteristic information, amplitude change law and phase characteristic information, and constructing data mapping to discrete data sets, thereby generating and obtaining keys, and performing data encryption and decryption operations.
It reduces the resource consumption and labor costs of key management, improves the security and computing efficiency of data encryption and decryption, and can meet real-time requirements.
Smart Images

Figure CN119848907B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a data encryption and decryption method, device, equipment and medium. Background Art
[0002] In the era of big data, the importance of data in various fields has become increasingly prominent, and the volume of data transmission and storage has increased explosively. Data security has become the key to ensuring the stable operation of information systems and user privacy, which has promoted the development of encryption technology towards a more efficient direction. From the early simple substitution encryption and transposition encryption to the widely used symmetric encryption algorithm and asymmetric encryption algorithm today, data encryption technology has been continuously evolving.
[0003] Although significant progress has been made in current data encryption technology, there are still some drawbacks. On the one hand, the key management of traditional encryption algorithms is relatively complex. Whether it is the key distribution in symmetric encryption or the key generation and storage in asymmetric encryption, a large amount of resources and energy are required. On the other hand, when facing the encryption and decryption of large-scale data, the computing efficiency of existing algorithms is relatively low. As the amount of data continues to increase, the time required for encryption and decryption also increases significantly, which makes it difficult for some application scenarios with high real-time requirements, such as real-time video transmission and online transactions, to meet their real-time requirements through existing encryption and decryption methods. Therefore, the above problems urgently need to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a data encryption and decryption method, device, equipment and medium, which greatly reduces the resource consumption and labor cost of key management, and can meet the real-time requirements at the same time. The specific solutions are as follows:
[0005] In the first aspect, the present application discloses a data encryption and decryption method, which is applied to a parallel computing system. The parallel computing system includes multiple computing cores that meet the synchronous computing requirements. The method includes:
[0006] Collect initial sound wave signals; the initial sound wave signals include one or more sound wave signal segments;
[0007] Allocate different sound wave signal segments to different computing cores, and use the computing cores to preprocess the obtained sound wave signal segments to obtain target sound wave signals;
[0008] Use the computing cores to extract the frequency feature information, amplitude change law and phase feature information of the target sound wave signals, and map the data constructed based on the frequency feature information, the amplitude change law and the phase feature information to a target discrete data set;
[0009] Obtain a target key from the hash data obtained based on the target discrete data set by using the computing core, and perform encryption and decryption operations on the corresponding data to be processed by using the target key.
[0010] Optionally, preprocess the obtained acoustic signal segment to obtain a target acoustic signal, including:
[0011] Determine a filtering method according to the noise characteristics of the acoustic signal segment, and perform noise reduction processing on the acoustic signal segment according to the filtering method to obtain a noise-reduced acoustic signal; wherein, the noise characteristics include noise frequency characteristics, noise azimuth characteristics and noise intensity characteristics;
[0012] Convert the sampling rate of the noise-reduced acoustic signal to the same value, and perform amplitude normalization on the noise-reduced acoustic signal after sampling rate conversion to obtain a target acoustic signal.
[0013] Optionally, the determining a filtering method according to the noise characteristics of the acoustic signal segment, and performing noise reduction processing on the acoustic signal segment according to the filtering method to obtain a noise-reduced acoustic signal includes:
[0014] Select a filtering window with a target window length and a target sliding step, determine the average value of the acoustic signal segment within the target window length, and slide the filtering window according to the target sliding step to filter out high-frequency noise in the acoustic signal segment to obtain a noise-reduced acoustic signal;
[0015] Or, if there are multiple acoustic acquisition devices, determine the azimuth of the noise in the acoustic signal segment according to the time difference and amplitude difference of the acoustic signal segment received by each acoustic acquisition device, and filter the noise in the azimuth to obtain a noise-reduced acoustic signal;
[0016] Or, during the process of filtering the acoustic signal segment by using a filter, continuously compare the signal error between the acoustic signal segment and the filtered signal, and adjust the filtering parameters of the filter by using the signal error to obtain a noise-reduced acoustic signal; the signal error characterizes the noise intensity.
[0017] Optionally, extract the frequency feature information, amplitude change law and phase feature information of the target acoustic signal, including:
[0018] Determine the sampling frequency according to the time domain characteristics of the target acoustic signal, determine the transform window parameters according to the sampling frequency, and perform signal transformation through the transform window parameters to obtain frequency feature information;
[0019] Perform frame segmentation on the target acoustic wave signal, calculate the short-time energy of each frame of the signal according to the corresponding frame segmentation result, and obtain the amplitude change law by analyzing the numerical change of the short-time energy of each frame of the signal;
[0020] Perform Hilbert transform on the target acoustic wave signal to obtain an analytic signal, and determine the instantaneous phase according to the phase angle calculated based on the analytic signal to obtain phase characteristic information.
[0021] Optionally, after obtaining the target key from the hash data obtained based on the target discrete data set, further include:
[0022] Generate an index identifier of the target key by using one or more key parameters in the key parameter set, and store the index identifier in the index register; wherein, the key parameters in the key parameter set include key attribute parameters, key algorithm parameters, and key usage parameters.
[0023] Optionally, before performing encryption and decryption operations on the corresponding data to be processed by using the target key, further include:
[0024] Verify whether the data to be processed meets the predefined format based on a regular expression or a parser;
[0025] Verify the integrity of the data to be processed according to the hash value determined based on the data to be processed;
[0026] If the data to be processed meets the big data file determination condition, perform block operation on the data to be processed to obtain a plurality of block data, and add corresponding block numbers to each of the block data.
[0027] Optionally, performing encryption and decryption operations on the corresponding data to be processed by using the target key includes:
[0028] During the encryption or decryption process, if the data to be processed meets the big data file determination condition, use multiple computing cores in the parallel computing system to synchronously process the plurality of block data.
[0029] In a second aspect, the present application discloses a data encryption and decryption device applied to a parallel computing system, the parallel computing system includes a plurality of computing cores that meet the synchronous computing requirements, and the device includes:
[0030] A signal collection module, configured to collect an initial acoustic wave signal; the initial acoustic wave signal includes one or more acoustic wave signal segments;
[0031] A preprocessing module, configured to allocate different acoustic wave signal segments to different computing cores, and use the computing cores to preprocess the obtained acoustic wave signal segments to obtain a target acoustic wave signal;
[0032] A feature extraction module, configured to extract frequency feature information, amplitude change pattern, and phase feature information of the target acoustic wave signal by using the computing core, and map data constructed based on the frequency feature information, the amplitude change pattern, and the phase feature information to a target discrete data set;
[0033] An encryption / decryption module, configured to obtain a target key from hash data obtained based on the target discrete data set by using the computing core, and perform encryption / decryption operations on corresponding data to be processed by using the target key.
[0034] In a third aspect, the present application discloses an electronic device, including:
[0035] A memory, configured to store a computer program;
[0036] A processor, configured to execute the computer program to implement the data encryption / decryption method disclosed above.
[0037] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the data encryption / decryption method disclosed above is implemented.
[0038] It can be seen that the present application proposes a data encryption and decryption method, which is applied to a parallel computing system. The parallel computing system includes multiple computing cores that meet the synchronous computing requirements. The method includes: collecting an initial acoustic signal; the initial acoustic signal includes one or more acoustic signal segments; distributing different acoustic signal segments to different computing cores, and using the computing cores to preprocess the obtained acoustic signal segments to obtain a target acoustic signal; using the computing cores to extract the frequency feature information, amplitude change law, and phase feature information of the target acoustic signal, and mapping the data constructed based on the frequency feature information, the amplitude change law, and the phase feature information to a target discrete data set; using the computing cores to obtain a target key from the hash data obtained based on the target discrete data set, and using the target key to perform encryption and decryption operations on the corresponding data to be processed. In summary, due to the randomness and uniqueness of acoustic signals, it is difficult to predict and tamper with the target key generated based on acoustic signals. In this way, the present application improves the security of data encryption and decryption. At the same time, the acquisition of acoustic signals is relatively convenient. Compared with traditional encryption technologies that require a large amount of manpower and material resources for key generation, the present application does not require complex and expensive equipment and a specific environment, nor does it require special complex key distribution, generation, and storage operations, greatly reducing the resource consumption and labor cost of key management. At the same time, the parallel processing method of multiple computing cores can significantly shorten the processing time of each step. Especially when facing large-scale data, it can greatly improve the overall computing efficiency of encryption and decryption. For application scenarios with high real-time requirements such as real-time video transmission and online transactions, the present application can quickly complete the encryption and decryption operations of data, thereby meeting their real-time requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0040] Figure 1 It is a flowchart of a data encryption and decryption method disclosed in the present application;
[0041] Figure 2 It is a schematic diagram of a newly added module disclosed in the present application;
[0042] Figure 3 It is an architecture diagram of a parallel computing system disclosed in the present application;
[0043] Figure 4 It is a flowchart of a specific data encryption and decryption method disclosed in the present application;
[0044] Figure 5 Structural schematic diagram of a data encryption and decryption device disclosed in the present application;
[0045] Figure 6 Structural diagram of an electronic device disclosed in the present application. Specific embodiments
[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0047] Although significant progress has been made in current data encryption technologies, there are still some drawbacks. On the one hand, the key management of traditional encryption algorithms is relatively complex. Whether it is the key distribution in symmetric encryption or the key generation and storage in asymmetric encryption, a large amount of resources and energy are required. On the other hand, when facing the encryption and decryption of large-scale data, the computing efficiency of existing algorithms is relatively low. As the amount of data continues to increase, the time required for encryption and decryption also increases significantly, making it difficult for some application scenarios with high real-time requirements, such as real-time video transmission and online transactions, to meet their real-time requirements through existing encryption and decryption methods. Therefore, the above problems urgently need to be solved by those skilled in the art.
[0048] Therefore, the embodiments of the present application propose a data encryption and decryption solution, which greatly reduces the resource consumption and labor cost of key management and can meet the real-time requirements at the same time.
[0049] The embodiments of the present application disclose a data encryption and decryption method, which is applied to a parallel computing system. The parallel computing system includes multiple computing cores that meet the synchronous computing requirements. Refer to Figure 1 As shown, it includes:
[0050] Step S11: Collect initial acoustic wave signals; the initial acoustic wave signals include one or more acoustic wave signal segments.
[0051] In this embodiment, according to different acquisition requirements, professional audio acquisition devices are selected, and a standard audio signal source is used to calibrate the acquisition devices to ensure that their sensitivity and frequency response meet the requirements. Then, the initial acoustic wave signals are collected from diverse audio sources (such as natural environmental sounds, voice commands, music segments, etc.) using the audio acquisition devices; the initial acoustic wave signals include one or more acoustic wave signal segments.
[0052] Step S12: Assign different acoustic signal segments to different computing cores, and use the computing cores to preprocess the obtained acoustic signal segments to obtain target acoustic signals.
[0053] In this embodiment, the preprocessing includes noise reduction processing, sampling rate conversion, and amplitude normalization. Specifically, the filtering method is determined according to the noise characteristics of the acoustic signal segment, and the acoustic signal segment is subjected to noise reduction processing according to the filtering method to obtain a noise-reduced acoustic signal; the noise characteristics include noise frequency characteristics, noise azimuth characteristics, and noise intensity characteristics; the sampling rate of the noise-reduced acoustic signal is converted to the same value, and the amplitude of the noise-reduced acoustic signal after sampling rate conversion is normalized to obtain a target acoustic signal. In this way, the noise reduction processing determines the filtering method according to the frequency, azimuth, and intensity characteristics of the noise, which can highly adapt to the complex characteristics of different noises. The sampling rate conversion unifies the sampling rates of the noise-reduced acoustic signals, solves the problem of inconsistent sampling rates in different data sources or processing stages, and realizes data standardization. The amplitude normalization processes the signal after sampling rate conversion, eliminates the amplitude differences caused by factors such as equipment sensitivity and transmission distance, ensures data consistency, and facilitates more accurate learning and recognition of signal characteristics.
[0054] In the first aspect, a filtering window with a target window length and a target sliding step is selected, the average value of the acoustic signal segment within the target window length is determined, and the filtering window is slid according to the target sliding step to filter out high-frequency noise in the acoustic signal segment to obtain a noise-reduced acoustic signal. Exemplarily, in this embodiment, a filtering window with a target window length of 100 signal sampling points and a target sliding step of 10 signal sampling points is selected. Further, the average value of the acoustic signal segment within the first target window length is determined. Then, the filtering window is slid according to the target sliding step, that is, the average value of the 11th - 110th signal sampling points is calculated, and so on. By continuously repeating this process, the filtering of high-frequency noise in the acoustic signal segment can be achieved. It should be noted that since high-frequency noise often manifests as rapid fluctuations in the signal, calculating the average value can reduce this fluctuation, thereby obtaining a noise-reduced acoustic signal.
[0055] In a second aspect, if there are multiple acoustic wave acquisition devices, the direction of the noise in the acoustic wave signal segment is determined based on the time difference and amplitude difference of the acoustic wave signal segment received by each of the acoustic wave acquisition devices, and the noise in the direction is filtered to obtain a noise-reduced acoustic wave signal. The following takes the acquisition of a speaker's voice signal at a large conference site as an example for illustration. At the conference site, 3 acoustic wave acquisition devices (microphones) are used and distributed at different positions in the venue. During the acquisition process, there are noises from different directions in the surrounding environment, such as the continuous humming of the air conditioner and the whispering of the audience in the back row. To determine the direction of the noise, this embodiment records the time difference and amplitude difference of the acoustic wave signal segment received by each acoustic wave acquisition device. For example, device A receives a certain noise signal 0.1 seconds earlier than device B, and the amplitude of the noise received by device A is greater than that of device B. Combining the position information of these devices in the venue, this embodiment can roughly determine that the noise comes from the direction close to device A. Once the direction of the noise is determined, the directional filtering technology can be used to attenuate the signal from this direction. Suppose it is determined that the noise comes from the left side of the venue, then the signal collected from the left side direction is filtered to reduce the influence of the noise on the overall signal, thereby obtaining a noise-reduced acoustic wave signal.
[0056] In a third aspect, during the process of filtering the acoustic wave signal segment using a filter, the signal error between the acoustic wave signal segment and the filtered signal is continuously compared, and the filtering parameters of the filter are adjusted using the signal error to obtain a noise-reduced acoustic wave signal; the signal error represents the noise intensity. Taking the recording of an audio signal of a musical instrument performance as an example, during the recording process, there are some irregular noises in the environment. First, a filter set with initial parameters is used to filter the acoustic wave signal segment. During the filtering process, the signal error between the acoustic wave signal segment and the filtered signal is continuously compared. For example, the mean square error between the two can be calculated to represent the noise intensity. If the signal error is large, it means that the filtering effect of the current filter is not good, indicating a high noise intensity. At this time, the filtering parameters of the filter are adjusted according to the above signal error, such as increasing the order of the filter or changing the filtering coefficient, etc. Then the signal is filtered again using the filter with adjusted parameters, and the signal error is recalculated. This process is continuously repeated until the signal error reaches an acceptable range, and finally a noise-reduced acoustic wave signal is obtained.
[0057] Further, convert the sampling rate of the denoised acoustic wave signal to the same value, and unify the amplitudes of the denoised acoustic wave signal after the sampling rate conversion to obtain the target acoustic wave signal. It should be noted that in this embodiment, the sampling rate of the denoised acoustic wave signal can be converted to the same value by means of upsampling or downsampling. In practical applications, the sampling rate value needs to be determined according to specific application scenarios and subsequent processing requirements. For example, in professional music production and high-quality audio playback scenarios, common sampling rates are 44.1 kHz or 48 kHz. Subsequently, unify the amplitudes of the denoised acoustic wave signal after the sampling rate conversion, so as to eliminate the amplitude differences between different signals and ensure the consistency and accuracy of the data.
[0058] Step S13: Use the calculation kernel to extract the frequency feature information, amplitude change law, and phase feature information of the target acoustic wave signal, and map the data constructed based on the frequency feature information, the amplitude change law, and the phase feature information to the target discrete data set.
[0059] In this embodiment, determine the sampling frequency according to the time-domain characteristics of the target acoustic wave signal, determine the transform window parameters according to the sampling frequency, and then perform signal transformation through the transform window parameters to obtain the frequency feature information. In addition, perform frame division processing on the target acoustic wave signal, calculate the short-time energy of each frame of signal according to the corresponding frame division result, and then obtain the amplitude change law by analyzing the numerical changes of the short-time energy of each frame of signal. Finally, perform Hilbert transform on the target acoustic wave signal to obtain the analytic signal, and determine the instantaneous phase according to the phase angle calculated based on the analytic signal to obtain the phase feature information.
[0060] Exemplarily, first, it is necessary to determine the sampling frequency according to its time-domain characteristics. For example, if the target acoustic wave signal contains high-frequency components, a higher sampling frequency needs to be selected to meet the Nyquist sampling theorem and avoid aliasing. After determining the sampling frequency, determine the transform window parameters according to this sampling frequency. The window parameters include the type of window function (such as Hanning window, Hamming window, etc.) and the window length, etc. Appropriate window parameters help to reduce problems such as spectral leakage. Then, multiply the target acoustic wave signal by the selected window function, and perform signal transformation through the following formula to obtain the frequency feature information:
[0061] ;
[0062] where is the sampling value of the target acoustic wave signal at discrete time points, is the window function, k = 0, 1,..., N - 1, N is the number of sampling points of the target acoustic wave signal, and k is the frequency index.
[0063] Exemplarily, calculate the short-time energy of each frame of signal through the following formula:
[0064] ;
[0065] where m is the sampling point index within a frame, M is the frame length, i.e., the number of sampling points contained in each frame signal, and n represents which frame signal is currently being calculated. It is the sampling value of the target acoustic wave signal at the discrete time point (n + m). Further, a curve is plotted with the frame number as the abscissa and the short-time energy as the ordinate to present the short-time energy change trend, and statistical quantities such as the mean and variance are calculated to understand the overall level and fluctuation degree of the short-time energy. A small variance indicates relatively stable amplitude changes, while a large variance indicates large fluctuations.
[0066] Exemplarily, for the signal , its analytic signal is expressed as: , is the Hilbert transform of , and j is the imaginary unit. The instantaneous phase can be obtained by calculating the phase angle of the analytic signal:
[0067] Further, mapping the data constructed based on the frequency feature information, the amplitude change rule, and the phase feature information to the target discrete data set {0, 1, 2,..., L - 1} can be achieved through the following formula: , where f is the data (i.e., the eigenvalue) constructed based on the frequency feature information, the amplitude change rule, and the phase feature information, L is the quantization level, min(f) and max(f) are respectively the minimum and maximum values of the eigenvalue, and round() represents the rounding function.
[0068] Step S14: Obtain the target key from the hash data obtained based on the target discrete data set using the calculation kernel, and perform encryption and decryption operations on the corresponding data to be processed using the target key.
[0069] In this embodiment, the target discrete data set is transformed using the hash algorithm SHA - 256 to obtain a 256 - bit hash value, and the first K bits of the hash value are used as the target key, and encryption and decryption operations are performed on the corresponding data to be processed using the target key. The value of K can be set by oneself to match the degree of data encryption.
[0070] Further, for the convenience of subsequent search and use, a unique index identifier is generated for each key and stored in the index register built into the module. Specifically, the index identifier of the target key is generated using one or more key parameters in the key parameter set, and the index identifier is stored in the index register; wherein, the key parameters in the key parameter set include key attribute parameters, key algorithm parameters, and key usage parameters. Key attribute parameters reflect the inherent characteristics of the key, such as key length, key type, etc. Common key lengths are 128 bits, 192 bits, and 256 bits. Key types are mainly divided into symmetric keys and asymmetric keys; key algorithm parameters include AES (Advanced Encryption Standard) algorithm, RSA (Rivest-Shamir-Adleman) algorithm, etc., and key usage parameters include usage range, usage frequency, and access rights, etc. For example, key length: 256 bits, meeting high-security requirements; key type: asymmetric key, facilitating data transmission and remote control security; key algorithm parameters: RSA algorithm, mature and suitable for encryption of the acoustic wave monitoring system; usage range: limited to encryption of communication between acoustic wave acquisition devices and data processing centers in a specific urban area of a certain city; usage frequency: limited to a maximum of 30 times per minute; access rights: only authorized professional technicians and system administrators can operate. Generate index identifier: ASY_256_RSA_URB30, ASY (Asymmetric Key) represents an asymmetric key, 256 is the key length, RSA is the algorithm name, URB (Urban) refers to the usage range in a specific urban area, and 30 is the upper limit of usage per minute. This index facilitates the quick search and management of keys in the index register.
[0071] It should be noted that before encrypting the data to be processed based on the target key, it is necessary to verify the data to be processed to ensure that the format of the data to be processed is correct, the data is complete, and it is suitable for encryption processing. Specifically, verify whether the data to be processed meets the predefined format based on regular expressions or parsers, and verify the integrity of the data to be processed according to the hash value determined based on the data to be processed. If the data to be processed meets the determination conditions for large data files, perform a chunking operation on the data to be processed to obtain multiple chunked data, and add corresponding chunk numbers to each chunked data. For data less than one block size, the (Public-Key Cryptography Standards #7) padding scheme can be used to dynamically add padding bytes according to the block size. During the encryption or decryption process, if the data to be processed meets the determination conditions for large data files, use multiple computing cores in the parallel computing system to synchronously process multiple chunked data.
[0072] When encrypting the data to be processed based on the target key, a suitable algorithm is selected from the encryption algorithm library according to the sensitivity and security requirements of the data, such as AES, RSA, ECC (Elliptic Curve Cryptography). For symmetric encryption algorithms such as AES, the same key is used for encryption and decryption; for asymmetric encryption algorithms such as RSA, the public key is used for encryption and the private key is used for decryption. After the data is encrypted, a compression algorithm is used to compress the data to reduce the requirements for storage space and transmission bandwidth. Note that the compression algorithm should be selected to be reversibly decompressible for subsequent data decryption. The parallel computing system can utilize the parallel computing framework to parallelize the encryption algorithm. The chunked data to be encrypted is distributed to multiple computing cores for simultaneous encryption processing, making full use of the high throughput and parallel computing capabilities of the parallel computing system to greatly improve the encryption speed and data compression speed.
[0073] When decrypting the data, a decompression algorithm corresponding to the compression is used to decompress the data to restore it to the original size before encryption. After decrypting the encrypted data, a decryption algorithm corresponding to the encryption is used to decrypt the data: for symmetric encryption, the same key as used for encryption is used for decryption; for asymmetric encryption, the private key is used for decryption. After decryption, the integrity of the data is checked by recalculating the hash value and comparing it with the original hash value, and the padding in the last chunk (such as padding) is processed to restore the original data format to ensure that the decrypted data is intact and consistent with the original data.
[0074] This application aims to build a set of efficient and secure encrypted data processing systems by leveraging the powerful parallel computing capabilities of the parallel computing system and combining the uniqueness, randomness, and easy acquisition characteristics of sound waves. This system can effectively solve the problems existing in traditional encryption technologies and meet the modern data security requirements. To achieve this goal, this application provides schematic diagrams of the newly added modules (see details in Figure 2 ) and the overall framework (see details in Figure 3 ).
[0075] See Figure 2 shown, Figure 2 The newly added modules in
[0076] See Figure 3 shown, Figure 3It contains multiple computing cores (such as computing core 1 - computing core 8, etc.). The internal structure of each computing core is complex. Taking computing core 0 as an example: (1) Instruction processing part: The instruction fetch module fetches instructions from the instruction cache, stores them in the instruction buffer after being parsed by the decoding module, and the emission module emits the instructions under the control of the scoreboard. The operand collector is responsible for collecting the operands required by the instructions. The SIMT (Single Instruction Multiple Threads) stack in the scheduling module is used for single instruction multiple thread execution. (2) Arithmetic part: It includes an arithmetic logic unit (ALU), a floating-point unit (FPU), and a load store unit (LSU), which are used to perform various computing and data access operations. The special function unit (SFU) contains a preprocessing module, a key generation module, etc., which can complete encryption and decryption related operations. In addition, the write-back module is responsible for writing back the operation results. The entire architecture also includes tensor cores for tensor operations in deep learning; the L2 cache is used as a secondary cache to accelerate data access speed; the key storage module is used to store encryption related keys.
[0077] See Figure 4As shown in the figure, first, the acoustic wave acquisition module acquires acoustic wave signals (which can be voice commands, music melodies, or natural environmental sounds, etc.), converts them into digital signals, and sends them to the preprocessing module. In the preprocessing module, the digital signals are denoised to remove the interference of environmental noise and improve the signal clarity. Then, the signal is subjected to sampling rate conversion and normalization processing to ensure that all signals have the same sampling rate and amplitude range, providing a consistent data format for subsequent key generation and data encryption. Subsequently, the preprocessed data is sent to the key generation module. This module generates the encryption keys required based on the characteristic information of the acoustic wave signals, such as frequency characteristics, amplitude change rules, and phase information. These characteristic information are extracted through methods such as Fourier transform and finally converted into encryption keys through a hash algorithm. The generated keys are then stored in the key storage module. This module is responsible for securely storing and managing the keys, generating a unique index identifier for each key, and storing it in the built-in index register of the module. At the same time, a redundant storage strategy is adopted to back up the keys to multiple storage locations to prevent data loss and improve the stability of the system. (2) Data encryption, the data preparation module further preprocesses and formats the acquired digital signals. Through steps such as format verification, integrity check, and data chunking, it ensures that the data is in the correct format, complete, and suitable for encryption processing before encryption. The encryption execution module receives the standardized data chunks and encryption keys from the data preparation module, and selects an appropriate encryption algorithm (such as AES, RSA, ECC, etc.) to encrypt the data. The encrypted data is compressed to reduce the storage space and transmission bandwidth requirements, generating the final encrypted data. (3) Data decryption, when it is necessary to decrypt the encrypted data, the data to be decrypted is sent to the decryption execution module. This module first decompresses the compressed encrypted data, and then decrypts the data using the decryption algorithm corresponding to the encryption. The decrypted data undergoes data recovery processing to ensure consistency with the original data, completing the entire encryption-decryption process. Among them, the parallel computing system plays a key accelerating role in the entire data processing and encryption process. By parallel processing a large amount of data, the parallel computing system significantly improves the processing speed of each module, thereby shortening the overall processing time and enhancing the system performance. In addition, the application of the parallel computing system also enhances the security and stability of the system, especially in key generation and storage, ensuring the high requirements of the data encryption system for key management.
[0078] This application forms an efficient, secure, and reliable data encryption system by integrating multiple modules such as acoustic wave acquisition, preprocessing, key generation, data preparation, encryption execution, decryption execution, and key storage. Utilizing the parallel computing capabilities of the parallel computing system, this system significantly improves the processing speed of each module, including data preprocessing, key generation, data encryption, and decryption, thus shortening the overall processing time and enhancing the system performance. In addition, by adopting advanced encryption algorithms and compression techniques, this system effectively reduces the requirements for data storage space and transmission bandwidth while ensuring data security.
[0079] This application also enhances the security of the key and the stability of the system through a redundant storage strategy and an efficient key management mechanism, preventing the risk of key loss or being overwritten and ensuring the long-term security of the data. In addition, the system conducts strict verification and processing on the integrity and consistency of the data to ensure the accuracy and reliability of the data during the encryption and decryption processes. With these advantages, the present invention provides a powerful solution for application scenarios that require high-security and high-efficiency data processing.
[0080] Furthermore, this application can be further extended to integrate other modal data, such as the intensity and frequency changes of optical signals, temperature fluctuations, etc. Together with the acoustic wave signals, they are processed in parallel by multiple computing cores of the parallel computing system. First, the different modal data are preprocessed separately to remove noise, unify the format, etc., and then the features of each modal data are comprehensively extracted. For example, by combining the frequency characteristics of acoustic waves, the spectral characteristics of optical signals, the change trend characteristics of temperature, etc., a more complex and unique data set is constructed. Then, the hash algorithm is used to convert the fused data set into an encryption key, making the generated key contain richer information and being difficult to be cracked.
[0081] It can be seen that the present application proposes a data encryption and decryption method applied to a parallel computing system. The parallel computing system includes multiple computing cores that meet the synchronous computing requirements. The method includes: collecting an initial acoustic wave signal; the initial acoustic wave signal includes one or more acoustic wave signal segments; allocating different acoustic wave signal segments to different computing cores, and using the computing cores to preprocess the obtained acoustic wave signal segments to obtain a target acoustic wave signal; using the computing cores to extract the frequency feature information, amplitude change law, and phase feature information of the target acoustic wave signal, and mapping the data constructed based on the frequency feature information, the amplitude change law, and the phase feature information to a target discrete data set; using the computing cores to obtain a target key from the hash data obtained based on the target discrete data set, and using the target key to perform encryption and decryption operations on the corresponding data to be processed. In summary, since the acoustic wave signal has randomness and uniqueness, it makes the target key generated based on the acoustic wave signal difficult to be predicted and tampered with. In this way, the present application improves the security of data encryption and decryption. At the same time, the collection of acoustic wave signals is relatively convenient. Compared with traditional encryption technologies that require a large amount of manpower and material resources in key generation, the present application does not require complex and expensive equipment and a specific environment, nor does it require special complex key distribution, generation, and storage operations, greatly reducing the resource consumption and labor cost of key management. At the same time, the parallel processing method of multiple computing cores can significantly shorten the processing time of each step. Especially when facing large-scale data, it can greatly improve the overall computing efficiency of encryption and decryption. For application scenarios with high real-time requirements such as real-time video transmission and online transactions, the present application can quickly complete the encryption and decryption operations of data, thereby meeting their real-time requirements.
[0082] Correspondingly, an embodiment of the present application also discloses a data encryption and decryption device applied to a parallel computing system. The parallel computing system includes multiple computing cores that meet the synchronous computing requirements. Refer to Figure 5 As shown, the device includes:
[0083] A signal collection module 11 for collecting an initial acoustic wave signal; the initial acoustic wave signal includes one or more acoustic wave signal segments;
[0084] A preprocessing module 12 for allocating different acoustic wave signal segments to different computing cores, and using the computing cores to preprocess the obtained acoustic wave signal segments to obtain a target acoustic wave signal;
[0085] A feature extraction module 13 for using the computing cores to extract the frequency feature information, amplitude change law, and phase feature information of the target acoustic wave signal, and mapping the data constructed based on the frequency feature information, the amplitude change law, and the phase feature information to a target discrete data set;
[0086] An encryption and decryption module 14 is configured to obtain a target key from hash data obtained from the target discrete data set by using the computing core, and perform encryption and decryption operations on corresponding data to be processed by using the target key.
[0087] Specifically, for the working processes of the above-mentioned modules, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
[0088] It can be seen that the present application provides a data encryption and decryption method applied to a parallel computing system. The parallel computing system includes a plurality of computing cores that meet the synchronous computing requirements. The method includes: collecting an initial acoustic signal; the initial acoustic signal includes one or more acoustic signal segments; allocating different acoustic signal segments to different computing cores, and preprocessing the obtained acoustic signal segments by using the computing cores to obtain a target acoustic signal; extracting frequency feature information, amplitude change law, and phase feature information of the target acoustic signal by using the computing cores, and mapping data constructed based on the frequency feature information, the amplitude change law, and the phase feature information to a target discrete data set; obtaining a target key from hash data obtained from the target discrete data set by using the computing cores, and performing encryption and decryption operations on corresponding data to be processed by using the target key. In summary, due to the randomness and uniqueness of acoustic signals, it is difficult to predict and tamper with the target key generated based on acoustic signals. In this way, the present application improves the security of data encryption and decryption. At the same time, the acquisition of acoustic signals is relatively convenient. Compared with traditional encryption technologies that require a large amount of manpower and material resources for key generation, the present application does not require complex and expensive equipment and a specific environment, nor does it require special complex key distribution, generation, and storage operations, greatly reducing the resource consumption and labor cost of key management. At the same time, the parallel processing method of multiple computing cores can significantly shorten the processing time of each step. Especially when facing large-scale data, it can greatly improve the overall computing efficiency of encryption and decryption. For application scenarios with high real-time requirements such as real-time video transmission and online transactions, the present application can quickly complete the encryption and decryption operations of data, thereby meeting their real-time requirements.
[0089] Furthermore, an embodiment of the present application further provides an electronic device. Figure 6 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be considered as any limitation on the scope of use of the present application.
[0090] Figure 6Schematic diagram of the structure of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the data encryption and decryption methods disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0091] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface 24 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0092] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a magnetic disk, or an optical disc, etc., and the resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. Among them, in addition to the computer program capable of implementing the data encryption and decryption method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 221 may further include a computer program capable of performing other specific tasks.
[0093] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the data encryption and decryption method disclosed above is implemented.
[0094] For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0095] The various embodiments in this application are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts between the various embodiments, reference may be made to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and reference may be made to the description in the method part for related parts.
[0096] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0097] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0098] Finally, it should also be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0099] The above has introduced in detail a data encryption and decryption method, device, equipment, and storage medium provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A data encryption and decryption method, characterized in that: Applied to a parallel computing system, the parallel computing system includes a plurality of computing cores that meet synchronous computing requirements, the method includes: Collecting an initial sound wave signal; the initial sound wave signal includes one or more sound wave signal segments; Allocating different sound wave signal segments to different computing cores, and using the computing cores to preprocess the acquired sound wave signal segments to obtain target sound wave signals; The frequency characteristic information, amplitude variation law and phase characteristic information of the target sound wave signal are extracted by using the calculation kernel, and , mapping the data constructed based on the frequency characteristic information, the amplitude variation law and the phase characteristic information to a target discrete data set; Wherein, f is data constructed based on the frequency characteristic information, the amplitude variation law and the phase characteristic information, L is the quantization level, min(f) and max(f) are the minimum and maximum values of the characteristic value respectively, and round() represents the rounding function; Using the computing core to obtain a target key from hash data obtained based on the target discrete data set, and using the target key to perform encryption and decryption operations on corresponding data to be processed; The frequency characteristic information, amplitude variation law and phase characteristic information of the target sound wave signal are extracted, including: Determine a sampling frequency according to the time domain characteristics of the target sound wave signal, determine a transformation window parameter according to the sampling frequency, perform signal transformation by using the transformation window parameter, and obtain frequency characteristic information; The target sound wave signal is subjected to frame processing, the short-time energy of each frame signal is calculated according to the corresponding frame processing result, and the amplitude variation law is obtained by analyzing the numerical variation of the short-time energy of each frame signal; Performing a Hilbert transform on the target sound wave signal to obtain an analytical signal, and determining an instantaneous phase according to a phase angle calculated based on the analytical signal to obtain phase characteristic information; The target discrete data set is converted using a hash algorithm to obtain hash data, and the first K bits of the hash data are used as the target key.
2. The data encryption and decryption method according to claim 1, characterized in that: Preprocessing the acquired sound wave signal fragment to obtain a target sound wave signal includes: Determine a filtering method according to the noise characteristics of the sound wave signal segment, and perform noise reduction processing on the sound wave signal segment according to the filtering method to obtain a noise-reduced sound wave signal; wherein the noise characteristics include noise frequency characteristics, noise azimuth characteristics, and noise intensity characteristics; The sampling rate of the noise-reduced sound wave signal is converted to the same value, and the amplitude of the noise-reduced sound wave signal after the sampling rate conversion is unified to obtain a target sound wave signal.
3. The data encryption and decryption method according to claim 2, characterized in that: The step of determining a filtering method according to the noise characteristics of the sound wave signal segment, and performing noise reduction processing on the sound wave signal segment according to the filtering method to obtain a noise-reduced sound wave signal includes: Selecting a filter window with a target window length and a target sliding step length, determining an average value of the sound wave signal segment within the target window length, and sliding the filter window according to the target sliding step length to filter the high-frequency noise in the sound wave signal segment to obtain a denoised sound wave signal; Or, if there are multiple sound wave acquisition devices, the direction of the noise in the sound wave signal segment is determined according to the time difference and amplitude difference of each sound wave acquisition device receiving the sound wave signal segment, and the noise in the direction is filtered to obtain a noise-reduced sound wave signal; Or, in the process of filtering the sound wave signal segment using a filter, the signal error between the sound wave signal segment and the filtered signal is continuously compared, and the filtering parameters of the filter are adjusted using the signal error to obtain the sound wave signal after noise reduction; the signal error represents the noise intensity.
4. The data encryption and decryption method according to claim 1, characterized in that: After obtaining the target key from the hash data obtained based on the target discrete data set, the method further includes: Generate an index identifier of the target key using one or more key parameters in a key parameter set, and store the index identifier in an index register; wherein the key parameters in the key parameter set include key attribute parameters, key algorithm parameters and key usage parameters.
5. The data encryption and decryption method according to any one of claims 1 to 4, characterized in that: Before using the target key to perform encryption and decryption operations on the corresponding data to be processed, the method further includes: Verifying whether the data to be processed meets a predefined format based on a regular expression or a parser; Verifying the integrity of the data to be processed according to a hash value determined based on the data to be processed; If the data to be processed meets the large data file determination condition, a block operation is performed on the data to be processed to obtain a plurality of block data, and a corresponding block sequence number is added to each of the block data.
6. The data encryption and decryption method according to claim 5, characterized in that: The using the target key to perform encryption and decryption operations on the corresponding data to be processed includes: During the encryption or decryption process, if the data to be processed meets the large data file determination condition, multiple computing cores in the parallel computing system are used to synchronously process multiple block data.
7. A data encryption and decryption device, characterized in that: Applied to a parallel computing system, the parallel computing system includes multiple computing cores that meet synchronous computing requirements, and the device includes: A signal collection module, used to collect an initial sound wave signal; the initial sound wave signal includes one or more sound wave signal segments; A preprocessing module, used for allocating different acoustic wave signal segments to different computing cores, and using the computing cores to preprocess the acquired acoustic wave signal segments to obtain target acoustic wave signals; The feature extraction module is used to extract the frequency feature information, amplitude variation law and phase feature information of the target sound wave signal by using the calculation kernel, and , mapping the data constructed based on the frequency characteristic information, the amplitude variation law and the phase characteristic information to a target discrete data set; Wherein, f is data constructed based on the frequency characteristic information, the amplitude variation law and the phase characteristic information, L is the quantization level, min(f) and max(f) are the minimum and maximum values of the characteristic value respectively, and round() represents the rounding function; An encryption and decryption module, used to use the computing core to obtain a target key from hash data obtained based on the target discrete data set, and use the target key to perform encryption and decryption operations on corresponding data to be processed; The frequency characteristic information, amplitude variation law and phase characteristic information of the target sound wave signal are extracted, including: Determine a sampling frequency according to the time domain characteristics of the target sound wave signal, determine a transformation window parameter according to the sampling frequency, perform signal transformation by using the transformation window parameter, and obtain frequency characteristic information; The target sound wave signal is subjected to frame processing, the short-time energy of each frame signal is calculated according to the corresponding frame processing result, and the amplitude variation law is obtained by analyzing the numerical variation of the short-time energy of each frame signal; Performing a Hilbert transform on the target sound wave signal to obtain an analytical signal, and determining an instantaneous phase according to a phase angle calculated based on the analytical signal to obtain phase characteristic information; The target discrete data set is converted using a hash algorithm to obtain hash data, and the first K bits of the hash data are used as the target key.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the data encryption and decryption method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the data encryption and decryption method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Two-dimensional wireless physical layer key generating method combining channel amplitude and channel phase
CN106102052A
Data processing method, device and equipment, medium and program product
CN113014604A