CN115037954A - Control method, device and system for accessing live broadcast - Google Patents

Control method, device and system for accessing live broadcast Download PDF

Info

Publication number
CN115037954A
CN115037954A CN202210552025.7A CN202210552025A CN115037954A CN 115037954 A CN115037954 A CN 115037954A CN 202210552025 A CN202210552025 A CN 202210552025A CN 115037954 A CN115037954 A CN 115037954A
Authority
CN
China
Prior art keywords
live broadcast
access
target
accessing
client
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.)
Pending
Application number
CN202210552025.7A
Other languages
Chinese (zh)
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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing 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 Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202210552025.7A priority Critical patent/CN115037954A/en
Publication of CN115037954A publication Critical patent/CN115037954A/en
Pending legal-status Critical Current

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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44204Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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/44209Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network
    • 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/44245Monitoring the upstream path of the transmission network, e.g. its availability, bandwidth
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The present disclosure provides a method, an apparatus and a system for controlling access to live broadcast, wherein the method can be applied to a live broadcast server, and the method comprises: receiving a live access request initiated by a user based on a client of user equipment, wherein the live access request is used for requesting to access a target live broadcast, acquiring the number of users accumulated to access the target live broadcast to obtain a first access number, acquiring the number of users currently accessing the target live broadcast to obtain a second access number if the first access number is greater than a preset first threshold, and outputting the target live broadcast through the client if the second access number is less than or equal to the first threshold, so that the control on the user to access the live broadcast can be realized from two granularities of coarse granularity and fine granularity, and the flexibility, effectiveness and reliability of the control are improved.

Description

