[go: up one dir, main page]

CN108111913B - Live video stream generation method and device and electronic equipment - Google Patents

Live video stream generation method and device and electronic equipment Download PDF

Info

Publication number
CN108111913B
CN108111913B CN201711406028.5A CN201711406028A CN108111913B CN 108111913 B CN108111913 B CN 108111913B CN 201711406028 A CN201711406028 A CN 201711406028A CN 108111913 B CN108111913 B CN 108111913B
Authority
CN
China
Prior art keywords
special effect
server
client
video special
video
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
CN201711406028.5A
Other languages
Chinese (zh)
Other versions
CN108111913A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201711406028.5A priority Critical patent/CN108111913B/en
Publication of CN108111913A publication Critical patent/CN108111913A/en
Application granted granted Critical
Publication of CN108111913B publication Critical patent/CN108111913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention provides a live video stream generation method and device and electronic equipment. The method comprises the following steps: the server side obtains the state parameters of the client side, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located; judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters to obtain a judgment result; sending the judgment result to the client; if the judgment result is that the video special effect is added by the server, receiving a to-be-processed video stream which is sent by the client and is not added with the video special effect; and adding the video special effect in the video stream to be processed to obtain a live video stream. According to the embodiment of the invention, the complex video special effect which is difficult to be added by the client in real time is delivered to the server for processing, so that the problem of large live broadcast delay caused by adding the video special effect is solved.

Description

