Streaming media data transmission method and device, equipment and storage medium
By dynamically evaluating packet loss rate and latency data in a multi-channel environment between relay servers, the channel with the highest communication score is selected to transmit streaming media data, thus solving the problem of poor streaming media data transmission quality and improving user experience and transmission reliability.
Patent Information
- Application Number
- CN202511192799.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-11-11
AI Technical Summary
Existing streaming media data transmission solutions struggle to cope with dynamic changes in complex network environments, leading to decreased transmission quality and impacting user experience. In particular, transmission quality is poor in high-definition video and real-time interactive scenarios, and there is a lack of effective redundancy backup mechanisms and low resource utilization.
By acquiring packet loss rate and latency data at preset intervals in at least two communication channels between the relay server and the next relay server, calculating a communication score based on the transmission mode and weighting coefficient, and selecting the channel with the highest communication score for streaming media data transmission, the transmission quality is ensured.
It significantly improves the quality of streaming media data transmission, enhances the overall user experience, and ensures that low packet loss rate or low latency channels are used for different transmission modes by dynamically adjusting transmission strategies, thereby improving the reliability and stability of transmission.
Smart Images

Figure CN120935148A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data transmission technology, and in particular to a streaming media data transmission method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of 5G communication, cloud computing, and smart terminal technologies, streaming media services have been deeply integrated into all aspects of social production and life, covering key scenarios such as online education, telemedicine, live streaming, and video conferencing. During streaming media transmission, relay services, as the core hub connecting the source and terminal, undertake important functions such as data forwarding, load balancing, and cross-network adaptation. Their transmission efficiency and stability directly determine the user's service experience. Especially in complex network environments spanning multiple regions and operators, streaming media data needs to be transmitted through the collaborative relay of multiple relay nodes. The transmission quality between relay services becomes a crucial factor in ensuring smooth audio and video playback and reducing latency and packet loss rates.
[0003] Currently, most mainstream streaming media transmission solutions rely on a fixed, single channel for data exchange between relay services. This means that once a transmission path is established, a single physical link or logical channel is used for data forwarding for an extended period. This model severely impacts the transmission quality of streaming media data when communication quality deteriorates or transmission anomalies occur, resulting in a poor user experience. Summary of the Invention This application provides a streaming media data transmission method, apparatus, device, and storage medium that can solve the problem of poor streaming media data transmission quality. By selecting the communication channel with the highest communication score from at least two communication channels for streaming media data transmission, the quality of streaming media data transmission is significantly improved, thereby enhancing the overall user experience.
[0004] In a first aspect, embodiments of this application provide a streaming media data transmission method for a relay server, wherein at least two communication channels exist between the relay server and the next relay server, and the streaming media data transmission method includes: The packet loss rate and latency data of each communication channel are acquired at preset intervals, and the current transmission mode is determined. The transmission mode includes control signaling mode or video stream mode. Based on the correspondence between the transmission mode and the preset weight coefficients, determine the current target weight coefficient; The communication score for each communication channel is calculated based on packet loss rate, latency data, and target weight coefficient. The communication channel with the highest communication score is identified as the target channel, and streaming media data is transmitted through the target channel.
[0005] Furthermore, a communication score is calculated for each communication channel based on packet loss rate, latency data, and target weighting coefficients, including: According to the formula Calculate the communication score for each communication channel; in, A communication score for the corresponding communication channel. This refers to the delay weighting coefficient for the corresponding communication channel. To account for the round-trip delay of the corresponding communication channel, This is the packet loss rate weighting coefficient for the corresponding communication channel. This represents the packet loss rate of the corresponding communication channel.
[0006] Furthermore, based on the correlation between the transmission mode and the preset weighting coefficients, the current target weighting coefficient is determined, including: When the transmission mode is control signaling mode, the delay weighting coefficient is determined according to the correspondence between the transmission mode and the preset weighting coefficient. The first value is the packet loss rate weighting coefficient. The second value is greater than the first value. When the transmission mode is video stream mode, the delay weighting coefficient is determined based on the correspondence between the transmission mode and the preset weighting coefficient. The third value is the packet loss rate weighting coefficient. The fourth value is the value where the third value is greater than the fourth value, the third value is less than the first value, and the fourth value is greater than the second value.
[0007] Furthermore, a communication score is calculated for each communication channel based on packet loss rate, latency data, and target weighting coefficients, including: When the packet loss rate of the corresponding communication channel is greater than the first preset threshold or the latency data is greater than the second preset threshold, the communication score of the corresponding communication channel is determined to be zero.
[0008] Furthermore, communication channels include public network channels and encrypted channels; Packet loss rate and latency data for each communication channel are acquired at preset intervals, including: At preset intervals, a first probe data packet of preset bytes is sent to the next relay server through the public network channel, and the corresponding first packet loss rate and first latency data are obtained based on the transmission of the first probe data packet. At preset intervals, a second probe data packet of preset bytes is sent to the next relay server through an encrypted channel, and the corresponding second packet loss rate and second delay data are obtained based on the transmission of the second probe data packet. Accordingly, a communication score is calculated for each communication channel based on packet loss rate, latency data, and target weighting coefficients, including: The communication score of the public network channel is calculated based on the first packet loss rate, the first latency data, and the target weight coefficient. The communication score of the encrypted channel is calculated based on the second packet loss rate, the second latency data, and the target weight coefficient.
[0009] Furthermore, after determining the corresponding first packet loss rate and first delay data based on the transmission of the first probe data packet, the method also includes: When the first packet loss rate is greater than the third preset threshold and the first latency data is greater than the fourth preset threshold, the corresponding relay server is marked as unavailable. Accordingly, after determining the corresponding second packet loss rate and second delay data based on the transmission of the second probe data packet, the process also includes: Determine the difference between the second delay data and the first delay data. If the difference is greater than the fifth preset threshold, disable the encryption channel for the first preset duration.
[0010] Furthermore, after calculating the communication score for each communication channel based on packet loss rate, latency data, and target weight coefficients, the process also includes: When the communication score of all communication channels is zero, a redundant transmission strategy is initiated to transmit streaming media data.
[0011] In a second aspect, embodiments of this application provide a streaming media data transmission apparatus for a relay server, wherein at least two communication channels exist between the relay server and a next relay server, and the streaming media data transmission apparatus includes: The detection data acquisition module is used to acquire packet loss rate and latency data for each communication channel at preset intervals; The current mode determination module is used to determine the current transmission mode, which includes either control signaling mode or video stream mode. The target weight coefficient determination module is used to determine the current target weight coefficient based on the correspondence between the transmission mode and the preset weight coefficient. The communication score calculation module is used to calculate the communication score of each communication channel based on packet loss rate, latency data and target weight coefficient; The target channel determination module is used to determine the communication channel with the highest communication score as the target channel; The data transmission module is used to transmit streaming media data through the target channel.
[0012] In a third aspect, embodiments of this application provide a streaming media data transmission device, including: Memory and one or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement the streaming media data transmission method as described in the first aspect.
[0013] In a fourth aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the streaming media data transmission method as described in the first aspect.
[0014] This application embodiment, during streaming media data transmission, acquires packet loss rate and latency data for each communication channel at preset intervals during the process of a relay server sending streaming media data to the next relay service. It also determines the current transmission mode, determines a target weight coefficient based on the current transmission mode, calculates a communication score for each communication channel based on the packet loss rate, latency data, and target weight coefficient, and determines the communication channel with the highest communication score as the target channel for transmitting streaming media data. Using this technique, the communication channel with the highest communication score is selected for streaming media data transmission at preset intervals based on the communication scores of at least two communication channels. This ensures that the communication channel with the highest current communication score is used for transmission each time streaming media data is transmitted, thus avoiding the technical problem of poor streaming media data transmission quality, improving the quality of streaming media data transmission, and thereby enhancing the overall user experience. Furthermore, by determining different target weight coefficients based on the current transmission mode, it is possible to ensure higher communication scores for communication channels with low packet loss rates in control signaling transmission mode, and higher communication scores for communication channels with low latency in video streaming mode. This improves the transmission quality and reliability of streaming media data in the corresponding transmission modes, further enhancing the overall user experience.
[0015] The beneficial effects of the streaming media data transmission device, streaming media data transmission equipment, and storage medium provided above can be referenced in relation to the beneficial effects of the streaming media data transmission method. Attached Figure Description
[0016] Figure 1 This is a schematic diagram illustrating a streaming media data transmission scenario provided in an embodiment of this application; Figure 2 A flowchart of a streaming media data transmission method provided in an embodiment of this application is given; Figure 3 This is a flowchart illustrating another streaming media data transmission method provided in an embodiment of this application; Figure 4 This is a flowchart illustrating another streaming media data transmission method provided in an embodiment of this application; Figure 5 This is a flowchart illustrating another streaming media data transmission method provided in an embodiment of this application; Figure 6 This is a flowchart illustrating another streaming media data transmission method provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a streaming media data transmission device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a streaming media data transmission device provided in an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0018] With the rapid development of 5G communication, cloud computing, and smart terminal technologies, streaming media services have been deeply integrated into all aspects of social production and life, covering key scenarios such as online education, telemedicine, live streaming, and video conferencing. During streaming media transmission, relay services, as the core hub connecting the source and terminal, undertake important functions such as data forwarding, load balancing, and cross-network adaptation. Their transmission efficiency and stability directly determine the user's service experience. Especially in complex network environments spanning multiple regions and operators, streaming media data needs to be transmitted through the collaborative relay of multiple relay nodes. The transmission quality between relay services becomes a crucial factor in ensuring smooth audio and video playback and reducing latency and packet loss rates.
[0019] Currently, most mainstream streaming media transmission solutions rely on a fixed, single channel for data exchange between relay services. Once a transmission path is established, a specific physical link or logical channel is used for data forwarding. Research by the inventors has revealed the following drawbacks of this model: a single channel struggles to cope with dynamic changes in complex network environments. When encountering network congestion, link failures, or sudden traffic surges, the lack of effective redundancy mechanisms easily leads to transmission interruptions, stuttering, and sudden drops in image quality. Fixed channels cannot dynamically adjust transmission strategies based on real-time network quality. For example, when path latency suddenly increases or packet loss rates rise, they cannot switch to the optimal relay path in time, passively enduring the deterioration in transmission quality. The low resource utilization of a single channel makes it difficult to achieve load balancing among relay nodes, potentially causing some nodes to become overloaded and further exacerbate transmission bottlenecks, while the network resources of other available nodes remain idle. These drawbacks are particularly pronounced in streaming media data transmission scenarios with stringent transmission quality requirements, such as high-definition video and real-time interaction, severely restricting the large-scale application of streaming media services and the improvement of user experience. Therefore, existing streaming media data transmission modes severely affect the transmission quality of streaming media data when communication quality deteriorates or transmission anomalies occur, resulting in a poor user experience.
[0020] For example, traditional streaming media servers use a single network channel to forward streaming media data, which cannot avoid the problems of UDP (User Datagram Protocol) rate limiting by operators and public network hopping. Public network hopping (or public network detours, public network bypasses) refers to the phenomenon where data packets, when transmitted on the public internet, do not choose the shortest path due to network policies, routing optimization, or fault avoidance, but instead detour through other nodes or operator networks, resulting in longer transmission paths and increased latency. For example, operator rate limiting manifests as a packet loss rate of up to 28% on the WG port (i.e., the WireGuard service port or VPN tunnel listening port), while public network hopping manifests as an RTT (Round-Trip Time) fluctuation of ±35ms across cross-border links. Therefore, the traditional single-network-channel forwarding strategy for streaming media data is relatively rigid.
[0021] For example, existing streaming media data pass-through solutions only achieve unmodified forwarding of data packets, but do not establish a real-time quality comparison mechanism for the communication channel (public network channel or encrypted channel). Routing decisions rely on static configuration and cannot adapt to network fluctuations. Therefore, existing streaming media data pass-through solutions lack channel quality awareness.
[0022] For example, in existing streaming media data transmission processes, control signaling (such as keyboard and mouse commands) is transmitted on the same channel as the video stream, which causes emergency commands to be affected by video congestion, resulting in increased transmission latency of control signaling.
[0023] Therefore, the existing streaming media data transmission mode results in poor streaming media data transmission quality, leading to a poor user experience.
[0024] Based on this, the present application provides a streaming media data transmission method, apparatus, device, and storage medium. The aim is to acquire packet loss rate and latency data of each communication channel at preset intervals during streaming media data transmission, while a relay server is sending streaming media data to a next relay service. This involves determining the current transmission mode, determining a target weight coefficient based on the current transmission mode, calculating a communication score for each communication channel based on the packet loss rate, latency data, and target weight coefficient, determining the communication channel with the highest communication score as the target channel, and transmitting streaming media data through the target channel. By employing the above technical means, the communication channel with the highest communication score can be selected for streaming media data transmission at preset intervals based on the communication scores of at least two communication channels. This ensures that the communication channel with the highest current communication score is used for transmission each time streaming media data is transmitted. Compared with existing fixed single-channel streaming media data transmission methods, this embodiment significantly improves the quality of streaming media data transmission, thereby enhancing the overall user experience. Furthermore, this embodiment determines different target weight coefficients based on the current transmission mode, which can ensure a higher communication score for communication channels with low packet loss rate in the control signaling transmission mode, and a higher communication score for communication channels with low latency in the video streaming mode, thereby improving the transmission instructions and transmission reliability of streaming media data under the corresponding transmission model, and further enhancing the overall user experience.
[0025] This application provides a streaming media data transmission method. This method uses relay servers, with at least two communication channels between each relay server and the next. Streaming media data refers to multimedia data transmitted in real-time over a network using a continuous streaming transmission method, primarily including audio, video, and animation. The characteristic of streaming media data is that the data is segmented into small data packets and continuously transmitted over the network. The receiving end buffers small amounts of data while simultaneously playing it, thus achieving a "transmit-and-play" experience. Application scenarios for streaming media data transmission include video conferencing, live online classes, platform video-on-demand, live sports events, and live news broadcasts. Streaming media data transmission features real-time performance, continuity, and stable quality.
[0026] Figure 1 This is a schematic diagram illustrating a streaming media data transmission scenario provided in an embodiment of this application. (Refer to...) Figure 1Assume there are relay servers A, B, and C. Relay servers B and C are both next-level relay servers of relay server A, meaning relay server A transmits streaming media data to relay servers B and C. There are at least two communication channels between relay servers A and B. For example, assuming two communication channels, these are a public network channel and an encrypted channel. Relay server A transmits streaming media data to relay server B through the public network channel and / or the encrypted channel. Similarly, relay server C is the next-level relay server of relay server A, meaning relay server A transmits streaming media data to relay server C. There are at least two communication channels between relay servers A and C. For example, assuming two communication channels, these are a public network channel and an encrypted channel. Relay server A transmits streaming media data to relay server C through the public network channel and / or the encrypted channel.
[0027] Figure 2 A flowchart of a streaming media data transmission method provided in an embodiment of this application is given. The streaming media data transmission method provided in this embodiment can be executed by a streaming media data transmission device, which can be implemented by software and / or hardware. The streaming media data transmission device can consist of two or more physical entities, or it can consist of a single physical entity. Generally, the streaming media data transmission device can be a relay server.
[0028] The following description uses a relay server as the main entity executing the streaming media data transmission method as an example. (Refer to...) Figure 2 This streaming media data transmission method is used for relay servers, and each relay server has at least two communication channels with the next relay server. Specifically, this streaming media data transmission method includes: S11. Acquire packet loss rate and latency data for each communication channel at preset intervals, and determine the current transmission mode, wherein the transmission mode includes control signaling mode or video stream mode.
[0029] During the process of transmitting streaming media data to the next relay server, the relay server acquires the packet loss rate and latency data for each communication channel at preset time intervals (e.g., every 1 second). Subsequently, the communication quality of each communication channel can be determined based on the packet loss rate and latency data for routing reference. For example, the relay server can send probe packets to the next relay server at preset time intervals, acquiring the corresponding packet loss rate and latency data based on the transmission of these probe packets. At preset time intervals, the relay server also needs to determine the current transmission mode, which may include control signaling mode or video streaming mode. Subsequently, the relative weighting coefficients of the packet loss rate and latency data can be determined based on the current transmission mode to ensure better transmission performance under the current transmission model.
[0030] For example, the data collection period can be configured according to business scenario requirements. For instance, it could be set to 100ms for real-time interactive scenarios, 500ms for on-demand scenarios, and 1s for uncertain scenarios. Currently available communication channels can be enumerated, such as public network channels, encrypted channels, and backup relay channels, and each channel can be assigned a unique identifier, such as a channel ID. Following the aforementioned collection period, when the preset time interval is reached, a parallel probing task is triggered for all communication channels to obtain the packet loss rate and latency data (e.g., round-trip time) for each channel. For example, the probing task can be implemented using multi-threading or asynchronous I / O to avoid single-channel blocking. Simultaneously with the probing task, the transmission mode of the current channel is identified through protocol characteristics and data packet attributes. The transmission mode includes control signaling mode or video streaming mode. When identifying the transmission mode, the protocol type and data packet characteristics of the transmission channel can be used to determine whether the current transmission mode is control signaling mode or video streaming mode. For example, if the transmission channel transmits RTSP (Real-Time Streaming Protocol), SIP (Session Initiation Protocol), or WebRTC signaling, then the transmission mode of that communication channel is determined to be control signaling mode. If the data packets transmitted by the transmission channel are small in length (usually <100 bytes), have variable transmission intervals (triggered on demand), or carry instruction fields, then the transmission mode of the communication channel is determined to be control signaling mode. If the transmission channel transmits RTP (Real-Time Transport Protocol), HTTP-FLV (HTTP-based FLV format video stream), or HLS (HTTP Live Streaming Protocol), then the transmission mode of the communication channel is determined to be video streaming mode. If the data packets transmitted by the transmission channel are large in length (usually 500-1500 bytes), have fixed transmission intervals (e.g., 33ms / frame, corresponding to 30fps video), or carry timestamps and frame type markers (e.g., I-frame / P-frame), then the transmission mode of the communication channel is determined to be video streaming mode. The collected packet loss rate, latency data, and transmission mode identification structure are associated and stored to form structured data of "channel ID-timestamp-mode-packet loss rate-latency data," and then stored.
[0031] As mentioned above, by periodically collecting indicator data such as packet loss rate and latency, the quality changes of each channel can be dynamically tracked, thereby avoiding the decision-making lag caused by relying on static configuration, and enabling real-time perception of network status, providing a data foundation for the flexible adjustment of streaming media data transmission. Furthermore, by distinguishing between control signaling mode and video streaming mode, different optimized transmission strategies can be formulated for the characteristics of these two transmission modes, avoiding resource waste or quality loss caused by a one-size-fits-all strategy, and improving the streaming media data transmission quality corresponding to different transmission modes. In addition, by monitoring the packet loss rate and latency data of each communication channel in real time, potential faults can be warned in advance (such as a continuous increase in the packet loss rate of a certain channel). Combined with the redundancy design of multiple communication channels, communication channel switching can be triggered before a fault occurs, reducing the probability of stuttering or interruption in streaming media data transmission, thereby improving the overall transmission quality and reliability of streaming media data transmission.
[0032] S12. Determine the current target weight coefficient based on the correspondence between the transmission mode and the preset weight coefficient.
[0033] After determining the current transmission mode in S11, different transmission modes have different core requirements. For example, the control signaling mode prioritizes reliability, i.e., low packet loss rate; while the video streaming mode prioritizes real-time performance, i.e., low latency. Therefore, based on the core requirements of different transmission modes, a target weight coefficient corresponding to the current transmission mode can be determined. The communication channel can then be scored based on the target weight coefficient to adapt the communication score to the current transmission mode, thereby improving the transmission quality and reliability of streaming media data under the current transmission mode.
[0034] For example, a mapping relationship between transmission modes and preset weight coefficients can be preset. This relationship can be established in the form of a mapping table, assigning different weights to key network indicators (such as latency and packet loss rate). For instance, suppose the preset mapping relationship between weight coefficients and transmission modes is as shown in the following mapping table:
[0035] After determining the current transmission mode in S11, the target weight coefficient corresponding to the current transmission mode is determined based on the current transmission mode and its relationship with preset weight coefficients. For example, assuming the current transmission mode is determined to be control signaling mode, the latency weight coefficient is determined to be 0.3 and the packet loss rate weight coefficient is determined to be 0.7 to increase the weight of packet loss rate; assuming the current transmission mode is determined to be video streaming mode, the latency weight coefficient is determined to be 0.9 and the packet loss rate weight coefficient is determined to be 0.1 to increase the weight of latency. Subsequently, based on the determined latency weight coefficient and packet loss rate weight coefficient, the communication score of the corresponding communication channel can be calculated to evaluate the transmission quality of the communication channel corresponding to the current transmission mode.
[0036] As mentioned above, the core requirement of the control signaling mode is that no instructions are lost. Therefore, a high packet loss rate weighting coefficient is used to ensure packet loss sensitivity. On the other hand, the core requirement of the video streaming mode is low-latency and smooth playback. Therefore, a high latency weighting coefficient is used to prioritize real-time performance. This differentiated evaluation makes the subsequent communication score more in line with the business needs of the current transmission mode, thereby improving the transmission instructions and transmission reliability of streaming media data under the current transmission mode.
[0037] S13. Calculate the communication score for each communication channel based on the packet loss rate, latency data, and target weight coefficient.
[0038] After determining the packet loss rate and latency data of each currently detected communication channel and the current transmission mode in S11, and determining the target weight coefficient corresponding to the current transmission mode based on S12, the communication score of each communication channel can be calculated based on the currently determined packet loss rate, latency data and target weight coefficient. Subsequently, the communication score can be used to determine which communication channel to transmit streaming media data in the current transmission mode.
[0039] For example, it can be based on the formula Calculate the communication score for each communication channel; where, A communication score for the corresponding communication channel. This refers to the delay weighting coefficient for the corresponding communication channel. To account for the round-trip delay of the corresponding communication channel, This is the packet loss rate weighting coefficient for the corresponding communication channel. This represents the packet loss rate of the corresponding communication channel. Wherein, the round-trip time of the corresponding communication channel is... The packet loss rate of the corresponding communication channel is determined by the latency data obtained in S11 above. The delay weighting coefficient for the corresponding communication channel is obtained through the aforementioned S11. And the packet loss rate weighting coefficient of the corresponding communication channel The above-mentioned S12 is determined based on the current transmission mode.
[0040] In the above formula, This reflects the principle that "the lower the latency, the higher the communication score," and non-linearly amplifies the advantages of low latency. For example, if the RTT increases from 20ms to 30ms, the score decreases by 33%; if the RTT increases from 50ms to 60ms, the score decreases by 17%. This reflects the principle that "the lower the packet loss, the higher the communication score." For example, with a 5% packet loss rate, the communication score is 0.95.
[0041] As described above, by assigning a communication score to each communication channel, the abstract network quality is transformed into a comparable mathematical score, avoiding the subjectivity of relying on empirical judgments and achieving an objective quantitative assessment of the path quality of communication channels. This improves the observability and reliability of communication channel quality assessment. Furthermore, since the communication score is calculated based on real-time packet loss rate and latency data, it can quickly respond to network changes and enhance the dynamic adaptability of path selection.
[0042] S14. Determine the communication channel with the highest communication score as the target channel, and transmit streaming media data through the target channel.
[0043] After calculating the communication score for each communication channel using the aforementioned S13, the communication channel with the highest current communication score is determined as the target channel, and streaming media data is transmitted through this target communication channel. Then, after a preset time has elapsed, S11-S14 are executed again to determine a new target communication channel for transmitting streaming media data through the new target communication channel.
[0044] As described above, by selecting the communication channel with the highest communication score for the transmission of streaming media data, the streaming media data is allocated to the communication channel with the lowest packet loss rate, the lowest latency, and the strongest stability under the current network conditions. This reduces problems such as video stuttering, audio interruption, and blurry images from the source, ensuring the optimal quality of streaming media transmission and significantly improving the user's viewing experience.
[0045] As described above, during streaming media data transmission, while the relay server is sending streaming media data to the next relay service, the packet loss rate and latency data of each communication channel are acquired at preset intervals. The current transmission mode is determined, and a target weight coefficient is determined based on the current transmission mode. A communication score for each communication channel is calculated based on the packet loss rate, latency data, and target weight coefficient. The communication channel with the highest communication score is selected as the target channel, and streaming media data is transmitted through the target channel. By employing this technique, at preset intervals, the communication channel with the highest communication score is selected for streaming media data transmission based on the communication scores of at least two communication channels. This ensures that the communication channel with the highest current communication score is used for each transmission of streaming media data, thus avoiding the technical problem of poor streaming media data transmission quality, improving the quality of streaming media data transmission, and consequently enhancing the overall user experience. Furthermore, by determining different target weight coefficients based on the current transmission mode, higher communication scores can be ensured for communication channels with low packet loss rates in control signaling transmission mode, and higher communication scores can be ensured for communication channels with low latency in video streaming mode. This improves the transmission instructions and reliability of streaming media data under the corresponding transmission models, further enhancing the overall user experience.
[0046] Figure 3 This is a flowchart illustrating another streaming media data transmission method provided in an embodiment of this application. (Refer to...) Figure 3 This streaming media data transmission method is used for relay servers, and there are at least two communication channels between the relay server and the next relay server. This embodiment uses the example of two communication channels between the relay server and the next relay server for explanation. These two communication channels are a public network channel and an encrypted channel.
[0047] For example, in current mainstream streaming media data transmission, the routing of relay servers primarily relies on public network channels (i.e., public ICMP (Internet Control Message Protocol Probing) channels). However, data transmission between relay servers in different data centers can also be established on the basis of secure tunnels (i.e., encrypted channels). Actual testing revealed routing differences between public network channels and encrypted channels sending data to the same relay node (i.e., relay server). These routing differences are due to factors such as: different paths, different network devices and encapsulation overhead, different QoS (Quality of Service) / rate limiting policies, ICMP probing rate limiting by ISPs on public network channels, the possibility that ICMP encapsulated in UDP (User Data Protocol) within WireGuard tunnels (i.e., encrypted channels) may not be affected by rate limits, differences in firewall / NAT device behavior, and different target server receiving paths. Because of these routing differences between public network channels and encrypted channels, the transmission quality of the two communication channels will differ. Therefore, it is necessary to probe network metrics for both channels, such as packet loss rate and latency data.
[0048] The streaming media data transmission method provided in this implementation specifically includes: S111. At preset intervals, a first probe data packet of preset bytes is sent to the next relay server through the public network channel, and the corresponding first packet loss rate and first delay data are obtained based on the transmission of the first probe data packet.
[0049] Since there are public and encrypted channels between the relay server and the next relay server, dynamic probing can be performed on both channels to obtain the packet loss rate and latency data for each communication channel. For the public channel, a preset number of probe data packets (e.g., 1200B ICMP (Analog Video Slicing)) are sent to the next relay server every preset time interval. The corresponding first packet loss rate and latency data are then obtained based on the transmission of these first probe data packets. For example, 10 first probe data packets are sent to the next relay server every second via the public channel to obtain the first packet loss rate and latency data for that public channel.
[0050] For example, a public network channel probing thread can be started at preset intervals using a system timer. The first probe data packet can be encapsulated using an ICMP Echo request (Type 8) and sent to the public IP address of the next relay server via the public network channel. During transmission, the "send timestamp (T1)" and "sequence number (N)" are recorded and stored in a local cache. If an ICMP Echo response (Type 0) is received from the relay server, the "sequence number (N)" and "receive timestamp (T2, relay server processing time)" are extracted, and the local receive time (T3) is recorded. The first latency data is calculated based on the aforementioned data, for example, round-trip time (RTT) = T3 - T1. After each probing cycle (e.g., sending 10 first probe data packets consecutively), the corresponding first packet loss rate is calculated using the formula: First packet loss rate = (number of lost packets / total sent packets) × 100%.
[0051] S112. At preset intervals, a second probe data packet of preset bytes is sent to the next relay server through an encrypted channel, and the corresponding second packet loss rate and second delay data are obtained based on the transmission of the second probe data packet.
[0052] Since there are public and encrypted channels between the relay server and the next relay server, dynamic dual-channel probing can be performed on both channels to obtain the packet loss rate and latency data for each communication channel. For the encrypted channel, a preset number of second probe data packets (e.g., 1200B UDP, simulating video fragmentation) are sent to the next relay server via the encrypted channel at preset intervals. The corresponding second packet loss rate and latency data are then obtained based on the transmission of these second probe data packets. For example, 10 second probe data packets are sent to the next relay server via the encrypted channel every second to obtain the corresponding second packet loss rate and latency data for that encrypted channel.
[0053] For example, an encrypted channel probing thread (an independent thread) is started in parallel with the public network channel probing, sharing the same time interval to ensure data timeliness comparison. The second probe data packet is sent through the encrypted channel, first processed by the encryption module (encrypted using a pre-shared key), then encapsulated into an encrypted protocol frame, and sent to the encrypted channel entry of the next relay server. The "sending timestamp (T1')" and "sequence number (M)" are recorded and stored in an independent buffer. The next relay server receives the aforementioned encrypted protocol frame, decrypts it, and returns an acknowledgment packet. After receiving the acknowledgment packet, the local relay server extracts the "sequence number (M)" and "processing timestamp within the encrypted channel (T2')" and records the local reception time (T3'). The second delay data is calculated based on the aforementioned data, for example, round-trip time RTT = T3' - T1' (including encryption / decryption time). After each round of probing (e.g., sending 10 first probe data packets consecutively), the corresponding second packet loss rate is calculated according to the formula: Second packet loss rate = (number of lost packets / total number of sent packets) × 100%.
[0054] After each round of detection, the first packet loss rate, the second packet loss rate, the first latency data, the second latency data, and the timestamp are associated and stored for use in subsequent steps.
[0055] As described above, by detecting the real-time packet loss rate and latency data of the public network channel and the encrypted channel at preset intervals, a real-time quantitative comparison of the dual-path quality can be performed intuitively. Subsequently, the communication quality of the two communication channels can be determined based on the real-time packet loss rate and latency data, so as to transmit streaming media data through the communication channel with high communication quality, thereby improving the transmission quality and reliability of streaming media data.
[0056] Figure 4 This is a flowchart illustrating another streaming media data transmission method provided in this application embodiment, see below. Figure 4 This streaming media data transmission method is used for relay servers, and at least two communication channels exist between the relay server and the next relay server. This embodiment uses the example of two communication channels between the relay server and the next relay server for explanation; these two communication channels are a public network channel and an encrypted channel. The streaming media data transmission method specifically includes: S131. Calculate the communication score of the public network channel based on the first packet loss rate, the first delay data, and the target weight coefficient.
[0057] After determining the first packet loss rate and first latency data of the public network channel in S111, and after determining the target weight coefficient based on S12, the communication score of the public network channel is calculated based on the first packet loss rate, the first latency data, and the target weight coefficient. For example, this can be achieved using the formula... Calculate the communication score of the public network channel; among which, A score for communication on the public network channel. This is the latency weighting coefficient for the public network channel. This refers to the round-trip latency of the public network channel, in milliseconds. This is the packet loss rate weighting coefficient for the public network channel. This represents the packet loss rate of the public network channel, with a value ranging from 0 to 1.
[0058] S132. Calculate the communication score of the encrypted channel based on the second packet loss rate, the second delay data, and the target weight coefficient.
[0059] After determining the second packet loss rate and second delay data of the encrypted channel in S111, and after determining the target weight coefficient based on S12, the communication score of the encrypted channel is calculated based on the second packet loss rate, the second delay data, and the target weight coefficient. For example, this can be achieved using the formula... Calculate the communication score for the encrypted channel; where, Scoring of communication in encrypted channels, This is the latency weighting coefficient for the encrypted channel. The round-trip time of the encrypted channel, in milliseconds. This is the packet loss rate weighting coefficient for the encrypted channel. This represents the packet loss rate of the encrypted channel, with a value ranging from 0 to 1.
[0060] It should be noted that, under the same transmission mode, the latency weighting coefficients for public network channels and encrypted channels differ. The same, for example, the time delay weighting coefficient The default value is set to 0.7; under the same transmission mode, the packet loss rate weighting coefficient for public network channels and encrypted channels is... The same, for example, the packet loss rate weighting coefficient. The default value is set to 0.3.
[0061] In one embodiment, assuming the current transmission mode is control signaling mode, the corresponding delay weighting coefficient is... The packet loss rate weighting coefficient is 0.3. The round-trip latency of the public network channel is 0.7. The packet loss rate over the public network channel is 35ms. It is 1%, according to the formula Calculated This results in a communication score of 0.7016 for the public network channel. Similarly, assuming the round-trip time of the encrypted channel... The packet loss rate of the encrypted channel is 40ms. It is 0.5%, according to the formula. Calculated The communication score for the encrypted channel is 0.704. Since the communication score of the encrypted channel (0.704) is greater than that of the public network channel (0.7016), the encrypted channel is chosen for transmitting streaming media data.
[0062] As described above, by using communication scoring for public network channels, the abstract network quality is transformed into a comparable mathematical score, avoiding the subjectivity of relying on empirical judgment and achieving an objective quantitative assessment of the path quality of public network channels, thereby improving the observability and reliability of public network channel quality assessment. Similarly, by using communication scoring for encrypted channels, the abstract network quality is transformed into a comparable mathematical score, avoiding the subjectivity of relying on empirical judgment and achieving an objective quantitative assessment of the path quality of encrypted channels, thereby improving the observability and reliability of encrypted channel quality assessment.
[0063] Figure 5 This is a flowchart illustrating another streaming media data transmission method provided in an embodiment of this application. (Refer to...) Figure 5 This streaming media data transmission method is used for relay servers, and at least two communication channels exist between the relay server and the next relay server. This embodiment uses the example of two communication channels between the relay server and the next relay server for explanation; these two communication channels are a public network channel and an encrypted channel. The streaming media data transmission method specifically includes: S121. When the transmission mode is control signaling mode, determine the delay weighting coefficient according to the correspondence between the transmission mode and the preset weighting coefficient. The first value is the packet loss rate weighting coefficient. The second value is greater than the first value.
[0064] After determining the current transmission mode in S11, if the transmission mode is control signaling mode, the delay weighting coefficient corresponding to the control signaling mode is determined according to the correspondence between the transmission mode and the preset weighting coefficient. The first value is the packet loss rate weighting coefficient. This is the second value, where the second value is greater than the first value. For example, this determines the delay weighting coefficient corresponding to the control signaling mode. The packet loss rate weighting coefficient is 0.3. The value is 0.7. By setting a second value greater than the first value, the packet loss rate weighting coefficient is determined. Greater than the delay weighting coefficient This increases the weight of packet loss rate, allowing channels with low packet loss rates to be prioritized for data transmission in control signaling mode, thereby improving the transmission reliability of the target communication channel.
[0065] S122. When the transmission mode is video stream mode, determine the delay weighting coefficient according to the correspondence between the transmission mode and the preset weighting coefficient. The third value is the packet loss rate weighting coefficient. The fourth value is the value where the third value is greater than the fourth value, the third value is less than the first value, and the fourth value is greater than the second value.
[0066] After determining the current transmission mode in S11, and assuming the transmission mode is video stream mode, the latency weighting coefficient in video stream mode is determined based on the correlation between the transmission mode and the preset weighting coefficient. The third value is the packet loss rate weighting coefficient. The fourth value is defined as follows: the third value is greater than the fourth value, the third value is less than the first value, and the fourth value is greater than the second value. For example, this determines the latency weighting coefficient corresponding to the video stream mode. The packet loss rate weighting coefficient is 0.9. The value is 0.1. By setting the third value to be greater than the fourth value, the time delay weighting coefficient is adjusted. Weighting coefficient greater than packet loss rate This increases the weight of latency data, allowing for the priority selection of low-latency channels for data transmission in video streaming mode, thereby improving the transmission reliability of the target communication channel.
[0067] As mentioned above, the core requirement of the control signaling mode is that no instructions are lost. Therefore, a high packet loss rate weighting coefficient is used to ensure packet loss sensitivity. On the other hand, the core requirement of the video streaming mode is low-latency and smooth playback. Therefore, a high latency weighting coefficient is used to prioritize real-time performance. This differentiated evaluation makes the subsequent communication score more in line with the business needs of the current transmission mode, thereby improving the transmission instructions and transmission reliability of streaming media data under the current transmission mode.
[0068] In one embodiment, when calculating the communication score of each communication channel, if the packet loss rate of the corresponding communication channel is greater than a first preset threshold or the latency data is greater than a second preset threshold, the communication score of the corresponding communication channel is determined to be zero. For example, if the round-trip time (RTT) of the corresponding communication channel is greater than 50ms or the packet loss rate (Loss) is greater than 5%, the communication score of the corresponding communication channel is determined to be zero. When the packet loss rate of the corresponding communication channel is greater than the first preset threshold, it indicates that the packet loss rate of the corresponding communication channel is too high, and the integrity of data transmission cannot be guaranteed, which may lead to problems such as streaming media stuttering, screen tearing, or file transmission corruption. Therefore, the communication score of its corresponding communication channel is set to zero to determine that the current communication channel is an invalid channel and exclude its use for streaming media data transmission. When the latency data of the corresponding communication channel is greater than the second threshold, it indicates that the latency of the corresponding communication channel is too high, and there will be significant delays in real-time interactive scenarios. Therefore, the communication score of the corresponding communication channel is set to zero to determine that the current communication channel is an invalid channel and exclude its use for streaming media data transmission. By setting the communication score of communication channels with packet loss rates greater than a first preset threshold or latency data greater than a second preset threshold to zero, the system can avoid including them in the candidate transmission channels, reduce the computational load in subsequent channel selection stages, and prevent invalid channels from occupying bandwidth and port resources, thereby improving overall resource utilization efficiency.
[0069] Figure 6 This is a flowchart illustrating another streaming media data transmission method provided in this application embodiment, see below. Figure 6 This streaming media data transmission method is used for relay servers, and at least two communication channels exist between the relay server and the next relay server. This embodiment uses the example of two communication channels between the relay server and the next relay server for explanation; these two communication channels are a public network channel and an encrypted channel. The streaming media data transmission method specifically includes: S21. When the first packet loss rate is greater than the third preset threshold and the first delay data is greater than the fourth preset threshold, mark the corresponding relay server as unavailable.
[0070] After determining the first packet loss rate and first latency data of the public network channel in S111, if the first packet loss rate is greater than a third preset threshold and the first latency data is greater than a fourth preset threshold, the corresponding relay server is marked as unavailable, i.e., the next corresponding relay server is marked as unavailable. For example, if the first packet loss rate is greater than 100ms and the first latency data is greater than 10%, the corresponding relay server is marked as unavailable. Based on the fact that the corresponding relay service is marked as unavailable in this detection, the transmission of streaming media data to that relay server through the public network channel is suspended. It should be noted that if the corresponding encrypted channel transmission is found to be normal in this detection, the streaming media data is transmitted to that relay server through the encrypted channel.
[0071] The above-mentioned method uses the first packet loss rate and the first latency data as dual indicators to jointly determine whether there is an anomaly in the public network channel. When the first packet loss rate is greater than the third preset threshold and the first latency data is greater than the fourth preset threshold, it indicates that there is an anomaly in the channel at this time, and the corresponding relay server is marked as unavailable. Compared with the traditional method of only triggering a warning, this embodiment directly marks the corresponding relay server as unavailable, thereby avoiding the transmission of streaming media data to the corresponding relay server through the public network channel, thus avoiding data transmission failure.
[0072] S22. Determine the difference between the second delay data and the first delay data. When the difference is greater than the fifth preset threshold, disable the first preset duration of the encrypted channel.
[0073] After determining the first latency data of the public network channel in S111 and the second latency data of the encrypted channel in S112, the difference between the second latency data and the first latency data is determined. If the difference is greater than a fifth preset threshold, it is determined to be UDP rate limiting by the operator, and therefore the encrypted channel is disabled for a first preset duration. For example, if the difference between the second latency data and the first latency data is greater than 30ms, the encrypted channel is disabled for 10 minutes. After the first preset duration, the corresponding streaming media data is retransmitted according to the aforementioned S11-S14.
[0074] As described above, when the difference between the second delay data and the first delay data is greater than the fifth preset threshold, the encrypted channel is limited in speed. Therefore, the encrypted channel is disabled for the first preset time to avoid problems such as stuttering or interruption caused by transmitting streaming media data through the speed-limited encrypted channel. Streaming media data can be transmitted based on other communication channels with normal transmission, thereby improving the transmission quality and reliability of streaming media data and enhancing the overall user experience.
[0075] In one embodiment, after calculating the communication score for each communication channel, a redundant transmission strategy is initiated to transmit streaming media data when the communication scores for all communication channels are zero. The redundant transmission strategy involves fragmenting the streaming media data and transmitting it in parallel through all communication channels. The receiving end listens to data packets from all communication channels, aggregates the fragments according to their sequence numbers, marks successfully received fragments and lost fragments, sorts the received complete fragments by timestamp, splices them into continuous streaming media frames, and outputs them. As described above, when all communication channels have a communication score of zero due to high packet loss or high latency, traditional single-channel transmission would be interrupted due to severe data loss. This embodiment, by initiating a redundant transmission strategy to transmit streaming media data, ensures that even if a single channel loses some streaming media data, complete streaming media data can still be obtained by splicing from streaming media data from other channels, avoiding interruption of streaming media data transmission. This improves the transmission quality and reliability of streaming media data, thereby enhancing the overall user experience.
[0076] In one embodiment, when the latency data (i.e., round-trip latency) of the current communication channel exceeds a second preset threshold multiple times consecutively, the system switches to another communication channel for streaming media data transmission. For example, if the round-trip latency of the current communication channel exceeds 50ms three times consecutively, the system switches to another communication channel for streaming media data transmission. Similarly, when the packet loss rate of the current communication channel exceeds a first preset threshold multiple times consecutively, the system switches to another communication channel for streaming media data transmission. For example, if the packet loss rate of the current communication channel exceeds 5% twice consecutively, the system switches to another communication channel for streaming media data transmission. During the switching process, the WebRTC Transport-CC protocol is used to complete the path migration within 80ms, aiming to maintain the ICE connection and avoid renegotiation.
[0077] In one embodiment, when both the public network channel and the encrypted channel are abnormal, control signaling is prioritized and the video stream is reduced to 480p resolution.
[0078] The above-mentioned dual-channel dynamic detection mechanism, utilizing both public and encrypted channels, assesses network quality in real time, quantifies round-trip latency and packet loss rate differences, and provides data support for routing decisions. Corresponding weighting coefficients are designed for control signaling and video stream modes, and communication scores are calculated using corresponding formulas for each communication mode, providing a service-adaptive dynamic scoring model for the system. Rigid thresholds of ≤50ms round-trip latency and ≤5% packet loss rate are set; channels exceeding these limits receive a score of zero. Lossless path switching within 80ms is achieved based on the WebRTC Transport-CC protocol, avoiding operational interruptions and enabling differentiated routing, hard threshold rejection, and seamless switching.
[0079] Based on the above embodiments, Figure 7 This is a schematic diagram of a streaming media data transmission device provided in an embodiment of this application. (Reference) Figure 7 The streaming media data transmission device provided in this embodiment is used for a relay server. There are at least two communication channels between the relay server and the next relay server. The streaming media data transmission device specifically includes: a detection data acquisition module 21, a current mode determination module 22, a target weight coefficient determination module 23, a communication score calculation module 24, a target channel determination module 25, and a data transmission module 26.
[0080] Among them, the detection data acquisition module 21 is used to acquire the packet loss rate and latency data of each communication channel at preset time intervals; The current mode determination module 22 is used to determine the current transmission mode, wherein the transmission mode includes control signaling mode or video stream mode; The target weight coefficient determination module 23 is used to determine the current target weight coefficient based on the correspondence between the transmission mode and the preset weight coefficient. The communication score calculation module 24 is used to calculate the communication score of each communication channel based on the packet loss rate, latency data and target weight coefficient. The target channel determination module 25 is used to determine the communication channel with the highest communication score as the target channel. The data transmission module 26 is used to transmit streaming media data through the target channel.
[0081] Based on the above implementation, the communication scoring calculation module 24 is also used to calculate the score according to the formula. Calculate the communication score for each communication channel; in, A communication score for the corresponding communication channel. This refers to the delay weighting coefficient for the corresponding communication channel. To account for the round-trip delay of the corresponding communication channel, This is the packet loss rate weighting coefficient for the corresponding communication channel. This represents the packet loss rate of the corresponding communication channel.
[0082] In one embodiment, the target weight coefficient determination module 23 includes: a first weight coefficient determination submodule and a second weight coefficient determination submodule; The first weighting coefficient determination submodule is used to determine the delay weighting coefficient based on the relationship between the transmission mode and the preset weighting coefficients when the transmission mode is control signaling mode. The first value is the packet loss rate weighting coefficient. The second value is greater than the first value. The second weighting coefficient determination submodule is used to determine the delay weighting coefficient based on the relationship between the transmission mode and the preset weighting coefficients when the transmission mode is video stream mode. The third value is the packet loss rate weighting coefficient. The fourth value is the value where the third value is greater than the fourth value, the third value is less than the first value, and the fourth value is greater than the second value.
[0083] Based on the above implementation, the communication score calculation module 24 is also used to determine that the communication score of the corresponding communication channel is zero when the packet loss rate of the corresponding communication channel is greater than the first preset threshold or the delay data is greater than the second preset threshold.
[0084] In one embodiment, the communication channel includes a public network channel and an encrypted channel; The detection data acquisition module 21 includes: a first detection transmission submodule, a first detection data acquisition submodule, a second detection transmission submodule, and a second detection data acquisition submodule; The first probe sending submodule is used to send a preset number of first probe data packets to the next relay server via the public network channel at preset intervals. The first probe data acquisition submodule is used to acquire the corresponding first packet loss rate and first delay data based on the transmission of the first probe data packet; The second probe sending submodule is used to send a preset number of second probe data packets to the next relay server through an encrypted channel at preset intervals; The second probe data acquisition submodule is used to acquire the corresponding second packet loss rate and second delay data based on the transmission of the second probe data packet; Accordingly, the communication scoring calculation module 24 includes: a public network scoring submodule and an encrypted scoring submodule; The public network scoring submodule is used to calculate the communication score of the public network channel based on the first packet loss rate, the first latency data, and the target weight coefficient. The encryption scoring submodule is used to calculate the communication score of the encrypted channel based on the second packet loss rate, the second delay data, and the target weight coefficient.
[0085] In one embodiment, the streaming media data transmission device further includes: a first anomaly determination module and a second anomaly determination module; The first anomaly detection module is used to mark the corresponding relay server as unavailable when the first packet loss rate is greater than the third preset threshold and the first latency data is greater than the fourth preset threshold. The second anomaly detection module is used to determine the difference between the second delay data and the first delay data. When the difference is greater than the fifth preset threshold, the first preset duration of the encryption channel is disabled.
[0086] In one embodiment, the streaming media data transmission device further includes: a redundant transmission module; The redundant transmission module is used to transmit streaming media data when the communication score of all communication channels is zero.
[0087] The streaming media data transmission device provided in this application embodiment can be used to execute the streaming media data transmission method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0088] This application provides a streaming media data transmission device, referring to... Figure 8 The streaming media data transmission device includes a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The streaming media data transmission device may have one or more processors, and the streaming media data transmission device may have one or more memories. The processor, memory, communication module, input device, and output device of the streaming media data transmission device can be connected via a bus or other means.
[0089] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the streaming media data transmission method described in any embodiment of this application (e.g., the detection data acquisition module, current mode determination module, target weight coefficient determination module, communication score calculation module, target channel determination module, and data transmission module in the streaming media data transmission device). The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0090] The communication module 33 is used for data transmission.
[0091] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory, thereby realizing the above-mentioned streaming media data transmission method.
[0092] Input device 34 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 35 may include display devices such as a display screen.
[0093] The streaming media data transmission device provided above can be used to execute the streaming media data transmission method provided in the above embodiments, and has corresponding functions and beneficial effects.
[0094] This application embodiment also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute a streaming media data transmission method. The streaming media data transmission method includes: acquiring packet loss rate and latency data of each communication channel at preset time intervals, and determining the current transmission mode, wherein the transmission mode includes a control signaling mode or a video stream mode; determining the current target weight coefficient according to the comparison relationship between the transmission mode and preset weight coefficients; calculating the communication score of each communication channel according to the packet loss rate, latency data, and target weight coefficients; determining the communication channel with the highest communication score as the target channel, and transmitting streaming media data through the target channel.
[0095] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0096] Of course, the storage medium for storing computer-executable instructions provided in the embodiments of this application is not limited to the streaming media data transmission method described above, but can also perform related operations in the streaming media data transmission method provided in any embodiment of this application.
[0097] The streaming media data transmission device, storage medium, and streaming media data transmission equipment provided in the above embodiments can execute the streaming media data transmission method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the streaming media data transmission method provided in any embodiment of this application.
[0098] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A streaming media data transmission method, characterized in that, For use as a relay server, wherein there are at least two communication channels between the relay server and the next relay server, the method includes: The packet loss rate and latency data of each communication channel are acquired at preset intervals, and the current transmission mode is determined, including control signaling mode or video stream mode. Based on the correlation between the transmission mode and the preset weight coefficient, the current target weight coefficient is determined; The communication score for each communication channel is calculated based on the packet loss rate, the latency data, and the target weight coefficient. The communication channel with the highest communication score is identified as the target channel, and streaming media data is transmitted through the target channel.
2. The method according to claim 1, characterized in that, The step of calculating the communication score for each communication channel based on the packet loss rate, the latency data, and the target weight coefficient includes: According to the formula Calculate the communication score for each communication channel; in, A communication score for the corresponding communication channel. This refers to the delay weighting coefficient for the corresponding communication channel. To account for the round-trip delay of the corresponding communication channel, This is the packet loss rate weighting coefficient for the corresponding communication channel. This represents the packet loss rate of the corresponding communication channel.
3. The method according to claim 2, characterized in that, The step of determining the current target weight coefficient based on the correlation between the transmission mode and the preset weight coefficient includes: When the transmission mode is control signaling mode, the delay weighting coefficient is determined according to the correspondence between the transmission mode and the preset weighting coefficient. The first value is the packet loss rate weighting coefficient. The second value is greater than the first value; When the transmission mode is video stream mode, the delay weighting coefficient is determined according to the correspondence between the transmission mode and the preset weighting coefficient. The third value is the packet loss rate weighting coefficient. The fourth value is a number in which the third value is greater than the fourth value, the third value is less than the first value, and the fourth value is greater than the second value.
4. The method according to claim 1, characterized in that, The step of calculating the communication score for each communication channel based on the packet loss rate, the latency data, and the target weight coefficient includes: When the packet loss rate of the corresponding communication channel is greater than the first preset threshold or the latency data is greater than the second preset threshold, the communication score of the corresponding communication channel is determined to be zero.
5. The method according to claim 1, characterized in that, The communication channel includes a public network channel and an encrypted channel; The step of acquiring packet loss rate and latency data for each communication channel at preset time intervals includes: At preset intervals, a first probe data packet of preset bytes is sent to the next relay server through the public network channel, and the corresponding first packet loss rate and first delay data are obtained based on the transmission of the first probe data packet. At preset intervals, a second probe data packet of preset bytes is sent to the next relay server through an encrypted channel, and the corresponding second packet loss rate and second delay data are obtained based on the transmission of the second probe data packet. Accordingly, calculating the communication score for each communication channel based on the packet loss rate, the latency data, and the target weight coefficient includes: The communication score of the public network channel is calculated based on the first packet loss rate, the first latency data, and the target weight coefficient. The communication score of the encrypted channel is calculated based on the second packet loss rate, the second latency data, and the target weight coefficient.
6. The method according to claim 5, characterized in that, After determining the corresponding first packet loss rate and first delay data based on the transmission of the first probe data packet, the method further includes: When the first packet loss rate is greater than the third preset threshold and the first latency data is greater than the fourth preset threshold, the corresponding relay server is marked as unavailable. Accordingly, after determining the corresponding second packet loss rate and second delay data based on the transmission of the second probe data packet, the method further includes: The difference between the second delay data and the first delay data is determined. When the difference is greater than a fifth preset threshold, the encryption channel is disabled for a first preset duration.
7. The method according to claim 1, characterized in that, After calculating the communication score for each communication channel based on the packet loss rate, the latency data, and the target weight coefficient, the method further includes: When the communication score of all communication channels is zero, a redundant transmission strategy is initiated to transmit the streaming media data.
8. A streaming media data transmission device, characterized in that, For a relay server, wherein there are at least two communication channels between the relay server and the next relay server, the device includes: The detection data acquisition module is used to acquire packet loss rate and latency data for each communication channel at preset intervals; The current mode determination module is used to determine the current transmission mode, which includes control signaling mode or video stream mode. The target weight coefficient determination module is used to determine the current target weight coefficient based on the correspondence between the transmission mode and the preset weight coefficient. The communication score calculation module is used to calculate the communication score of each communication channel based on the packet loss rate, the latency data, and the target weight coefficient. The target channel determination module is used to determine the communication channel with the highest communication score as the target channel; The data transmission module is used to transmit streaming media data through the target channel.
9. A streaming media data transmission device, characterized in that, include: Memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a processor, are used to perform the method as described in any one of claims 1-7.