Control method, device and system for accessing live broadcast
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for controlling access to a live broadcast.
Background
With the development of internet technology, live broadcasting is widely applied to different industries.
The user can access the live broadcast through the user equipment, and how to control the access of the live broadcast is made to be urgent to solve along with the continuous increase of the number of the users accessing the live broadcast.
Disclosure of Invention
The disclosure provides a method, a device and a system for controlling access to live broadcast, which are used for improving the reliability of access to live broadcast.
In a first aspect, an embodiment of the present disclosure provides a control method for accessing a live broadcast, which is applied to a live broadcast server, and the method includes:
receiving a live access request initiated by a user based on a client of user equipment, wherein the live access request is used for requesting to access a target live broadcast;
acquiring the number of users who access the target live broadcast accumulatively to obtain a first access number;
if the first access number is larger than or equal to a preset first threshold value, acquiring the number of users currently accessing the target live broadcast to obtain a second access number;
and if the second access quantity is smaller than the first threshold value, outputting the target live broadcast through the client.
In an embodiment of the present disclosure, after obtaining the number of users currently accessing the target live broadcast and obtaining a second access number if the first access number is greater than or equal to a preset first threshold, the method further includes:
and determining and sending a target polling time interval to the client according to the second access number, wherein the target polling time interval is used for indicating the frequency of the client initiating the heartbeat request to the live broadcast server.
In one embodiment of the present disclosure, the second number of accesses is inversely proportional to the target polling time interval.
In one embodiment of the present disclosure, determining and sending a target polling interval to the client according to the second access number includes:
determining a current limiting feedback code of the second access number according to the second access number and a preset access current limiting number;
determining a time interval corresponding to the current limiting feedback code according to a preset mapping relation, wherein the mapping relation is used for representing the corresponding relation between the current limiting feedback code and the time interval;
and determining and sending a target polling time interval to the client according to the time interval.
In one embodiment of the present disclosure, the number of live broadcasts played by the live broadcast server is multiple, where multiple live broadcasts include the target live broadcast; prior to said determining and sending a target polling interval to the client according to the second access number, the method comprises:
obtaining a third access quantity for accessing the plurality of live broadcasts;
determining a first polling time interval according to the third access quantity and a preset first access current limiting quantity of the live broadcast server;
and the determining and sending a polling interval to the client according to the second access number comprises: determining a second polling time interval according to the second access quantity and a preset second access current limiting quantity of the target live broadcast; and determining and sending the target polling time interval to the client according to the first polling time interval and the second polling time interval.
In an embodiment of the present disclosure, after obtaining the number of users currently accessing the target live broadcast and obtaining the second access number, the method further includes:
and if the first access number is greater than or equal to a first threshold value, adjusting the first access number to be the same as the second access number.
In an embodiment of the present disclosure, the first access number and the second access number are determined based on the number of tokens in a token record, where the token record is information of a user accessing the target live broadcast, and is stored in a disk of the live broadcast server in a snapshot form, and one user accessing the target live broadcast corresponds to one token, and the token record is stored based on a hash tair hash data structure of a structured data storage system.
In one embodiment of the present disclosure, the token has a type attribute, the type attribute includes a valid type, and the first access number is a total number of tokens in the token record; the second access number is the number of the tokens of the valid type in the token record;
for a client corresponding to any token, if a heartbeat request initiated by the client within a preset time period is received, the type attribute of the token corresponding to the client is an effective type.
In an embodiment of the present disclosure, after obtaining the number of users currently accessing the target live broadcast and obtaining a second access number if the first access number is greater than or equal to a preset first threshold, the method further includes:
and if the second access quantity is larger than or equal to the first threshold value, outputting a prompt message through the client, wherein the prompt message is used for prompting that the user cannot access the target live broadcast currently.
In an embodiment of the present disclosure, after obtaining the first access number by obtaining the number of users accessing the target live broadcast accumulatively, the method further includes:
and if the first access quantity is smaller than the first threshold value, outputting the target live broadcast through the client.
In a second aspect, an embodiment of the present disclosure provides a control apparatus for accessing a live broadcast, where the control apparatus is applied to a live broadcast server, and the apparatus includes:
the system comprises a receiving unit, a live broadcast accessing unit and a live broadcast accessing unit, wherein the receiving unit is used for receiving a live broadcast accessing request initiated by a user based on a client of user equipment, and the live broadcast accessing request is used for requesting to access a target live broadcast;
the first acquisition unit is used for acquiring the number of users for accumulating the access target live broadcast to obtain a first access number;
the second obtaining unit is used for obtaining the number of users currently accessing the target live broadcast to obtain a second access number if the first access number is larger than or equal to a preset first threshold;
and the first output unit is used for outputting the target live broadcast through the client if the second access quantity is smaller than the first threshold.
In one embodiment of the present disclosure, the apparatus further comprises:
a first determining unit, configured to determine a target polling time interval according to the second access number, where the target polling time interval is used to indicate a frequency at which a client initiates a heartbeat request to the live broadcast server;
a sending unit, configured to send the target polling time interval to the client.
In one embodiment of the present disclosure, the second number of accesses is inversely proportional to the target polling time interval.
In one embodiment of the present disclosure, the first determining unit includes:
the first determining subunit is used for determining the current limiting feedback codes of the second access number according to the second access number and a preset access current limiting number;
the second determining subunit is configured to determine a time interval corresponding to the current-limiting feedback code according to a preset mapping relationship, where the mapping relationship is used to represent a corresponding relationship between the current-limiting feedback code and the time interval;
and the third determining subunit is used for determining the target polling time interval according to the time interval.
In one embodiment of the present disclosure, the number of live broadcasts played by the live broadcast server is multiple, where multiple live broadcasts include the target live broadcast; the device further comprises:
a third obtaining unit, configured to obtain a third access number for accessing the plurality of live broadcasts;
the second determining unit is used for determining a first polling time interval according to the third access quantity and a preset first access current limiting quantity of the live broadcast server;
correspondingly, the first determining unit includes:
the fourth determining subunit is configured to determine a second polling time interval according to the second access quantity and a preset second access current-limiting quantity of the target live broadcast;
a fifth determining subunit, configured to determine the target polling time interval according to the first polling time interval and the second polling time interval.
In one embodiment of the present disclosure, the apparatus further comprises:
an adjusting unit, configured to adjust the first access number to a value that is the same as the second access number if the first access number is greater than or equal to a first threshold.
In an embodiment of the present disclosure, the first access number and the second access number are determined based on the number of tokens in a token record, where the token record is information of a user accessing the target live broadcast, and is stored in a disk of the live broadcast server in a snapshot form, and one user accessing the target live broadcast corresponds to one token, and the token record is stored based on a hash tair hash data structure of a structured data storage system.
In one embodiment of the present disclosure, the token has a type attribute, the type attribute includes a valid type, and the first access number is a total number of tokens in the token record; the second access number is the number of the tokens of the valid type in the token record;
for a client corresponding to any token, if a heartbeat request initiated by the client within a preset time period is received, the type attribute of the token corresponding to the client is an effective type.
In one embodiment of the present disclosure, the apparatus further comprises:
and the second output unit is used for outputting a prompt message through the client if the second access quantity is greater than or equal to the first threshold, wherein the prompt message is used for prompting that the user cannot access the target live broadcast currently.
In one embodiment of the present disclosure, the apparatus further comprises:
and a third output unit, configured to output the target live broadcast through the client if the first access number is smaller than the first threshold.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the electronic device to perform the method of any one of the first aspect of the disclosure.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method of any one of the first aspects of the disclosure.
In a fifth aspect, the embodiments of the present disclosure provide a computer program product comprising a computer program that, when executed by a processor, implements the method of any one of the first aspects of the present disclosure.
In a sixth aspect, an embodiment of the present disclosure provides a control system for accessing live broadcast, including a live broadcast server and a user equipment, where the live broadcast server includes the control device for accessing live broadcast as described in the second aspect, and the user equipment includes a client for initiating a request for accessing live broadcast to the control device for accessing live broadcast.
The embodiment of the disclosure provides a control method, a device and a system for accessing live broadcast, wherein the method can be applied to a live broadcast server, and comprises the following steps: receiving a live access request initiated by a user based on a client of user equipment, wherein the live access request is used for requesting to access a target live broadcast, acquiring the number of users accumulated to access the target live broadcast to acquire a first access number, acquiring the number of users currently accessing the target live broadcast to acquire a second access number if the first access number is greater than a preset first threshold, and outputting the target live broadcast through the client if the second access number is less than or equal to the first threshold, in the embodiment, when the first access number is greater than the first threshold, acquiring the second access number to accurately determine the number of users currently accessing the target live broadcast, and when the second access number does not exceed the first threshold, outputting the target live broadcast to support the user to watch the technical characteristics of the target live broadcast, and realizing the control of the live broadcast access of the user from two granularities of coarse granularity and fine granularity, thereby improving flexibility, effectiveness, and reliability of control.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a control method for accessing live broadcast according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a control method for accessing a live broadcast according to another embodiment of the present disclosure;
fig. 3 is a schematic diagram of a control method for accessing live broadcast according to another embodiment of the present disclosure;
fig. 4 is a schematic diagram of a control device for accessing a live broadcast according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a control device for accessing a live broadcast according to another embodiment of the present disclosure;
fig. 6 is a schematic diagram of a control system for accessing a live broadcast according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the disclosure.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The terms "first," "second," "third," and the like in the description and in the claims of the present disclosure and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein.
Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Live broadcast can be understood as an information network publishing mode which synchronously makes and publishes information along with the occurrence and development processes of events on site and has a bidirectional circulation process. The form of the method can also be divided into live broadcast, talk type live broadcast in a studio, character and picture live broadcast, video and audio live broadcast or live broadcast with information sources provided by a third party (such as a television) and the like, and the live broadcast has the functions of mass storage and convenient searching.
The live broadcast server can be understood as a server supporting the live broadcast function, that is, "live broadcast" in the live broadcast server cannot be understood as limitation to the server, and the live broadcast server may be a cloud server, a local server, a server cluster, or an electronic device supporting the live broadcast function, and this embodiment is not limited.
The user may access the live broadcast through a user device. For example, a user may access a live broadcast corresponding to a Uniform Resource Locator (URL) through a browser, and may access the live broadcast without logging in.
The user equipment may be understood as a device that can establish a communication link with the live broadcast server and has a display function, such as a desktop computer, a notebook computer, a mobile phone, and the like, which are not listed here.
It can be understood that the live broadcast has various types, such as education live broadcast, culture live broadcast, film and television live broadcast, conference live broadcast, article (can be an entity object or a virtual object) live broadcast and the like, aiming at certain types of live broadcast, in order to ensure the effectiveness of the live broadcast as much as possible and control the cost of the live broadcast and the like, the number of users accessing the live broadcast needs to be controlled, namely, the number of live broadcast persons is controlled and watched.
Illustratively, for example, by taking education live broadcast as an example, and specifically taking a courtyard of education live broadcast as an example, a platform for providing live broadcast can open the courtyard to the public through live broadcast, so as to avoid the drawbacks of blocking and the like caused by too many people, improve the reliability of each public watching live broadcast, avoid too high cost, and control the number of people accessing live broadcast.
The special courseware emphasizes the specificity, mainly aims at the problem that education resources are relatively weak and relevant regulated courses such as 'no-go, no-go and no-go' exist, adopts forms of specially opening lessons or synchronously closing lessons on the internet, pushing appropriate high-quality education resources according to the teaching progress and the like, and promotes fair and balanced development of education.
In some embodiments, an upper limit value of the number of users watching the live broadcast may be set, the number of users watching the live broadcast may be counted, and when the number of users watching the live broadcast reaches the upper limit value, a watching request of a user requesting to watch the live broadcast later may be rejected.
However, the number of users actually watching the live broadcast may be smaller than the upper limit value of the number, for example, a certain user quits the live broadcast after watching the live broadcast for one minute, which may cause a technical problem that the reliability and accuracy of the control on accessing the live broadcast are low.
To avoid at least one of the above technical problems, the inventors of the present disclosure have made creative efforts to obtain the inventive concept of the present disclosure: the number of users watching the live broadcast is determined from two granularities of coarse granularity and fine granularity, the number of the users watching the live broadcast is determined by the coarse granularity and is the accumulated number of the users watching the live broadcast, and the number of the users watching the live broadcast is determined by the fine granularity and is the actual number of the users watching the live broadcast at present, so that the control of accessing the live broadcast is realized through the accumulated number and the actual number.
Hereinafter, the technical solution of the present disclosure will be described in detail by specific examples. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
The present disclosure provides a control method for accessing live broadcast, which can be applied to a live broadcast server. Referring to fig. 1, fig. 1 is a flowchart of a control method for accessing a live broadcast according to an embodiment of the present disclosure, as shown in fig. 1, the method includes:
s101: and receiving a live broadcast access request initiated by a user based on a client of the user equipment.
And the live access request is used for requesting to access the target live broadcast. The target live broadcast is used for representing the live broadcast which the user wishes to access, namely the live broadcast which the user wishes to watch, and cannot be understood as the definition of the content of the live broadcast.
For example, the execution subject of the present embodiment may be a control device (hereinafter, simply referred to as a control device) accessing the live broadcast, and the control device may be a processor or a chip provided in the live broadcast server.
The manner in which the control device obtains the request for accessing the live broadcast is not limited in this embodiment. For example, the user may initiate a request for accessing the live broadcast in a voice manner, and correspondingly, the control device obtains the voice initiated by the user through the client of the user equipment to obtain the request for accessing the live broadcast. For another example, the user may also initiate a live access request in a touch manner, and accordingly, the control device obtains the live access request.
Taking the example that the user can initiate the request for accessing the live broadcast by voice, the following is exemplarily set forth: the user equipment is provided with a pickup assembly, the pickup assembly is in communication link with the client, and the pickup assembly collects a live access request initiated by user voice and transmits the live access request to the control device.
S102: and acquiring the number of the users who access the target live broadcast cumulatively to obtain a first access number.
Illustratively, the first access amount may be understood as an accumulated amount of users accessing the target live broadcast from the start of the target live broadcast to the current time. If the target live broadcast is played for 10 minutes to the current moment, the first access number is the number of all users accessing the target live broadcast within 10 minutes.
S103: and if the first access number is larger than or equal to a preset first threshold value, acquiring the number of users currently accessing the target live broadcast to obtain a second access number.
It will be appreciated that the first threshold is an upper limit on the number of users accessing the target live, i.e. a threshold from the overall number of users accessing the target live. The magnitude of the first threshold may be determined based on demand, history, and experimentation. For example, for a live scenario in which the live server can support more users, the first threshold may be relatively large; conversely, the first threshold may be relatively small for live scenes where the live server may support fewer users.
The second access number and the first access number are relative concepts, the second access number refers to the number of users accessing the target live broadcast at the current moment, and the users accessing the live broadcast at the current moment can be determined based on the heartbeat request initiated by the client to the live broadcast server.
For example, in a preset heartbeat frequency range, if a live broadcast server receives a heartbeat request initiated by a certain client, it indicates that the client is a client accessing a target live broadcast at the current moment; otherwise, if a certain client does not initiate a heartbeat request to the live broadcast server within the heartbeat frequency range, it indicates that the user corresponding to the client has quitted the access to the target live broadcast.
By combining the above analysis, it can be known that the first access number is the number of all users who have accessed the target live broadcast after the target live broadcast, for example, the first access number includes the number of users who have accessed the target live broadcast at the current time (i.e., the second access number), and includes the number of users who have accessed the target live broadcast before but have not accessed the target live broadcast at the current time.
That is, the first access number may be understood as the number of users accessing the target live broadcast determined from the coarse granularity, i.e., the number determined from the overall granularity of accessing the target live broadcast. The second access number may be understood as the number of users accessing the target live broadcast determined from the fine granularity, that is, the number determined from the local granularity of accessing the target live broadcast at the current time.
The user who accesses the target live broadcast at the current moment can be understood as an effective user, and the user who accesses the target live broadcast before but does not access the target live broadcast at the current moment can be understood as an ineffective user.
Accordingly, the first access number is the number of active users + the number of inactive users, and the second access number is the number of active users. Therefore, the first access number is the second access number + the number of dead users.
S104: and if the second access quantity is smaller than the first threshold value, outputting the target live broadcast through the client.
If the second access number is smaller than the first threshold, it indicates that the number of users currently accessing the target live broadcast (i.e., the number of valid users) does not exceed the upper limit of the number of users who can watch the target live broadcast by the live broadcast server, and therefore, the control device can output the target live broadcast to the client, so that the users can watch the target live broadcast through the user equipment.
Based on the above analysis, the present disclosure provides a control method for accessing live broadcast, where the method may be applied to a live broadcast server, and the method includes: receiving a live access request initiated by a user based on a client of user equipment, wherein the live access request is used for requesting to access a target live broadcast, acquiring the number of users for accessing the target live broadcast cumulatively, acquiring a first access number, acquiring the number of users for accessing the target live broadcast currently and acquiring a second access number if the first access number is greater than or equal to a preset first threshold, and outputting the target live broadcast through the client if the second access number is less than the first threshold. Therefore, the throughput is improved, the flexibility, the effectiveness and the reliability of control are improved, and the flexibility, the effectiveness and the reliability are better.
For the reader to more deeply understand the implementation principle of the present disclosure, the control method for accessing live broadcast of the present disclosure will now be described in more detail with reference to fig. 2, and the method can be applied to a live broadcast server. As shown in fig. 2, the method includes:
s201: and receiving a live broadcast access request initiated by a user based on a client of the user equipment.
And the access live broadcast request is used for requesting to access the target live broadcast.
It is understood that, in order to avoid tedious statements, the technical features of the present embodiment that are the same as those of the above embodiments are not described again in this embodiment.
S202: obtaining a token (token) record stored by a live broadcast server, and determining the number of users accessing the target live broadcast accumulatively according to the token record to obtain a first access number.
One token represents one user, that is, one user corresponds to one token. Exemplarily, in a live broadcast access request initiated by a client, a token is carried so that a control device performs authentication processing on access authority of a user based on the token, if the authentication is passed, whether the token is included in a token record is determined, and if the token record includes the token, it indicates that the user has promoted access to a target live broadcast due to network abnormality and the like, and the token does not need to be added in the token record; otherwise, if the token record does not include the token, the token record is added to the token record, and the count value corresponding to the token record is added by 1, so as to determine the first access amount through the count value.
S203: and judging whether the first access quantity is larger than or equal to a first threshold value, if so, executing S204, and if not, executing S206.
S204: and acquiring the number of the users currently accessing the target live broadcast to obtain a second access number.
In some embodiments, the token record is information of the user accessing the target live that is saved in the form of a snapshot in a disk of the live server. A user accessing a target live broadcast corresponds to a token, and the token record is stored based on a hash (tairHash) data structure of a structured data storage system.
Illustratively, Redis a memory database of the live server, and the memory database is to store the contents in the database of the live server in the memory of the live server. In contrast, the read-write efficiency of the memory database is much faster than that of the conventional database (the read-write efficiency of the memory is far higher than that of the hard disk).
In order to avoid the disadvantage that data in the memory database will be completely lost due to power failure or downtime of the live broadcast server, in this embodiment, a persistent mode (RDB) is adopted to write the data snapshot in the memory into the disk of the live broadcast server, and if data needs to be restored, the snapshot file can be read into the memory.
The data structure of the token record is a tairHash data structure. For example, the tairHash data structure is a key-value pair (key-value) structure, one key corresponds to one live broadcast, the live broadcast server can support simultaneous playing of multiple live broadcasts, the multiple live broadcasts include target live broadcasts, the value corresponding to the key is fieldtoken, and the number of tokens currently accessing the live broadcasts is represented.
In some embodiments, the number of fieldtokens per key, i.e., the number of currently accessed users in a live broadcast, may be determined by a count statistics method (exhlenWithNoExp). The second number of accesses is obtained, for example, by counting the number of fieldtokens under the key of the target live broadcast by statistical means.
In this embodiment, the second access number is determined by combining the tairHash data structure and the counting statistical method, so that the concurrency amount can be greatly increased, that is, in a scene in which a live broadcast server broadcasts a plurality of live broadcasts, the current access number corresponding to each live broadcast is determined in parallel.
In some embodiments, it may also be achieved through atomic operation (atomic operation) that only one thread can determine the current number of accesses at a time. For example, an atomic write key may be implemented by a SETNX command, so that only one thread can determine the current number of accesses at a time.
In conjunction with the above analysis, the number of users in the token record can be counted from both "coarse" and "fine" granularities. Coarse granularity may be understood, for example, as: and if the request for accessing the live broadcast is that the user accesses the target live broadcast for the first time, adding 1 to the number of the users accessing the target live broadcast. Fine granularity can be understood as: and determining the number of users currently accessing the target live broadcast by combining the heartbeat request.
In some embodiments, the token has a type attribute, the type attribute including a valid type and an invalid type, the first access number being a total number of tokens in the token record; the second access number is the number of tokens of a valid type in the token record. For a client corresponding to any token, if a heartbeat request initiated by the client within a preset time period is received, the type attribute of the token corresponding to the client is an effective type.
Illustratively, if a client initiates a heartbeat request to a control device within a preset time period, a user accessing a target live broadcast through the client is a valid user, and correspondingly, a token corresponding to the client is a valid type of token, and the user is a user currently accessing the target live broadcast.
On the contrary, if the client does not initiate a heartbeat request to the control device within the preset time period, the client may be disconnected from the communication link between the client and the live broadcast server due to network abnormality or user quit operation, and the user accessing the target live broadcast through the client is an invalid user, and correspondingly, the token corresponding to the client is an invalid token, and the user is not the user currently accessing the target live broadcast, but is one of the number of users cumulatively accessing the target live broadcast.
That is, the token record has a cumulative number of users who have all access targets live (i.e., a first access number) that is only increasing or decreasing, and a current number of users who have a heartbeat with the live server (a second access number).
S205: and judging whether the second access quantity is smaller than the first threshold value, if so, executing S206, and if not, executing S207.
S206: and outputting the target live broadcast through the client.
S207: and outputting the prompt message through the client.
The prompt message is used for prompting that the user cannot access the target live broadcast currently.
If the second access number is larger than the first threshold, it is indicated that the number of the users currently accessing the target live broadcast does not reach the upper limit value of the number, and the user can be prompted that the target live broadcast cannot be accessed currently. Alternatively, the prompting message may also prompt the user for "try again later", and so on.
That is, whether to output the target live broadcast to the client may be determined based on the first access number, and if the first access number is smaller than the first threshold, it indicates that the number of users accessing the target live broadcast accumulatively does not reach the upper limit value of the number, the control device may output the target live broadcast to the client, so that the users watch the target live broadcast through the user equipment. Subsequent operations of obtaining the second access quantity and the like are not needed, so that the response efficiency and the overall access performance of the live broadcast server are improved.
If the first access is larger than or equal to the first threshold, the number of the users accessing the target live broadcast accumulatively is equal to the upper limit value of the number, and in order to achieve the reliability of control over the target live broadcast access and avoid the excessive number of people accessing the target live broadcast, the control device can acquire the second access number.
And if the acquired second access number is smaller than the first threshold, it is indicated that the number of users currently accessing the target live broadcast does not reach the upper limit value of the number, and the control device can output the target live broadcast to the client, so that the users watch the target live broadcast through the user equipment. On the contrary, if the second access number is greater than or equal to the first threshold, it indicates that the number of users currently accessing the target live broadcast has reached the upper limit value of the number, and the control device may output the prompt message as described in the above embodiment without outputting the target live broadcast to the client.
In order to make the first access quantity as much as possible the quantity of users currently accessing the target live broadcast, so as to process as many live broadcast access requests as possible in the coarse-grained stage without entering the fine-grained stage, thereby improving the live broadcast access efficiency and improving the experience of the users accessing the live broadcast, when the first access quantity is greater than or equal to the first threshold value, the first access quantity can be adjusted to be the same as the second access quantity.
On this basis, a further optimization may be made in adjusting the first number of accesses, such as adjusting the first number of accesses to the same value as the second number of accesses in a time interval-based manner. Similarly, the time interval may be determined based on demand, history, and experimentation.
For example, if the first access amount is greater than or equal to the first threshold, the first access amount may be adjusted to the same value as the second access amount at intervals of 60 seconds.
Alternatively, when the first access number is greater than the second threshold value, the first access number may be adjusted to the same value as the second access number. Wherein the second threshold is greater than or equal to the first threshold.
It should be understood that the above examples are only used for illustrating the possible optimization ways for adjusting the first access number, and are not to be construed as limiting the adjustment of the first access number.
In conjunction with the above analysis, the second access number is the number of active users, and may be determined based on the heartbeat request. In some embodiments, the client may initiate a heartbeat request to the live broadcast server based on a fixed frequency, and if the live broadcast server does not receive the heartbeat request initiated by the client within the fixed frequency, it is indicated that a user corresponding to the client is a failed user; otherwise, if the live broadcast server receives the heartbeat request initiated by the client within the fixed frequency, it indicates that the user corresponding to the client is an effective user.
However, especially for scenes with a large number of users accessing the target live broadcast, in order to reduce the amount of concurrent access of the client in unit time, in other embodiments, the client may initiate heartbeat requests to the live broadcast server based on a flexible frequency. In order to enable a reader to deeply understand the implementation principle of the control method for accessing live broadcast in a scenario where a client initiates a heartbeat request to a live broadcast server based on a flexible frequency, details are now described with reference to fig. 3.
Fig. 3 is a schematic diagram of a control method for accessing live broadcast according to another embodiment of the present disclosure, where the method may be applied to a live broadcast server, and as shown in fig. 3, the method includes:
s301: the client initiates a request for accessing the live broadcast to the live broadcast server. And the access live broadcast request is used for requesting to access the target live broadcast.
Illustratively, the user is based on a client-initiated request to access the live broadcast of the user device. Correspondingly, a live access request initiated by a user based on a client of the user equipment is received.
Similarly, in order to avoid the tedious statements, the technical features of the present embodiment that are the same as those of the above embodiments are not described again in this embodiment.
S302: the live broadcast server obtains the number of users who access the target live broadcast accumulatively to obtain a first access number.
S303: and if the first access number is larger than or equal to a preset first threshold value, the live broadcast server acquires the number of users currently accessing the target live broadcast to obtain a second access number.
S304: and if the second access quantity is smaller than the first threshold value, the live broadcast server transmits the target live broadcast to the client.
Illustratively, the live broadcast server transmits a target live broadcast to the user equipment through the client, and correspondingly, the user equipment receives the target live broadcast.
S305: and the client outputs the target live broadcast.
For example, the client plays the target live broadcast through a display screen of the user equipment, so that the user can watch the target live broadcast.
S306: and the live broadcast server determines a target polling time interval according to the second access quantity. The target polling time interval is used for indicating the frequency of heartbeat requests sent by the client to the live broadcast server.
S307: the live server sends the target polling interval to the client.
Accordingly, the client receives the target polling interval.
S308: the client initiates a heartbeat request to the live server based on the target polling time interval.
Accordingly, the live server receives the heartbeat request.
It should be noted that the second access number may be a dynamically changing number, that is, the number of users currently accessing the target live broadcast may increase or decrease, and the target polling time interval is also a dynamically changing time interval, that is, may change with the change of the second access number. If the second access number increases, the target polling time interval becomes relatively smaller, and if the second access number decreases, the target polling time interval becomes relatively larger.
In some embodiments, the second number of accesses is inversely proportional to the target polling time interval. The larger the second access number is, the shorter the target polling time interval is; conversely, the smaller the second access number, the longer the target polling interval.
By the scheme provided by the embodiment, the client side can initiate the heartbeat request to the live broadcast server in a shorter time period under the condition that the access amount of the target live broadcast is larger, so that the access resource of the invalid user for accessing the target live broadcast is released, and more access requirements for accessing the target live broadcast are met.
In some embodiments, S306 may include the steps of:
the first step is as follows: and determining the current limit feedback codes of the second access number according to the second access number and the preset access current limit number.
Similarly, the access current limit amount may be determined based on a demand, a history, a test, and the like, which is not limited in this embodiment. Preferably, the access restriction amount may be greater than or equal to the first threshold.
For example, according to the size relationship between the second access number and the access flow limit number, different access scenes may be determined, where if the second access number is smaller than the access flow limit number, the access scene is a normal access scene, if the second access number is greater than or equal to the access flow limit number, the access scene is a flow limit retry scene, and if the number of requests for accessing the live broadcast currently received by the live broadcast server is large, the access scene is a concurrent retry scene. And the current limiting feedback codes corresponding to different access scenes are different.
The second step: and determining a time interval corresponding to the current limiting feedback code according to a preset mapping relation. The mapping relation is used for representing the corresponding relation between the current limiting feedback code and the time interval.
For example, different current-limiting feedback codes correspond to different time intervals, and when a current-limiting feedback code is determined, a time interval having a corresponding relationship with the current-limiting feedback code may be determined from the mapping relationship.
In combination with the above analysis, the current limiting feedback codes corresponding to different access scenarios are different, and the time intervals corresponding to different current limiting feedback codes are different, so that the time intervals corresponding to different access scenarios are different.
For example, the time interval of the normal access scene is [ 10 seconds, 50 seconds ], the time interval of the concurrent retry scene is [ 2 seconds, 8 seconds ], and the time interval of the current limit retry scene is [ 1 second, 3 seconds ].
The third step: and determining and sending the target polling time interval to the client according to the time interval.
The time interval may be determined as the target polling time interval, or a period of time may be randomly selected from the time interval to be determined as the target polling time interval, and the like, which is not limited in this embodiment.
In this embodiment, the current-limiting feedback code is determined to determine the time interval based on the current-limiting feedback code, so that the target polling time interval is determined according to the time interval, the target polling time interval can be associated with the access scene, the actual access scene requirement is met, and the accuracy and reliability of determining the target polling time interval are improved.
Based on the analysis, the live broadcast server can support simultaneous broadcast of a plurality of live broadcasts, the live broadcasts include target live broadcasts, and the target polling time interval can be determined in a double-current-limiting mode, namely, the target polling time interval can be determined in a mode of integral current-limiting dimension and local current-limiting dimension, so that the accuracy and reliability of determining the target polling time interval are further improved.
The overall current limit dimension refers to a dimension of the total current limit quantity of a plurality of live broadcasts played from the live broadcast server. The local current limit dimension refers to a dimension of the number of current limits for playing out a target live portion from a live server.
Illustratively, the live server may obtain a third access number for accessing the plurality of live broadcasts; determining a first polling time interval according to the third access quantity and a preset first access current limiting quantity of the live broadcast server; determining a second polling time interval according to the second access quantity and a preset second access current limiting quantity of the target live broadcast; a target polling time interval is determined based on the first polling time interval and the second polling time interval.
And the third access quantity is the sum of the quantity of all users accessing the plurality of live broadcasts. The first access flow limit number is the flow limit number of the overall flow limit dimension, and the second access flow limit number is the flow limit number of the local flow limit dimension. The first number of access restrictions is greater than a second number of access restrictions, which may be greater than or equal to a first threshold.
In some embodiments, after determining the first and second polling time intervals, an intersection between the first and second polling time intervals may be determined and determined as the target polling time interval.
In some embodiments, when the live broadcast server receives a request for accessing a live broadcast, a total number of currently accessed multiple live broadcasts may be obtained first, and if the total number is greater than or equal to the first access limited number, the request for accessing the live broadcast may be denied. Otherwise, if the total number is smaller than the first access current limiting number, determining the live broadcast requested by the request for accessing the live broadcast, determining the total number of the live broadcast requested by the current access, if the total number is smaller than a second access current limiting number corresponding to the requested live broadcast, outputting the requested live broadcast, and otherwise, rejecting the request.
It should be noted that the embodiments shown in fig. 1, fig. 2, and fig. 3 may be independent embodiments as described above, or one embodiment or more embodiments may be obtained by combining multiple diagrams in three diagrams, where the combination manner and the sequence order are not limited in this embodiment.
Referring to fig. 4, fig. 4 is a schematic diagram of a control device for accessing live broadcast according to an embodiment of the present disclosure, where the control device 400 is applied to a live broadcast server, and includes:
the receiving unit 401 is configured to receive a live access request initiated by a user based on a client of a user device, where the live access request is used to request to access a target live broadcast.
A first obtaining unit 402, configured to obtain the number of users accessing the target live broadcast cumulatively, to obtain a first access number.
A second obtaining unit 403, configured to obtain the number of users currently accessing the target live broadcast if the first access number is greater than or equal to a preset first threshold, to obtain a second access number.
A first output unit 404, configured to output the target live broadcast through the client if the second access number is smaller than the first threshold.
Referring to fig. 5, fig. 5 is a schematic diagram of a control device for accessing live broadcast according to another embodiment of the present disclosure, where the control device 500 is applied to a live broadcast server, and includes:
the receiving unit 501 is configured to receive a live access request initiated by a user based on a client of a user device, where the live access request is used to request to access a target live broadcast.
A first obtaining unit 502, configured to obtain the number of users who cumulatively access the target live broadcast, to obtain a first access number.
A second obtaining unit 503, configured to obtain the number of users currently accessing the target live broadcast if the first access number is greater than or equal to a preset first threshold, so as to obtain a second access number.
A first output unit 504, configured to output the target live broadcast through the client if the second access number is smaller than the first threshold.
A first determining unit 505, configured to determine a target polling time interval according to the second access number, where the target polling time interval is used to indicate a frequency of the client initiating the heartbeat request to the live broadcast server.
Illustratively, the second number of accesses is inversely proportional to the target polling time interval.
As can be seen in fig. 5, in some embodiments, the first determining unit 505 includes:
a first determining sub-unit 5051 is configured to determine a stream limitation feedback code of the second access number according to the second access number and a preset access stream limitation number.
The second determining subunit 5052 is configured to determine, according to a preset mapping relationship, a time interval corresponding to the current limit feedback code, where the mapping relationship is used to represent a corresponding relationship between the current limit feedback code and the time interval.
A third determination sub-unit 5053 for determining a target polling interval from the time intervals.
A sending unit 506, configured to send the target polling time interval to the client.
In some embodiments, the number of live broadcasts played by the live broadcast server is multiple, and the multiple live broadcasts include the target live broadcast; the control device 500 further includes:
a third obtaining unit 507, configured to obtain a third access amount for accessing multiple live broadcasts.
A second determining unit 508, configured to determine the first polling interval according to the third access amount and a preset first access flow limit amount of the live server.
Accordingly, the first determining unit 505 includes:
a fourth determination sub-unit 5054 is configured to determine a second polling interval based on the second access number and a preset second access stream limit number of the target live broadcast.
A fifth determination sub-unit 5055, for determining a target polling time interval from the first and second polling time intervals.
An adjusting unit 509, configured to adjust the first access number to a value same as the second access number if the first access number is greater than or equal to the first threshold.
In some embodiments, the first access number and the second access number are determined based on the number of tokens in a token record, where the token record is information of users accessing the target live broadcast, and the information is stored in a disk of the live broadcast server in the form of a snapshot, and one user accessing the target live broadcast corresponds to one token, and the token record is stored based on a structured data storage system hash tairHash data structure.
In some embodiments, the token has a type attribute, the type attribute including a valid type, the first access number being a total number of tokens in the token record; the second access number is the number of the tokens of the valid type in the token record;
for a client corresponding to any token, if a heartbeat request initiated by the client within a preset time period is received, the type attribute of the token corresponding to the client is an effective type.
A second output unit 510, configured to output, by the client, a prompt message if the second access number is greater than or equal to the first threshold, where the prompt message is used to prompt that the user cannot access the target live broadcast currently.
A third output unit 511, configured to output the target live broadcast through the client if the first access number is smaller than the first threshold.
According to another aspect of the present disclosure, the present disclosure further provides a control system for accessing a live broadcast, including a live broadcast server and a user equipment, where the live broadcast server includes a control device for accessing a live broadcast as described in any of the above embodiments, and the user equipment includes a client for initiating a request for accessing the live broadcast to the control device for accessing the live broadcast.
Referring to fig. 6, fig. 6 is a schematic diagram of a control system for accessing live broadcast according to an embodiment of the present disclosure, and as shown in fig. 6, the system includes: a user device and a live server, wherein,
the user equipment comprises a client, and the user is used for initiating a live broadcast access request to a live broadcast server, wherein the live broadcast access request is used for requesting to access a target live broadcast.
A keep-alive component is included in the client, and the keep-alive component can initiate a heartbeat request to the live server based on the target polling time interval.
The live broadcast server includes: the system comprises a flow scattering component, a first current limiting component, a coarse-grained counter, a calibration component, a second current limiting component, a fine-grained counter and a concurrent access lock sub-component.
Wherein the traffic breaking component is configured to determine a target polling time interval.
The first current limiting component is used for achieving current limiting of the whole current limiting dimensionality, if the first current limiting component is provided with a first access current limiting quantity, and current limiting processing is conducted on the live broadcast server on the whole according to a third access quantity and the first access current limiting quantity.
The coarse-granularity counters and the live broadcasts are in one-to-one correspondence, and the coarse-granularity counters with the correspondence are used for determining the accumulated number of the accessed live broadcasts.
The calibration component is configured to adjust the cumulative number obtained by the coarse-granularity counter to a value that is the same as the current number obtained by the fine-granularity counter.
The second current limiting component is used for limiting local dimensions, for example, the second current limiting component is in one-to-one correspondence with the live broadcasts, and the second current limiting component with the correspondence is used for limiting the current of the access number of the corresponding live broadcasts.
The fine grain counters and the coarse grain counters are in a one-to-one corresponding relation, and if the accumulated number determined by the coarse grain counters reaches a preset access upper limit value, the fine grain counters with the corresponding relation determine the current number.
And the concurrent access lock sub-component is used for controlling the execution of the operation of determining the current number by a thread at the same time in a mode of a lock mechanism.
It should be understood that the implementation principle of the above components may refer to the above embodiments, and details are not described herein. And the above division of the components is only used for exemplary illustration, and the components that may be included in the system are not to be understood as a limitation of the components in the system.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. As shown in fig. 7, an electronic device 700 of an embodiment of the present disclosure may include: at least one processor 701 (only one processor is shown in FIG. 7); and a memory 702 communicatively coupled to the at least one processor. The memory 702 stores instructions executable by the at least one processor 701, and the instructions are executed by the at least one processor 701, so that the electronic device 700 can execute the technical solutions in any one of the foregoing method embodiments.
Alternatively, the memory 702 may be separate or integrated with the processor 701.
When the memory 702 is a separate device from the processor 701, the electronic device 700 further comprises: a bus 703 for connecting the memory 702 and the processor 701.
The electronic device provided in the embodiment of the present disclosure may execute the technical solutions of any of the foregoing method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
The embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program is used to implement the technical solution in any of the foregoing method embodiments.
The embodiment of the present disclosure provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the technical solution in any of the foregoing method embodiments.
The embodiment of the present disclosure further provides a chip, including: a processing module and a communication interface, wherein the processing module can execute the technical scheme in the method embodiment.
Further, the chip further includes a storage module (e.g., a memory), where the storage module is configured to store instructions, and the processing module is configured to execute the instructions stored in the storage module, and the execution of the instructions stored in the storage module causes the processing module to execute the technical solution in the foregoing method embodiment.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present disclosure are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (12)

