Real-time streaming media transmission method and system based on cloud game and storage medium
By monitoring network status in real time and adjusting video streaming parameters dynamically, combining forward error correction encoding and congestion control, network fluctuations and delay problems in real-time streaming of cloud gaming are solved, significantly improving the reliability of user experience and data transmission.
Patent Information
- Application Number
- CN202411772163.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The real-time streaming media transmission of cloud games has problems such as network lag, high packet loss rate, and delay in transmission, which affects the user experience.
By monitoring network status in real time, dynamically adjust the resolution, frame rate and bit rate of the video stream, adopt forward error correction encoding, congestion control and priority scheduling, intelligent load balancing and edge computing collaborative transmission, optimize the decoding buffer and improve data Transmission reliability and fluency.
Effectively respond to network fluctuations, ensure screen fluency, enhance data recovery capabilities after packet loss, reduce transmission delay, improve user experience, and provide efficient, stable, and low-latency real-time streaming solutions for cloud gaming.
Smart Images

Figure CN119232713A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of streaming media transmission technology, and in particular to a method for real-time streaming media transmission based on cloud games. Background Art
[0002] Cloud gaming is a service that relies on cloud computing technology to transmit game images and sounds to user terminals through real-time streaming. Compared with traditional local games, cloud gaming can reduce the performance requirements of terminal devices, but there are also problems such as network lag, high packet loss rate, and transmission delay.
[0003] In response to the above problems, the present invention proposes a method, system and storage medium based on real-time streaming media transmission of cloud games. Summary of the invention
[0004] The present invention provides a method, system and storage medium based on real-time streaming media transmission of cloud games, which are used to solve the technical problems existing in the prior art.
[0005] To solve the above problems, the present invention provides the following technical solution: a method for real-time streaming media transmission based on cloud games, comprising the following steps:
[0006] S1, real-time monitoring of network status: collect network status parameters, including bandwidth, delay, jitter and packet loss rate, and generate real-time network status data;
[0007] S2, adaptive bitrate adjustment: dynamically adjust the resolution, frame rate and bit rate of the video stream based on network status data to optimize transmission performance;
[0008] S3, forward error correction coding: insert redundant data packets into the video stream, dynamically adjust the redundant data ratio according to the packet loss rate and jitter, and enhance the reliability of data transmission;
[0009] S4, congestion control and priority scheduling: Based on network bandwidth and latency, a congestion control algorithm is used to dynamically adjust the data transmission rate and prioritize the transmission of critical data packets;
[0010] S5, intelligent load balancing: dynamically selects the best server node based on the network conditions between the user and the server and the server load;
[0011] S6, edge computing collaborative transmission: edge computing nodes share some audio and video processing tasks, reducing the computing load of the main server and reducing transmission delay;
[0012] S7, decoding buffer optimization: Set an adaptive decoding buffer on the terminal device, adjust the buffer size in real time according to the network status, and reduce the impact of network fluctuations on playback.
[0013] In step S2, the adaptive bit rate adjustment includes:
[0014] S201, calculate the network stability coefficient S:
[0015] S = α * (1 - P) + β * (B / L) - γ * J
[0016] Among them, P is the packet loss rate, B is the bandwidth, L is the delay, J is the jitter, α, β and γ are weight coefficients;
[0017] S202, when S is lower than a preset threshold, the resolution and frame rate are reduced to reduce the amount of transmitted data; when S is higher than the preset threshold, the resolution and frame rate are gradually increased to optimize the image quality.
[0018] Further, in step S3, the forward error correction coding includes:
[0019] S301, calculation of redundant data ratio:
[0020] Dynamically adjust the redundant data ratio Re according to the packet loss rate P and jitter J:
[0021] Re = δ * P + ε * J + ζ
[0022] Among them, δ, ε and ζ are adjustment coefficients;
[0023] S302, redundant data packet generation: divide the original data packet into k groups, and generate nk redundant data packets according to the redundant data ratio Re;
[0024] S303, packet loss recovery: during the transmission process, when any nk data packets are lost, the original data is restored through redundant data packets.
[0025] Furthermore, in step S4, congestion control and priority scheduling include:
[0026] S401, congestion control mechanism: dynamically adjust the data transmission rate by real-time monitoring of network bandwidth and delay;
[0027] S402, data packet priority scheduling: when the network is congested, key data packets, such as key frames and control instructions, are transmitted first; when the network is restored, the transmission of ordinary data packets is gradually restored.
[0028] Furthermore, in step S5, intelligent load balancing includes:
[0029] S501, service node priority calculation: Combine the network delay L, bandwidth B and packet loss rate P between the user and the server to calculate the service node priority Q:
[0030] Q = η * (1 / L) + θ * B - κ * P
[0031] Among them, η, θ and κ are weight coefficients;
[0032] S502, dynamic server allocation: select the optimal server node according to the priority Q; when the network conditions change, dynamically switch to the backup server node.
[0033] Furthermore, in step S6, edge computing collaborative transmission includes:
[0034] S601, edge node preprocessing: preprocessing the audio and video data on the edge computing node, including encoding, resolution reduction and other operations;
[0035] S602, data transmission path optimization: the user terminal preferentially requests video stream data from the nearest edge node, and when the edge node resources are insufficient, it falls back to the main server for transmission;
[0036] S603, edge node and main server collaborate: the edge node and the main server collaborate to distribute data processing tasks to reduce the transmission path length and reduce latency.
[0037] Furthermore, in step S7, decoding buffer optimization includes:
[0038] S701, dynamically adjust the buffer size: when the network fluctuates greatly, increase the buffer size to reduce playback jams; when the network is stable, reduce the buffer size to reduce latency;
[0039] S702, buffer status monitoring: dynamically adjust the filling status of the decoding buffer according to the real-time network status to ensure smooth playback.
[0040] The present invention also discloses a system based on real-time streaming media transmission of cloud games, comprising:
[0041] Network status detection module: used to collect network status parameters, including bandwidth, delay, jitter and packet loss rate, and generate real-time network status data;
[0042] Bit rate adjustment module: dynamically adjusts the resolution, frame rate and bit rate of the video stream based on network status data to optimize transmission performance;
[0043] Coding error correction module: used to insert redundant data packets into the video stream, dynamically adjust the redundant data ratio according to the packet loss rate and jitter, and enhance the reliability of data transmission;
[0044] Congestion control and priority scheduling module: Based on network bandwidth and delay, it uses congestion control algorithm to dynamically adjust the data transmission rate and give priority to the transmission of key data packets;
[0045] Load balancing module: used to dynamically select the best server node based on the network conditions between the user and the server and the server load;
[0046] Collaborative transmission module: used to share some audio and video processing tasks through edge computing nodes, reduce the computing load of the main server and reduce transmission delay;
[0047] Decoding buffer optimization module: used to set an adaptive decoding buffer on the terminal device, adjust the buffer size in real time according to the network status, and reduce the impact of network fluctuations on playback;
[0048] The bit rate adjustment module calculates the network stability coefficient S through the following formula:
[0049] S = α * (1 - P) + β * (B / L) - γ * J
[0050] Among them, P is the packet loss rate, B is the bandwidth, L is the delay, J is the jitter, α, β and γ are weight coefficients;
[0051] When S is lower than the preset threshold, the resolution and frame rate are reduced to reduce the amount of transmitted data; when S is higher than the preset threshold, the resolution and frame rate are gradually increased to optimize the image quality.
[0052] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0053] Compared with the prior art, the present invention has at least the following beneficial effects:
[0054] The present invention effectively copes with network fluctuations through real-time monitoring and dynamic adjustment, adaptive bit rate and forward error correction mechanism to ensure picture smoothness. Forward error correction coding enhances data recovery capability after packet loss and ensures picture integrity. Congestion control and edge computing collaborative transmission reduce transmission delay and optimize user experience. This technical solution is an efficient, stable and low-latency cloud game real-time streaming media transmission solution, which can significantly improve user experience and meet the needs of large-scale applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 It is a flow chart of the method for real-time streaming media transmission of cloud games based on the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention. It is understood that the drawings are only provided for reference and explanation, and are not used to limit the present invention.
[0058] See also Figure 1 The present invention discloses a method for real-time streaming media transmission based on cloud games, which includes multiple collaborative steps and can effectively deal with network fluctuations, packet loss, delays and uneven loads, and ensure the smoothness and high-quality experience of cloud games. Specifically, it includes the following steps:
[0059] Step S1: Real-time detection of network status
[0060] 1. Real-time process:
[0061] A network status monitoring module is built between the user terminal and the server to regularly collect key parameters such as bandwidth, latency, jitter, and packet loss rate. The sampling period is set to once per second, and the sliding window method is used to record the network status data of the last 10 seconds.
[0062] After data collection, the mean and variance of each parameter are calculated to generate real-time network status data for dynamic regulation in subsequent steps.
[0063] 2. Example description:
[0064] The network status sampling of a group of user terminal servers is as follows:
[0065] Bandwidth B (Mbps): [20, 18, 15, 13, 10, 8, 9, 12, 14, 16]
[0066] Delay L (ms): [30, 40, 50, 60, 80, 100, 90, 70, 50, 40]
[0067] Jitter J (ms): [5, 6, 7, 8, 10, 12, 11, 9, 7, 6]
[0068] Packet loss rate P (%): [0.01, 0.03, 0.05, 0.07, 0.1, 0.15, 0.12, 0.08, 0.04, 0.02]
[0069] After taking the average value, the network status data is obtained:
[0070] B_avg: 13.5 Mbps, L_avg: 61 ms, J_avg: 8.1 ms, P_avg: 0.067
[0071] 3. Effect analysis:
[0072] Real-time monitoring of network status can provide a dynamic adjustment basis for subsequent steps, help cope with network fluctuations, and improve overall transmission stability.
[0073] Step S2: Adaptive bit rate adjustment
[0074] The network stability coefficient S is calculated based on the real-time network status data. The formula is as follows:
[0075] S = α * (1 - P) + β * (B / L) - γ * J
[0076] Among them, P is the packet loss rate, B is the bandwidth, L is the delay, and J is the jitter;
[0077] α: the weight of the impact of packet loss rate on network stability;
[0078] β: The impact weight of bandwidth to delay ratio on network stability;
[0079] γ: The weight of the impact of jitter on network stability.
[0080] The basis for value selection:
[0081] 1. Theoretical basis:
[0082] The impact of packet loss rate (P) on cloud gaming is mainly reflected in the recovery cost of image loss and data loss, which has a greater impact, so it needs to be given a higher weight (such as 0.4~0.6);
[0083] The ratio of bandwidth to latency (B / L) reflects the amount of data that can be transmitted per unit time and is an important indicator for measuring transmission performance. Its weight is slightly lower than the packet loss rate (e.g., 0.2-0.4).
[0084] The impact of jitter (J) on real-time media transmission is significant in the small and medium delay range, but is limited in the case of large delays, so the weight can be appropriately reduced (such as 0.1~0.3).
[0085] 2. Experimental basis:
[0086] In the experimental verification, multiple groups of test values were taken for α, β, and γ, and their influence on the calculation results of the network stability coefficient was observed. The following Table 1 shows the experimental data of the stability coefficient S under multiple groups of different network states:
[0087] Table 1:
[0088] Packet loss rate (P) Bandwidth(B) / Mbps Delay(L) / ms Jitter(J) / ms S (α=0.5, β=0.3, γ=0.2) S (α=0.6, β=0.3, γ=0.1) 0.01 20 50 5 0.923 0.946 0.05 10 100 10 -0.165 -0.059 0.1 5 200 15 -0.967 -0.831
[0089] When α=0.5, β=0.3, γ=0.2, the calculation results can more evenly reflect the impact of packet loss rate, bandwidth delay ratio and jitter;
[0090] When α=0.6 and γ=0.1, the weight of packet loss rate is too high, which has too great an impact on the results when the packet loss rate is low, while the impact of jitter is underestimated.
[0091] 3. In summary:
[0092] In the actual cloud gaming scenario, the packet loss rate is the main influencing factor (50% weight), followed by the bandwidth to delay ratio (30% weight), and the jitter (20% weight) has the second largest impact. The final values are: α = 0.5, β = 0.3, γ = 0.2
[0093] Dynamically adjust the resolution, frame rate, and bit rate of the video stream according to the S value:
[0094] When S is lower than the preset threshold, the resolution and frame rate are reduced;
[0095] When S is higher than the threshold, the resolution and frame rate are gradually restored;
[0096] In this embodiment, the preset threshold is 0.
[0097] Set the values of α = 0.5, β = 0.3, γ = 0.2, B_avg: 13.5 Mbps, L_avg: 61 ms, J_avg: 8.1ms, P_avg: 0.067,
[0098] Substitute the network stability coefficient S = α * (1 - P) + β * (B / L) - γ * J
[0099] S = 0.5 * (1 - 0.067) + 0.3 * (13.5 / 61) - 0.2 * 8.1 = -1.0872
[0100] Since S < 0, the adjustment results are as follows:
[0101] Resolution: 1920×1080 → 1280×720
[0102] Frame rate: 60 FPS → 30 FPS
[0103] Bit rate: 6 Mbps → 3 Mbps
[0104] Effect: Adaptive bit rate adjustment can effectively reduce the amount of data transmitted in the video stream and ensure smoothness under network fluctuation conditions.
[0105] Step S3: Forward Error Correction Coding
[0106] 1. Implementation process: Dynamically generate redundant data packets based on the packet loss rate. The redundancy ratio calculation formula is as follows: Re = δ *P + ε * J + ζ
[0107] The original data packet is divided into k packets and nk redundant packets are generated, so that the original data can still be restored when any nk packets are lost.
[0108] 2. Regarding the values of δ, ε and ζ as adjustment coefficients:
[0109] δ: the weight of the impact of packet loss rate on redundancy ratio;
[0110] ε: the weight of the impact of jitter on the redundancy ratio;
[0111] ζ: fixed basic redundancy ratio;
[0112] Theoretical analysis:
[0113] The packet loss rate (P) is the key parameter that determines the redundancy ratio. The redundancy ratio should increase rapidly with the increase of the packet loss rate. Therefore, the value of δ should be high (such as 0.5~0.7).
[0114] Jitter (J) affects the continuity of audio and video data. Its impact is relatively weak, but it still needs to be considered (e.g. 0.2~0.4);
[0115] The basic redundancy ratio ζ is used to ensure the minimum redundancy requirement under low packet loss rate conditions, and its value range is usually 0.05~0.2.
[0116] Experimental verification:
[0117] Table 2 below shows the redundancy ratio calculation results based on different network status tests:
[0118] Table 2:
[0119] Packet loss rate (P) Jitter (J) Re (δ=0.6,ε=0.3, ζ=0.1) Re (δ=0.5,ε=0.4, ζ=0.1) Actual packet loss recovery effect 0.01 5 ms 0.115 0.125 Complete recovery from packet loss 0.05 8 ms 0.315 0.355 Complete recovery from packet loss 0.1 15 ms 0.73 0.81 Complete recovery from packet loss
[0120] When δ=0.6, ε=0.3, ζ=0.1, the calculated redundancy ratio can meet the packet loss recovery requirements and will not generate too much redundant data, thus ensuring transmission efficiency.
[0121] Practical application verification:
[0122] Under high packet loss rate network conditions (P=0.1), by increasing the redundancy ratio, the packet loss recovery rate is close to 100%; under low packet loss rate conditions (P=0.01), the redundancy ratio is controlled within a reasonable range to avoid excessive redundancy. The final values are: δ =0.6, ε = 0.3, ζ = 0.1
[0123] Substitute the data δ = 0.6, ε = 0.3, ζ = 0.1, packet loss rate P = 0.067, and jitter J = 8.1 into the formula: Re = 0.6 * 0.067 + 0.3 * 8.1 + 0.1 = 0.0402 + 2.43 + 0.1 = 2.5702
[0124] The redundancy ratio is 2.57. If the number of original data packets is 10 (k=10):
[0125] n = k + ceil(k * Re) = 10 + ceil(10 * 2.57) = 10 + 26 = 36
[0126] If any 26 data packets are lost during transmission, they can still be restored through redundant data.
[0127] Effect: Forward error correction coding improves the video stream recovery capability under network packet loss conditions and ensures the integrity and continuity of the picture.
[0128] Step S4: Congestion control and priority scheduling
[0129] 1. Implementation process:
[0130] Adopt the congestion control algorithm based on BBR (bottleneck bandwidth and round-trip time) to dynamically adjust the sending rate according to network bandwidth and delay:
[0131] R = B / (RTT + Buffer)
[0132] When the network is congested, key frames (I frames) and control data packets are transmitted first, and non-key frames (P frames, B frames) are discarded.
[0133] 2. Example description:
[0134] Assume that the current bandwidth B = 13.5 Mbps, the delay RTT = 61 ms, and the buffer = 10 ms:
[0135] R = 13.5 / (0.061 + 0.01) = 13.5 / 0.071 ≈ 190 Mbps
[0136] When the network is congested, only I frames and control packets are transmitted, and non-critical frames are discarded.
[0137] Effect: Through congestion control algorithms and priority scheduling, the impact of network congestion on picture smoothness can be reduced, ensuring the complete transmission of key data.
[0138] Step S5: Intelligent load balancing
[0139] 1. Implementation process:
[0140] Combined with the network delay, bandwidth and packet loss rate between the user and the server, the service node priority is calculated: Q = η * (1 / L) + θ * B - κ * P
[0141] Dynamically select the server node with the highest priority and switch to the backup node when network conditions change.
[0142] η: the impact weight of delay on priority;
[0143] θ: the weight of bandwidth’s impact on priority;
[0144] κ: The weight of the impact of packet loss rate on priority.
[0145] 2. About the basis for value selection:
[0146] Theoretical basis:
[0147] Latency (L) is a key factor in determining user experience. Servers with low latency should be preferred, so η needs a higher weight (such as 0.4~0.6);
[0148] Bandwidth (B) determines the transmission capacity of the server, and its weight can be moderate (e.g., 0.2~0.4);
[0149] The weight of the packet loss rate (P) affecting the priority is relatively low (such as 0.1~0.3).
[0150] Experimental verification:
[0151] The following server parameters are used for priority calculation test. Table 3 below shows the experimental data of server priority Q under different network conditions:
[0152] Table 3:
[0153] server Delay(L) Bandwidth (B) Packet loss rate (P) Q (η=0.5, θ=0.3, κ=0.2) Q (η=0.6, θ=0.3, κ=0.1) A 50 ms 20 Mbps 0.02 6.006 6.506 B 70 ms 15 Mbps 0.01 4.505 4.905
[0154] When η=0.5, θ=0.3, κ=0.2, server A has a higher priority and is selected first;
[0155] When η=0.6, θ=0.3, κ=0.1, the impact of latency is overly magnified, which may lead to the preference of servers with lower latency even when the bandwidth is low, affecting the transmission efficiency.
[0156] Therefore, the final value of the weight distribution of comprehensive delay, bandwidth and packet loss rate is:
[0157] η = 0.5, θ = 0.3, κ = 0.2
[0158] Substituting into the formula:
[0159] Q_A=0.5*(1 / 50)+0.3*20-0.2 * 0.02 = 0.01 + 6 - 0.004 = 6.006
[0160] Q_B=0.5*(1 / 70)+0.3*15-0.2 * 0.01 = 0.0071 + 4.5 - 0.002 = 4.5051
[0161] Since Q_A>Q_B, server A is preferred.
[0162] Effect: Intelligent load balancing can reasonably allocate server resources, reduce user delays, and improve service stability.
[0163] Step S6: Edge computing collaborative transmission
[0164] Implementation process:
[0165] Pre-process the audio and video data on the edge node (such as reducing resolution and encoding compression);
[0166] Users get video streams from edge nodes first, and fall back to the main server when edge node resources are insufficient.
[0167] Effect: Edge computing collaborative transmission can reduce the length of the data transmission path, reduce transmission delay and main server load.
[0168] Step S7: Decoding buffer optimization
[0169] 1. Implementation process:
[0170] Dynamically adjust the buffer size based on network status:
[0171] When the network fluctuates greatly (jitter J>8ms), increase the buffer to 5 seconds;
[0172] When the network is stable (jitter J ≤ 8ms), reduce the buffer size to 2 seconds.
[0173] Effect: Decoding buffer optimization can effectively alleviate the impact of network fluctuations on playback smoothness, while reducing latency under stable networks.
[0174] Through the above implementation steps, this technical solution can achieve the following effects:
[0175] 1. Smoothness guarantee: Through real-time monitoring and dynamic adjustment, adaptive bit rate and forward error correction mechanism can effectively cope with network fluctuations and ensure picture smoothness.
[0176] 2. Improved reliability: Forward error correction coding enhances data recovery capabilities after packet loss, ensuring picture integrity.
[0177] 3. Low latency: Congestion control and edge computing collaborative transmission reduce transmission delays and optimize user experience.
[0178] 4. Efficient load distribution: Intelligent load balancing rationally distributes server resources, reduces server pressure and improves user service quality.
[0179] 5. User experience optimization: Decoding buffer optimization dynamically adjusts under network fluctuations and stable conditions to reduce freezes and delays.
[0180] The present invention also discloses a system based on real-time streaming media transmission of cloud games, comprising:
[0181] Network status detection module: used to collect network status parameters, including bandwidth, delay, jitter and packet loss rate, and generate real-time network status data;
[0182] Bit rate adjustment module: dynamically adjusts the resolution, frame rate and bit rate of the video stream based on network status data to optimize transmission performance;
[0183] Coding error correction module: used to insert redundant data packets into the video stream, dynamically adjust the redundant data ratio according to the packet loss rate and jitter, and enhance the reliability of data transmission;
[0184] Congestion control and priority scheduling module: Based on network bandwidth and delay, it uses congestion control algorithm to dynamically adjust the data transmission rate and give priority to the transmission of key data packets;
[0185] Load balancing module: used to dynamically select the best server node based on the network conditions between the user and the server and the server load;
[0186] Collaborative transmission module: used to share some audio and video processing tasks through edge computing nodes, reduce the computing load of the main server and reduce transmission delay;
[0187] Decoding buffer optimization module: used to set an adaptive decoding buffer on the terminal device, adjust the buffer size in real time according to the network status, and reduce the impact of network fluctuations on playback;
[0188] The bit rate adjustment module can calculate the network stability coefficient S through the following formula:
[0189] S = α * (1 - P) + β * (B / L) - γ * J
[0190] Among them, P is the packet loss rate, B is the bandwidth, L is the delay, J is the jitter, α, β and γ are weight coefficients;
[0191] When S is lower than the preset threshold, the resolution and frame rate are reduced to reduce the amount of transmitted data; when S is higher than the preset threshold, the resolution and frame rate are gradually increased to optimize the image quality.
[0192] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned cloud computer resource dynamic allocation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0193] Overall, this technical solution is an efficient, stable, low-latency cloud gaming real-time streaming media transmission solution that can significantly improve user experience and meet the needs of large-scale applications.
[0194] In the specification and claims of the present application, the words "include / comprise" and the words "have / include" and their variations are used to specify the existence of stated features, values, steps or components, but do not exclude the existence or addition of one or more other features, values, steps, components or combinations thereof.
[0195] Some features of the present invention are described in different embodiments for clarity of description, however, these features may also be described in combination in a single embodiment. Conversely, some features of the present invention are described in only a single embodiment for brevity, however, these features may also be described in different embodiments alone or in any suitable combination.
[0196] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for real-time streaming media transmission based on cloud games, characterized in that: The following steps are involved: S1, real-time monitoring of network status: collect network status parameters, including bandwidth, delay, jitter and packet loss rate, and generate real-time network status data; S2, adaptive bitrate adjustment: dynamically adjust the resolution, frame rate and bit rate of the video stream based on network status data to optimize transmission performance; S3, forward error correction coding: insert redundant data packets into the video stream, dynamically adjust the redundant data ratio according to the packet loss rate and jitter, and enhance the reliability of data transmission; S4, congestion control and priority scheduling: Based on network bandwidth and latency, a congestion control algorithm is used to dynamically adjust the data transmission rate and prioritize the transmission of critical data packets; S5, intelligent load balancing: dynamically selects the best server node based on the network conditions between the user and the server and the server load; S6, edge computing collaborative transmission: edge computing nodes share some audio and video processing tasks, reducing the computing load of the main server and reducing transmission delay; S7, decoding buffer optimization: set an adaptive decoding buffer on the terminal device, adjust the buffer size in real time according to the network status, and reduce the impact of network fluctuations on playback; In step S2, the adaptive bit rate adjustment includes: S201, calculate the network stability coefficient S: S = α * (1 - P) + β * (B / L) - γ * J; Among them, P is the packet loss rate, B is the bandwidth, L is the delay, J is the jitter, α, β and γ are weight coefficients; S202, when S is lower than a preset threshold, the resolution and frame rate are reduced to reduce the amount of transmitted data; when S is higher than the preset threshold, the resolution and frame rate are gradually increased to optimize the image quality.
2. The method for real-time streaming media transmission based on cloud games according to claim 1 is characterized in that: In step S3, the forward error correction coding includes: S301, calculation of redundant data ratio: Dynamically adjust the redundant data ratio Re according to the packet loss rate P and jitter J: Re = δ * P + ε * J + ζ; Among them, δ, ε and ζ are adjustment coefficients; S302, redundant data packet generation: divide the original data packet into k groups, and generate nk redundant data packets according to the redundant data ratio Re; S303, packet loss recovery: during the transmission process, when any nk data packets are lost, the original data is restored through redundant data packets.
3. The method for real-time streaming media transmission based on cloud games according to claim 1 is characterized in that: In step S4, congestion control and priority scheduling include: S401, congestion control mechanism: dynamically adjust the data transmission rate by real-time monitoring of network bandwidth and delay; S402, data packet priority scheduling: when the network is congested, key data packets, such as key frames and control instructions, are transmitted first; when the network is restored, the transmission of ordinary data packets is gradually restored.
4. The method for real-time streaming media transmission based on cloud games according to claim 1 is characterized in that: In step S5, intelligent load balancing includes: S501, service node priority calculation: Combine the network delay L, bandwidth B and packet loss rate P between the user and the server to calculate the service node priority Q: Q = η * (1 / L) + θ * B - κ * P; Among them, η, θ and κ are weight coefficients; S502, dynamic server allocation: select the optimal server node according to the priority Q; when the network conditions change, dynamically switch to the backup server node.
5. The method for real-time streaming media transmission based on cloud games according to claim 1, characterized in that: In step S6, edge computing collaborative transmission includes: S601, edge node preprocessing: preprocessing the audio and video data on the edge computing node, including encoding, resolution reduction and other operations; S602, data transmission path optimization: the user terminal preferentially requests video stream data from the nearest edge node, and when the edge node resources are insufficient, it falls back to the main server for transmission; S603, edge node and main server collaborate: the edge node and the main server collaborate to distribute data processing tasks to reduce the transmission path length and reduce latency.
6. The method for real-time streaming media transmission based on cloud games according to claim 1, characterized in that: In step S7, decoding buffer optimization includes: S701, dynamically adjust the buffer size: when the network fluctuates greatly, increase the buffer size to reduce playback jams; when the network is stable, reduce the buffer size to reduce latency; S702, buffer status monitoring: dynamically adjust the filling status of the decoding buffer according to the real-time network status to ensure smooth playback.
7. A system based on real-time streaming media transmission of cloud games, characterized in that: include: Network status detection module: used to collect network status parameters, including bandwidth, delay, jitter and packet loss rate, and generate real-time network status data; Bit rate adjustment module: dynamically adjusts the resolution, frame rate and bit rate of the video stream based on network status data to optimize transmission performance; Coding error correction module: used to insert redundant data packets into the video stream, dynamically adjust the redundant data ratio according to the packet loss rate and jitter, and enhance the reliability of data transmission; Congestion control and priority scheduling module: Based on network bandwidth and delay, it uses congestion control algorithm to dynamically adjust the data transmission rate and give priority to the transmission of key data packets; Load balancing module: used to dynamically select the best server node based on the network conditions between the user and the server and the server load; Collaborative transmission module: used to share some audio and video processing tasks through edge computing nodes, reduce the computing load of the main server and reduce transmission delay; Decoding buffer optimization module: used to set an adaptive decoding buffer on the terminal device, adjust the buffer size in real time according to the network status, and reduce the impact of network fluctuations on playback; The bit rate adjustment module calculates the network stability coefficient S through the following formula: S = α * (1 - P) + β * (B / L) - γ * J; Among them, P is the packet loss rate, B is the bandwidth, L is the delay, J is the jitter, α, β and γ are weight coefficients; When S is lower than the preset threshold, the resolution and frame rate are reduced to reduce the amount of transmitted data; when S is higher than the preset threshold, the resolution and frame rate are gradually increased to optimize the image quality.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method for transmitting facsimile message
CN101047626A
Streaming media data transmission method and system, sending device and receiving device
CN111787413A
FEC method and device for data transmission
CN116980077A
Audio and video transmission method and system based on WebTransport
CN117097705A
Audio and video data network transmission reliability optimization method based on industrial APP
CN117714432A
Cited By
5G video service quality enhancement method, platform, equipment and medium
CN119583818A
A 5G Video Service Quality Enhancement Method, Platform, Device and Medium
CN119583818B
Video transmission system and surgical robot system
CN119946279A
Video transmission system and surgical robot system
CN119946279B
Cross-system same-screen control operation method based on Android intelligent terminal
CN120010988A
