CN117544809B - Method and system for generating and recommending network video application by server-side dynamic code rate - Google Patents

Method and system for generating and recommending network video application by server-side dynamic code rate Download PDF

Info

Publication number
CN117544809B
CN117544809B CN202410032790.5A CN202410032790A CN117544809B CN 117544809 B CN117544809 B CN 117544809B CN 202410032790 A CN202410032790 A CN 202410032790A CN 117544809 B CN117544809 B CN 117544809B
Authority
CN
China
Prior art keywords
code rate
data
client
network
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410032790.5A
Other languages
Chinese (zh)
Other versions
CN117544809A (en
Inventor
张冬艳
蒋韵洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology Beijing USTB
Original Assignee
University of Science and Technology Beijing USTB
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology Beijing USTB filed Critical University of Science and Technology Beijing USTB
Priority to CN202410032790.5A priority Critical patent/CN117544809B/en
Publication of CN117544809A publication Critical patent/CN117544809A/en
Application granted granted Critical
Publication of CN117544809B publication Critical patent/CN117544809B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2402Monitoring of the downstream path of the transmission network, e.g. bandwidth available
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2407Monitoring of transmitted content, e.g. distribution time, number of downloads
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44204Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/637Control signals issued by the client directed to the server or network components
    • H04N21/6373Control signals issued by the client directed to the server or network components for rate control, e.g. request to the server to modify its transmission rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention belongs to the technical field of data communication and data processing, and particularly relates to a server-side dynamic code rate generation and recommendation network video application method and system.

Description

Method and system for generating and recommending network video application by server-side dynamic code rate
Technical Field
The invention belongs to the technical field of data communication and video data processing, and particularly relates to a method and a system for generating and recommending network video application by a server side dynamic code rate.
Background
Code rate self-adaption is a technology widely applied to the fields of multimedia communication and streaming media transmission, and aims to automatically adjust the data transmission rate according to the change of network conditions and the performance of terminal equipment so as to provide better user experience; in the aspect of multimedia communication, the code rate self-adaption is widely applied to video calls and video conferences; according to network delay and bandwidth conditions, it can adjust video quality to ensure smooth communication quality; in streaming media applications, rate adaptation is critical in streaming media services, such as live video and video on demand; the video code rate can be automatically adjusted according to the network connection quality and the equipment performance of the audience, so that the buffer waiting time is avoided and better watching experience is provided; in the aspect of online game, in the multi-player online game, the code rate self-adaption can be used for optimizing the game performance, reducing delay and ensuring smooth transmission of game pictures; in cloud storage and backup, for cloud storage and backup services, code rate adaptation can be used for adjusting uploading and downloading speeds so as to adapt to different network conditions and equipment performances;
typical schemes include: code rate self-adaptive protocol DASH of the streaming media; the method allows the server to provide a plurality of media contents with different code rate versions, and the client selects the most suitable version in the playing process so as to adapt to the current network bandwidth and performance; the streaming media protocol HLS developed by apple company is used for playing streaming media content on the iOS equipment; the method supports code rate self-adaption, and different code rate versions are switched according to network conditions; real-time communication technology WebRTC, including video calls; the method has the function of code rate self-adaption so as to ensure that the communication quality is maintained under the unstable network condition; the Transmission Control Protocol (TCP) is based on code rate control, wherein when transmitting data, the TCP can adopt a congestion control algorithm to automatically adjust the sending rate according to the congestion condition of the network so as to avoid the loss of data packets and network congestion; the video codec (such as H.264, H.265) can automatically adjust the compression rate in the encoding and decoding processes to adapt to different network conditions so as to maintain the video quality;
taking a code rate self-adaptive protocol (DASH) of streaming media as an example, in the DASH prior art, different code rate versions (such as three fixed code rate versions of 480p, 720p and 1080 p) with fixed number and definition are generated for each segment for a client to select when multi-code rate coding is performed;
in the prior art, when streaming media is subjected to code rate self-adaptive playing, a server side only provides code rate versions with fixed quantity and value for a client side to select, the current network condition of the client side is supported between different code rates, if the downward compatibility causes the conditions of bandwidth waste and poor video playing definition, and if the upward compatibility causes the problem of video playing blocking.
Disclosure of Invention
The invention provides a server-side dynamic code rate generation and recommendation network video application method and system, which are used for solving the problems that when the prior art in the background technology has streaming media for code rate self-adaptive playing, the server side only provides code rate versions with fixed quantity and numerical value for the client side to select, the current network condition of the client side is supported between different code rates, if the downward compatibility causes the condition of bandwidth waste and poor video playing definition, and if the upward compatibility causes the condition of video playing blocking;
the technical problems solved by the invention are realized by adopting the following technical scheme: the method for generating and recommending the network video application by the server side dynamic code rate comprises the following steps:
based on the received client-side historical play video information, the server side generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server side through dynamic code rate generation processing, and recommends the code rate set to the client side;
based on the received code rate set, the client selects the code rate which is more in line with the current network condition through self-adaptive code rate selection processing.
Further:
the dynamic code rate generation process includes:
historical play data collection: detecting that a client automatically or manually switches different playing code rates, and sending an initial data packet of the historical playing code rate to a server by the client;
data cleaning and classification: based on the initial data packet of the historical playing code rate received by the server, after incomplete, error, redundancy or useless information in the data is removed or modified through preprocessing of the original data, the quality data is stored in a buffer area;
dynamic code rate generation: based on the quality data in the buffer zone, generating a code rate set of the next stage according to the planned sending period through determining period processing, historical code rate clustering processing and code rate mapping processing.
Further:
the determining period processing includes:
setting a maximum received data amount as a data period:
if the initial data packet is received, the number of data is automatically increased, whether the number of data exceeds the maximum received data amount is judged, and if the number of data exceeds the maximum received data amount, historical code rate clustering processing is performed.
Further:
the determining period processing further includes:
setting the longest value of the accumulated time of the continuous historical code rate as a data period:
if the initial data packet is received, accumulating the data duration, judging whether the data duration exceeds the longest accumulated time value, and if so, entering into the historical code rate clustering process.
Further:
the historical code rate clustering process comprises the following steps:
based on the duration time of the client and the network characteristics of the historical code rate, classifying the client through density clustering. Preferably, the classification of clients herein may be clients with the same network characteristics, or clients with similar network characteristics.
Further:
the density clustering process includes:
calculating a distance matrix between the data points;
calculating the local density of the client data through a local density function based on the distance matrix;
calculating local density contribution through a density contribution function based on the local density, and calculating a local density estimated value;
selecting a crowding degree threshold value in the local density, and determining to obtain a minimum sample number parameter;
based on the self-adaptive local density estimation value and the minimum sample number parameter, obtaining a clustering result of client classification through a standard density clustering algorithm;
the local density function is:
the d is the distance between the ith data point and other data points;
the dissolved_dist [ k ] is the kth small value of the distance between the ith data point and other data points;
the saidLocal density for data point i;
the density contribution function is:
further:
the code rate mapping process includes:
calculating the generated code rate corresponding to each data point by generating a code rate expected value function based on the central point of each classification area of the clustering result;
the code rate expected value generating function is as follows:
the said j A central point of each classification area is the clustering result;
the saidHistorical code rate corresponding to each data point;
the n is the total number of data points.
Further:
converging the center points of the classification areas to a set U, and generating a code rate set of the next stage;
the set U is as follows:
set u=
The saidA center point for each classification region;
the set U is a code rate set;
the p is the total number of clusters of the data set U.
Further:
the adaptive code rate selection process includes:
acquiring network condition information: the client side periodically measures network bandwidth and determines the equipment performance of the current network speed; detecting network conditions of network delay and network packet loss rate;
setting an initial code rate: in the initial playing period, the client selects an initial proper code rate according to the equipment performance and the network condition;
monitoring network condition changes: monitoring the change states of the equipment performance and the network condition periodically or in real time;
dynamically adjusting the code rate:
if the current network speed in the current data period is greater than the initial proper code rate, the current playing code rate is improved to the closest code rate recommended by the server side;
and if the current network speed in the current data period is smaller than the initial proper code rate, the current playing code rate is reduced to the closest code rate recommended by the server side.
Meanwhile, the invention also provides a server-side dynamic code rate generation and recommendation network video application system, which comprises:
the network video application system realizes the network video application method of any one of the above, and comprises a server side and a client side;
server side:
based on the received client-side historical play video information, the server side generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server side through dynamic code rate generation processing, and the code rate set is referred to the client side;
client side:
based on the received code rate set, the client selects the code rate which is more in line with the current network condition through self-adaptive code rate selection processing.
The beneficial technical effects are as follows:
the scheme adopts the video information played based on the received history of the client, the server generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server through dynamic code rate generation processing, and the code rate set is recommended to the client; based on the received code rate set, the client selects the code rate which is more in line with the current network condition through self-adaptive code rate selection processing, and because the current research on video streaming code rate self-adaptation is concentrated on the code rate self-adaptive selection algorithm of the client, the scheme provides a method that the DRGA-HR algorithm is applied to the server, the DRGA-HR algorithm takes the client ID, the historical playing code rate and the duration uploaded by each client according to the period through a dynamic code rate generator as input parameters, generates and outputs the code rate set which is in line with logic expectation and needs to be encoded at the server through a series of calculation, and recommends the code rate set to the client for selection by the server, so that the code rate selected by the client is more in line with the current network condition through the pre-recommendation combined with the self-adaptive code rate selection algorithm of the client, and the effect watched by the user is better; meanwhile, the code rate set is directly pushed to a client after being generated at the server, the client selects a proper code rate according to a code rate self-adaptive algorithm, the switching code rate does not need manual switching of the client, the client is embedded with a code rate self-adaptive algorithm to select according to network bandwidth in real time, and if the current network bandwidth is insufficient to support the code rate, the client is automatically switched to another proper code rate; existing DASH technology: generating different code rate versions (such as 480p, 720p and 1080 p) with fixed number and definition for each segment for the client to select; the invention is as follows: since a recommended code rate version is generated in each period, for example, the generated code rates are 550p, 690p, 900p according to the historical data returned by the client in the first period, the code rates generated in the second period are 1050p, 1200p, etc., the code rate set and the code rate number generated in each time are dynamically generated by the data in one period according to the newly proposed algorithm, and the user viewing condition is under the network condition of 570p in the period of the first period: existing DASH technology: only 480p or 720p of the fixed code rate can be selected; selecting 480p causes network bandwidth waste, and video definition watched by users is poor, if selecting 720p, video playing is blocked, and user experience is reduced, and the invention: the 550p code rate generated and recommended by the server side can be selected, the definition is only 20p lower than the viewing condition supported by the network in real time, the current network bandwidth is fully utilized, and the user experience degree reaches a higher level under the predictable condition; based on bandwidth data of a client, providing a method for generating a dynamic code rate in advance at a server and pushing the dynamic code rate to the client; compared with streaming media transmission with a fixed code rate at a server end, the method aims to further improve the watching quality of a user; the innovation point of the content is that the number of the code rates dynamically generated by the server side is determined, the code rate pushed to the client side is selected, and a time interval for dynamically generating the code rate is set, so that user experience can be improved.
Drawings
FIG. 1 is a general flow chart of the network video application method of the present invention;
FIG. 2 is a flow chart of a dynamic code rate generation process of the network video application method of the present invention;
FIG. 3 is a flow chart of an adaptive code rate selection process of the network video application method of the present invention;
FIG. 4 is a workflow diagram of a network video application method of the present invention;
fig. 5 is an application block diagram of the network video application system of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings:
in the figure:
s101, based on received client-side historical play video information, a server side generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server side through dynamic code rate generation processing, and recommends the code rate set to a client side;
s102-selecting a code rate which is more in line with the current network condition by the client through self-adaptive code rate selection processing based on the received code rate set;
s1001, collecting historical play data;
s1002, cleaning and classifying data;
s1003-generating a dynamic code rate;
s2001-acquiring network condition information;
s2002-setting an initial code rate;
s2003-monitoring network condition changes;
s2004-dynamically adjusting code rate;
examples
This embodiment:
as shown in fig. 1 and 4, the method for generating S1003 and the recommended network video application based on the dynamic code rate of the server includes:
based on the received client-side historical play video information, the server side generates a code rate set which is required to be encoded at the server side and meets logic expectations through processing of a dynamic code rate generation S1003, and recommends the code rate set to the client side S101;
based on the received code rate set, the client selects a code rate more in line with the current network condition through adaptive code rate selection processing S102.
The scheme adopts the video information played based on the received history of the client, the server generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server through dynamic code rate generation processing, and the code rate set is recommended to the client; based on a received code rate set, a client selects a code rate which better accords with the current network condition through self-adaptive code rate selection processing, and because the current research on video streaming code rate self-adaptation is concentrated on a dynamic code rate generation algorithm and a code rate self-adaptive selection algorithm of the client, the scheme provides a method for applying a DRGA-HR algorithm to a server, the DRGA-HR algorithm takes a client ID, a historical playing code rate and duration uploaded by each client according to a period through a dynamic code rate generator as input parameters, generates and outputs the code rate set which accords with logic expectation and needs to be encoded at the server through a series of calculation, and the server recommends the code rate set to the client for selection, so that the code rate selected by the client is better in accordance with the current network condition through the pre-recommendation of the code rate selection algorithm combined with the client self-adaptation, and the user watching effect is better; meanwhile, the code rate set is directly pushed to the client after being generated by the client, the client selects a proper code rate according to a code rate self-adaptive algorithm, the switching code rate does not need manual switching by the client, the client is embedded with a code rate self-adaptive algorithm to select according to the network bandwidth in real time, and if the current network bandwidth is insufficient to support the code rate, the client is automatically switched to another proper code rate; existing DASH technology: generating different code rate versions (such as 480p, 720p and 1080 p) with fixed number and definition for each segment for the client to select; the invention is as follows: since a recommended code rate version is generated in each period, for example, the generated code rates are 550p, 690p, 900p according to the historical data returned by the client in the first period, the code rates generated in the second period are 1050p, 1200p, etc., the code rate set and the code rate number generated in each time are dynamically generated by the data in one period according to the newly proposed algorithm, and the user viewing condition is under the network condition of 570p in the period of the first period: existing DASH technology: only 480p or 720p of the fixed code rate can be selected; selecting 480p causes network bandwidth waste, and video definition watched by users is poor, if selecting 720p, video playing is blocked, and user experience is reduced, and the invention: the 550p code rate generated and recommended by the server side can be selected, the definition is only 20p lower than the viewing condition supported by the network in real time, the current network bandwidth is fully utilized, and the user experience degree reaches a higher level under the predictable condition; based on bandwidth data of a client, providing a method for generating a dynamic code rate in advance at a server and pushing the dynamic code rate to the client; compared with streaming media transmission with a fixed code rate at a server end, the method aims to further improve the watching quality of a user; the innovation point of the content is that the number of the code rates dynamically generated by the server side is determined, the code rate pushed to the client side is selected, and a time interval for dynamically generating the code rate is set, so that user experience can be improved.
As shown in fig. 2, the dynamic code rate generation process includes:
historical play data collection S1001: detecting that a client automatically or manually switches different playing code rates, and sending an initial data packet of the historical playing code rate to a server by the client;
data cleaning and classification S1002: based on the initial data packet of the historical playing code rate received by the server, after incomplete, error, redundancy or useless information in the data is removed or modified through preprocessing of the original data, the quality data is stored in a buffer area;
dynamic code rate generation S1003: based on the quality data in the buffer zone, generating a code rate set of the next stage according to the planned sending period through determining period processing, historical code rate clustering processing and code rate mapping processing.
The dynamic code rate generation processing adopted by the scheme comprises the following steps: historical play data collection, data cleaning and classification, and dynamic code rate generation, wherein the DRGA-HR algorithm is mainly divided into three parts: data collection, data cleaning and classified storage, and dynamic code rate generation, firstly, data collection: in order to collect the code rate information and duration time information of each client-side historical playing video as fast and accurately as possible, a historical playing code rate feedback collection module is arranged in each client-side, and the module immediately sends a piece of historical data to a server-side after detecting that the client-side automatically or manually switches different playing code rates; secondly, cleaning and classifying data, and storing: after the server collects the data returned by the historical playing code rate feedback collection module, the data of each client are cleaned and classified and then stored in a buffer queue. Data scrubbing refers to the process of preprocessing raw data to remove or modify incomplete, erroneous, redundant, or useless information in the data. This process is a very important part of data processing, as the quality of data directly affects the accuracy and reliability of the data analysis results. Since the algorithm involves feedback data of multiple channels and multiple clients, we need to classify the data according to the client ID and the source port of the corresponding channel to ensure that the dynamic code rate generated by each server corresponds to the specific channel accurately. Storing the classified data in a buffer queue; data cleaning refers to deleting data information with missing or error or redundancy in key fields; (2) Good data is the data with complete information of each field, and bad data is the data with missing or error; (3) Data cleansing typically does not involve algorithms in the traditional sense, but rather a set of data processing techniques and methods that aim to prepare data for subsequent analysis or training of machine learning models. The goal of data cleansing and preprocessing is to ensure data quality so that it can be effectively used for analysis or modeling, rather than directly related to algorithms. Finally, generating a dynamic code rate: in order to ensure that the code rate generated by the server end is more fit with the network bandwidth state of the current online client end, the dynamic code rate generator executes code rate generation according to a planned period, takes data stored in each buffer area queue as input parameters, and finally obtains a code rate set to be generated in the next stage through determining the period, historical code rate clustering and code rate mapping.
The determining period processing includes:
setting a maximum received data amount as a data period:
if the initial data packet is received, the number of data is automatically increased, whether the number of data exceeds the maximum received data amount is judged, and if the number of data exceeds the maximum received data amount, historical code rate clustering processing is performed.
The method adopts the determination period to process, and comprises the following steps: setting a maximum received data amount as a data period: if the initial data packet is received, the number of data is increased automatically, whether the number of data exceeds the maximum received data amount is judged, and if the number of data exceeds the maximum received data amount, historical code rate clustering processing is performed; because the period is determined, the current stage provides the client with two modes of periodic execution; the first implementation mode is as follows: according to the number of the collected data as a period, the dynamic code rate generation module executes a historical code rate clustering algorithm once every N pieces of data are collected, and the method is as follows: each time a piece of data is collected, the number of the collected data is accumulated, a historical code rate clustering algorithm is executed, a code rate set is generated, an algorithm result is output, and a counter is reset, wherein the first execution mode is characterized in that: the method adopts the number of data as a period, can ensure that the number of data samples of each clustering is fixed, has strong effect stability of data clustering, and can collect a fixed number of historical data in variable time.
The determining period processing further includes:
setting the longest value of the accumulated time of the continuous historical code rate as a data period:
if the initial data packet is received, accumulating the data duration, judging whether the data duration exceeds the longest value of accumulated time, and if so, entering into the historical code rate clustering processing.
The method adopting the determined period processing further comprises the following steps: setting the longest value of the accumulated time of the continuous historical code rate as a data period: if an initial data packet is received, accumulating the data duration, judging whether the data duration exceeds the longest value of accumulated time, and if so, entering historical code rate clustering processing, wherein the second execution mode is as follows: according to the continuous accumulated time of the historical code rate as a period, after the dynamic code rate generation module collects data with the accumulated time length of Nmin, executing a historical code rate clustering algorithm by taking all the data collected in the Nmin as parameters, wherein the specific method comprises the following steps: each time a piece of data is collected, if the time length field of the data is greater than 0, adding the time length field into the accumulated time length, adding the data into a code rate data list, and if the accumulated time length reaches 5 minutes, or the accumulated time length does not exceed 5 minutes but reaches a time point of 5 minutes, executing a historical code rate clustering algorithm; meanwhile, judging to execute a historical code rate clustering algorithm once by using the code rate data list as a parameter, generating a code rate set, outputting an algorithm result, and resetting the accumulated time length and the code rate data list; if the end of the data stream is reached, the loop is exited. The mode adopts the accumulated duration of the continuous historical code rate as the period, can ensure that the time interval of each clustering is fixed, and has good effect stability of data clustering.
The period is the time interval for updating the dynamic code rate at the server side. Because the server side needs to dynamically generate code rate according to the real-time network condition of the user; for example, according to the period of taking the number of data bars=10, after the collection module of the client collects 10 pieces of available data, updating the code rate once; the pre-recommended code rate generated by the server side is 100p and 500p before, after 10 pieces of available data are received on the data collector, the server side immediately executes a historical code rate clustering algorithm once, and the generated code rate is 200p and 550p at this time. The newly generated code rate is pre-recommended to the client for selection.
The historical code rate clustering process comprises the following steps:
based on the duration time of the client and the network characteristics of the historical code rate, classifying the client through density clustering. The categorization of clients herein may be clients with the same network characteristics or clients with similar network characteristics.
The history code rate clustering processing method comprises the following steps: based on the network characteristics of the duration and the historical code rate of the client, classifying the clients with similar network characteristics through density clustering, and preprocessing the client data collected by the server, so that the duration and the historical code rate of each client for watching a certain channel are obtained. If there are a large number of clients, it takes a long time for the server side to calculate the code rate adapted for the next phase for each client individually. In a live broadcast scene, a great deal of loss is caused to the whole live broadcast process due to the calculation delay of the server side. However, network conditions between different clients have similar characteristics, so that the clients with similar network characteristics are classified into one type by adopting a clustering method, so that the calculation amount of the server is reduced. The method can reduce the calculation cost of the service end and improve the overall efficiency of the live broadcast service; when the historical code rate clustering algorithm is designed, a DBSCAN clustering algorithm is adopted to realize the main body function, and a clustering result is obtained. The density clustering method can be used for converging and classifying the data with the same, similar or similar network characteristics.
The density clustering process includes:
calculating a distance matrix between the data points;
calculating the local density of the client data through a local density function based on the distance matrix;
calculating local density contribution through a density contribution function based on the local density, and calculating a local density estimated value;
selecting a crowding degree threshold value in the local density, and determining to obtain a minimum sample number parameter;
based on the self-adaptive local density estimation value and the minimum sample number parameter, obtaining a clustering result of client classification through a standard density clustering algorithm;
the local density function is:
the d is the distance between the ith data point and other data points;
the dissolved_dist [ k ] is the kth small value of the distance between the ith data point and other data points;
the saidLocal density for data point i;
the density contribution function is:
the method adopts density clustering and local density functions and density contribution functions, and because DBSCAN is a density-based clustering algorithm, data points with high density can be clustered together, and data points in a sparse area are used as noise points. Where density is defined as the number of other data points in the area around a data point, and where the number of data points in the neighborhood of radius epsilon is not less than MinPts, a data point is referred to as a core point and its density is defined as the number of data points in its neighborhood. Meanwhile, if the data point is a core point, all data points within epsilon distance belong to the same cluster; if it is not a core point, it is clustered with its neighbor points by other core points. While data points with low density are considered noise or boundary points; however, the clustering effect of the DBSCAN algorithm is determined by the neighborhood radius (eps) and the minimum number of samples (MinPts) these two parameters determine, so how to determine eps and MinPts becomes important. Because the number of clients in each clustering, the duration time of the collected clients and the data distribution of the historical code rate are different, the MinPts and Eps parameter values are required to be set in each clustering, the manual setting value is not feasible in each clustering, and a method for adaptively setting the MinPts and Eps parameter values according to a data set is adopted; the method introduces a local self-adaptive DBSCAN based on density, and can adaptively determine a neighborhood radius eps parameter and a minimum sample number MinPts parameter according to local density estimation of collected client data; the method comprises the following specific steps: (1) Calculating a distance matrix between data points, wherein dist matrix i][j]Representing the distance between the i-th data point and the j-th data point. (2) For each data point i, the distances from the data points are arranged in ascending order, and the kth distance value is selected, wherein k is the interval [0.05, 0.1]Is used for suppressing noise. The local density of the data point i is then estimated according to the following formula
(equation 1)
Where d represents the distance between the ith data point and the other data points, and dissolved_dist [ k ] represents the kth small value of the distance between the ith data point and the other data points. Here, a gaussian kernel function in the kernel density estimation is used. Specifically, for the distance d from the ith data point to the jth data point, we calculate the local density contribution between the two points using the following formula:
(equation 2)
Then adding all local density contributions and taking the reciprocal thereof as a local density estimation value of the data point i; (3) For a suitable confidence level (e.g., 95%), we choose to chooseLocal densityTop-congestion (herein top-5%) as the congestion level threshold +.>95. Then will->And (95) rounding upwards to obtain a minimum sample number parameter MinPts; (4) And (3) operating a standard DBSCAN algorithm by using the adaptive eps and MinPts parameters, and obtaining a clustering result.
The code rate mapping process includes:
calculating the generated code rate corresponding to each data point by generating a code rate expected value function based on the central point of each classification area of the clustering result;
the code rate expected value generating function is as follows:
the said j A central point of each classification area is the clustering result;
the saidGenerating code rate corresponding to each data point;
the n is the total number of data points.
Converging the center points of the classification areas to a set U, and generating a code rate set of the next stage;
the set U is as follows:
set u=
The saidFor each ofCenter points of the respective classification areas;
the set U is a code rate set;
the p is the total number of clusters of the data set U.
According to the scheme, code rate mapping processing and code rate expected value function generation are adopted, and as the result obtained through a historical code rate clustering algorithm only determines the code rate quantity to be generated by the media server, the finally presented recommended dynamic code rate set also needs to determine the code rate corresponding to each clustered cluster. Because the DBSCAN algorithm cannot obtain the center point of each classification area, a calculation and then a mapping process are required for the corresponding code rate value of each cluster. The data parameters used by the algorithm for clustering according to the historical code rate provided herein contain the historical code rate, so in order to make the code rate corresponding to each cluster adaptive and real, we extract the historical code rate field data values of the data points belonging to the same cluster respectively, and finally obtain a set u=And the set U is a code rate set to be generated by the server in the next time period.
Converging the center points of the classification areas to a set U, and generating a code rate set of the next stage;
the set U is as follows:
set u=
The saidA center point for each classification region;
and the set U is a code rate set.
The scheme adopts a central point of a convergence classification area to a set U, and generates a code rate set of the next stage; since the calculation is performed according to equation 3; assuming that the clustering algorithm clusters the data set W into P clusters, each cluster having N data points therein, and groups the data of the same cluster into one set, the data set W may be divided into(i=1,2,…,p),/>The data points also comprise the historical code rate corresponding to each data point>(j=1, 2, …, n), the generation code rate corresponding to each cluster is replaced by the expected data value of all the data points of the cluster, and the formula is as follows:
(equation 3)
Finally, a set u=And the set U is a code rate set to be generated by the server in the next time period.
As shown in fig. 3, the adaptive code rate selection process includes:
acquiring network condition information S2001: the client side periodically measures network bandwidth and determines the equipment performance of the current network speed; detecting network conditions of network delay and network packet loss rate;
setting an initial code rate S2002: in the initial playing period, the client selects an initial proper code rate according to the equipment performance and the network condition;
monitoring network condition changes S2003: monitoring the change states of the equipment performance and the network condition periodically or in real time;
dynamically adjusting the code rate S2004:
if the current network speed in the current data period is greater than the initial proper code rate, the current playing code rate is improved to the closest code rate recommended by the server side;
and if the current network speed in the current data period is smaller than the initial proper code rate, the current playing code rate is reduced to the closest code rate recommended by the server side.
The adaptive code rate selection processing adopted by the scheme comprises the following steps: acquiring network condition information, setting an initial code rate, monitoring network condition change, dynamically adjusting the code rate and the like, wherein the self-adaptive code rate selection processing comprises the following steps: the dynamic code rate self-adaption refers to adjusting the code rate of the audio and video stream in real time according to the current network condition and the equipment performance so as to provide better user experience; acquiring network condition information: the client periodically measures the network bandwidth and obtains the current network speed. Detecting the delay and the packet loss rate of the network at the same time; setting an initial code rate: when starting playing, the client can select an initial proper code rate according to the equipment performance and the network condition; monitoring network condition changes: monitoring changes in network conditions, including bandwidth, delay and packet loss rate, periodically or in real-time; dynamically adjusting the code rate: (1) a rate raising strategy: when the network condition is good, the client can try to raise the code rate so as to improve the video quality; (2) a rate reduction strategy: when the network condition is poor, the client can timely reduce the code rate so as to avoid blocking and buffering; smooth transition: fast and severe code rate switching is avoided so as not to cause discomfort of user experience. Using an exponentially weighted moving average to ensure smooth adjustment of the code rate; and (3) real-time monitoring: the client continuously monitors the network condition, responds to the change in time, and ensures that the dynamic code rate self-adaption can adapt to different network environments.
As shown in fig. 5, the server-side dynamic code rate generating and recommending network video application system is characterized by comprising:
the network video application system realizes the network video application method of any one of the above, and comprises a server side and a client side;
server side:
based on the received client history play video information, the server generates a code rate set which is required to be encoded at the server and meets logic expectations through processing of a dynamic code rate generation S1003, and the code rate set is referred to a client S101;
client side:
based on the received code rate set, the client selects a code rate more in line with the current network condition through adaptive code rate selection processing S102.
The scheme adopts a server-side dynamic code rate generation and recommendation network video application system, and the system comprises a server side and a client side. The client can select a more appropriate and optimal playing code rate according to the network bandwidth state when watching the video, the code rate switching times are reduced, the cache waiting time is shortened, and the user has better watching experience.
Embodiment one:
as shown in fig. 4, in the data collection, the initial data collected by the historical playing code rate feedback collection module includes field information shown in table 1:
table 1: initial data field information
In the data cleansing and classifying storage, the field information required to be stored in the buffer queue after data preprocessing is as shown in table 2:
table 2: storing field information
Working principle:
according to the scheme, the video information is played based on the received client history, the server generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server through dynamic code rate generation processing, and the code rate set is recommended to the client; based on a received code rate set, a client selects a code rate which better accords with the current network condition through self-adaptive code rate selection processing, and because the current research on video streaming code rate self-adaptation is concentrated on a dynamic code rate generation algorithm and a code rate self-adaptive selection algorithm of the client, the scheme provides a method for applying a DRGA-HR algorithm to a server, the DRGA-HR algorithm takes a client ID, a historical playing code rate and duration uploaded by each client according to a period through a dynamic code rate generator as input parameters, generates and outputs the code rate set which accords with logic expectation and needs to be encoded at the server through a series of calculation, and the server recommends the code rate set to the client for selection, so that the code rate selected by the client is better in accordance with the current network condition through the pre-recommendation of the code rate selection algorithm combined with the client self-adaptation, and the user watching effect is better; meanwhile, the code rate set is directly pushed to the client after being generated by the client, the client selects a proper code rate according to a code rate self-adaptive algorithm, the switching code rate does not need manual switching by the client, the client is embedded with a code rate self-adaptive algorithm to select according to the network bandwidth in real time, and if the current network bandwidth is insufficient to support the code rate, the client is automatically switched to another proper code rate; existing DASH technology: generating different code rate versions (such as 480p, 720p and 1080 p) with fixed number and definition for each segment for the client to select; since a recommended code rate version is generated in each period, for example, the generated code rates are 550p, 690p, 900p according to the historical data returned by the client in the first period, the code rates generated in the second period are 1050p, 1200p, etc., the code rate set and the code rate number generated in each time are dynamically generated by the data in one period according to the newly proposed algorithm, and the user viewing condition is under the network condition of 570p in the period of the first period: existing DASH technology: only 480p or 720p of the fixed code rate can be selected; selecting 480p causes network bandwidth waste, and video definition watched by users is poor, if selecting 720p, video playing is blocked, and user experience is reduced, and the invention: the 550p code rate generated and recommended by the server side can be selected, the definition is only 20p lower than the viewing condition supported by the network in real time, the current network bandwidth is fully utilized, and the user experience degree reaches a higher level under the predictable condition; based on bandwidth data of a client, providing a method for generating a dynamic code rate in advance at a server and pushing the dynamic code rate to the client; compared with streaming media transmission with a fixed code rate at a server end, the method aims to further improve the watching quality of a user; the innovation point of the content is that the number of the code rates dynamically generated by the server side is determined, the code rate pushed to the client side is selected, and a time interval for dynamically generating the code rate is set, so that the user experience is improved; the invention solves the problems that in the prior art, when streaming media is subjected to code rate self-adaptive playing, a server only provides code rate versions with fixed quantity and numerical value for a client to select, the current network condition of the client is supported between different code rates, if the downward compatibility causes the condition of bandwidth waste and poor video playing definition, and if the upward compatibility causes the condition of video playing clamping, the invention has the technical effects of improving the watching quality of users and improving the experience of the users. By using the technical scheme of the invention or under the inspired by the technical scheme of the invention, a similar technical scheme is designed by a person skilled in the art, so that the technical effects are achieved, and the technical scheme is considered to fall into the protection scope of the invention.