1. A control method for accessing live broadcast is applied to a live broadcast server, and comprises the following steps:
receiving a live access request initiated by a user based on a client of user equipment, wherein the live access request is used for requesting to access a target live broadcast;
acquiring the number of accumulated users accessing the target live broadcast to obtain a first access number;
if the first access number is larger than or equal to a preset first threshold value, acquiring the number of users currently accessing the target live broadcast to obtain a second access number;
and if the second access quantity is smaller than the first threshold value, outputting the target live broadcast through the client.
2. The method according to claim 1, wherein after obtaining a second access number by obtaining a number of users currently accessing the target live broadcast if the first access number is greater than or equal to a preset first threshold, the method further comprises:
and determining and sending a target polling time interval to the client according to the second access number, wherein the target polling time interval is used for indicating the frequency of the client initiating the heartbeat request to the live broadcast server.
3. The method of claim 2, wherein the second number of accesses is inversely proportional to the target polling time interval.
4. The method of claim 2 or 3, wherein determining and transmitting a target polling interval to the client in accordance with the second access number comprises:
determining a current limiting feedback code of the second access number according to the second access number and a preset access current limiting number;
determining a time interval corresponding to the current limiting feedback code according to a preset mapping relation, wherein the mapping relation is used for representing the corresponding relation between the current limiting feedback code and the time interval;
and determining and sending a target polling time interval to the client according to the time interval.
5. The method of claim 2 or 3, wherein the number of live broadcasts played by the live broadcast server is multiple, and the multiple live broadcasts comprise the target live broadcast; prior to said determining and sending a target polling interval to the client according to the second access number, the method comprises:
obtaining a third access quantity for accessing the plurality of live broadcasts;
determining a first polling time interval according to the third access quantity and a preset first access flow limiting quantity of the live broadcast server;
and determining and sending a polling interval to the client according to the second access number, comprising: determining a second polling time interval according to the second access quantity and a preset second access current limiting quantity of the target live broadcast; and determining and sending the target polling time interval to the client according to the first polling time interval and the second polling time interval.
6. The method of any of claims 1-5, after obtaining a second access number by obtaining a number of users currently accessing the target live broadcast, the method further comprising:
and if the first access quantity is larger than or equal to a first threshold value, adjusting the first access quantity to be the same as the second access quantity.
7. The method of any one of claims 1-6, wherein the first access number and the second access number are determined based on a number of tokens in a token record, the token record being information of users accessing the target live broadcast stored in a disk of the live broadcast server in the form of snapshots, one user accessing the target live broadcast corresponding to one token, the token record being stored based on a structured data storage system hash tairHash data structure.
8. A control device for accessing live broadcast is applied to a live broadcast server, and comprises:
the system comprises a receiving unit, a live broadcast accessing unit and a live broadcast accessing unit, wherein the receiving unit is used for receiving a live broadcast accessing request initiated by a user based on a client of user equipment, and the live broadcast accessing request is used for requesting to access a target live broadcast;
the first acquisition unit is used for acquiring the number of users for accumulating the access target live broadcast to obtain a first access number;
the second obtaining unit is used for obtaining the number of users currently accessing the target live broadcast to obtain a second access number if the first access number is larger than or equal to a preset first threshold;
and the first output unit is used for outputting the target live broadcast through the client if the second access quantity is smaller than the first threshold.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the electronic device to perform the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-7.
12. A control system for accessing a live broadcast, comprising a live broadcast server and a user equipment, wherein the live broadcast server comprises the control device for accessing the live broadcast in claim 8, and the user equipment comprises a client for initiating a request for accessing the live broadcast to the control device for accessing the live broadcast.
CN202210552025.7A 2022-05-18 2022-05-18 Control method, device and system for accessing live broadcast Pending CN115037954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210552025.7A CN115037954A (en) 2022-05-18 2022-05-18 Control method, device and system for accessing live broadcast

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210552025.7A CN115037954A (en) 2022-05-18 2022-05-18 Control method, device and system for accessing live broadcast

