CN110971937B - Regulation and control method, storage medium, electronic device and system for screenshot service - Google Patents

Regulation and control method, storage medium, electronic device and system for screenshot service Download PDF

Info

Publication number
CN110971937B
CN110971937B CN201811163338.3A CN201811163338A CN110971937B CN 110971937 B CN110971937 B CN 110971937B CN 201811163338 A CN201811163338 A CN 201811163338A CN 110971937 B CN110971937 B CN 110971937B
Authority
CN
China
Prior art keywords
token bucket
resources
screenshot
client
resource
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
CN201811163338.3A
Other languages
Chinese (zh)
Other versions
CN110971937A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201811163338.3A priority Critical patent/CN110971937B/en
Publication of CN110971937A publication Critical patent/CN110971937A/en
Application granted granted Critical
Publication of CN110971937B publication Critical patent/CN110971937B/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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47205End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
    • 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/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • 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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • 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/2408Monitoring of the upstream path of the transmission network, e.g. client requests
    • 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/4334Recording operations
    • 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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4438Window management, e.g. event handling following interaction with the user interface

Landscapes

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

Abstract

The invention discloses a regulation and control method, a storage medium, electronic equipment and a system for screenshot service, which relate to the technical field of live broadcast room client sides, and the method comprises the following steps: monitoring the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side of the live broadcast room; when the residual flow resource is larger than a preset resource residual threshold or the screenshot failure rate is larger than a preset first failure threshold, reducing the total resource amount of the residual flow resource and reducing the subsequent resources distributed to the residual flow resource; and when the current limiting operation frequency is greater than a preset current limiting frequency threshold and the screenshot failure rate is less than a preset second failure threshold, increasing the total resource amount of the residual stream resources and increasing the resources subsequently distributed to the residual stream resources. The method and the system manage and control the distribution condition of the stream resources of the client of the live broadcast room, ensure the normal operation of the screenshot service and avoid influencing the normal operation of the client of the live broadcast room.

Description