Live video stream generation method and device and electronic equipment
Technical Field
The present invention relates to the field of multimedia content interaction technologies, and in particular, to a method and an apparatus for generating a live video stream, and an electronic device.
Background
The live video is one of emerging internet applications, and the spiritual entertainment requirements of the majority of users are met. The main stream video live broadcast mode is that a main broadcast distributes live broadcast video streams to a content distribution network in real time, and audiences download and watch the live broadcast video streams from the content distribution network. In order to enable viewers to obtain a better viewing experience, a main broadcast often adds a video special effect to a shot video stream to obtain a live video stream with the video special effect. In the prior art, the anchor utilizes a client device to perform the task of adding video effects.
However, the inventor finds that the prior art has at least the following problems in the process of implementing the invention:
when the algorithm complexity of the video special effect added in the video stream obtained by shooting by the anchor is high, the algorithm is limited by the performance of the client equipment, the task of adding the video special effect cannot be completed in real time, and a large live broadcast delay can be generated to influence the live broadcast effect.
Disclosure of Invention
The embodiment of the invention aims to provide a live video stream generation method, which is used for solving the problem of larger live broadcast delay caused by adding a video special effect in the prior art.
The specific technical scheme is as follows:
in a first aspect of an embodiment of the present invention, a method for generating a live video stream is provided, where the method includes:
the server side obtains the state parameters of the client side, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located;
the server judges whether the video special effect is added by the server or not by utilizing a preset execution decision maker according to the state parameters to obtain a judgment result, wherein the preset execution decision maker is established based on the state parameters of a plurality of sample clients, and whether the video special effect added by the server of the sample clients is known;
the server side sends the judgment result to the client side;
if the judgment result is that the video special effect is added by the server, the server receives the video stream to be processed which is sent by the client and is not added with the video special effect;
and adding the video special effect in the video stream to be processed to obtain a live video stream.
With reference to the first aspect, in a first possible implementation manner, the device performance parameter includes:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
With reference to the first aspect, in a second possible implementation manner, the state parameter further includes:
and the communication state parameter is used for representing the communication state between the server and the client.
With reference to the first aspect, in a third possible implementation manner, the determining, according to the state parameter and by using a preset execution decision device, whether to add the video special effect by the server includes:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000021
Figure BDA0001520342370000022
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level, x, that the video effect is not added by the serveriM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result; or,
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the server adds the video special effect.
With reference to the first aspect, in a fourth possible implementation manner, the determining, according to the state parameter and by using a preset execution decision maker, whether the video special effect is added by the server includes:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the server side equipment.
In a second aspect of the embodiments of the present invention, there is provided another live video stream generation method, where the method includes:
after receiving a video special effect adding instruction, a client sends a state parameter of the client to a server, wherein the state parameter comprises: the algorithm complexity corresponding to the video special effect and the current equipment performance parameter of the equipment where the client is located;
the client receives a judgment result which is sent by the server and indicates whether the server adds the video special effect or not, wherein the judgment result is determined by the server according to the state parameters and by using a preset execution decision device, the preset execution decision device is established based on the state parameters of a plurality of sample clients, and whether the video special effect added by the server of the sample clients is known or not is determined;
and if the judgment result is that the video special effect is added by the server, the client sends the video stream to be processed without the video special effect to the server.
With reference to the second aspect, in a first possible implementation manner, the method further includes:
and if the judgment result is that the video special effect is not added by the server, the client adds the video special effect in the video stream to be processed to obtain the live video stream.
In a third aspect of the embodiments of the present invention, there is provided another live video stream generation method, where the method includes:
after receiving a video special effect adding instruction, a client acquires state parameters of the client, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect and the current equipment performance parameters of the equipment where the client is located;
the client judges whether the video special effect is added by the server or not by utilizing a preset execution decision maker according to the state parameters to obtain a judgment result, wherein the preset execution decision maker is established based on the state parameters of a plurality of sample clients, and whether the video special effect is added by the server or not is known;
the client sends the judgment result to the server;
and if the judgment result is that the video special effect is added by the server, the client sends the video stream to be processed without the video special effect to the server.
With reference to the third aspect, in a first possible implementation manner, the device performance parameter includes:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
With reference to the third aspect, in a second possible implementation manner, the state parameter further includes:
and the communication state parameter is used for representing the communication state between the server and the client.
With reference to the third aspect, in a third possible implementation manner, the determining, by using a preset execution decision device according to the state parameter, whether to add the video special effect by the server includes:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000041
Figure BDA0001520342370000042
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level for not adding the video special effect by the server, xiM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result; or,
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the server adds the video special effect.
With reference to the third aspect, in a fourth possible implementation manner, the determining, according to the state parameter and by using a preset execution decision device, whether the video special effect is added by the server includes:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the equipment where the server side is positioned.
In a fourth aspect of the embodiments of the present invention, there is provided a live video stream generation apparatus, including:
a first parameter obtaining module, configured to obtain a state parameter of a client, where the state parameter includes: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located;
the first decision module is used for judging whether the video special effect is added by the server side or not by utilizing a preset execution decision device according to the parameters to obtain a judgment result, wherein the preset execution decision device is established based on the state parameters of a plurality of sample client sides, and whether the video special effect is added by the server side or not is known;
the first notification module is used for sending the judgment result to the client;
a first receiving module, configured to receive, if the determination result is that the server adds the video special effect, a to-be-processed video stream sent by the client without the video special effect added;
and the first special effect processing module is used for adding the video special effect in the video stream to be processed to obtain a live video stream.
With reference to the fourth aspect, in a first possible implementation manner, the device performance parameter includes:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
With reference to the fourth aspect, in a second possible implementation manner, the state parameter further includes:
and the communication state parameter is used for representing the communication state between the server and the client.
With reference to the fourth aspect, in a third possible implementation manner, the first decision module is specifically configured to:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000051
Figure BDA0001520342370000052
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level, x, that the video effect is not added by the serveriM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result; or,
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the server adds the video special effect.
With reference to the fourth aspect, in four possible implementation manners, the first decision module is specifically configured to:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the equipment where the server side is positioned.
In a fifth aspect of the embodiments of the present invention, there is provided another live video stream generation apparatus, including:
the parameter sending module is used for sending the state parameters of the client to the server after receiving the video special effect adding instruction, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect and the current equipment performance parameter of the equipment where the client is located;
a decision receiving module, configured to receive a determination result indicating whether the video special effect is added by the server or not, where the determination result is determined by the server according to the state parameter and using a preset execution decision device, where the preset execution decision device is created based on the state parameters of multiple sample clients, and it is known whether the video special effect is added by the server or not;
and the first stream pushing module is used for sending the video stream to be processed, to which the video special effect is not added, to the server side if the judgment result is that the video special effect is added by the server side.
With reference to the fifth aspect, in a first possible implementation manner, the method further includes:
and the second special effect processing module is used for adding the video special effect into the video stream to be processed to obtain the live video stream if the judgment result is that the video special effect is not added by the server side.
In a sixth aspect of the embodiments of the present invention, there is provided another live video stream generation apparatus, including:
the second parameter obtaining module is used for obtaining the state parameters of the client after the client receives the video special effect adding instruction, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect and the current equipment performance parameters of the equipment where the client is located;
the second decision module is used for judging whether the video special effect is added by the server side or not by utilizing a preset execution decision device according to the state parameters to obtain a judgment result, wherein the preset execution decision device is established based on the state parameters of a plurality of sample client sides, and whether the video special effect is added by the server side or not is known;
the second notification module is used for sending the judgment result to the server;
and the second stream pushing module is used for sending the processing video stream without the video special effect to the server side if the judgment result is that the server side adds the video special effect.
With reference to the sixth aspect, in a first possible implementation manner, the device performance parameter includes:
a capability parameter for indicating the arithmetic capability of the CPU and/or a parameter for indicating the remaining capacity.
With reference to the sixth aspect, in a second possible implementation manner, the state parameter further includes:
and the communication state parameter is used for representing the communication state between the server and the client.
With reference to the sixth aspect, in a third possible implementation manner, the second decision module is specifically configured to:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000071
Figure BDA0001520342370000072
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level, x, that the video effect is not added by the serveriM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result;
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the video special effect is added by the server.
With reference to the sixth aspect, in a fourth possible implementation manner, the second decision module is specifically configured to:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the equipment where the server side is positioned.
In a seventh aspect of the embodiments of the present invention, an electronic device is provided, which includes a first processor, a first communication interface, a first memory, and a first communication bus, where the first processor, the first communication interface, and the first memory complete communication with each other through the first communication bus;
a first memory for storing a computer program;
a first processor arranged to implement the method steps of any of claims 1 to 5 when executing the program stored in the first memory.
In an eighth aspect of the embodiments of the present invention, an electronic device is provided, which includes a second processor, a second communication interface, a second memory, and a second communication bus, where the second processor, the second communication interface, and the second memory complete communication with each other through the second communication bus;
a second memory for storing a computer program;
a second processor arranged to perform the method steps of any of claims 6 to 7 when executing the program stored in the second memory.
In a ninth aspect of the embodiments of the present invention, an electronic device is provided, including a third processor, a third communication interface, a third memory, and a third communication bus, where the third processor, the third communication interface, and the third memory complete communication with each other through the third communication bus;
a third memory for storing a computer program;
a third processor adapted to perform the method steps of any of claims 8-12 when executing the program stored in the third memory.
In a tenth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute any one of the live video stream generation methods described above.
In an eleventh aspect of the embodiments of the present invention, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-mentioned picture transmission methods.
According to the live video streaming method, the live video streaming device and the electronic equipment, whether the video special effect is added by the server side or not can be judged according to the state parameters of the client side by utilizing the preset execution decision device, the complex video special effect which is difficult to be added by the client side in real time can be delivered to the server side for processing, and the problem of larger live broadcast delay caused by adding the video special effect is solved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of a live video stream generation method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of a live video stream generation method according to an embodiment of the present invention;
fig. 3 is another schematic flow chart of a live video stream generation method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a live video stream generation apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a live video stream generation apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a live video stream generation apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a live video generation electronic device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another electronic device for generating live video according to an embodiment of the present invention;
fig. 9 is another schematic structural diagram of a live video generation electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a live video stream generation method according to an embodiment of the present invention, which may include the following steps:
s101, the server side obtains the state parameters of the client side, and the state parameters comprise: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located.
The video special effect to be added can be one or multiple, and the algorithm complexity is a numerical value used for expressing the amount of calculation required for realizing the video special effect to be added. The method comprises the steps of obtaining algorithm complexity corresponding to a video special effect to be added, wherein the algorithm complexity can be sent by a receiving client, or information of the video special effect to be added sent by the receiving client, and further determining the algorithm complexity according to the information. Illustratively, the server receives a code number of a video special effect to be added sent by the client, and determines the algorithm complexity corresponding to the code number according to the code number by using a preset code number-algorithm complexity corresponding relation. Similarly, the device performance parameter sent by the client may be received, or the current relevant information of the device where the client is located sent by the client may be received, and the server determines the device performance parameter according to the information.
S102, judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters to obtain a judgment result, wherein the preset execution decision maker is established based on the state parameters of a plurality of sample client sides, and whether the video special effect is added by the server side or not is known;
in this embodiment, the step of judging whether a sample client adds a video special effect by a server is to calculate the time from when the sample client starts to add the video special effect to when the server receives the video stream added with the video special effect by adding the video special effect by the sample client and sending the video stream added with the video special effect to the server. And if the time exceeds a preset acceptable delay threshold, the sample client is considered to be added with the video special effect by the server. And if the time does not exceed the preset acceptable delay threshold, the sample client is not considered to add the video special effect by the server.
It is understood that the execution decision maker can be regarded as a mapping relation between the state parameter of a client and whether the client adds a video special effect by the server. In this embodiment, the mapping relationship may be implemented by using a logistic regression model, or may be implemented by using a neural network model or other models in other implementation manners.
In this embodiment, the algorithm complexity corresponding to the video special effect to be added and the current device performance parameter of the device where the client is located may be input into the execution decision device, the execution decision device outputs the corresponding mapping value according to the preset mapping rule, and if the size of the mapping value meets the preset characteristic condition corresponding to the video special effect added by the server, it is determined that the video special effect is added by the server, or if the size of the mapping value meets the preset characteristic condition corresponding to the video special effect added by the client, it is determined that the video special effect is added by the server.
And S103, sending the judgment result to the client.
And S104, if the judgment result is that the video special effect is added by the server, receiving the to-be-processed video stream which is sent by the client and is not added with the video special effect.
And S105, adding the video special effect into the video stream to be processed to obtain a live video stream.
In this embodiment, after the video stream to be processed is decoded, corresponding video special effect processing is performed, and then the live video stream is obtained after re-encoding. It can be understood that the performance of the device where the server is located is stronger than that of the device where the client is located, so that the time consumption of the server is shorter than that of the client when the same video special effect processing is performed. To for
By adopting the embodiment, whether the video special effect is added by the server side can be determined according to the state parameters of the client side including the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client side is located through the preset execution decision maker, and the video special effect which is too complex for the performance of the equipment where the client side is located is processed by the server side with strong video special effect. The problem of large live broadcast delay caused by adding a video special effect is solved.
Referring to fig. 2, fig. 2 is another schematic flow chart of a live video stream generation method according to an embodiment of the present invention, which may include the following steps:
s201, after receiving the video special effect adding instruction, the client sends a state parameter of the client to the server, where the state parameter may include: the algorithm complexity corresponding to the video special effect and the current equipment performance parameters of the equipment where the client is located.
In an alternative implementation, the device performance parameters may include:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
It is understood that the device performance parameters may include both capability parameters and charge parameters, may include capability parameters without charge parameters, or may include charge parameters without capability parameters.
The capacity parameter may be determined according to the number of times that the CPU can perform floating-point number operations per second, or may be calculated according to a preset operation capacity score of the model of the CPU and a usage rate weighting of the current CPU. Illustratively, the CPU of a client device is type a, which is a CPU with relatively high performance, and the corresponding computation capability score is 0.9, and the current usage rate of the CPU is 10%, then the capability parameter of the client is 0.9 × (1-10%) -0.81. It can be understood that the stronger the computing power of the CPU, the shorter the time required for completing the addition of the video special effect, and thus the less the client needs to add the video special effect by the server.
The power parameter may be a percentage of the remaining power, or may be a value determined according to a range in which the percentage of the remaining power is located. For example, the charge parameter is 1 when the percentage of remaining charge is higher than 20%, and the charge parameter is 0 when the percentage of remaining charge is not higher than 20%. It can be understood that the addition of the video special effect by the client brings extra power consumption to the device where the client is located, and therefore when the remaining power of the device where the client is located is low, the video special effect can be added by the server in consideration of prolonging the service time of the device where the client is located.
In an optional implementation manner, the state parameter may further include:
and the communication state parameter is used for representing the communication state between the server and the client.
The communication state parameter may be determined according to a delay between the server and the client, or may be determined according to a network type (such as wifi, wired, 2G, and the like) used by the client, for example, when the client uses wifi to connect to the network, the communication state parameter may be 0.8 at the time because the network speed of wifi is usually faster, and when the client uses 2G to connect to the network, the communication state parameter may be 0.2 at the time because the network speed of 2G is usually slower.
It can be understood that when the communication state between the server and the client is poor, the data transmission rate between the client and the server is slow, which may bring a large delay to live video, and at this time, the server may add video to shorten the time consumed by adding video special effects, and make up for the live broadcast delay caused by the poor communication state.
S202, the server receives the state parameters of the client.
And S203, the server side takes the state parameters as model input, and calculates the mapping value corresponding to the client side by using a logistic regression model.
Specifically, in this embodiment, the mapping value corresponding to the client may be calculated by using a logistic regression model as shown below:
Figure BDA0001520342370000121
Figure BDA0001520342370000122
wherein, thetaiIs the ith preset model parameter of the logistic regression model, i is a positive integer, hθ(x) Confidence that video effects are not added by the server, xiAnd m is the ith model input, a preset threshold value and n is the number of the model inputs.
The model parameters are predetermined and can be created based on state parameters of a plurality of sample clients known to add video special effects by the server, that is, a preset execution decision maker is constructed.
Specifically, in the present embodiment, the initial values of the respective model parameters are first set manually empirically.
Then, the state parameters of each sample client are respectively used as model input, and the mapping value of each sample client is obtained. Calculating the score of the currently used model parameter according to the mapping value of each sample client according to the following formula:
Figure BDA0001520342370000131
where P is the score of the current model parameters, k is the number of sample clients, fiFor the calculated mapping value, r, of the ith sample client based on the current model parametersiThe result of manual judgment for showing whether the ith sample client adds the video special effect by the server or not is shown, and if the ith sample client adds the video special effect by the server, r isiIs 0, otherwise riIs 1.
And finally, continuously adjusting the model parameters, and calculating the scores of the adjusted model parameters until the scores of the adjusted model parameters are higher than a preset threshold value.
In an optional implementation manner, the server may use the state parameters and the load rate of the server device as model inputs, and calculate a mapping value corresponding to the client by using a preset logistic regression model.
The model parameters of the logistic regression model may be determined based on the state parameters of a plurality of sample clients known whether the video special effect is added by the server and the load rates of the corresponding sample servers. It can be understood that when the load rate of the server-side device is high, in order to avoid further increasing load pressure on the server-side device, the video special effect is added to the client side as much as possible within an allowable range.
By adopting the implementation mode, a better balance point can be found between the live broadcast delay and the load of the server-side equipment, so that the load of the server-side equipment is reduced and the calculation cost is saved on the premise that the live broadcast delay can be accepted.
S204, if the mapping value of the client is 0, determining that the judgment result is that the video special effect is added by the server, and if the mapping value of the client is 1, determining that the judgment result is that the video special effect is not added by the server.
It will be understood that hθ(x) The reliability of the video special effect is not added by the server, namely the reliability is calculated by the execution decision device according to the state parameters of the client, and if the reliability is judged manually, the result of the manual judgment is the probability that the video special effect is not added by the server. Thus when h isθ(x) And when the value is not less than the preset threshold value m (namely when the mapping value is 1), determining that the video special effect is not added by the server side according to the judgment result.
In the present embodiment, it is considered that when the degree of reliability of the video effect not added by the server is not lower than the degree of reliability of the video effect added by the server (i.e., h)θ(x)≥1-hθ(x) In this embodiment, the preset threshold m is 0.5, and in other implementation manners, m may also be adjusted according to actual requirements.
And S205, the server side sends the judgment result to the client side.
S206, the client receives the judgment result.
S207, if the judgment result is that the server adds the video special effect, the step S208 is executed, and if not, the step S210 is executed.
And S208, the client sends the to-be-processed video stream without the video special effect to the server.
S209, the server adds a video special effect in the video stream to be processed to obtain a live video stream.
S210, adding a video special effect in the video stream to be processed by the client to obtain the live video stream.
Referring to fig. 3, fig. 3 is another schematic flow chart of a live video stream generation method according to an embodiment of the present invention, which may include the following steps:
s301, after receiving the video special effect adding instruction, the client acquires the state parameters of the client, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located.
In an alternative implementation, the device performance parameters may include:
and the capacity parameter is used for expressing the operation capacity of the CPU and/or the electric quantity parameter is used for expressing the residual electric quantity.
In an optional implementation manner, the state parameter may further include:
and the communication state parameter is used for representing the communication state between the server and the client.
And S302, the client inputs the state parameters as models, and calculates the mapping values corresponding to the client by using a logistic regression model.
In an optional implementation manner, the mapping value corresponding to the client is calculated according to the following formula:
Figure BDA0001520342370000151
Figure BDA0001520342370000152
wherein, thetaiFor executing the ith preset model parameter of the decision maker, i is a positive integer, hθ(x) Confidence that video effects are not added by the server, xiM is a preset threshold value for the ith state parameter of the client;
in an optional implementation manner, whether a video special effect is added by the server side can be judged by using a preset execution decision maker according to the state parameter and the load rate of the device where the server side is located.
S303, if the mapping value of the client is 0, determining that the judgment result is that the video special effect is added by the server, and if the mapping value of the client is 1, determining that the judgment result is that the video special effect is not added by the server.
And S304, sending the judgment result to the server.
S305, the server receives the determination result.
S306, if the judgment result is that the server adds the video special effect, step 307 is executed, otherwise, step 309 is executed.
S307, the client sends the video stream to be processed without the video special effect to the server.
And S308, adding the video special effect in the video stream to be processed by the server side to obtain the live video stream.
S309, the client adds the video special effect in the video stream to be processed to obtain the live video stream.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a live video stream generating apparatus according to an embodiment of the present invention, where the apparatus may include:
a first parameter obtaining module 401, configured to obtain a state parameter of a client, where the state parameter includes: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located;
a first decision module 402, configured to determine, according to the state parameters, whether to add a video special effect by the server by using a preset execution decision unit, so as to obtain a determination result, where the preset execution decision unit is created based on the state parameters of multiple sample clients that are known whether to add a video special effect by the server;
a first notification module 403, configured to send the determination result to the client;
a first receiving module 404, configured to receive a to-be-processed video stream sent by a client without adding a video special effect if the determination result is that the video special effect is added by the server;
the first special effect processing module 405 is configured to add a video special effect to a video stream to be processed to obtain a live video stream.
In an alternative implementation, the device performance parameters may include:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
In an optional implementation manner, the state parameter may further include:
and the communication state parameter is used for representing the communication state between the server and the client.
In an alternative implementation manner, the first decision module 402 may be specifically configured to:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000161
Figure BDA0001520342370000162
wherein, thetaiFor executing the ith preset model parameter of the decision maker, i is a positive integer, hθ(x) Confidence that video effects are not added by the server, xiM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the judgment result is that the video special effect is not added by the server;
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the video special effect is added by the server.
In an alternative implementation manner, the first decision module 402 may be specifically configured to:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters and the load rate of the server side equipment.
Referring to fig. 5, fig. 5 is a schematic structural diagram of another live video stream generation apparatus according to an embodiment of the present invention, which may include:
the parameter sending module 501 is configured to send a client state parameter to the server after receiving the video special effect adding instruction, where the state parameter includes: the algorithm complexity corresponding to the video special effect and the current equipment performance parameters of the equipment where the client is located;
a decision receiving module 502, configured to receive a determination result indicating whether a video special effect is added by a server or not, where the determination result is determined by the server according to a state parameter and using a preset execution decision device, where the preset execution decision device is created based on the state parameters of multiple sample clients, and it is known whether the video special effect is added by the server or not;
the first stream pushing module 503 is configured to send the to-be-processed video stream to the server side without adding the video special effect if the determination result is that the server side adds the video special effect.
In an optional implementation manner, the method may further include:
and a second special effect processing module 504, configured to add a video special effect to the to-be-processed video stream if the determination result is that the video special effect is not added by the server, so as to obtain a live video stream.
Referring to fig. 6, fig. 6 is a schematic structural diagram of another video live stream generation apparatus according to an embodiment of the present invention, where the schematic structural diagram may include:
the second parameter obtaining module 601 is configured to, after the client receives the video special effect adding instruction, obtain a state parameter of the client, where the state parameter includes: the algorithm complexity corresponding to the video special effect and the current equipment performance parameters of the equipment where the client is located;
a second decision module 602, configured to determine, according to the state parameters, whether to add a video special effect by the server by using a preset execution decision device, so as to obtain a determination result, where the preset execution decision device is created based on the state parameters of multiple sample clients that are known whether to add a video special effect by the server;
the second notification module 603 is configured to send the determination result to the server;
and a second stream pushing module 604, configured to send the to-be-processed video stream to the server side without adding the video special effect if the determination result is that the server side adds the video special effect.
In an alternative implementation, the device performance parameters may include:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
In an optional implementation manner, the state parameter may further include:
and the communication state parameter is used for representing the communication state between the server and the client.
In an alternative implementation manner, the second decision module 602 may be specifically configured to:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000181
Figure BDA0001520342370000182
wherein, thetaiFor executing the ith preset model parameter of the decision maker, i is a positive integer, hθ(x) Confidence that video effects are not added by the server, xiM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the judgment result is that the video special effect is not added by the server;
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the video special effect is added by the server.
In an optional implementation manner, the second decision module 602 may be further specifically configured to:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters and the load rate of the equipment where the server side is positioned.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a first processor 701, a first communication interface 702, a first memory 703 and a first communication bus 704, where the first processor 701, the first communication interface 702, and the first memory 703 complete mutual communication through the first communication bus 704,
a first memory 703 for storing a computer program;
the first processor 701, when configured to execute the program stored in the first memory 703, may implement the following steps:
the server side obtains the state parameters of the client side, and the state parameters comprise: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located;
judging whether a video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters to obtain a judgment result, wherein the preset execution decision maker is established based on the state parameters of a plurality of sample client sides which know whether the video special effect is added by the server side or not;
sending the judgment result to the client;
if the judgment result is that the video special effect is added by the server, receiving the video stream to be processed which is sent by the client and is not added with the video special effect;
and adding a video special effect in the video stream to be processed to obtain the live video stream.
In an alternative implementation, the device performance parameters may include:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
In an optional implementation manner, the state parameter may further include:
and the communication state parameter is used for representing the communication state between the server and the client.
In an optional implementation manner, determining whether to add a video special effect by the server by using a preset execution decision device according to the state parameter may include:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000191
Figure BDA0001520342370000192
wherein, thetaiFor executing the ith preset model parameter of the decision maker, i is a positive integer, hθ(x) Trustworthiness of video effects not added by the serverDegree, xiM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the judgment result is that the video special effect is not added by the server;
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the video special effect is added by the server.
In an optional implementation manner, determining whether to add a video special effect by the server by using a preset execution decision device according to the state parameter may include:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters and the load rate of the server side equipment.
An electronic device is further provided in the embodiments of the present invention, as shown in fig. 8, and includes a second processor 801, a second communication interface 802, a second memory 803, and a second communication bus 804, where the second processor 801, the second communication interface 802, and the second memory 803 complete communication with each other through the second communication bus 804,
a second memory 803 for storing a computer program;
the second processor 801 is configured to, when executing the program stored in the second memory 803, implement the following steps:
after receiving the video special effect adding instruction, the client sends the state parameters of the client to the server, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect and the current equipment performance parameters of the equipment where the client is located;
receiving a judgment result which is sent by the server and indicates whether the video special effect is added by the server, wherein the judgment result is determined by the server according to the state parameters and by using a preset execution decision maker, and the preset execution decision maker is established based on the state parameters of a plurality of sample clients which know whether the video special effect is added by the server;
and if the judgment result is that the video special effect is added by the server, sending the to-be-processed video stream without the video special effect to the server.
In an optional implementation manner, the method may further include:
and if the judgment result is that the video special effect is not added by the server, adding the video special effect in the video stream to be processed to obtain the live video stream.
The embodiment of the present invention further provides an electronic device, as shown in fig. 9, which includes a third processor 901, a third communication interface 902, a third memory 903 and a third communication bus 904, where the third processor 801, the third communication interface 802 and the third memory 803 complete mutual communication through the third communication bus 904,
a third memory 903 for storing computer programs;
the third processor 901 is configured to implement the following steps when executing the program stored in the third memory 903:
after receiving the video special effect adding instruction, the client acquires the state parameters of the client, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect and the current equipment performance parameters of the equipment where the client is located;
judging whether a video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters to obtain a judgment result, wherein the preset execution decision maker is established based on the state parameters of a plurality of sample client sides which know whether the video special effect is added by the server side or not;
sending the judgment result to a server;
and if the judgment result is that the video special effect is added by the server, sending the to-be-processed video stream without the video special effect to the server.
In an alternative implementation, the device performance parameters may include:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
In an optional implementation manner, the state parameter may further include:
and the communication state parameter is used for representing the communication state between the server and the client.
In an optional implementation manner, determining whether to add a video special effect by a server by using a preset execution decision device according to a state parameter includes:
calculating a mapping value corresponding to the client according to the following formula:
Figure BDA0001520342370000211
Figure BDA0001520342370000221
wherein, thetaiFor executing the ith preset model parameter of the decision maker, i is a positive integer, hθ(x) Confidence that video effects are not added by the server, xiM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the judgment result is that the video special effect is not added by the server;
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the video special effect is added by the server.
In an optional implementation manner, determining whether to add a video special effect by the server by using a preset execution decision device according to the state parameter may include:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameters and the load rate of the equipment where the server side is positioned.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute any one of the live video stream generation methods in the foregoing embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the live video stream generation methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is to be understood that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments of the apparatus, the electronic device, the computer-readable storage medium, and the computer program product comprising instructions, which are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (27)