Publications (1)

Publication Number Publication Date
CN115037954A true CN115037954A (en) 2022-09-09

Family

ID=83122020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210552025.7A Pending CN115037954A (en) 2022-05-18 2022-05-18 Control method, device and system for accessing live broadcast

Country Status (1)

Country Link
CN (1) CN115037954A (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7647318B1 (en) * 2003-07-28 2010-01-12 Juniper Networks, Inc. Management interface having fine-grain access control using regular expressions
CN101729571A (en) * 2009-12-28 2010-06-09 广州游家信息技术有限公司 Method, server and system for counting network on-line user number
WO2011054555A1 (en) * 2009-11-06 2011-05-12 International Business Machines Corporation Method and system for managing security objects
CN104468395A (en) * 2014-10-20 2015-03-25 广州华多网络科技有限公司 Direct-broadcasting-room channel access method and system
CN104754284A (en) * 2013-12-26 2015-07-01 中国移动通信集团公司 Video conference live broadcast method, equipment and system
US20170010853A1 (en) * 2015-07-12 2017-01-12 Jeffrey Gelles System for remote control and use of a radio receiver
CN106791901A (en) * 2016-12-15 2017-05-31 Tcl集团股份有限公司 A kind of direct broadcast band sort method and its device
US20190079941A1 (en) * 2017-09-13 2019-03-14 Facebook, Inc. Highlighting portions of a live video broadcast
US10334314B1 (en) * 2017-12-22 2019-06-25 Hulu, LLC Preload-supported concurrent video stream limiting
CN110166791A (en) * 2019-06-12 2019-08-23 北京字节跳动网络技术有限公司 Establishment of connection method, apparatus, equipment and storage medium
CN110913235A (en) * 2018-09-18 2020-03-24 优酷网络技术(北京)有限公司 Access control method and device for large-scale live broadcast and electronic equipment
CN111030936A (en) * 2019-11-18 2020-04-17 腾讯云计算(北京)有限责任公司 Current-limiting control method and device for network access and computer-readable storage medium
CN111355970A (en) * 2019-05-15 2020-06-30 深圳市鸿合创新信息技术有限责任公司 Live broadcast management method and device and electronic equipment
CN111414516A (en) * 2020-03-17 2020-07-14 北京字节跳动网络技术有限公司 Live broadcast room message processing method and device, electronic equipment and storage medium
CN112738547A (en) * 2020-12-31 2021-04-30 杭州当虹科技股份有限公司 System for real-time statistics live online number of people
CN113067808A (en) * 2021-03-15 2021-07-02 上海哔哩哔哩科技有限公司 Data processing method, live broadcast method, authentication server and live broadcast data server
CN113115056A (en) * 2021-03-15 2021-07-13 广州虎牙科技有限公司 Live broadcast method, device, system, storage medium and equipment
CN113312328A (en) * 2021-07-28 2021-08-27 阿里云计算有限公司 Control method, data processing method, data access method and computing device
DE112020000538T5 (en) * 2019-05-07 2021-10-21 International Business Machines Corporation FINE-GRAINED TOKEN-BASED ACCESS CONTROL
CN113810726A (en) * 2020-06-12 2021-12-17 阿里巴巴集团控股有限公司 Control method, control device and control equipment
CN114257521A (en) * 2021-12-17 2022-03-29 北京沃东天骏信息技术有限公司 Flow prediction method, device, electronic equipment and storage medium

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7647318B1 (en) * 2003-07-28 2010-01-12 Juniper Networks, Inc. Management interface having fine-grain access control using regular expressions
WO2011054555A1 (en) * 2009-11-06 2011-05-12 International Business Machines Corporation Method and system for managing security objects
CN101729571A (en) * 2009-12-28 2010-06-09 广州游家信息技术有限公司 Method, server and system for counting network on-line user number
CN104754284A (en) * 2013-12-26 2015-07-01 中国移动通信集团公司 Video conference live broadcast method, equipment and system
CN104468395A (en) * 2014-10-20 2015-03-25 广州华多网络科技有限公司 Direct-broadcasting-room channel access method and system
US20170010853A1 (en) * 2015-07-12 2017-01-12 Jeffrey Gelles System for remote control and use of a radio receiver
CN106791901A (en) * 2016-12-15 2017-05-31 Tcl集团股份有限公司 A kind of direct broadcast band sort method and its device
US20190079941A1 (en) * 2017-09-13 2019-03-14 Facebook, Inc. Highlighting portions of a live video broadcast
US10334314B1 (en) * 2017-12-22 2019-06-25 Hulu, LLC Preload-supported concurrent video stream limiting
CN110913235A (en) * 2018-09-18 2020-03-24 优酷网络技术(北京)有限公司 Access control method and device for large-scale live broadcast and electronic equipment
DE112020000538T5 (en) * 2019-05-07 2021-10-21 International Business Machines Corporation FINE-GRAINED TOKEN-BASED ACCESS CONTROL
CN111355970A (en) * 2019-05-15 2020-06-30 深圳市鸿合创新信息技术有限责任公司 Live broadcast management method and device and electronic equipment
CN110166791A (en) * 2019-06-12 2019-08-23 北京字节跳动网络技术有限公司 Establishment of connection method, apparatus, equipment and storage medium
CN111030936A (en) * 2019-11-18 2020-04-17 腾讯云计算(北京)有限责任公司 Current-limiting control method and device for network access and computer-readable storage medium
CN111414516A (en) * 2020-03-17 2020-07-14 北京字节跳动网络技术有限公司 Live broadcast room message processing method and device, electronic equipment and storage medium
CN113810726A (en) * 2020-06-12 2021-12-17 阿里巴巴集团控股有限公司 Control method, control device and control equipment
CN112738547A (en) * 2020-12-31 2021-04-30 杭州当虹科技股份有限公司 System for real-time statistics live online number of people
CN113067808A (en) * 2021-03-15 2021-07-02 上海哔哩哔哩科技有限公司 Data processing method, live broadcast method, authentication server and live broadcast data server
CN113115056A (en) * 2021-03-15 2021-07-13 广州虎牙科技有限公司 Live broadcast method, device, system, storage medium and equipment
CN113312328A (en) * 2021-07-28 2021-08-27 阿里云计算有限公司 Control method, data processing method, data access method and computing device
CN114257521A (en) * 2021-12-17 2022-03-29 北京沃东天骏信息技术有限公司 Flow prediction method, device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
QI LI; XINWEN ZHANG; QINGJI ZHENG; RAVI SANDHU; XIAOMING FU: "LIVE: Lightweight Integrity Verification and Content Access Control for Named Data Networking", 《IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY》, 31 December 2015 (2015-12-31) *
李昊;张敏;冯登国;惠榛;: "大数据访问控制研究", 计算机学报, no. 01, pages 13 *
武娟;龙斌;庞涛;黄海;: "一种可控对等网络流媒体直播系统", 电信科学, no. 01, 15 January 2010 (2010-01-15) *

Similar Documents

Publication Publication Date Title
US11948155B2 (en) Method and device for performing credit evaluation on work publisher on basis of blockchain
US10210342B2 (en) Centralized throttling service
US20140298395A1 (en) Methods and systems for playing video on multiple terminals
WO2018000624A1 (en) Video playing control method and device
CN112203111B (en) Multimedia resource preloading method and device, electronic equipment and storage medium
US11792445B2 (en) Methods and apparatus for pausing live service
CN110324680B (en) Video pushing method and device, server, client and storage medium
CN109428910B (en) Data processing method, device and system
US11212332B2 (en) Dynamic archiving of streaming content
US20170185454A1 (en) Method and Electronic Device for Determining Resource Consumption of Task
CN110022259B (en) Message arrival rate determining method and device, data statistics server and storage medium
WO2014153963A1 (en) Methods and systems for playing video on multiple terminals
CN116627333A (en) Log caching method and device, electronic equipment and computer readable storage medium
CN106649645B (en) Playlist processing method and device
CN110740174A (en) File downloading speed limiting method and device and electronic equipment
CN112565877B (en) Screen projection method and system, electronic equipment and storage medium
CN113852834A (en) Content display method, device, equipment and storage medium
CN112257038A (en) Courseware anti-theft method, courseware anti-theft system, electronic equipment and storage medium
CN115037954A (en) Control method, device and system for accessing live broadcast
CN109788326B (en) Video resource pre-pushing method, device and system
CN112148789A (en) Processing method and system for controlling multimedia playing
CN107528900B (en) Multimedia file processing method, related equipment and system
CN111124308A (en) Performance analysis method and device, electronic equipment and storage medium
CN111090818A (en) Resource management method, resource management system, server, and computer storage medium
CN109194971A (en) A kind of generation method and device for multimedia file

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