Regulation and control method, storage medium, electronic device and system for screenshot service
Technical Field
The invention relates to the technical field of live broadcast room clients, in particular to a regulation and control method, a storage medium, electronic equipment and a system for screenshot service.
Background
With the development of live broadcasting, the content related to live broadcasting is more and more extensive, more and more people are watching the live broadcasting, in the live broadcasting process, a user often needs to capture a live broadcasting picture when watching a live broadcasting room, the capture service is different from a traditional capture mechanism of a mobile terminal, the traditional capture of the mobile terminal is to capture the picture displayed by the mobile terminal and capture part of the picture, and the capture service of the live broadcasting room is to send image data matched with the capture area to a client of the live broadcasting room by a server according to the capture area, namely the capture service needs the cooperation of the client of the live broadcasting room and the server;
therefore, in the implementation process of the existing live broadcast image screenshot service, the server crash condition caused by too much pressure of a live broadcast stream provider can occur, so that the screenshot service can not be smoothly performed, and even the live broadcast work can not normally operate;
therefore, a regulation and control method for screenshot service is urgently needed to solve the above problems.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a regulation and control method for screenshot service, which is used for managing and controlling the distribution condition of stream resources of a live broadcast room client, ensuring the normal operation of the screenshot service and avoiding influencing the normal operation of the live broadcast room client.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for regulating screenshot service, which includes the following steps:
monitoring the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side of the live broadcast room;
when the residual stream resource is larger than a preset resource residual threshold or the screenshot failure rate is larger than a preset first failure threshold, reducing the total resource amount of the residual stream resource and reducing the subsequent resources allocated to the residual stream resource;
when the current limiting operation frequency is greater than a preset current limiting frequency threshold and the screenshot failure rate is less than a preset second failure threshold, increasing the total resource amount of the residual stream resources and increasing the resources subsequently allocated to the residual stream resources; wherein the content of the first and second substances,
the stream resource is a resource in a data stream form which is distributed to the client by the server and is required for data transmission.
On the basis of the scheme, the method utilizes a token bucket algorithm to monitor the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast room client, and specifically comprises the following steps:
initializing token bucket size to S0Setting the size of the token bucket to be S (t) at the moment t, wherein the capacity of the token bucket represents the storage space of the stream resources of the client, and the tokens of the token bucket represent the stream resources of the client;
initial setting P into token bucket every second0The number of tokens put into the token bucket per second at the moment t is P (t);
monitoring the number of the remaining tokens in the token bucket, and recording as R (t);
when the number of tokens in the token bucket is zero, performing current limiting operation, and recording the current limiting times at t moment as I (t);
and recording the loss times of the pull loss per second at the time t as F (t).
In addition to the above, when time t, r (t) is greater than the resource remaining threshold, let S (t +1) be S (t) -r (t)/2 and P (t +1) be P (t) -r (t)/2;
and S (t +1) is the size of the token bucket at the moment of t +1, and P (t +1) is the number of tokens put into the token bucket per second at the moment of t + 1.
In addition to the above scheme, when time t, assuming that i (t) is greater than the current limit frequency threshold and f (t) is less than the second failure threshold, let S (t +1) become S (t) + i (t) and P (t +1) become S (t) + i (t);
and S (t +1) is the size of the token bucket at the moment of t +1, and I (t +1) is the current limiting times at the moment of t + 1.
In a second aspect, the present invention further provides a storage medium, where a computer program is stored, and when being executed by a processor, the computer program implements the regulation and control method for screenshot service of the first aspect.
In a third aspect, the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor implements the method for regulating and controlling screenshot service of the first aspect when executing the computer program.
In a fourth aspect, the present invention further provides a regulation and control system for screenshot service, including:
the live broadcast client monitoring unit is used for monitoring the residual stream resources, the current limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast room client;
the first regulating unit is used for reducing the total resource amount of the residual stream resources and reducing the resources subsequently distributed to the residual stream resources when the residual stream resources are larger than a preset resource residual threshold or the screenshot failure rate is larger than a preset first failure threshold;
a second regulating unit, configured to increase a total amount of resources of the remaining stream resources and increase resources subsequently allocated to the remaining stream resources when the current limiting operation frequency is greater than a preset current limiting frequency threshold and the screen capture failure rate is less than a preset second failure threshold; wherein the content of the first and second substances,
the stream resource is a resource in a data stream form which is distributed to the client by the server and is required for data transmission.
On the basis of the technical scheme, the live broadcast client monitoring unit monitors the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast room client by using a token bucket algorithm, and specifically comprises the following steps:
initializing token bucket size to S0Setting the size of the token bucket to be S (t) at the moment t, wherein the capacity of the token bucket represents the storage space of the stream resources of the client, and the tokens of the token bucket represent the stream resources of the client;
initial setting P into token bucket every second0The number of tokens put into the token bucket per second at the moment t is P (t);
monitoring the number of the remaining tokens in the token bucket, and recording as R (t);
when the number of tokens in the token bucket is zero, performing current limiting operation, and recording the current limiting times at t moment as I (t);
and recording the loss times of the pull loss per second at the time t as F (t).
Compared with the prior art, the invention has the advantages that:
the method and the system manage and control the distribution condition of the stream resources of the client of the live broadcast room, ensure the normal operation of the screenshot service and avoid influencing the normal operation of the client of the live broadcast room.
Drawings
Fig. 1 is a flowchart illustrating steps of a regulation and control method for screenshot service according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of an online live broadcast according to an embodiment of the present invention;
fig. 3 is a block diagram of a regulation and control system for screenshot service according to a second embodiment of the present invention;
in the figure: 1. a live broadcast client monitoring unit; 2. a first regulation unit; 3. a second regulatory unit.
Detailed Description
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
The embodiment of the invention provides a regulation and control method, a storage medium, electronic equipment and a system for screenshot service.
In order to achieve the technical effects, the general idea of the application is as follows:
a regulation and control method for screenshot service comprises the following steps:
s1, monitoring the residual stream resources, the current limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side in the live broadcast;
s2, when the residual flow resource is larger than the preset resource residual threshold or the screenshot failure rate is larger than the preset first failure threshold, reducing the total resource amount of the residual flow resource and reducing the subsequent resource distributed to the residual flow resource;
and S3, when the current limiting operation frequency is greater than the preset current limiting frequency threshold and the screenshot failure rate is less than the preset second failure threshold, increasing the total resource amount of the residual stream resources and increasing the resources subsequently distributed to the residual stream resources.
Example one
Referring to fig. 1, an embodiment of the present invention provides a regulation and control method for screenshot service, including the following steps:
s1, monitoring the residual stream resources, the current limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side in the live broadcast;
s2, when the residual flow resource is larger than the preset resource residual threshold or the screenshot failure rate is larger than the preset first failure threshold, reducing the total resource amount of the residual flow resource and reducing the subsequent resource distributed to the residual flow resource;
and S3, when the current limiting operation frequency is greater than the preset current limiting frequency threshold and the screenshot failure rate is less than the preset second failure threshold, increasing the total resource amount of the residual stream resources and increasing the resources subsequently distributed to the residual stream resources.
It should be noted that the stream resource is a resource in a data stream form that is allocated to the client by the server and is required for data transmission;
in addition, the current limiting operation is specifically that the residual stream resources of the live broadcast room client are zero, and the subsequent operation needing to use the residual stream resources is directly returned.
In the embodiment of the invention, the distribution condition of the stream resources of the live broadcast room client is controlled based on the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast room client, so that the normal operation of the screenshot service is ensured, and the influence on the normal operation of the live broadcast room client is avoided.
In the embodiment of the invention, because the screenshot service of the live broadcast room is essentially different from the traditional mobile phone screenshot service operation, the screenshot service of the live broadcast room is that the server sends the image resource corresponding to the area to the client according to the screenshot area of the client so as to finish screenshot, the screenshot service of the live broadcast room occupies the stream resource of the client of the live broadcast room, and further the server further distributes the stream resource to the client of the live broadcast room so as to facilitate the normal work of the client of the live broadcast room, thereby finally bringing a certain burden to the work of the server,
therefore, in the embodiment of the present invention, in step S1, the remaining stream resources, the current limiting operation frequency, the screenshot frequency, and the screenshot failure rate of the live broadcast room client are monitored, and when the conditions allow, real-time monitoring is performed, so as to know the stream resource usage of the live broadcast room client and facilitate later adjustment;
in actual monitoring, a monitoring method based on a token bucket algorithm is provided, namely, the token bucket algorithm is used for monitoring the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side of the live broadcast room, and the method specifically comprises the following steps:
a1, initializing token bucket size to S0Setting the size of a token bucket at the moment t as S (t), wherein the capacity of the token bucket represents the storage space of the stream resources of the client, and the token of the token bucket represents the stream resources of the client;
a2, initially setting P to be put into token bucket per second0The number of tokens put into the token bucket per second at the moment t is P (t);
a3, monitoring the number of the remaining tokens in the token bucket, and recording as R (t);
a4, when the number of tokens in the token bucket is zero, performing current limiting operation, and recording the current limiting times at t moment as I (t);
a5, recording the loss frequency of the pull loss per second at the time t, and recording the loss frequency as F (t);
the token bucket algorithm is an existing algorithm, and has certain reliability for monitoring the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side of the live broadcast room;
it should be noted that P is put into the token bucket every second0A token representing the amount of streaming resources allocated to the live broadcast room client per second;
in addition, the current limiting operation is specifically that the remaining stream resources of the live broadcast room client are zero, that is, the number of tokens in the token bucket is 0, and the subsequent operation requiring the use of the remaining stream resources is directly performed with a return operation.
It should be noted that the token bucket algorithm is one of the most commonly used algorithms in network Traffic Shaping (Traffic Shaping) and Rate Limiting (Rate Limiting);
typically, token bucket algorithms are used to control the amount of data sent onto the network and to allow the transmission of bursts of data.
In step S2, in the embodiment of the present invention, when the remaining streaming resource is greater than the preset resource remaining threshold or the screenshot failure rate is greater than the preset first failure threshold, the total amount of the remaining streaming resource is reduced and the subsequent resources allocated to the remaining streaming resource are reduced,
if the residual stream resources are greater than the preset resource residual threshold, it is indicated that the amount of the residual stream resources of the live broadcast room client is enough to maintain the normal operation of the live broadcast room client, and even exceeds the requirement of normal work, so that in order to save the amount of the stream resources, the total amount of the resources of the residual stream resources can be properly reduced, and the resources subsequently allocated to the residual stream resources can be reduced;
when the screenshot failure rate is greater than the preset first failure threshold, the network environment of the client of the live broadcast room is possibly poor, so that stream resources are added and allocated to the client, resource waste is substantially caused, and the pressure of the server is increased, so that the total amount of the resources of the residual stream resources is also properly reduced, and the resources subsequently allocated to the residual stream resources are also reduced;
in an embodiment of the present invention, in response to the monitoring method based on the token bucket algorithm, when time t, r (t) is greater than the resource remaining threshold, S (t +1) ═ S (t) -r (t)/2 and P (t +1) ═ P (t) -r (t) (/ 2);
s (t +1) is the size of the token bucket at the moment of t +1, and P (t +1) is the number of tokens put into the token bucket per second at the moment of t + 1;
when f (t) is greater than the first failure threshold at time t, let S (t +1) be S (t)/2 and P (t +1) be P (t)/2;
s (t +1) is the size of the token bucket at the moment t +1, and P (t +1) is the number of tokens put into the token bucket per second at the moment t + 1.
Further in step S3, when the current limiting operation frequency is greater than the preset current limiting frequency threshold and the screenshot failure rate is less than the preset second failure threshold, increasing the total amount of resources of the remaining stream resources and increasing subsequent resources allocated to the remaining stream resources;
when the current limiting operation is frequent and the current limiting operation frequency is high, it is symbolized that the screenshot operation is not failed due to a network problem at the moment, but the total amount of the resources of the residual stream resources is increased, the resources subsequently distributed to the residual stream resources are increased, the number of the stream resources of the client side in the live broadcast room is increased, and the smooth operation of the client side is ensured;
in an embodiment of the present invention, in response to the monitoring method based on the token bucket algorithm, when time t, assuming that i (t) is greater than the current limit frequency threshold and f (t) is less than the second failure threshold, S (t +1) ═ S (t) + i (t) and P (t +1) ═ S (t) + i (t);
s (t +1) is the size of the token bucket at the moment t +1, and I (t +1) is the current limiting times at the moment t + 1.
Based on the same inventive concept, the application provides an embodiment of a regulation and control system for screenshot service corresponding to the first embodiment, which is detailed in the second embodiment
Example two
As shown in fig. 3, a second embodiment of the present invention provides a regulation and control system for screenshot service, which includes:
a live broadcast client monitoring unit 1, configured to monitor remaining stream resources, a current limiting operation frequency, a screenshot frequency, and a screenshot failure rate of a live broadcast room client;
the first regulating and controlling unit 2 is configured to reduce the total amount of resources of the remaining stream resources and reduce resources subsequently allocated to the remaining stream resources when the remaining stream resources are greater than a preset resource remaining threshold or a screenshot failure rate is greater than a preset first failure threshold;
and the second regulating and controlling unit 3 is configured to increase the total amount of resources of the remaining stream resources and increase resources subsequently allocated to the remaining stream resources when the current limiting operation frequency is greater than the preset current limiting frequency threshold and the screen capture failure rate is less than the preset second failure threshold.
In the embodiment of the invention, the distribution condition of the stream resources of the live broadcast room client is controlled based on the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast room client, so that the normal operation of the screenshot service is ensured, and the influence on the normal operation of the live broadcast room client is avoided.
The stream resource is a resource in the form of a data stream that is allocated by the server to the client for data transmission.
In the embodiment of the invention, because the live broadcast screenshot service is essentially different from the traditional mobile phone screenshot service operation, the live broadcast screenshot service is to send the image resource corresponding to the area to the client by the server according to the area of the client screenshot so as to complete screenshot, the live broadcast screenshot service occupies the stream resource of the live broadcast client, and further enables the server to further distribute the stream resource to the live broadcast client so as to facilitate the normal work of the live broadcast client, and finally brings a certain burden to the work of the server.
Therefore, in the embodiment of the invention, when the live broadcast client monitoring unit 1 works, the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast client are monitored, and when the conditions allow, the real-time monitoring is carried out, so that the use condition of the stream resources of the live broadcast client can be known, and the adjustment in the later period is facilitated;
when the live broadcast client monitoring unit 1 actually monitors, a monitoring method based on a token bucket algorithm is used, namely, the token bucket algorithm is used for monitoring the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast client, and the method specifically comprises the following steps:
a1, initializing token bucket size to S0Setting the size of a token bucket at the moment t as S (t), wherein the capacity of the token bucket represents the storage space of the stream resources of the client, and the token of the token bucket represents the stream resources of the client;
a2, initially setting P to be put into token bucket per second0The number of tokens put into the token bucket per second at the moment t is P (t);
a3, monitoring the number of the remaining tokens in the token bucket, and recording as R (t);
a4, when the number of tokens in the token bucket is zero, performing current limiting operation, and recording the current limiting times at t moment as I (t);
a5, recording the loss frequency of the pull loss per second at the time t, and recording the loss frequency as F (t);
the token bucket algorithm is an existing algorithm, and has certain reliability for monitoring the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side of the live broadcast room;
it should be noted that P is put into the token bucket every second0And a token indicating the amount of streaming resources allocated to the live-air client per second.
In the embodiment of the invention, when the first regulation and control unit 2 works and the residual flow resource is larger than the preset resource residual threshold or the screenshot failure rate is larger than the preset first failure threshold, the total resource amount of the residual flow resource is reduced and the subsequent resource distributed to the residual flow resource is reduced,
if the residual stream resources are greater than the preset resource residual threshold, it is indicated that the amount of the residual stream resources of the live broadcast room client is enough to maintain the normal operation of the live broadcast room client, and even exceeds the requirement of normal work, so that in order to save the amount of the stream resources, the total amount of the resources of the residual stream resources can be properly reduced, and the resources subsequently allocated to the residual stream resources can be reduced;
when the screenshot failure rate is greater than the preset first failure threshold, the network environment of the client of the live broadcast room is possibly poor, so that stream resources are added and allocated to the client, resource waste is substantially caused, and the pressure of the server is increased, so that the total amount of the resources of the residual stream resources is also properly reduced, and the resources subsequently allocated to the residual stream resources are also reduced;
in an embodiment of the present invention, the first control unit 2 corresponds to the monitoring method based on the token bucket algorithm, and when time t, r (t) is greater than the resource remaining threshold, the first control unit makes S (t +1) equal to S (t) -r (t)/2 and P (t +1) equal to P (t) -r (t)/2;
s (t +1) is the size of the token bucket at the moment of t +1, and P (t +1) is the number of tokens put into the token bucket per second at the moment of t + 1;
when f (t) is greater than the first failure threshold at time t, let S (t +1) be S (t)/2 and P (t +1) be P (t)/2;
s (t +1) is the size of the token bucket at the moment t +1, and P (t +1) is the number of tokens put into the token bucket per second at the moment t + 1.
When the second regulation and control unit 3 works, when the current-limiting operation frequency is greater than the preset current-limiting frequency threshold and the screenshot failure rate is less than the preset second failure threshold, the total amount of resources of the remaining stream resources is increased and the resources subsequently allocated to the remaining stream resources are increased;
when the current limiting operation is frequent and the current limiting operation frequency is high, it is symbolized that the screenshot operation is not failed due to a network problem at the moment, but the total amount of the resources of the residual stream resources is increased, the resources subsequently distributed to the residual stream resources are increased, the number of the stream resources of the client side in the live broadcast room is increased, and the smooth operation of the client side is ensured;
in an embodiment of the present invention, the second control unit 3 corresponds to the monitoring method based on the token bucket algorithm, and when the time t is, assuming that i (t) is greater than the current limit frequency threshold and f (t) is less than the second failure threshold, let S (t +1) ═ S (t) + i (t) and P (t +1) ═ S (t) + i (t);
s (t +1) is the size of the token bucket at the moment t +1, and I (t +1) is the current limiting times at the moment t + 1.
Based on the same inventive concept, the present application provides an embodiment of a storage medium corresponding to the embodiment described in the third embodiment
EXAMPLE III
A third embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out all or part of the method steps of the first embodiment.
The present invention can implement all or part of the processes in the first to third embodiments, and can also be implemented by using a computer program to instruct related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
Based on the same inventive concept, the present application provides an embodiment of an electronic device corresponding to the first embodiment, which is detailed in the fourth embodiment
Example four
The fourth embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the first embodiment.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, server, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), servers and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. A regulation and control method for screenshot service is characterized by comprising the following steps:
monitoring the residual stream resources, the current-limiting operation frequency, the screenshot frequency and the screenshot failure rate of the client side of the live broadcast room;
when the residual stream resource is larger than a preset resource residual threshold or the screenshot failure rate is larger than a preset first failure threshold, reducing the total resource amount of the residual stream resource and reducing the subsequent resources allocated to the residual stream resource;
when the current limiting operation frequency is greater than a preset current limiting frequency threshold and the screenshot failure rate is less than a preset second failure threshold, increasing the total resource amount of the residual stream resources and increasing the resources subsequently allocated to the residual stream resources; wherein the content of the first and second substances,
the stream resource is a resource in a data stream form which is distributed to the client by the server and is required for data transmission.
2. The method of claim 1, wherein: the method comprises the following steps of monitoring the residual stream resources, the current limiting operation frequency, the screenshot frequency and the screenshot failure rate of a live broadcast room client by using a token bucket algorithm, and specifically comprising the following steps:
initializing token bucket size to S0Setting the size of the token bucket to be S (t) at the moment t, wherein the capacity of the token bucket represents the storage space of the stream resources of the client, and the tokens of the token bucket represent the stream resources of the client;
initialSetting P into the token bucket per second0The number of tokens put into the token bucket per second at the moment t is P (t);
monitoring the number of the remaining tokens in the token bucket, and recording as R (t);
when the number of tokens in the token bucket is zero, performing current limiting operation, and recording the current limiting times at t moment as I (t);
and recording the loss times of the pull loss per second at the time t as F (t).
3. The method of claim 2, wherein: when r (t) is greater than the resource remaining threshold at time t, let S (t +1) be S (t) -r (t)/2 and P (t +1) be P (t) -r (t)/2;
and S (t +1) is the size of the token bucket at the moment of t +1, and P (t +1) is the number of tokens put into the token bucket per second at the moment of t + 1.
4. The method of claim 2, wherein: when f (t) is greater than the first failure threshold at time t, let S (t +1) be S (t)/2 and P (t +1) be P (t)/2;
and S (t +1) is the size of the token bucket at the moment of t +1, and P (t +1) is the number of tokens put into the token bucket per second at the moment of t + 1.
5. The method of claim 2, wherein: when time t, assuming that i (t) is greater than the current limit frequency threshold and f (t) is less than the second failure threshold, let S (t +1) be S (t) + i (t) and P (t +1) be S (t) + i (t);
and S (t +1) is the size of the token bucket at the moment of t +1, and I (t +1) is the current limiting times at the moment of t + 1.
6. A storage medium having a computer program stored thereon, characterized in that: the computer program, when executed by a processor, implements the method of any of claims 1 to 5.
7. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that runs on the processor, characterized in that: the processor, when executing the computer program, implements the method of any of claims 1 to 5.
8. A regulation and control system for screenshot service, characterized in that it comprises:
the live broadcast client monitoring unit is used for monitoring the residual stream resources, the current limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live broadcast room client;
the first regulating unit is used for reducing the total resource amount of the residual stream resources and reducing the resources subsequently distributed to the residual stream resources when the residual stream resources are larger than a preset resource residual threshold or the screenshot failure rate is larger than a preset first failure threshold;
a second regulating unit, configured to increase a total amount of resources of the remaining stream resources and increase resources subsequently allocated to the remaining stream resources when the current limiting operation frequency is greater than a preset current limiting frequency threshold and the screen capture failure rate is less than a preset second failure threshold; wherein the content of the first and second substances,
the stream resource is a resource in a data stream form which is distributed to the client by the server and is required for data transmission.
9. The system of claim 8, wherein the live client monitoring unit monitors the remaining stream resources, the current limiting operation frequency, the screenshot frequency and the screenshot failure rate of the live room client by using a token bucket algorithm, and specifically comprises the following steps:
initializing token bucket size to S0Setting the size of the token bucket to be S (t) at the moment t, wherein the capacity of the token bucket represents the storage space of the stream resources of the client, and the tokens of the token bucket represent the stream resources of the client;
initial setting P into token bucket every second0The number of tokens put into the token bucket per second at the moment t is P (t);
monitoring the number of the remaining tokens in the token bucket, and recording as R (t);
when the number of tokens in the token bucket is zero, performing current limiting operation, and recording the current limiting times at t moment as I (t);
and recording the loss times of the pull loss per second at the time t as F (t).
CN201811163338.3A 2018-09-30 2018-09-30 Regulation and control method, storage medium, electronic device and system for screenshot service Active CN110971937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811163338.3A CN110971937B (en) 2018-09-30 2018-09-30 Regulation and control method, storage medium, electronic device and system for screenshot service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811163338.3A CN110971937B (en) 2018-09-30 2018-09-30 Regulation and control method, storage medium, electronic device and system for screenshot service