Claims (5)

1. The method for generating and recommending the network video application by the server side dynamic code rate is characterized by comprising the following steps:
based on the received client-side historical play video information, the server side generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server side through dynamic code rate generation processing, and recommends the code rate set to the client side;
based on the received code rate set, the client selects the code rate which is more in line with the current network condition through self-adaptive code rate selection processing;
the dynamic code rate generation process includes:
historical play data collection: detecting that a client automatically or manually switches different playing code rates, and sending an initial data packet of the historical playing code rate to a server by the client;
data cleaning and classification: based on the initial data packet of the historical playing code rate received by the server, after incomplete, error, redundancy or useless information in the data is removed or modified through preprocessing of the original data, the quality data is stored in a buffer area;
dynamic code rate generation: based on the quality data in the buffer zone, generating a code rate set of the next stage according to the planned sending period through determining period processing, historical code rate clustering processing and code rate mapping processing;
the determining period processing includes:
setting a maximum received data amount as a data period:
if the initial data packet is received, the number of data is increased automatically, whether the number of data exceeds the maximum received data amount is judged, and if the number of data exceeds the maximum received data amount, historical code rate clustering processing is performed;
the determining period processing further includes:
setting the longest value of the accumulated time of the continuous historical code rate as a data period:
if the initial data packet is received, accumulating the data duration, judging whether the data duration exceeds the longest value of accumulated time, and if so, entering into the historical code rate clustering process;
the historical code rate clustering process comprises the following steps:
classifying the clients with similar network characteristics through density clustering based on the duration time and the network characteristics of the historical code rate of the clients;
the density clustering process includes:
calculating a distance matrix between the data points;
calculating the local density of the client data through a local density function based on the distance matrix;
calculating local density contribution through a density contribution function based on the local density, and calculating a local density estimated value;
selecting a crowding degree threshold value in the local density, and determining to obtain a minimum sample number parameter;
based on the self-adaptive local density estimation value and the minimum sample number parameter, obtaining a clustering result of client classification through a standard density clustering algorithm;
the local density function is:
the d is the distance between the ith data point and other data points;
the dissolved_dist [ k ] is the kth small value of the distance between the ith data point and other data points;
the saidLocal density for data point i;
the density contribution function is:
2. the network video application method of claim 1, wherein:
the code rate mapping process includes:
calculating the generated code rate corresponding to each data point by generating a code rate expected value function based on the central point of each classification area of the clustering result;
the code rate expected value generating function is as follows:
the said j A central point of each classification area is the clustering result;
the saidGenerating code rate corresponding to each data point;
the n is the total number of data points.
3. The network video application method according to claim 2, wherein:
converging the center points of the classification areas to a set U, and generating a code rate set of the next stage;
the set U is as follows:
set u=
The saidA center point for each classification region;
the set U is a code rate set;
the p is the total number of clusters of the data set U.
4. The network video application method of claim 1, wherein:
the adaptive code rate selection process includes:
acquiring network condition information: the client side periodically measures network bandwidth and determines the equipment performance of the current network speed; detecting network conditions of network delay and network packet loss rate;
setting an initial code rate: in the initial playing period, the client selects an initial proper code rate according to the equipment performance and the network condition;
monitoring network condition changes: monitoring the change states of the equipment performance and the network condition periodically or in real time;
dynamically adjusting the code rate:
if the current network speed in the current data period is greater than the initial proper code rate, the current playing code rate is improved to the closest code rate recommended by the server side;
and if the current network speed in the current data period is smaller than the initial proper code rate, the current playing code rate is reduced to the closest code rate recommended by the server side.
5. The server-side dynamic code rate generation and recommendation network video application system is characterized by comprising the following steps:
the network video application system realizes the network video application method according to any one of claims 1 to 4, and comprises a server side and a client side;
server side:
based on the received client-side historical play video information, the server side generates and outputs a code rate set which accords with logic expectation and is needed to be encoded at the server side through dynamic code rate generation processing, and the code rate set is referred to the client side;
client side:
based on the received code rate set, the client selects the code rate which is more in line with the current network condition through self-adaptive code rate selection processing.
CN202410032790.5A 2024-01-10 2024-01-10 Method and system for generating and recommending network video application by server-side dynamic code rate Active CN117544809B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410032790.5A CN117544809B (en) 2024-01-10 2024-01-10 Method and system for generating and recommending network video application by server-side dynamic code rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410032790.5A CN117544809B (en) 2024-01-10 2024-01-10 Method and system for generating and recommending network video application by server-side dynamic code rate

