Method for implementing high-quality transmission of voice streaming in an onion routing network
Patent Information
- Application Number
- CN202410032126.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2044-01-09
AI Technical Summary
[0005]本发明的目的在于针对匿名通信的匿名性需求和流媒体的高速率、低延迟之间天然存在矛盾关系的问题,提供一种语音流媒体在洋葱路由网络中实现高质量传输的方法
[0015] Compared with the prior art, the significant advantages of the present invention are as follows: By designing an adaptive adjustment mechanism for voice streaming media during transmission and a decision-making mechanism during anonymous network transmission, the present invention ensures the anonymity and security of streaming media transmission on the one hand, and alleviates the contradiction between the long latency of anonymous networks and the high speed and real-time performance of voice streaming media transmission on the other hand, which is of great significance for the efficient and secure transmission of streaming media.
Smart Images

Figure CN117834593B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of network security technology, and specifically relates to a method for achieving high-quality transmission of voice streaming media in an onion routing network. Background Technology
[0002] WebRTC (Web Real-Time Communication) is a method that enables real-time communication between browsers and mobile applications through a simple API. Without using intermediaries, WebRTC establishes peer-to-peer links between browsers to transmit audio and video streams. The principles of WebRTC application are open source, free access, adherence to unified standards, and browser integration. In terms of devices, WebRTC is not limited by the terminal operating environment of traditional internet applications or browsers, thus this technology has been widely promoted and applied.
[0003] Tor (The Second Generation Onion Router) is known as a second-generation onion routing system. Tor's core technology, "onion routing," involves encrypting TCP / IP packets during communication. These encrypted packets, called onion packets, are then transmitted through an anonymous communication link generated by a random algorithm. The client first accesses the directory server through the onion proxy to obtain current network status information, primarily information about the onion routing nodes, including public keys and IP addresses. Then, the onion proxy randomly selects three nodes as relay nodes (entry node, intermediate node, and exit node) and negotiates a shared session key with each node to establish a private link with encrypted connections.
[0004] The increasing awareness of privacy has led to a growing proportion of anonymous communication systems in accessing online services. Streaming media traffic currently dominates internet traffic in terms of volume. However, there is an inherent contradiction between the anonymity requirements of anonymous communication and the high speed and low latency of streaming media. Therefore, this paper designs an adaptive adjustment mechanism for voice streaming media transmission and a decision-making mechanism for anonymous network transmission. This mechanism ensures both anonymity and security during streaming media transmission while mitigating the conflict between the long latency of anonymous networks and the high speed and real-time requirements of voice streaming media transmission. This is of great significance for the efficient and secure transmission of streaming media. Summary of the Invention
[0005] The purpose of this invention is to address the inherent contradiction between the anonymity requirements of anonymous communication and the high speed and low latency of streaming media, and to provide a method for achieving high-quality transmission of voice streaming media in an onion routing network.
[0006] The technical solution to achieve the objective of this invention is: a method for high-quality transmission of voice streaming media in an onion routing network, comprising:
[0007] Collect attribute characteristics of WebRTC application data transmission to evaluate the transmission quality and efficiency of the current session;
[0008] Based on the model used to evaluate the quality of transmitted audio data, calculate the experience score for the current playback effect;
[0009] Based on the calculated score, query the relevant database and adjust the playback mode accordingly.
[0010] In an onion routing network, the directory server extracts node server attributes to evaluate the node's load capacity and bandwidth usage.
[0011] Based on the idea of dynamic programming algorithm, the optimal load distribution method is calculated when deploying nodes;
[0012] The directory server provides routing information to WebRTC and collects information periodically, updating and responding accordingly.
[0013] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described above.
[0014] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the above-described method.
[0015] Compared with the prior art, the significant advantages of the present invention are as follows: By designing an adaptive adjustment mechanism for voice streaming media during transmission and a decision-making mechanism during anonymous network transmission, the present invention ensures the anonymity and security of streaming media transmission on the one hand, and alleviates the contradiction between the long latency of anonymous networks and the high speed and real-time performance of voice streaming media transmission on the other hand, which is of great significance for the efficient and secure transmission of streaming media. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the adaptive adjustment mechanism for voice streaming media during transmission and the decision-making mechanism during anonymous network transmission, as described in this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0018] Combination Figure 1The present invention provides a method for achieving high-quality transmission of voice streaming media in an onion routing network, comprising the following steps:
[0019] Collect attribute characteristics of WebRTC application data transmission to evaluate the transmission quality and efficiency of the current session. Retrieve the following data from the WebRTC getStat API: the number of RTP packets lost per SSRC (packetsLost); the duration of the session since the first RTP packet transmission (totalSamplesDuration); and the total number of bytes of received audio data (bytesReceived).
[0020] Calculate the ratio of the average number of consecutively lost packets during a random packet loss event:
[0021]
[0022] The average number of consecutive packet losses and the average number of randomly lost packets can be calculated by taking the ratio of packetsLost and totalSamplesDuration.
[0023] The packet loss rate (LR) is calculated as follows:
[0024]
[0025] Calculate the effective device impairment factor I considering both speech coding and packet loss conditions. e,eff The calculation method is as follows:
[0026]
[0027] Specifically, for NB (narrowband audio, the same below), I0 is 95; for WB (wideband audio, the same below), I0 is 129; and for SWB (ultraband audio, the same below), I0 is 135.
[0028] I e This represents the device impairment factor, indicating the audio quality degradation caused by the speech codec. LR is the packet loss rate. Bpl represents packet loss robustness. e Both Bpl and Bpl are specific values corresponding to the codec used.
[0029] The overall rating of expected session quality is calculated by combining the effects of different impairments on session voice quality. This rating is called the transmission rating factor and is denoted as R. The calculation method is as follows:
[0030] R = R max -I e,eff
[0031] Among them, for NB, R max takes 93.2; for WB, R max takes 129; for SWB, R max takes 148.
[0032] Further convert R into a more intuitive metric, i.e., the Mean Opinion Score MOS. The value range of MOS is from 0 (the worst average score) to 100 (the best average score). The relationship between the two is as follows:
[0033] When R = 0, MOS = 1;
[0034] When 0 < R < 100, MOS = 1 + 0.035·R + R·(R - 60)·(100 - R)·7·10 -6
[0035] When R = 100, MOS = 4.5;
[0036] According to the calculated MOS value, judge the adjustment direction of the transmission mode and bit rate of the WebRTC application (taking Opus as an example). The specific bandwidth range, bit rate, and playback correspondence can be seen in the following table. Continuously adjust the settings by sending SDP messages to make the MOS value reach the maximum possible value.
[0037] Bit Rates and Transmission Modes Supported by the Opus Codec
[0038]
[0039]
[0040] When transmitting audio data, select the open-source Onion Router Network Tor as the proxy tool. Let m represent the number of CPU cores of the control host, and n represent the number of servers, where n > m. The task allocation and resource scheduling method based on dynamic programming can be described as follows:
[0041] (1) x i represents the number of configuration tasks to be sent to each server (with the same performance), i ∈ {1, 2,..., n}. The directory server interacts with the relay nodes to send the configuration; for the execution of tasks, its processing time calculation method is as follows:
[0042] t i = tLong i / mips j
[0043] where tLong i represents the length of the i-th task, and j represents the computing power of the j-th relay node.
[0044] (2) Divide n servers into m groups, and denote the sum of data in each group as sum. i , i ∈ {1, 2,..., m}, calculate the average of n averages, and the calculation method is as follows:
[0045]
[0046] (3) Calculate the grouping uniformity of n tasks, and introduce variance calculation as follows:
[0047]
[0048] When the length value takes the minimum value, the grouping is the most average, the efficiency is the highest, and the task execution is the fastest.
[0049] (4) Sort the n numbers in descending order, starting from the maximum value X max Select. If Then directly divide X max into a separate group. There are j numbers greater than or equal to , then divide them into j groups.
[0050] (5) For the ungrouped numbers, first put the maximum value X max ' into a group g, and then find the numbers p0 and q0 closest to Δ0 for group g from the remaining numbers, q0 < Δ0 < p0. The solution method for Δ0 is as follows:
[0051]
[0052] If (Δ0 – p0) 2 > (Δ0 – q0) 2 , then add q0 to group g and continue to explore Δ1 = Δ0 – q0;
[0053] If (Δ0 – p0) 2 ≤ (Δ0 – q0) 2 , then save (Δ0 – p0) 2 2 and continue to explore Δ0 – q0;
[0054] Recursively execute the above process, select the data with the smallest difference square and add it to group g, and continue to explore Δ1 = Δ0 – q0;
[0055] (6) When the sum of several numbers in group g is greater than or equal to Complete the allocation of a group;
[0056] (7) Continue to execute the operation in Step5 until the n - j numbers less than are completely divided into m - j groups, jump out of the loop, and the n servers are divided into m groups.
[0057] The routes allocated according to the dynamic programming algorithm are sent to the WebRTC application, and the routing load is calculated in real time. Dynamic programming is performed again as needed. On the WebRTC application side, the playback mode and bitrate are also adjusted according to real-time feedback such as load and packet loss.
[0058] This invention designs an adaptive adjustment mechanism for voice streaming media during transmission and a decision-making mechanism for anonymous network transmission. On the one hand, it ensures the anonymity and security of streaming media transmission, and on the other hand, it alleviates the contradiction between the long latency of anonymous networks and the high speed and real-time requirements of voice streaming media transmission. This is of great significance for the efficient and secure transmission of streaming media.
[0059] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for achieving high-quality transmission of voice streaming media in an onion routing network, characterized in that, include: Collect attribute characteristics of WebRTC application data transmission to evaluate the transmission quality and efficiency of the current session; The following data is obtained using the getStat API provided by WebRTC: the number of RTP packets lost per SSRC (packetsLost) according to RFC 3550; the duration of the session since the first RTP packet transmission (totalSamplesDuration); and the total number of bytes of received audio data (bytesReceived). Based on this, the following parameters are calculated: 1) Calculate the packet loss rate (LR) as follows: ; 2) Calculate the effective equipment impairment factor considering both speech coding and packet loss. The calculation method is as follows: ; For NB, Take 95; for WB, Take 129; for SWB, Take 135; It is a device impairment factor that represents the audio quality degradation caused by the speech codec; It is the packet loss rate; Indicates robustness against group loss; and These are all specific values corresponding to the codec used; It is the ratio of the average number of consecutively lost packets during a random packet loss event: ; The average number of consecutive packet losses and the average number of randomly lost packets are calculated by the ratio of packetsLost and totalSamplesDuration. 3) The overall rating of expected session quality is calculated by combining the effects of different impairments on session voice quality. This rating is called the transmission rating factor and is denoted as R. The calculation method is as follows: ; For NB, Take 93.2; for WB, Take 129; for SWB, Take 148; 4) Further convert R into a more intuitive indicator, namely the Mean Opinion Score (MOS). The MOS value ranges from 0 to 100, and the relationship between the two is as follows: When R=0, MOS=1; When 0 < R < 100, ; When R=100, MOS=4.5; Based on the model used to evaluate the quality of transmitted audio data, calculate the experience score for the current playback effect; Based on the calculated score, query the relevant database and adjust the playback mode accordingly. In an onion routing network, the directory server extracts node server attributes to evaluate the node's load capacity and bandwidth usage. Based on the idea of dynamic programming algorithm, the optimal load distribution method is calculated when deploying nodes; The directory server provides routing information to WebRTC and collects information periodically, updating and responding accordingly.
2. The method according to claim 1, characterized in that, Based on the calculated MOS value, the direction of adjustment for the transmission mode and bit rate of the WebRTC application is determined. By continuously adjusting the settings by sending SDP messages, the MOS value can be made to reach its maximum value.
3. The method according to claim 1, characterized in that, When transmitting audio data, the open-source Tor routing network is selected as the proxy tool. Here, 𝑚 represents the number of CPU cores on the control host, and 𝑛 represents the number of servers, where 𝑛 > 𝑚. The task allocation and resource scheduling method based on dynamic programming is described as follows: 1) This represents the number of configuration tasks that each server needs to distribute, 𝑖∈{1, 2, ..., 𝑛}; the directory server interacts with the relay node to distribute configurations; the processing time for task execution is calculated as follows: ; in Let represent the length of the nth task, and j represent the computing power of the jth relay node; 2) Divide the n servers into m groups, and denot the sum of the data in each group as . , Calculate the average of n averages as follows: ; 3) Calculate the uniformity of grouping among the n tasks, and introduce the variance calculation as follows: ]; When the l_i_i value is at its minimum, the grouping is most even, the efficiency is highest, and the task is executed fastest. 4) Sort the n numbers in descending order, starting with the largest value. Start by selecting, if ≥ Then directly If grouped separately, there are 𝑗 numbers greater than or equal to 10. The numbers are divided into groups 𝑗; 5) For ungrouped numbers, first group the largest number. Place the numbers into a group g, and then find the closest numbers from the remaining numbers for group g. The number and , < < ,for The solution method is as follows: = − ; if Then Join group g and continue exploring = – ; if Then 2. Save and continue exploring. – ; The above process is executed recursively, selecting the data with the smallest squared difference to add to group g, and the exploration continues. = – ; 6) When the sum of the numbers in group g is greater than or equal to Complete the allocation of one group; 7) Continue performing step 5) until there are n - n smaller than n. The numbers are completely divided into 𝑚 − 𝑗 groups, the loop is broken, and 𝑛 servers are divided into 𝑚 groups.
4. The method according to claim 1, characterized in that, The routes allocated according to the dynamic programming algorithm are sent to the WebRTC application, and the routing load is calculated in real time. Dynamic programming is performed again as needed. On the WebRTC application side, the playback mode and bitrate are also adjusted according to the real-time load and packet loss feedback.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Audio and video processing method and system
CN109982100A
Web client tracking prevention method and system and electronic equipment
CN111245824A