Publications (2)

Publication Number Publication Date
CN110971937A CN110971937A (en) 2020-04-07
CN110971937B true CN110971937B (en) 2022-02-22

Family

ID=70029470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811163338.3A Active CN110971937B (en) 2018-09-30 2018-09-30 Regulation and control method, storage medium, electronic device and system for screenshot service

Country Status (1)

Country Link
CN (1) CN110971937B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600761B (en) * 2020-12-11 2024-04-09 腾讯科技(深圳)有限公司 Resource allocation method, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103369372A (en) * 2013-07-17 2013-10-23 广州珠江数码集团有限公司 Live television screen capturing system and live television screen capturing method
CN105592319A (en) * 2014-10-23 2016-05-18 上海天脉聚源文化传媒有限公司 Server screenshot method and server
CN107438175A (en) * 2017-08-14 2017-12-05 武汉微创光电股份有限公司 For the rapid screenshot method and system of extensive video

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9311283B2 (en) * 2012-08-16 2016-04-12 Realnetworks, Inc. System for clipping webpages by traversing a dom, and highlighting a minimum number of words
CN103546766B (en) * 2013-11-14 2017-02-08 腾讯科技(成都)有限公司 Video processing method, related equipment and communication system
US10028021B2 (en) * 2014-12-22 2018-07-17 Hisense Electric Co., Ltd. Method and device for encoding a captured screenshot and controlling program content switching based on the captured screenshot

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103369372A (en) * 2013-07-17 2013-10-23 广州珠江数码集团有限公司 Live television screen capturing system and live television screen capturing method
CN105592319A (en) * 2014-10-23 2016-05-18 上海天脉聚源文化传媒有限公司 Server screenshot method and server
CN107438175A (en) * 2017-08-14 2017-12-05 武汉微创光电股份有限公司 For the rapid screenshot method and system of extensive video