Publications (2)

Publication Number Publication Date
CN117544809A CN117544809A (en) 2024-02-09
CN117544809B true CN117544809B (en) 2024-03-26

Family

ID=89794316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410032790.5A Active CN117544809B (en) 2024-01-10 2024-01-10 Method and system for generating and recommending network video application by server-side dynamic code rate

Country Status (1)

Country Link
CN (1) CN117544809B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108271048A (en) * 2018-02-09 2018-07-10 北京邮电大学 A kind of code check self-adapting adjusting apparatus and method for taking into account handling capacity and video buffer
CN109040855A (en) * 2018-09-03 2018-12-18 重庆邮电大学 A kind of wireless DASH streaming media bit rate smooth adaptive transmission method
CN115022684A (en) * 2022-05-27 2022-09-06 西安交通大学 Video stream self-adaptive transmission method based on deep reinforcement learning under QUIC protocol
CN115988267A (en) * 2022-12-20 2023-04-18 哈尔滨工业大学(深圳) DASH-based video code rate self-adaptive adjustment method and system
CN116962414A (en) * 2023-07-26 2023-10-27 北京理工大学 Self-adaptive video streaming transmission method and system based on server-free calculation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405319B (en) * 2020-03-31 2021-07-23 北京达佳互联信息技术有限公司 Bandwidth determination method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108271048A (en) * 2018-02-09 2018-07-10 北京邮电大学 A kind of code check self-adapting adjusting apparatus and method for taking into account handling capacity and video buffer
CN109040855A (en) * 2018-09-03 2018-12-18 重庆邮电大学 A kind of wireless DASH streaming media bit rate smooth adaptive transmission method
CN115022684A (en) * 2022-05-27 2022-09-06 西安交通大学 Video stream self-adaptive transmission method based on deep reinforcement learning under QUIC protocol
CN115988267A (en) * 2022-12-20 2023-04-18 哈尔滨工业大学(深圳) DASH-based video code rate self-adaptive adjustment method and system
CN116962414A (en) * 2023-07-26 2023-10-27 北京理工大学 Self-adaptive video streaming transmission method and system based on server-free calculation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于无线网络环境的手机视频码率自适应技术研究;臧伟;软件;20120415;第33卷(第04期);全文 *
臧伟.基于无线网络环境的手机视频码率自适应技术研究.软件.2012,第33卷(第04期),全文. *