1. A live video stream generation method is characterized by comprising the following steps:
the server side obtains the state parameters of the client side, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located;
the server judges whether the video special effect is added by the server or not according to the state parameters by utilizing a preset execution decision maker to obtain a judgment result, the preset execution decision maker is established based on the state parameters of a plurality of sample clients, whether the video special effect is added by the server or not is known, and whether the video special effect is added by the server or not is determined by the following modes: adding a video special effect by the sample client and sending the video stream added with the video special effect to the server, calculating the time spent from the time when the sample client starts to add the video special effect to the time when the server receives the video stream added with the video special effect, if the time spent exceeds a preset acceptable delay threshold, determining that the sample client adds the video special effect by the server, and if the time spent does not exceed the preset acceptable delay threshold, determining that the sample client does not add the video special effect by the server;
the server side sends the judgment result to the client side;
if the judgment result is that the video special effect is added by the server, the server receives the video stream to be processed which is sent by the client and is not added with the video special effect;
and adding the video special effect in the video stream to be processed to obtain a live video stream.
2. The method of claim 1, wherein the device performance parameters comprise:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
3. The method of claim 1, wherein the status parameter further comprises:
and the communication state parameter is used for representing the communication state between the server and the client.
4. The method according to claim 1, wherein the determining whether the video special effect is added by the server by using a preset execution decision device according to the state parameter comprises:
calculating a mapping value corresponding to the client according to the following formula:
Figure FDA0003084045500000011
Figure FDA0003084045500000021
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level, x, that the video effect is not added by the serveriM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result; or,
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the server adds the video special effect.
5. The method according to claim 1, wherein the determining whether the video special effect is added by the server by using a preset execution decision device according to the state parameter comprises:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the equipment where the server side is positioned.
6. A live video stream generation method is characterized by comprising the following steps:
after receiving a video special effect adding instruction, a client sends a state parameter of the client to a server, wherein the state parameter comprises: the algorithm complexity corresponding to the video special effect and the current equipment performance parameter of the equipment where the client is located;
the client receives a judgment result which is sent by the server and indicates whether the server adds the video special effect, the judgment result is determined by the server according to the state parameters and by using a preset execution decision device, the preset execution decision device is established based on the state parameters of a plurality of sample clients, whether the sample clients add the video special effect by the server is known, and whether the sample clients add the video special effect by the server is determined by the following modes: adding a video special effect by the sample client and sending the video stream added with the video special effect to the server, calculating the time spent from the time when the sample client starts to add the video special effect to the time when the server receives the video stream added with the video special effect, if the time spent exceeds a preset acceptable delay threshold, determining that the sample client adds the video special effect by the server, and if the time spent does not exceed the preset acceptable delay threshold, determining that the sample client does not add the video special effect by the server;
and if the judgment result is that the video special effect is added by the server, the client sends the video stream to be processed without the video special effect to the server.
7. The method of claim 6, further comprising:
and if the judgment result is that the video special effect is not added by the server, the client adds the video special effect in the video stream to be processed to obtain the live video stream.
8. A live video stream generation method is characterized by comprising the following steps:
after receiving a video special effect adding instruction, a client acquires state parameters of the client, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect and the current equipment performance parameter of the equipment where the client is located;
the client judges whether the video special effect is added by the server or not according to the state parameters by utilizing a preset execution decision maker to obtain a judgment result, wherein the preset execution decision maker is established by the state parameters of a plurality of sample clients, whether the video special effect is added by the sample clients or not is known, and whether the video special effect is added by the server or not is determined by the following modes: adding a video special effect by the sample client and sending the video stream added with the video special effect to the server, calculating the time spent from the time when the sample client starts to add the video special effect to the time when the server receives the video stream added with the video special effect, if the time spent exceeds a preset acceptable delay threshold, determining that the sample client adds the video special effect by the server, and if the time spent does not exceed the preset acceptable delay threshold, determining that the sample client does not add the video special effect by the server;
the client sends the judgment result to the server;
and if the judgment result is that the video special effect is added by the server, the client sends the video stream to be processed without the video special effect to the server.
9. The method of claim 8, wherein the device performance parameters comprise:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
10. The method of claim 8, wherein the status parameter further comprises:
and the communication state parameter is used for representing the communication state between the server and the client.
11. The method according to claim 8, wherein the determining whether the video special effect is added by the server by using a preset execution decision device according to the state parameter comprises:
calculating a mapping value corresponding to the client according to the following formula:
Figure FDA0003084045500000041
Figure FDA0003084045500000042
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level, x, that the video effect is not added by the serveriM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result; or,
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the server adds the video special effect.
12. The method according to claim 8, wherein the determining whether the video special effect is added by the server by using a preset execution decision device according to the state parameter comprises:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the equipment where the server side is positioned.
13. A live video stream generation apparatus, comprising:
a first parameter obtaining module, configured to obtain a state parameter of a client, where the state parameter includes: the algorithm complexity corresponding to the video special effect to be added and the current equipment performance parameters of the equipment where the client is located;
a first decision module, configured to determine, according to the state parameter, whether to add the video special effect by a server by using a preset execution decision maker, to obtain a determination result, where the preset execution decision maker is created based on the state parameters of multiple sample clients, whether to add the video special effect by the server by the sample clients is known, and whether to add the video special effect by the server by the sample clients is determined in the following manner: adding a video special effect by the sample client and sending the video stream added with the video special effect to the server, calculating the time spent from the time when the sample client starts to add the video special effect to the time when the server receives the video stream added with the video special effect, if the time spent exceeds a preset acceptable delay threshold, determining that the sample client adds the video special effect by the server, and if the time spent does not exceed the preset acceptable delay threshold, determining that the sample client does not add the video special effect by the server;
the first notification module is used for sending the judgment result to the client;
a first receiving module, configured to receive, if the determination result is that the server adds the video special effect, a to-be-processed video stream sent by the client without the video special effect added;
and the first special effect processing module is used for adding the video special effect in the video stream to be processed to obtain a live video stream.
14. The apparatus of claim 13, wherein the device performance parameters comprise:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
15. The apparatus of claim 13, wherein the status parameter further comprises:
and the communication state parameter is used for representing the communication state between the server and the client.
16. The apparatus of claim 13, wherein the first decision module is specifically configured to:
calculating a mapping value corresponding to the client according to the following formula:
Figure FDA0003084045500000051
Figure FDA0003084045500000052
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level, x, that the video effect is not added by the serveriM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result; or,
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the server adds the video special effect.
17. The apparatus of claim 13, wherein the first decision module is specifically configured to:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the equipment where the server side is positioned.
18. A live video stream generation apparatus, comprising:
the parameter sending module is used for sending the state parameters of the client to the server after receiving the video special effect adding instruction, wherein the state parameters comprise: the algorithm complexity corresponding to the video special effect and the current equipment performance parameter of the equipment where the client is located;
a decision receiving module, configured to receive a determination result indicating whether the video special effect is added by the server or not, where the determination result is determined by the server according to the state parameter and using a preset execution decision device, where the preset execution decision device is created based on the state parameters of multiple sample clients, and whether the video special effect is added by the server or not is known, and whether the video special effect is added by the server or not is determined by the sample clients according to the following manners: adding a video special effect by the sample client and sending the video stream added with the video special effect to the server, calculating the time spent from the time when the sample client starts to add the video special effect to the time when the server receives the video stream added with the video special effect, if the time spent exceeds a preset acceptable delay threshold, determining that the sample client adds the video special effect by the server, and if the time spent does not exceed the preset acceptable delay threshold, determining that the sample client does not add the video special effect by the server;
and the first stream pushing module is used for sending the video stream to be processed, to which the video special effect is not added, to the server side if the judgment result is that the video special effect is added by the server side.
19. The apparatus of claim 18, further comprising:
and the second special effect processing module is used for adding the video special effect into the video stream to be processed to obtain the live video stream if the judgment result is that the video special effect is not added by the server side.
20. A live video stream generation apparatus, comprising:
a second parameter obtaining module, configured to obtain a state parameter of the client after receiving the video special effect adding instruction, where the state parameter includes: the algorithm complexity corresponding to the video special effect and the current equipment performance parameter of the equipment where the client is located;
a second decision module, configured to determine, according to the state parameter, whether to add the video special effect by the server by using a preset execution decision device, to obtain a determination result, where the preset execution decision device is created based on the state parameters of multiple sample clients, and it is known whether to add the video special effect by the server for the sample clients, and whether to add the video special effect by the server for the sample clients is determined in the following manner: adding a video special effect by the sample client and sending the video stream added with the video special effect to the server, calculating the time spent from the time when the sample client starts to add the video special effect to the time when the server receives the video stream added with the video special effect, if the time spent exceeds a preset acceptable delay threshold, determining that the sample client adds the video special effect by the server, and if the time spent does not exceed the preset acceptable delay threshold, determining that the sample client does not add the video special effect by the server;
the second notification module is used for sending the judgment result to the server;
and the second stream pushing module is used for sending the video stream to be processed, to which the video special effect is not added, to the server side if the judgment result is that the video special effect is added by the server side.
21. The apparatus of claim 20, wherein the device performance parameters comprise:
a capability parameter for indicating the arithmetic capability of the CPU and/or a power parameter for indicating the remaining power.
22. The apparatus of claim 20, wherein the status parameter further comprises:
and the communication state parameter is used for representing the communication state between the server and the client.
23. The apparatus of claim 20, wherein the second decision module is specifically configured to:
calculating a mapping value corresponding to the client according to the following formula:
Figure FDA0003084045500000071
Figure FDA0003084045500000072
wherein, thetaiI is a positive integer, h is the ith preset model parameter of the execution decision deviceθ(x) Confidence level, x, that the video effect is not added by the serveriM is a preset threshold value for the ith state parameter of the client;
if the mapping value corresponding to the client is 1, determining that the video special effect is not added by the server side according to the judgment result; or,
and if the mapping value corresponding to the client is 0, determining that the judgment result is that the video special effect is added by the server.
24. The apparatus of claim 20, wherein the second decision module is specifically configured to:
and judging whether the video special effect is added by the server side or not by utilizing a preset execution decision maker according to the state parameter and the load rate of the equipment where the server side is positioned.
25. An electronic device is characterized by comprising a first processor, a first communication interface, a first memory and a first communication bus, wherein the first processor, the first communication interface and the first memory are used for completing communication with each other through the first communication bus;
a first memory for storing a computer program;
a first processor arranged to implement the method steps of any of claims 1 to 5 when executing the program stored in the first memory.
26. An electronic device is characterized by comprising a second processor, a second communication interface, a second memory and a second communication bus, wherein the second processor, the second communication interface and the second memory are communicated with each other through the second communication bus;
a second memory for storing a computer program;
a second processor arranged to perform the method steps of any of claims 6 to 7 when executing the program stored in the second memory.
27. An electronic device is characterized by comprising a third processor, a third communication interface, a third memory and a third communication bus, wherein the third processor, the third communication interface and the third memory complete mutual communication through the third communication bus;
a third memory for storing a computer program;
a third processor arranged to perform the method steps of any of claims 8 to 12 when executing the program stored in the memory.
CN201711406028.5A 2017-12-22 2017-12-22 Live video stream generation method and device and electronic equipment Active CN108111913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711406028.5A CN108111913B (en) 2017-12-22 2017-12-22 Live video stream generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711406028.5A CN108111913B (en) 2017-12-22 2017-12-22 Live video stream generation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108111913A CN108111913A (en) 2018-06-01
CN108111913B true CN108111913B (en) 2021-08-27

Family

ID=62212449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711406028.5A Active CN108111913B (en) 2017-12-22 2017-12-22 Live video stream generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108111913B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883857A (en) * 2021-09-27 2023-03-31 北京字跳网络技术有限公司 Live gift cloud rendering method and device, electronic equipment and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6832239B1 (en) * 2000-07-07 2004-12-14 International Business Machines Corporation Systems for managing network resources
US20020194609A1 (en) * 2001-06-18 2002-12-19 Tran Thanh T. Video client with dynamically allocable video buffer for efficiently streaming video
CN1859403B (en) * 2006-02-09 2010-05-12 华为技术有限公司 Method for Capability Negotiation in Client/Server Mode Service System
US8253732B2 (en) * 2008-01-03 2012-08-28 International Business Machines Corporation Method and system for remote visualization client acceleration
US8281307B2 (en) * 2009-06-01 2012-10-02 International Business Machines Corporation Virtual solution composition and deployment system and method
CN101662506B (en) * 2009-10-14 2013-01-16 中兴通讯股份有限公司 Load balancing method based on CPU kernel sharing and device thereof
CN102254292A (en) * 2010-05-20 2011-11-23 盛乐信息技术(上海)有限公司 Remote 3D instruction rendering system and method
US9258625B2 (en) * 2011-04-19 2016-02-09 Sensormatic Electronics, LLC Method and system for load balancing between a video server and client
CN102523107B (en) * 2011-12-02 2017-12-22 浙江鸿泉车联网有限公司 The method and device of balanced network management system service end and client computing pressure
US9357272B2 (en) * 2012-08-03 2016-05-31 Intel Corporation Device orientation capability exchange signaling and server adaptation of multimedia content in response to device orientation
CN103200350B (en) * 2013-03-29 2015-12-23 北京中科大洋科技发展股份有限公司 A kind of nonlinear cloud edit methods
CN105791148B (en) * 2014-12-26 2020-07-03 北大医疗信息技术有限公司 System and method for automatically balancing server load
CN104822047B (en) * 2015-04-16 2018-10-19 中国科学院上海技术物理研究所 One kind being based on network self-adapting medical image transmission display methods
CN106302477A (en) * 2016-08-18 2017-01-04 合网络技术(北京)有限公司 A kind of net cast method of testing and system