Also Published As

Publication number Publication date
CN110971937A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN109089130B (en) Method and device for adjusting timestamp of live video
CA2888218C (en) Playback stall avoidance in adaptive media streaming
CN110099134B (en) Video file downloading method and device, electronic equipment and storage medium
CN108810657B (en) Method and system for setting video cover
CN110662100A (en) Information processing method, device and system and computer readable storage medium
US11863841B2 (en) Video playing control method and system
CN106791957B (en) Video live broadcast processing method and device
CN113691859A (en) Video caching method, device, equipment and medium
EP3748978A1 (en) Screen recording method, client, and terminal device
CN111726641A (en) Live video playing processing method and device and server
CN110971937B (en) Regulation and control method, storage medium, electronic device and system for screenshot service
US20210092400A1 (en) Video coder-based code rate control method and device, and video server
CN112423006A (en) Live broadcast scene switching method, device, equipment and medium
CN109347967A (en) A kind of method and device obtaining audio, video data
CN103096133A (en) Obtaining method and device of data
CN107172489A (en) TV applications software refreshing method, TV and computer-readable recording medium
WO2010149227A1 (en) Modifying command sequences
CN110971941A (en) Method, system, server and live broadcast room controller for dredging bullet screen congestion
CN115525431A (en) Method, device and equipment for controlling rendering machine and storage medium
US20200195996A1 (en) Methods and Apparatus for Streaming Data
CN111090818A (en) Resource management method, resource management system, server, and computer storage medium
CN114416013A (en) Data transmission method, data transmission device, electronic equipment and computer-readable storage medium
CN110971916B (en) Live broadcast fluency monitoring method and system
CN111629233B (en) Audio and video transcoding method and device
CN110572697A (en) remote teaching method and device for multiple video channels and server

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