Voice communication method and system in broadband and narrowband intercommunication environment
By selecting appropriate coding algorithms and bit rates in a broadband-narrowband interoperability environment, and combining forward error correction and encryption technologies, the problems of voice quality loss and latency in narrowband networks are solved, achieving efficient and secure voice communication.
Patent Information
- Application Number
- CN202410189541.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2026-04-17
AI Technical Summary
When transmitting broadband voice signals in narrowband networks, there are issues with voice quality loss and latency. Especially in scenarios requiring high-fidelity voice communication, narrowband networks cannot support advanced voice features such as stereo and echo cancellation.
The method of voice communication in a broadband-narrowband interoperability environment is adopted. The voice signal is collected by the audio device and converted into a digital signal. An appropriate encoding algorithm and bit rate are selected, and forward error correction technology and encryption technology are combined to optimize network bandwidth utilization and data transmission security.
It improves voice transmission quality and efficiency, reduces latency, supports advanced voice functions, and provides security and privacy protection, adapting to different network environments.
Smart Images

Figure CN121887782A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of voice communication technology, and more specifically to a voice communication method in a broadband-narrowband interoperability environment. Background Technology
[0002] With the continuous development of communication technology, people have increasingly higher requirements for the quality and efficiency of voice communication. The widespread adoption of broadband networks has made high-quality voice communication possible, but in some cases, interoperability with narrowband networks is still necessary. Broadband voice codec technology is the foundation for achieving high-quality voice communication. It converts voice signals into digital data and restores the digital data to audible sound at the receiving end. Common broadband codec algorithms include G.711, G.722, and Opus. These algorithms provide a wider frequency range and better audio quality to meet the needs of high-definition voice communication. Narrowband voice codec technology is used to adapt broadband voice signals for transmission in narrowband networks. Narrowband codec algorithms can compress broadband voice signals into smaller data volumes to adapt to the bandwidth limitations of narrowband networks. Common narrowband codec algorithms include G.711 and G.729. Interoperability between broadband and narrowband voice communication relies on network transmission technologies for data transmission. Common network transmission technologies include IP networks and VoIP (Voice over IP). IP networks are a widely used network technology that provides flexible routing and transmission capabilities. VoIP is a technology that transmits voice signals over IP networks, enabling the digitization and networking of voice communication.
[0003] Transmitting broadband voice over narrowband networks requires compression and downsampling of the voice signal, which leads to a loss of voice quality. This is especially problematic for high-fidelity voice communication scenarios (such as professional audio recording or musical performances), where the signal may not meet user needs. Broadband voice transmission over narrowband networks also introduces latency, affecting real-time voice communication. Furthermore, narrowband networks cannot support advanced voice features such as stereo, echo cancellation, and noise reduction. These features, which are well implemented in broadband networks, may be unusable or ineffective in narrowband networks. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing a voice communication method in a broadband-narrowband interoperability environment.
[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A voice communication method in a broadband-narrowband interoperability environment, specifically including the following steps:
[0006] S101. Collect voice signals through audio equipment, convert the voice signals into digital signals, and transmit the information through the Internet;
[0007] S102. Select different encoding algorithms and bit rates in different environments to improve the quality and efficiency of voice transmission;
[0008] S103. Adjust the bit rate of audio encoding according to changes in network bandwidth, and use forward error correction technology to reduce packet loss rate;
[0009] S104. Use encryption technology to protect the security of voice data transmission.
[0010] In a preferred embodiment, step S101 involves using a microphone or other audio device to collect the user's voice signal, converting the collected analog voice signal into a digital signal, transmitting it via the internet, and processing the digital voice signal using sampling values, bias values, and gain values to digitally represent the voice signal. The digital voice signal undergoes both digital representation and quantization processing. Specifically, the calculation formulas for sampling values, bias values, and gain values are as follows:
[0011] SV = SP / Z
[0012] BV = 2^(L-1)
[0013] GV = 2^(L-1)
[0014] Where SV represents the sampled value, S represents the input signal value, P represents the bias value, Z represents the gain value, BV represents the bias value, L represents the quantization bits, and GV represents the gain value, the specific steps for transmitting digital signals over the Internet are as follows:
[0015] S1. Encapsulation and Transmission: Digital signals are compressed and encoded using audio encoding algorithms. The encoded audio data is then encapsulated into data packets. The audio data is encapsulated using RTP, with the encoded audio data placed in the RTP payload. The audio data is fragmented, and the corresponding fragmentation representation is set in the RTP header. The constructed RTP data packets are then encapsulated into UDP datagrams, with the source and destination ports set to indicate the sender and receiver of the datagram. The UDP datagrams are then encapsulated into IP datagrams, with the source and destination IP addresses set to identify the sender and receiver of the datagram. The IP datagrams are then encapsulated into physical network frames, with the source and destination MAC addresses set to identify the sender and receiver of the frame. The encapsulated data packets are then transmitted over the network. The receiving end adjusts the order and synchronizes the received data packets based on the sequence number and timestamp information in the RTP header to restore the original audio data.
[0016] S2. Parsing and Decoding: Extract RTP header information from the received data packet. The RTP header contains sequence number, timestamp, and synchronization source identifier fields. Based on the RTP header information, determine the location and length of the audio data. Extract the audio data portion from the data packet and decode the audio data. For the linear quantization value of each sampling point, apply the inverse quantization formula: IV = QV * SZ, where QV represents the linear quantization value, which represents the value of the digitized signal after quantization processing, and SZ represents the difference between each quantization level, indicating higher quantization precision. For each linear quantization value, apply the inverse PCM conversion formula, specifically calculated as follows: PCM = IV + 128, where IV represents the linear value. The digitized signal value obtained by the inverse quantization formula maps the quantized value back to a continuous linear range. The digitized signal value obtained by the PCM conversion formula is then calculated. The inverse PCM conversion formula adds 128 to the linear value, converting it into an unsigned integer form representing the amplitude of the audio.
[0017] S3. Playback: Converts the digital signal into a continuous analog signal, uses filtering techniques to restore the continuous analog signal, and performs a weighted summation of the input signals. The specific calculation formula is as follows:
[0018] y[n]=b[0]*x[n]+b[1]*x[n-1]+...+b[M]*x[nM]
[0019] Where y[n] represents the output of the filter, x[n] represents the sampled value of the input signal, and b[0], b[1], ..., b[M] represent the coefficients of the filter. The output of the filter is used as the estimated value of the analog signal, and the analog signal is output to the audio device for playback through the amplifier circuit.
[0020] In a preferred embodiment, step S102 specifically includes the following steps:
[0021] S1. In a broadband environment, the AAC encoding algorithm can provide higher audio quality and a wider range of frequency effects.
[0022] S2. In a narrowband environment, the AMR algorithm can provide voice transmission at a low bit rate. Reducing the sampling rate can reduce audio efficiency and bandwidth consumption.
[0023] Furthermore, the specific steps of the AAC encoding algorithm are as follows:
[0024] 1) The audio signal is converted from the time domain to the frequency domain. The AAC coding algorithm uses MDCT for time-frequency transformation, and its calculation formula is as follows:
[0025] X(k,n)=2*sum(x(n+m)*w(m)*cos((pi / N)*(m+0.5+(N / 2))*(k+0.5)),m=0to N-1)
[0026] Where X(k,n) is the k-th frequency band coefficient of the n-th time window, x(n+m) is the sample value of the input audio signal, w(m) is the window function, and N is the window length;
[0027] 2) Quantize the frequency domain coefficients by dividing them into multiple frequency bands. Each frequency band contains a set of continuous frequency domain coefficients. Divide the frequency domain coefficients in each band by the corresponding quantization step size and take the integer part as the quantized coefficient. The quantized coefficients are closer to the discrete values, reducing the amount of data. The specific calculation formula is as follows:
[0028] q_c = floor(o_c / q_s)
[0029] Where o_c represents the original frequency domain coefficients, q_s represents the quantization step size of the corresponding frequency band, and floor represents the function rounding down;
[0030] 3) The quantized frequency domain coefficients are reduced in size through prediction. The AAC coding algorithm uses a linear prediction method, representing each frequency band coefficient as a linear combination of the previous few coefficients in that frequency band. The specific calculation formula is as follows:
[0031]
[0032] Where LH represents the quantized coefficients, Yi represents the predicted coefficients, and Ci represents the predicted values of the first few coefficients in this frequency band;
[0033] 4) Perform entropy encoding on the predicted coefficients to reduce the amount of data and determine the encoding interval. Sort all symbols to be encoded in ascending order of probability distribution and divide the encoding interval according to their probability distribution. Divide the real number interval between 0 and 1 according to the probability distribution of each symbol. The length of the encoding interval corresponding to each symbol is its probability distribution. For each coefficient, select a sub-interval within the encoding interval for encoding to narrow the encoding interval. Divide the interval again according to its probability distribution based on the proportion of the coefficient to be encoded within the encoding interval to obtain smaller sub-intervals. Repeat this process until the interval is small enough or cannot be further reduced. Take any real number in the encoding interval as the encoded output of the coefficient. Reconstruct the encoding interval through the known probability distribution and the encoded output. Determine the symbol to be decoded according to the probability distribution of the symbols contained in the interval. Repeat this process until all symbols are decoded.
[0034] 5) Channel coding is performed on the entropy-coded data to improve noise resistance and error correction capability. The AAC coding algorithm uses cyclic redundancy coding and forward error correction techniques to enhance the channel coding capability. Cyclic redundancy coding uses parity bits to detect data transmission errors. The specific steps are as follows:
[0035] A. At the encoder end, first determine a generator polynomial G(x), which is a binary number;
[0036] B. Treat the data to be transmitted as a binary number D(x), add 0 to its highest bit with the same number of times as G(x), and get a new number M(x). Then perform a division operation on M(x) to get a remainder R(x). The number of times this remainder R(x) is at most one less than the number of times G(x), that is, its number of bits is 1 less than G(x).
[0037] C. After adding the remainder R(x) to the highest bit of the original data D(x), a new data D'(x) is obtained, which is the data with the CRC check bit added;
[0038] D. Send D'(x) to the receiving end and calculate it using the same generator polynomial G(x) at the receiving end. If the received data passes the CRC check, it means that no error occurred during transmission.
[0039] Forward error correction corrects data transmission errors by adding redundant information. The specific steps are as follows:
[0040] A. Encode the data to be transmitted according to the selected encoding method and add redundant information. This redundant information can be used at the receiving end to correct transmission errors.
[0041] B. Send the encoded data to the receiving end;
[0042] C. At the receiving end, the received data is decoded using the selected encoding method. If an error is detected, redundant information is used to correct the error, and finally the correct audio signal is obtained.
[0043] 6) Package the channel-coded data into an audio file of a specific format.
[0044] In a preferred embodiment, step S103 specifically includes the following steps:
[0045] S1. Bandwidth-based bitrate adjustment: By using network bandwidth estimation technology, the current available bandwidth is monitored in real time. Based on the monitored bandwidth, a suitable target bitrate is calculated. Based on the target bitrate, the audio encoding parameters are adjusted, such as reducing the bitrate to adapt to lower bandwidth or increasing the bitrate to improve audio quality.
[0046] S2. Reduce packet loss rate based on forward error correction technology: The forward error correction coding algorithm is used at the sending end to encode the original data into redundant data. The redundant data contains the redundant information of the original data. Group transmission: The encoded data is divided into multiple groups for transmission and decoded at the receiving end. Even if a group is lost during transmission, the receiving end can still correct the error through the redundant information in other groups, thereby recovering the original data.
[0047] In a preferred embodiment, step S104 specifically includes the following steps:
[0048] S1. The sender and receiver each generate a pair of public and private keys. The public key can be transmitted publicly, while the private key needs to be protected. The specific calculation formula is as follows:
[0049] A. Randomly select two different prime numbers p and q;
[0050] B. Calculate the modulus n = p * q;
[0051] C. Calculate Euler's totient function p(n) = (p-1)*(q-1);
[0052] D. Randomly select an integer e, And e and Coprime;
[0053] E. Calculate d such that That is, d is the multiplicative inverse of e modulo p(n);
[0054] F. The public key is (n,e), and the private key is (n,d).
[0055] S2. The sender uses the receiver's public key to encrypt the session key. The sender encrypts their own session key using the receiver's public key to obtain the encrypted ciphertext. The receiver then decrypts the ciphertext using their own private key to obtain the session key. The specific calculation formula is as follows:
[0056] The sender uses the receiver's public key to encrypt the data: ciphertext = plaintext^emodn;
[0057] The recipient uses their private key to decrypt: the decrypted plaintext = ciphertext^dmod n;
[0058] S3. The sender uses a session key to encrypt the voice data, and the receiver uses the session key to decrypt it, thereby achieving secure communication.
[0059] The present invention also provides a voice communication system for broadband and narrowband interoperability environments, comprising:
[0060] Signal conversion module: Collects voice signals through audio devices, converts the voice signals into digital signals, and transmits the information via the Internet;
[0061] Audio encoding module: Selects different encoding algorithms and bit rates in different environments to improve the quality and efficiency of voice transmission;
[0062] Network adjustment module: Adjusts the bit rate of audio encoding according to changes in network bandwidth, and uses forward error correction technology to reduce packet loss rate;
[0063] Security protection module: Employs encryption technology to protect the security of voice data transmission.
[0064] The beneficial effects of this invention are as follows: By converting and compressing voice signals into digital signals, the voice communication system in a broadband environment can utilize network bandwidth resources more efficiently, reducing data transmission latency. The broadband-narrowband interoperability-based voice communication system is compatible with multiple platforms and devices, allowing users to make calls through different devices, providing more choices and flexibility. The system employs an adaptive network adjustment mechanism, dynamically adjusting the audio encoding bit rate and network transmission parameters according to changes in network bandwidth, ensuring good communication quality under different bandwidth conditions. The system uses encryption technology to protect voice data transmission, preventing eavesdropping and tampering. The user's call content is protected, providing a certain degree of security and privacy protection. Attached Figure Description
[0065] Figure 1 This is a flowchart of the present invention;
[0066] Figure 2 This is a system block diagram of the present invention;
[0067] Figure 3 This is a system conversion block diagram of the present invention;
[0068] Figure 4 This is a block diagram illustrating the signal conversion principle of the present invention. Detailed Implementation
[0069] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0070] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0071] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0072] Example 1
[0073] like Figure 1 This implementation provides a voice communication method in a broadband-narrowband interoperability environment, specifically including the following steps:
[0074] S101. Collect voice signals through audio equipment, convert the voice signals into digital signals, and transmit the information through the Internet;
[0075] S102. Select different encoding algorithms and bit rates in different environments to improve the quality and efficiency of voice transmission;
[0076] S103. Adjust the bit rate of audio encoding according to changes in network bandwidth, and use forward error correction technology to reduce packet loss rate;
[0077] S104. Use encryption technology to protect the security of voice data transmission.
[0078] In this embodiment, step S101 uses a microphone or other audio device to collect the user's voice signal, converts the collected analog voice signal into a digital signal, transmits it via the Internet, and processes the digital voice signal using sampling values, bias values, and gain values to digitally represent the voice signal. The digital voice signal undergoes digital representation and quantization processing. Specifically, the calculation formulas for sampling values, bias values, and gain values are as follows:
[0079] SV = SP / Z
[0080] BV = 2^(L-1)
[0081] GV = 2^(L-1)
[0082] Where SV represents the sampled value, S represents the input signal value, P represents the bias value, Z represents the gain value, BV represents the bias value, L represents the quantization bits, and GV represents the gain value, the specific steps for transmitting digital signals over the Internet are as follows:
[0083] S1. Encapsulation and Transmission: Digital signals are compressed and encoded using audio encoding algorithms. The encoded audio data is then encapsulated into data packets. The audio data is encapsulated using RTP, with the encoded audio data placed in the RTP payload. The audio data is fragmented, and the corresponding fragmentation representation is set in the RTP header. The constructed RTP data packets are then encapsulated into UDP datagrams, with the source and destination ports set to indicate the sender and receiver of the datagram. The UDP datagrams are then encapsulated into IP datagrams, with the source and destination IP addresses set to identify the sender and receiver of the datagram. The IP datagrams are then encapsulated into physical network frames, with the source and destination MAC addresses set to identify the sender and receiver of the frame. The encapsulated data packets are then transmitted over the network. The receiving end adjusts the order and synchronizes the received data packets based on the sequence number and timestamp information in the RTP header to restore the original audio data.
[0084] S2. Parsing and Decoding: Extract RTP header information from the received data packet. The RTP header contains sequence number, timestamp, and synchronization source identifier fields. Based on the RTP header information, determine the location and length of the audio data. Extract the audio data portion from the data packet and decode the audio data. For the linear quantization value of each sampling point, apply the inverse quantization formula: IV = QV * SZ, where QV represents the linear quantization value, which is the value of the digitized signal after quantization processing, and SZ represents the difference between each quantization level. The smaller the step size, the higher the quantization accuracy. For each linear quantization value, apply the inverse PCM conversion formula, specifically calculated as follows: PCM = IV + 128, where IV represents the linear value. The digitized signal value obtained by the inverse quantization formula maps the quantized value back to a continuous linear range. The digitized signal value is obtained by the PCM conversion formula. The inverse PCM conversion formula adds 128 to the linear value, converting it into an unsigned integer form, representing the amplitude of the audio.
[0085] S3. Playback: Converts the digital signal into a continuous analog signal, uses filtering techniques to restore the continuous analog signal, and performs a weighted summation of the input signals. The specific calculation formula is as follows:
[0086] y[n]=b[0]*x[n]+b[1]*x[n-1]+...+b[M]*x[nM]
[0087] Where y[n] represents the output of the filter, x[n] represents the sampled value of the input signal, and b[0], b[1], ..., b[M] represent the coefficients of the filter. The output of the filter is used as the estimated value of the analog signal, and the analog signal is output to the speaker or other audio device for playback through the amplifier circuit.
[0088] Specifically, it should be noted that the offset value is an offset used in the quantization process to ensure that the quantized value can cover the entire quantization range. The formula for calculating the offset value is 2^(quantization bits - 1). The offset value depends on the number of quantization bits and is generally the number of quantization bits minus one to the power of 2. For example, for 8-bit quantization, the offset value is 2^(8-1) = 2^7 = 128.
[0089] Specifically, it should be noted that the gain value is a coefficient used to scale the input signal value during the quantization process. The formula for calculating the gain value is 2^(quantization bits - 1). The gain value depends on the number of quantization bits, and is generally the number of quantization bits minus one to the power of 2. For example, for 8-bit quantization, the gain value is 2^(8-1) = 2^7 = 128.
[0090] Subtracting the bias value from the input signal value and then dividing by the gain value can map the input signal value to a suitable range, obtaining a specific sample value, so that the quantized speech signal can better represent the original analog speech signal.
[0091] Example 2
[0092] In some embodiments, step S102 specifically includes the following steps:
[0093] S1. In a broadband environment, the AAC encoding algorithm can provide higher audio quality and a wider range of frequency effects.
[0094] S2. In a narrowband environment, the AMR algorithm can provide voice transmission at a low bit rate. Reducing the sampling rate can reduce audio efficiency and bandwidth consumption.
[0095] In this embodiment, the specific steps of the AAC encoding algorithm are as follows:
[0096] 1) The audio signal is converted from the time domain to the frequency domain. The AAC coding algorithm uses MDCT for time-frequency transformation, and its calculation formula is as follows:
[0097] X(k,n)=2*sum(x(n+m)*w(m)*cos((pi / N)*(m+0.5+(N / 2))*(k+0.5)),m=0to N-1)
[0098] Where X(k,n) is the k-th frequency band coefficient of the n-th time window, x(n+m) is the sample value of the input audio signal, w(m) is the window function, and N is the window length;
[0099] 2) Quantize the frequency domain coefficients by dividing them into multiple frequency bands. Each frequency band contains a set of continuous frequency domain coefficients. Divide the frequency domain coefficients in each band by the corresponding quantization step size and take the integer part as the quantized coefficient. The quantized coefficients are closer to the discrete values, reducing the amount of data. The specific calculation formula is as follows:
[0100] q_c = floor(o_c / q_s)
[0101] Where o_c represents the original frequency domain coefficients, q_s represents the quantization step size of the corresponding frequency band, and floor represents the function rounding down;
[0102] 3) The quantized frequency domain coefficients are reduced in size through prediction. The AAC coding algorithm uses a linear prediction method, representing each frequency band coefficient as a linear combination of the previous few coefficients in that frequency band. The specific calculation formula is as follows:
[0103]
[0104] Where LH represents the quantized coefficients, Yi represents the predicted coefficients, and Ci represents the predicted values of the first few coefficients in this frequency band;
[0105] 4) Perform entropy encoding on the predicted coefficients to reduce the amount of data and determine the encoding interval. Sort all symbols to be encoded in ascending order of probability distribution and divide the encoding interval according to their probability distribution. Divide the real number interval between 0 and 1 according to the probability distribution of each symbol. The length of the encoding interval corresponding to each symbol is its probability distribution. For each coefficient, select a sub-interval within the encoding interval for encoding to narrow the encoding interval. Divide the interval again according to its probability distribution based on the proportion of the coefficient to be encoded within the encoding interval to obtain smaller sub-intervals. Repeat this process until the interval is small enough or cannot be further reduced. Take any real number in the encoding interval as the encoded output of the coefficient. Reconstruct the encoding interval through the known probability distribution and the encoded output. Determine the symbol to be decoded according to the probability distribution of the symbols contained in the interval. Repeat this process until all symbols are decoded.
[0106] 5) Channel coding is performed on the entropy-coded data to improve noise resistance and error correction capability. The AAC coding algorithm uses cyclic redundancy coding and forward error correction techniques to enhance the channel coding capability. Cyclic redundancy coding uses parity bits to detect data transmission errors. The specific steps are as follows:
[0107] A. At the encoder end, first determine a generator polynomial G(x), which is a binary number.
[0108] B. Treat the data to be transmitted as a binary number D(x), add 0 to its highest bit with the same number of times as G(x), and get a new number M(x). Then perform a division operation on M(x) to get a remainder R(x). The number of times this remainder R(x) is at most one less than the number of times G(x), that is, its number of bits is 1 less than G(x).
[0109] C. After adding the remainder R(x) to the highest bit of the original data D(x), a new data D'(x) is obtained, which is the data with the CRC check bit added;
[0110] D. Send D'(x) to the receiving end and calculate it using the same generator polynomial G(x) at the receiving end. If the received data passes the CRC check, it means that no error occurred during transmission.
[0111] Forward error correction corrects data transmission errors by adding redundant information. The specific steps are as follows:
[0112] A. Encode the data to be transmitted according to the selected encoding method and add redundant information. This redundant information can be used at the receiving end to correct transmission errors.
[0113] B. Send the encoded data to the receiving end;
[0114] C. At the receiving end, the received data is decoded using the selected encoding method. If an error is detected, redundant information is used to correct the error, and finally the correct audio signal is obtained.
[0115] 6) Package the channel-coded data into an audio file of a specific format, such as MP4 or ADTS.
[0116] Example 3
[0117] In some embodiments, step S103 specifically includes the following steps:
[0118] S1. Bandwidth-based bitrate adjustment: By using network bandwidth estimation techniques, such as network condition feedback methods, the current available bandwidth is monitored in real time. Based on the monitored bandwidth, a suitable target bitrate is calculated. Based on the target bitrate, the audio encoding parameters are adjusted, such as reducing the bitrate to adapt to lower bandwidth or increasing the bitrate to improve audio quality.
[0119] S2. Reduce packet loss rate based on forward error correction technology: The forward error correction coding algorithm is used at the sending end to encode the original data into redundant data. The redundant data contains the redundant information of the original data. Group transmission: The encoded data is divided into multiple groups for transmission and decoded at the receiving end. Even if a group is lost during transmission, the receiving end can still correct the error through the redundant information in other groups, thereby recovering the original data.
[0120] Example 4
[0121] In some embodiments, step S104 specifically includes the following steps:
[0122] S1. The sender and receiver each generate a pair of public and private keys. The public key can be transmitted publicly, while the private key needs to be protected. The specific calculation formula is as follows:
[0123] A. Randomly select two different prime numbers p and q;
[0124] B. Calculate the modulus n = p * q;
[0125] C. Calculate Euler's totient function p(n) = (p-1)*(q-1);
[0126] D. Randomly select an integer e, And e and Coprime;
[0127] E. Calculate d such that That is, d is the multiplicative inverse of e modulo p(n);
[0128] F. The public key is (n,e), and the private key is (n,d).
[0129] S2. The sender uses the receiver's public key to encrypt the session key. The sender encrypts their own session key using the receiver's public key to obtain the encrypted ciphertext. The receiver then decrypts the ciphertext using their own private key to obtain the session key. The specific calculation formula is as follows:
[0130] The sender uses the receiver's public key to encrypt the data: ciphertext = plaintext^emodn;
[0131] The recipient uses their private key to decrypt: the decrypted plaintext = ciphertext^dmod n;
[0132] S3. The sender uses a session key to encrypt the voice data, and the receiver uses the session key to decrypt it, thereby achieving secure communication.
[0133] Example 5
[0134] like Figure 2 This embodiment also provides a voice communication system in a broadband-narrowband interoperability environment, including: a signal conversion module, an audio encoding module, a network adjustment module, and a security protection module;
[0135] Signal conversion module: Collects voice signals through audio devices, converts the voice signals into digital signals, and transmits the information via the Internet;
[0136] Audio encoding module: Selects different encoding algorithms and bit rates in different environments to improve the quality and efficiency of voice transmission;
[0137] Network adjustment module: Adjusts the bit rate of audio encoding according to changes in network bandwidth, and uses forward error correction technology to reduce packet loss rate;
[0138] Security protection module: Employs encryption technology to protect the security of voice data transmission.
[0139] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0140] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0141] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0142] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0143] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0144] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0145] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A voice communication method in a wide and narrow band interworking environment, characterized by, Includes the following steps: S101. Collect voice signals through audio equipment, convert the voice signals into digital signals, and transmit the information through the Internet; S102. Select different encoding algorithms and bit rates in different environments to improve the quality and efficiency of voice transmission; S103. Adjust the bit rate of audio encoding according to changes in network bandwidth, and use forward error correction technology to reduce packet loss rate; S104. Use encryption technology to protect the security of voice data transmission.
2. The voice communication method in a wide and narrow band interworking environment according to claim 1, characterized in that, In step S101, a microphone or other audio device is used to collect the user's voice signal, convert the collected analog voice signal into a digital signal, transmit it through the Internet, and process the digital voice signal through sampling value, bias value and gain value to digitally represent the voice signal, and perform digital representation and quantization processing on the digital voice signal.
3. The voice communication method in a wide and narrow band interworking environment according to claim 2, characterized in that, The specific steps for transmitting the digital signal over the Internet are as follows: S1. Encapsulation and Transmission: Digital signals are compressed and encoded using audio encoding algorithms. The encoded audio data is then encapsulated into data packets. The audio data is encapsulated using RTP, with the encoded audio data placed in the RTP payload. The audio data is fragmented, and the corresponding fragmentation representation is set in the RTP header. The constructed RTP data packets are then encapsulated into UDP datagrams, with the source and destination ports set to indicate the sender and receiver of the datagram. The UDP datagrams are then encapsulated into IP datagrams, with the source and destination IP addresses set to identify the sender and receiver of the datagram. The IP datagrams are then encapsulated into physical network frames, with the source and destination MAC addresses set to identify the sender and receiver of the frame. The encapsulated data packets are then transmitted over the network. The receiving end adjusts the order and synchronizes the received data packets based on the sequence number and timestamp information in the RTP header to restore the original audio data. S2. Parsing and Decoding: Extract RTP header information from the received data packet. The RTP header contains sequence number, timestamp, and synchronization source identifier fields. Based on the RTP header information, determine the location and length of the audio data. Extract the audio data portion from the data packet and decode the audio data. For the linear quantization value of each sampling point, apply the inverse quantization formula: IV = QV * SZ, where QV represents the linear quantization value, which is the value of the digitized signal after quantization processing, and SZ represents the difference between each quantization level. For each linear quantization value, apply the inverse PCM conversion formula, specifically calculated as follows: PCM = IV + 128, where IV represents the linear value. The digitized signal value obtained by the inverse quantization formula maps the quantization value back to a continuous linear range. The digitized signal value is obtained by the PCM conversion formula. The inverse PCM conversion formula adds 128 to the linear value, converting it into an unsigned integer form, representing the amplitude of the audio. S3. Playback: Converts the digital signal into a continuous analog signal, uses filtering techniques to restore the continuous analog signal, and performs a weighted summation of the input signals. The specific calculation formula is as follows: y[n]=b[0]*x[n]+b[1]*x[n-1]+…+b[M]*x[nM] Where y[n] represents the output of the filter, x[n] represents the sampled value of the input signal, and b[0], b[1], ..., b[M] represent the coefficients of the filter. The output of the filter is used as the estimated value of the analog signal, and the analog signal is output to the audio device for playback through the amplifier circuit.
4. The voice communication method in a wide and narrow band interworking environment according to claim 1, characterized in that, In S102, in a broadband environment, the AAC coding algorithm provides higher audio quality and a wider range of frequency effects, while in a narrowband environment, the AMR algorithm provides voice transmission at low bit rates.
5. The voice communication method in a wide and narrow band interworking environment according to claim 4, wherein, The specific steps of the AAC encoding algorithm are as follows: 1) The audio signal is converted from the time domain to the frequency domain. The AAC coding algorithm uses MDCT for time-frequency transformation, and its calculation formula is as follows: X(k,n)=2*sum(x(n+m)*w(m)*cos((pi / N)*(m+0.5+(N / 2))*(k+0.5)),m=0to N-1) Where X(k,n) is the k-th frequency band coefficient of the n-th time window, x(n+m) is the sample value of the input audio signal, w(m) is the window function, and N is the window length; 2) Quantize the frequency domain coefficients by dividing them into multiple frequency bands. Each frequency band contains a set of continuous frequency domain coefficients. Divide the frequency domain coefficients in each band by the corresponding quantization step size and take the integer part as the quantized coefficient. The quantized coefficients are closer to the discrete values, reducing the amount of data. The specific calculation formula is as follows: q_c = floor(o_c / q_s) Where o_c represents the original frequency domain coefficients, q_s represents the quantization step size of the corresponding frequency band, and floor represents the function rounding down; 3) The quantized frequency domain coefficients are reduced in size through prediction. The AAC coding algorithm uses a linear prediction method, representing each frequency band coefficient as a linear combination of the previous few coefficients in that frequency band. The specific calculation formula is as follows: Where LH represents the quantized coefficients, Yi represents the predicted coefficients, and Ci represents the predicted values of the first few coefficients in this frequency band; 4) Perform entropy encoding on the predicted coefficients to reduce the amount of data and determine the encoding interval. Sort all symbols to be encoded in ascending order of probability distribution and divide the encoding interval according to their probability distribution. Divide the real number interval between 0 and 1 according to the probability distribution of each symbol. The length of the encoding interval corresponding to each symbol is its probability distribution. For each coefficient, select a sub-interval within the encoding interval for encoding to narrow the encoding interval. Divide the interval again according to its probability distribution based on the proportion of the coefficient to be encoded within the encoding interval to obtain smaller sub-intervals. Repeat this process until the interval cannot be further reduced. Take any real number in the encoding interval as the encoded output of the coefficient. Reconstruct the encoding interval through the known probability distribution and the encoded output. Determine the symbol to be decoded according to the probability distribution of the symbols contained in the interval. Repeat this process until all symbols are decoded. 5) Channel coding is performed on the entropy-coded data to improve noise resistance and error correction capability. The AAC coding algorithm uses cyclic redundancy coding and forward error correction techniques to enhance the channel coding capability. Cyclic redundancy coding uses parity bits to detect data transmission errors. The specific steps are as follows: A. At the encoder end, first determine a generator polynomial G(x), which is a binary number; B. Treat the data to be transmitted as a binary number D(x), add 0 to its highest bit with the same number of times as G(x), and get a new number M(x). Then perform a division operation on M(x) to get a remainder R(x). The number of times this remainder R(x) is at most one less than the number of times G(x). C. After adding the remainder R(x) to the highest bit of the original data D(x), a new data D'(x) is obtained, which is the data with the CRC check bit added; D. Send D'(x) to the receiving end, and compute it at the receiving end using the same generator polynomial G(x); 6) Package the channel-coded data into an audio file of a specific format.
6. The voice communication method in a wide and narrow band interworking environment according to claim 4, wherein, The forward error correction corrects data transmission errors by adding redundant information. The specific steps are as follows: A. Encode the data to be transmitted according to the selected encoding method and add redundant information. This redundant information can be used at the receiving end to correct transmission errors. B. Send the encoded data to the receiving end; C. At the receiving end, the received data is decoded using the selected encoding method. If errors are detected, redundant information is used to correct them, and finally the correct audio signal is obtained.
7. A voice communication method for a broadband-narrowband interoperability environment according to claim 1, characterized in that, In step S103, the bit rate adjustment based on bandwidth is achieved by using network bandwidth estimation technology to monitor the current available bandwidth in real time, calculating a suitable target bit rate based on the monitored bandwidth, and adjusting the audio encoding parameters according to the target bit rate.
8. The voice communication method in a wide and narrow band interworking environment according to claim 1, wherein, The forward error correction technique reduces packet loss by using a forward error correction coding algorithm at the sending end to encode the original data into redundant data. The redundant data contains redundant information from the original data and is sent in groups. The encoded data is divided into multiple groups for transmission and then decoded at the receiving end. By correcting the redundant information in other groups, the original data is recovered.
9. The voice communication method in a wide and narrow band interworking environment according to claim 1, wherein, S104 specifically includes the following steps: S1. The sender and receiver each generate a pair of public and private keys. The public key can be transmitted publicly, while the private key needs to be protected. The specific calculation formula is as follows: A. Randomly select two different prime numbers p and q; B. Calculate the modulus n = p * q; C. Calculate Euler's totient function p(n) = (p-1)*(q-1); D. randomly select an integer e, and e is relatively prime to n. E. Compute d such that i.e. d is the multiplicative inverse of e with respect to the modulus p(n); F. The public key is (n,e), and the private key is (n,d). S2. The sender uses the receiver's public key to encrypt the session key. The sender encrypts their own session key using the receiver's public key to obtain the encrypted ciphertext. The receiver then decrypts the ciphertext using their own private key to obtain the session key. The specific calculation formula is as follows: The sender uses the receiver's public key to encrypt the data: ciphertext = plaintext^emodn; The recipient uses their private key to decrypt: the decrypted plaintext = ciphertext^dmod n; S3. The sender uses a session key to encrypt the voice data, and the receiver uses the session key to decrypt it.
10. A voice communication system for broadband and narrowband interoperability environments is applied to the voice communication method for broadband and narrowband interoperability environments as described in any one of claims 1-9, characterized in that, include: Signal conversion module: Collects voice signals through audio devices, converts the voice signals into digital signals, and transmits the information via the Internet; Audio encoding module: Selects different encoding algorithms and bit rates in different environments to improve the quality and efficiency of voice transmission; Network adjustment module: Adjusts the bit rate of audio encoding according to changes in network bandwidth, and uses forward error correction technology to reduce packet loss rate; Security protection module: Employs encryption technology to protect the security of voice data transmission.