Also Published As

Publication number Publication date
CN108111913A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
US10659832B1 (en) Dynamic bitrate selection for streaming media
WO2017219589A1 (en) Method and system for processing program crash message
US20170302721A1 (en) Cloud streaming service system, cloud streaming service method using optimal GPU, and apparatus for same
US10440082B1 (en) Adjusting parameter settings for bitrate selection algorithms
CN106228388A (en) A kind of member user's behavior monitoring method, device and electronic equipment
CN105681823A (en) Method and device for transcoding video file online
CN111083483A (en) Video coding code rate determining method and device, electronic equipment and storage medium
CN111068305A (en) Cloud game loading control method and device, electronic equipment and storage medium
CN108111913B (en) Live video stream generation method and device and electronic equipment
CN113645477A (en) Live broadcast data processing method and device, live broadcast client equipment and storage medium
CN110248211B (en) Live broadcast room message current limiting method and device, electronic equipment and storage medium
CN117453997A (en) Content recommendation method and device, electronic equipment and storage medium
CN112402982B (en) User cheating behavior detection method and system based on machine learning
CN112684899A (en) Client operation control method and device, electronic equipment and computer readable medium
US20170171307A1 (en) Method and electronic apparatus for processing picture
CN113835905A (en) Message queue load balancing method and device, electronic equipment and medium
CN109788326B (en) Video resource pre-pushing method, device and system
CN106846033A (en) Data processing method, device and electronic equipment
CN110213621B (en) Bandwidth allocation method and device
CN117176988A (en) Video frame rate control method and device, electronic equipment and readable storage medium
CN117478935A (en) Streaming method, device, equipment and storage medium for streaming media data
CN111741335A (en) Data processing method and device, mobile terminal and computer readable storage medium
CN115842752A (en) Weak network processing method, device, equipment and storage medium
CN113645214B (en) Data detection method, device, electronic equipment and readable storage medium
CN112507216A (en) Data object recommendation method, device, equipment and storage medium

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