Also Published As

Publication number Publication date
CN117544809A (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN109996087B (en) Code rate self-adaption method and device for live video broadcast based on finite state machine
CN104205769B (en) The DASH clients and receiver of the improvement selected using playback rate
CN101305612B (en) A multi-source and resilient video on demand streaming system for a peer-to-peer subscriber community
Kan et al. Deep reinforcement learning-based rate adaptation for adaptive 360-degree video streaming
CN110072130B (en) HTTP/2-based HAS video slice pushing method
WO2022037228A1 (en) Svc video transmission method based on intelligent edge, and intelligent edge
CN112437321B (en) Adaptive code rate calculation method based on live broadcast streaming media
CN111669617B (en) Live video stream transmission method based on intelligent edge
Tian et al. Deeplive: QoE optimization for live video streaming through deep reinforcement learning
Han et al. Cooperative server-client http adaptive streaming system for live video streaming
Wang et al. BitLat: Bitrate-adaptivity and latency-awareness algorithm for live video streaming
CN116017003A (en) Self-adaptive VR360 video-on-demand method and system based on multiple artificial intelligence methods
CN108810468B (en) Video transmission device and method for optimizing display effect
CN117544809B (en) Method and system for generating and recommending network video application by server-side dynamic code rate
Fu et al. 360hrl: Hierarchical reinforcement learning based rate adaptation for 360-degree video streaming
Villa et al. Improving fairness for adaptive HTTP video streaming
Wang et al. Hybrid control-based ABR: Towards low-delay live streaming
Liu et al. Reinforcement learning based dynamic adaptive video streaming for multi-client over NDN
Bezerra et al. DBuffer: A state machine oriented control system for DASH
Liu et al. Throughput Prediction-Enhanced RL for Low-Delay Video Application
CN114900706B (en) Live video stream transmission adaptive scheduling method based on extended video coding
Liu et al. Adaptive Live Streaming for Multi-user Access with Fairness Guarantee
WO2024116385A1 (en) Video player, video playback method, and program
Nguyen et al. QoE optimization for adaptive streaming with multiple VBR videos
Pang et al. CP-operated dash caching via reinforcement learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant