CN115037954B - 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
CN115037954B
CN115037954B CN202210552025.7A CN202210552025A CN115037954B CN 115037954 B CN115037954 B CN 115037954B CN 202210552025 A CN202210552025 A CN 202210552025A CN 115037954 B CN115037954 B CN 115037954B
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.)
Active
Application number
CN202210552025.7A
Other languages
Chinese (zh)
Other versions
CN115037954A (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.)
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/CN115037954B/en
Publication of CN115037954A publication Critical patent/CN115037954A/en
Application granted granted Critical
Publication of CN115037954B publication Critical patent/CN115037954B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/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)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

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 an access live broadcast request initiated by a user based on a client of user equipment, wherein the access live broadcast request is used for requesting to access a target live broadcast, acquiring the user quantity of accumulated access target live broadcast to obtain a first access quantity, acquiring the user quantity of the current access target live broadcast to obtain a second access quantity if the first access quantity is larger than a preset first threshold, and outputting the target live broadcast through the client if the second access quantity is smaller than or equal to the first threshold, so that the control of the user access live broadcast can be realized from two granularities of coarse and fine, and the flexibility, the effectiveness and the reliability of the control are improved.

Description

Control method, device and system for accessing live broadcast
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method, a device and a system for controlling access to live broadcast.
Background
With the development of internet technology, live broadcast is widely applied to different industries.
Users can access live broadcast through user equipment, and as the number of users accessing live broadcast is continuously increased, how to control the live broadcast access is a problem to be solved urgently.
Disclosure of Invention
The disclosure provides a control method, device and system for accessing live broadcast, which are used for improving the reliability of accessing live broadcast.
In a first aspect, an embodiment of the present disclosure provides a control method for accessing live broadcast, which is applied to a live broadcast server, where the method includes:
Receiving an access live broadcast request initiated by a user based on a client of user equipment, wherein the access live broadcast request is used for requesting to access a target live broadcast;
Acquiring the number of users of the accumulated access target live broadcast to obtain a first access number;
If the first access number is greater than or equal to a preset first threshold value, acquiring the number of users currently accessing the target live broadcast, and acquiring a second access number;
And if the second access number is smaller than the first threshold, outputting the target live broadcast through the client.
In one embodiment of the present disclosure, after the obtaining the number of users currently accessing the target live broadcast if the first number of accesses 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 quantity, 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 disclosure, determining and transmitting a target polling time interval to the client according to the second number of accesses includes:
Determining a current limiting feedback code of the second access quantity according to the second access quantity and a preset access current limiting quantity;
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 a plurality of, and the plurality of live broadcasts includes the target live broadcast; before the determining and sending the target polling time interval to the client according to the second access number, the method comprises:
acquiring a third access quantity for accessing the 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 determining and sending a polling time interval to the client according to the second access number, including: 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 one embodiment of the present disclosure, after the obtaining the number of users currently accessing the target live broadcast, obtaining a second number of accesses, 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 one embodiment of the present disclosure, the first number of accesses and the second number of accesses are determined based on a number of tokens in a token record, the token record being information of a user accessing the target live broadcast stored in a disk of the live broadcast server in a form of a snapshot, 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.
In one embodiment of the disclosure, the token has a type attribute, the type attribute comprising a valid type, the first number of accesses being a total number of tokens in the token record; the second access number is the number of tokens of the valid type in the token record;
Aiming at a client corresponding to any token, if a heartbeat request initiated by the client in a preset period is received, the type attribute of the token corresponding to the client is an effective type.
In one embodiment of the present disclosure, after the obtaining the number of users currently accessing the target live broadcast if the first number of accesses is greater than or equal to a preset first threshold, the method further includes:
And if the second access number is greater than or equal to the first threshold, 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 one embodiment of the present disclosure, after the acquiring the number of users that accumulated the access target live broadcast, the method further includes:
and if the first access number is smaller than the first threshold, outputting the target live broadcast through the client.
In a second aspect, an embodiment of the present disclosure provides a control apparatus for accessing live broadcast, applied to a live broadcast server, where the apparatus includes:
The receiving unit is used for receiving an access live broadcast request initiated by a user based on a client of user equipment, wherein the access live broadcast request is used for requesting to access a target live broadcast;
the first acquisition unit is used for acquiring the number of users of the accumulated access target live broadcast to obtain a first access number;
the second acquisition unit is used for acquiring 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 value, so as to acquire a second access number;
and the first output unit is used for outputting the target live broadcast through the client if the second access number 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 instruct a client to initiate a frequency of a heartbeat request to the live broadcast server;
And the sending unit is used for sending 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:
A first determining subunit, configured to determine a current limiting feedback code 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 characterize a correspondence between the current-limiting feedback code and the time interval;
and the third determining subunit is used for determining a 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 a plurality of, and the plurality of live broadcasts includes the target live broadcast; the apparatus 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:
A fourth determining subunit, configured to determine a second polling time interval according to the second access number and a preset second access current limiting number 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:
And the adjusting unit is used for adjusting the first access quantity to be the same as the second access quantity if the first access quantity is larger than or equal to a first threshold value.
In one embodiment of the present disclosure, the first number of accesses and the second number of accesses are determined based on a number of tokens in a token record, the token record being information of a user accessing the target live broadcast stored in a disk of the live broadcast server in a form of a snapshot, 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.
In one embodiment of the disclosure, the token has a type attribute, the type attribute comprising a valid type, the first number of accesses being a total number of tokens in the token record; the second access number is the number of tokens of the valid type in the token record;
Aiming at a client corresponding to any token, if a heartbeat request initiated by the client in a preset 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 number 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 the third output unit is used for outputting the target live broadcast through the client if the first access number is smaller than the first threshold value.
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 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 aspects of the present disclosure.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the first aspects of the present disclosure.
In a fifth aspect, the disclosed embodiments provide a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the first aspects of the 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 device, where the live broadcast server includes a control device for accessing live broadcast according to the second aspect, and the user device 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 an access live broadcast request initiated by a user based on a client of user equipment, wherein the access live broadcast request is used for requesting to access a target live broadcast, acquiring the number of users accumulating the access target live broadcast, acquiring a first access number, acquiring the number of users currently accessing the target live broadcast if the first access number is larger than a preset first threshold value, acquiring a second access number, and outputting the target live broadcast through the client if the second access number is smaller than or equal to the first threshold value.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a flow chart of a control method of accessing live in accordance with one embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of controlling access to a live broadcast in accordance with 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 live broadcast according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a control apparatus for accessing live broadcast according to another embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a control system accessing a live broadcast according to one embodiment of the present disclosure;
fig. 7 is a schematic hardware structure of an electronic device according to an embodiment of the disclosure.
Specific embodiments of the present disclosure have been shown by way of the above drawings and will be described in more detail below. These drawings and the written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The terms first, second, third and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein.
Furthermore, 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 broadcasting can be understood as an information network publishing mode with a bidirectional circulation process, wherein information is synchronously produced and published along with the occurrence and development processes of an event on site. The mode of the system can also be divided into live broadcast, studio interview type live broadcast, text and picture live broadcast, video and audio live broadcast or live broadcast with a third party (such as a television) for providing information sources, and the like, and the live broadcast has the functions of mass storage and convenient searching.
The live broadcast server may be understood as a server supporting a live broadcast function, that is, "live broadcast" in the live broadcast server cannot be understood as limiting the server, and the live broadcast server may be a cloud server, a local server, a server cluster, or an electronic device supporting a live broadcast function, which is not limited in this embodiment.
The user may access the live broadcast through the user device. Illustratively, a user may access a live broadcast corresponding to the shared uniform resource locator (Uniform Resource Locator, URL) through a browser, and may access the live broadcast without logging in.
User equipment is understood to be equipment that can establish a communication link with a live server and has a display function, such as a desktop computer, a notebook computer, a mobile phone, etc., which are not listed here.
It can be understood that the types of live broadcast are numerous, such as educational live broadcast, cultural live broadcast, video live broadcast, conference live broadcast, object (may be a physical object or a virtual object) live broadcast, etc., and for some 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, etc., the number of users accessing the live broadcast needs to be controlled, that is, the number of people watching the live broadcast is controlled.
By taking education live broadcasting as an example, and taking a special delivery classroom in education live broadcasting as an example, a platform for providing live broadcasting can open the special delivery classroom to the public through live broadcasting, so as to avoid defects such as blocking caused by too many people, improve the reliability of watching live broadcasting by each public, avoid too high cost, and control the number of people accessing live broadcasting.
The special class emphasizes the specialization, mainly aims at the problems that education resources are relatively weak and relevant specified courses are not available, are specially give a course on the internet or are used for synchronously teaching, and utilize the Internet to push appropriate high-quality education resources according to teaching progress, so that the fair and balanced development of education is promoted.
In some embodiments, the upper limit value of the number of users watching live broadcast may be set, and the number of users watching live broadcast may be counted, and when the number of users watching live broadcast reaches the upper limit value of the number, the watching request of the users who later request to watch live broadcast is refused.
However, the number of users actually watching live broadcast may be smaller than the upper limit value, for example, a user exits from live broadcast after watching live broadcast for one minute, so that the reliability and accuracy of control over accessing live broadcast are low.
To avoid at least one of the above technical problems, the inventors of the present disclosure have creatively worked to obtain the inventive concept of the present disclosure: the number of users watching the live broadcast is determined from two granularities, namely, coarse granularity and fine granularity, wherein the number of users watching the live broadcast is determined by coarse granularity, namely, the accumulated number of users watching the live broadcast is determined by fine granularity, the number of users watching the live broadcast is determined by fine granularity, namely, the actual number of users currently watching the live broadcast, and the control of accessing the live broadcast is realized through the accumulated number and the actual number.
The technical scheme of the present disclosure is described in detail below through specific embodiments. It should be noted that the following 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 live broadcast according to an embodiment of the disclosure, as shown in fig. 1, the method includes:
s101: and receiving an access live broadcast request initiated by a user based on a client of the user equipment.
The live broadcast access request is used for requesting to access the target live broadcast. The target live broadcast is used to characterize a live broadcast that the user wishes to access, i.e. a live broadcast that the user wishes to view, and is not to be interpreted as a 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) for accessing live broadcast, and the control device may be a processor or a chip or the like provided in a live broadcast server.
The present embodiment is not limited as to the manner in which the control device obtains the access live request. For example, the user may initiate the access live broadcast request by means of voice, and correspondingly, the control device obtains the voice initiated by the user through the client of the user device, so as to obtain the access live broadcast request. For another example, the user may initiate a live access request in a touch manner, and correspondingly, the control device obtains the live access request.
Taking the example that a user can initiate a request for accessing live broadcast in a voice manner, the following is exemplarily set forth: the user equipment is provided with a pickup assembly, the pickup assembly establishes a communication link with the client, and the pickup assembly collects a live broadcast access request initiated by user voice and transmits the live broadcast access request to the control device.
S102: and acquiring the number of users of the accumulated access target live broadcast to obtain a first access number.
By way of example, the first access number may be understood as the number of users accessing the target live broadcast that are accumulated from the beginning of the target live broadcast to the current moment. If the target live broadcast has been broadcast for 10 minutes to the current time, the first access number is the number of all users accessing the target live broadcast within 10 minutes.
S103: if the first access number is greater than or equal to a preset first threshold, acquiring the number of users currently accessing the target live broadcast, and acquiring a second access number.
It is understood that the first threshold is an upper limit value of the number of users accessing the target live broadcast, i.e. a threshold value in terms of the total number of users accessing the target live broadcast. The magnitude of the first threshold may be determined based on demand, history, experimentation, and the like. If a live scene with more users can be supported for a live server, the first threshold value can be relatively larger; 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 is 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 a heartbeat request initiated by the client to the live broadcast server.
For example, in a preset heartbeat frequency range, if the live broadcast server receives a heartbeat request initiated by a certain client, the client is indicated to be the client accessing the 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, the user corresponding to the client is indicated to have exited the access to the target live broadcast.
In combination with the above analysis, the first access number is the number of users accessing the target live broadcast after the target live broadcast, for example, the first access number includes the number of users accessing the target live broadcast at the current time (i.e., the second access number), and the first access number includes the number of users accessing the target live broadcast before and not accessing the target live broadcast at the current time.
That is, the first access number may be understood as the number of users of the access target live broadcast determined from the coarse granularity, i.e., the number determined from the overall granularity of the access 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, i.e. the number determined from the local granularity of accessing the target live broadcast at the current moment.
The user accessing the target live broadcast at the current moment can be understood as an effective user, and the user accessing the target live broadcast before and not accessing the target live broadcast at the current moment can be understood as an ineffective user.
Accordingly, the first number of accesses = number of active users + number of inactive users, and the second number of accesses = number of active users. Thus, the first access number=the second access number+the number of dead users.
S104: and if the second access number is smaller than the first threshold, outputting the target live broadcast through the client.
The second access number is smaller than the first threshold, which indicates that the number of users currently accessing the target live broadcast (i.e. the number of effective users) does not exceed the upper limit value of the number of users for which the live broadcast server can view the target live broadcast, so that the control device can output the target live broadcast to the client, so that the user can view 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 an access live broadcast request initiated by a user based on a client of user equipment, wherein the access live broadcast request is used for requesting to access a target live broadcast, acquiring the user quantity of accumulated access target live broadcast, obtaining a first access quantity, acquiring the user quantity of the current access target live broadcast if the first access quantity is larger than or equal to a preset first threshold value, obtaining a second access quantity, and outputting the target live broadcast through the client if the second access quantity is smaller than the first threshold value.
In order to make the reader more deeply understand the implementation principle of the present disclosure, a control method for accessing live broadcast of the present disclosure will be described in more detail with reference to fig. 2, and the method may be applied to a live broadcast server. As shown in fig. 2, the method includes:
s201: and receiving an access live broadcast request initiated by a user based on a client of the user equipment.
The live broadcast access request is used for requesting to access the target live broadcast.
It will be appreciated that, in order to avoid cumbersome descriptions, the technical features of the present embodiment that are the same as those of the above embodiment are not repeated.
S202: and obtaining token records stored by the live broadcast server, determining the number of users accessing the target live broadcast according to the token records, and obtaining the first access number.
Wherein one token represents one user, i.e. one user corresponds to one token. The method includes that a token is carried in an access live broadcast request initiated by a client so that a control device can carry out authentication processing on access rights of a user based on the token, if the authentication is passed, whether the token is included in a token record or not is determined, if the token is included in the token record, the fact that the user has proposed access to a target live broadcast due to network abnormality or the like is indicated, and the token is not required to be added in the token record; otherwise, if the token record does not include the token, the user is a new user living broadcast of the access target, the token record added with the token is added, and the count value corresponding to the token record is added with 1 so as to determine the first access amount through the count value.
S203: whether the first access number is greater than or equal to a first threshold is determined, if so, S204 is executed, and if not, S206 is executed.
S204: and acquiring the number of 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 broadcast that is saved in the form of a snapshot in the disk of the live server. A user accessing the target live broadcast corresponds to a token that is recorded as maintained based on a structured data storage system hash (tairHash) data structure.
Illustratively, the Redis is an in-memory database of the live server, where the in-memory database is to store the content in the database of the live server in the in-memory of the live server. In contrast, the memory database has much faster read-write efficiency than the conventional database (the memory has much higher read-write efficiency than the hard disk).
In order to avoid the defect that the data in the memory database is lost completely due to the power failure or downtime of the live server, in this embodiment, a persistence (RDB) mode is adopted to write the data snapshot in the memory into the disk of the live server, and if the data needs to be recovered, the snapshot file can be read into the memory.
The data structure of the token record is tairHash data structures. For example, the tairHash data structure is a key-value pair (key-value) structure, one key corresponds to one live broadcast, and the live broadcast server can support to play a plurality of live broadcasts simultaneously, wherein the plurality of live broadcasts comprise target live broadcasts, the value corresponding to the key is fieldtoken, and the token number of the current access live broadcast is represented.
In some embodiments, the number of fieldtoken per key, i.e., the number of currently accessed users on a direct broadcast, may be determined by a count statistics method (exhlenWithNoExp). For example, the number of fieldtoken under the key of the target live broadcast is determined through a counting statistical method, so that the second access number is obtained.
In this embodiment, the second access number is determined by combining tairHash data structures and a counting statistical method, so that the concurrence can be greatly improved, that is, in a scene where a plurality of live broadcasts are broadcast by a live broadcast server, the current access number corresponding to each live broadcast is determined in parallel.
In some embodiments, it is also possible to implement that only one thread can determine the current number of accesses at a time through atomic operation (atomic operation). For example, atomic writing of keys may be accomplished by SETNX commands, thereby enabling only one thread to determine the current number of accesses at a time.
In connection with the above analysis, the number of users in the token log may be counted from both a "coarse" and a "fine" granularity. For example, coarse granularity may be understood as: and if the live broadcast access request 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 particle size can be understood as: and determining the number of users currently accessing the target live broadcast in combination with the heartbeat request.
In some embodiments, the token has a type attribute including a valid type and an invalid type, the first number of accesses being a total number of tokens in the token record; the second number of accesses is the number of 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 period is received, the type attribute of the token corresponding to the client is an effective type.
If the client initiates a heartbeat request to the control device within a preset period, a user accessing the target live broadcast through the client is an effective user, and correspondingly, a token corresponding to the client is an effective type token, and the user is a user currently accessing the target live broadcast.
Otherwise, if the client does not initiate a heartbeat request to the control device within the preset period, the communication link between the client and the live broadcast server may be disconnected due to network abnormality or user exit operation, etc., 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 type token, and the user is not the user currently accessing the target live broadcast, but is one user of the number of users accumulating to access the target live broadcast.
That is, the token record has an accumulated number, which is the number of users (i.e., the first access number) who only increase and decrease for all access targets living broadcast, and a current number, which is the number of users (the second access number) who keep heartbeats with the living broadcast server.
S205: whether the second access number is smaller than the first threshold is determined, if yes, S206 is executed, and if no, S207 is executed.
S206: and outputting the target live broadcast through the client.
S207: and outputting a 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 greater than the first threshold, the number of users accessing the target live broadcast at present is not up to the upper limit value of the number, and the users can be prompted that the target live broadcast cannot be accessed at present. Or the prompt message may also prompt the user "retry later" or the like.
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 is indicated that the number of users that access the target live broadcast cumulatively has not reached the number upper limit, and the control device may output the target live broadcast to the client, so that the user views the target live broadcast through the user device. And the subsequent operation of acquiring the second access quantity and the like is not needed, so that the response efficiency and the overall access performance of the live broadcast server are improved.
If the first access is greater than or equal to the first threshold, the number of users accumulating the access target live broadcast is indicated to reach the upper limit value of the number, and in order to realize the reliability of the control of the access target live broadcast and avoid the excessive number of the 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, the control device can output the target live broadcast to the client so that the user can watch the target live broadcast through the user equipment. Otherwise, if the second access number is greater than or equal to the first threshold, which indicates that the number of users currently accessing the target live broadcast has reached the upper limit value of the number, the control device does not output the target live broadcast to the client, but may output the prompting message as described in the foregoing embodiment.
In order to make the first access quantity as large as possible be the number of users currently accessing the target live broadcast, so as to process as many access live broadcast requests as possible in a coarse granularity stage without entering a fine granularity stage, thereby improving the efficiency of accessing live broadcast and improving the experience of users accessing live broadcast, when the first access quantity is greater than or equal to a first threshold value, the first access quantity can be adjusted to be the same as the second access quantity.
On this basis, the first number of accesses may be further optimized, for example, the first number of accesses may be adjusted to the same value as the second number of accesses on a time-interval basis. 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 60 seconds intervals.
Alternatively, the first access number may be adjusted to the same value as the second access number when the first access number is greater than the second threshold. Wherein the second threshold is greater than or equal to the first threshold.
It should be understood that the above examples are only for exemplary purposes of illustrating the possible ways of optimizing the adjustment of the first number of accesses and are not to be construed as limiting the adjustment of the first number of accesses.
In connection with the above analysis, the second number of accesses is the number of active users, which may be determined based on the heartbeat request. In some embodiments, the client may initiate a heartbeat request to the live server based on a fixed frequency, and if the live server does not receive the heartbeat request initiated by the client in the fixed frequency, the user corresponding to the client is indicated as a failure user; otherwise, if the live broadcast server receives the heartbeat request initiated by the client in the fixed frequency, the user corresponding to the client is indicated to be an effective user.
However, particularly for a scenario where the number of users accessing the target live is high, in order to reduce the amount of concurrent access per unit time of the client, in other embodiments, the client may initiate heartbeat requests to the live server based on a flexible frequency. In order to enable readers to understand deeply the implementation principle of the control method for accessing live broadcast under the condition that the client initiates the heartbeat request to the live broadcast server based on flexible frequency, the implementation principle is described in detail 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, as shown in fig. 3, and the method includes:
S301: the client initiates a request for accessing the live broadcast to the live broadcast server. The live broadcast access request is used for requesting to access the target live broadcast.
Illustratively, the user is based on a request to access live initiated by a client of the user device. Correspondingly, a live broadcast access request initiated by a user based on a client of user equipment is received.
Similarly, in order to avoid cumbersome descriptions, the technical features of the present embodiment that are the same as those of the above embodiment are not repeated.
S302: and the live broadcast server acquires the number of users which access the target live broadcast in a cumulative way, and obtains the first access number.
S303: if the first access number is greater than or equal to a preset first threshold, 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 number is smaller than the first threshold value, the live broadcast server transmits the target live broadcast to the client.
The live broadcast server transmits the target live broadcast to the user equipment through the client, and the user equipment receives the target live broadcast correspondingly.
S305: and the client outputs the target live broadcast.
And if the client plays the target live broadcast through the display screen of the user equipment, the user can watch the target live broadcast.
S306: the live server determines a target polling interval according to the second number of accesses. The target polling time interval is used for indicating the frequency of the client initiating the heartbeat request to the live server.
S307: the live server sends a target polling interval to the client.
Correspondingly, the client receives the target polling time interval.
S308: the client initiates a heartbeat request to the live server based on the target polling 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 along with the change of the second access number. The target polling interval is relatively small if the second number of accesses increases, and relatively large if the second number of accesses decreases.
In some embodiments, the second number of accesses is inversely proportional to the target polling time interval. The larger the second access number, the shorter the target polling interval; conversely, the smaller the second number of accesses, the longer the target polling interval.
By the scheme provided by the embodiment, under the condition that the access amount of the target live broadcast is larger, the client initiates a heartbeat request to the live broadcast server in a shorter time period so as to release the access resource of the access target live broadcast of the invalid user and meet the access requirement of more access target live broadcast.
In some embodiments, S306 may include the steps of:
A first step of: and determining the current limiting feedback code of the second access quantity according to the second access quantity and the preset access current limiting quantity.
Similarly, the number of access restrictions may be determined based on the requirements, the history, and the test, which is not limited in this embodiment. Preferably, the number of access restrictions 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 current limit number, different access scenes may be determined, if the second access number is smaller than the access current limit number, the access scene is a normal access scene, if the second access number is greater than or equal to the access current limit number, the access scene is a current limit retry scene, and if the live broadcast server currently receives a greater number of requests for accessing the live broadcast, the access scene is a concurrent retry scene. And the current limiting feedback codes corresponding to different access scenes are different.
And a second step of: 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 relation with the current-limiting feedback code can be determined from the mapping relation.
In combination with the above analysis, the current-limiting feedback codes corresponding to different access scenes are different, and the time intervals corresponding to different current-limiting feedback codes are different, so that the time intervals corresponding to different access scenes are different.
For example, the time interval of the normal access scenario is [ 10 seconds, 50 seconds ], the time interval of the concurrent retry scenario is [ 2 seconds, 8 seconds ], and the time interval of the current limit retry scenario is [ 1 second, 3 seconds ].
And a third step of: and determining and sending a 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 embodiment is not limited.
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, so that the target polling time interval is 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 broadcasting a plurality of live broadcasts simultaneously, and the target live broadcasts are included in the plurality of live broadcasts, so that a 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 'whole current limiting dimension + local current limiting dimension', and the accuracy and the reliability of determining the target polling time interval are further improved.
Where the overall current limit dimension refers to the dimension of the current limit number of a plurality of live ensembles played out from the live server. The local current limit dimension refers to the dimension of the number of current limits for broadcasting the target live portion from the live server.
For example, the live server may obtain a third access number to access 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 second access current limiting quantity of the preset target live broadcast; and determining a target polling time interval according to the first polling time interval and the second polling time interval.
Wherein the third access number is the sum of all the user numbers accessing the plurality of live broadcasts. The first access current limiting number is the current limiting number of the whole current limiting dimension, and the second access current limiting number is the current limiting number of the local current limiting dimension. The first number of access restrictions is greater than the second number of access restrictions, which may be greater than or equal to the first threshold.
In some embodiments, after determining the first polling interval and the second polling interval, an intersection between the first polling interval and the second polling interval may be determined and determined as the target polling interval.
In some embodiments, if the live broadcast server receives the live broadcast access request, the total number of the live broadcasts accessed currently may be acquired first, and if the total number is greater than or equal to the first access current limit number, the live broadcast access request may be denied. Otherwise, if the total number is smaller than the first access current limit number, the live broadcast requested by the access live broadcast request can be determined, the total number of the live broadcasts requested by the current access request is determined, if the total number is smaller than the second access current limit number corresponding to the requested live broadcast, the requested live broadcast is output, and otherwise, the request is refused.
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 may be obtained by combining multiple diagrams in the three diagrams, or more embodiments, and the combination manner and the sequence of the embodiments are not limited.
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 an access live broadcast request initiated by a user based on a client of the user equipment, where the access live broadcast request is used for requesting to access a target live broadcast.
The first obtaining unit 402 is configured to obtain a first access number by obtaining a cumulative number of users accessing the target live broadcast.
The second obtaining unit 403 is configured to obtain the number of users currently accessing the target live broadcast if the first number of accesses is greater than or equal to a preset first threshold, and obtain a second number of accesses.
The first output unit 404 is configured to output, if the second access number is smaller than the first threshold, the target live broadcast through the client.
Referring to fig. 5, fig. 5 is a schematic diagram of a control device for accessing live broadcast according to another embodiment of the disclosure, where the control device 500 is applied to a live broadcast server, and includes:
The receiving unit 501 is configured to receive an access live broadcast request initiated by a user based on a client of the user equipment, where the access live broadcast request is used for requesting to access a target live broadcast.
The first obtaining unit 502 is configured to obtain a first access number by obtaining a cumulative number of users accessing the target live broadcast.
The second obtaining unit 503 is configured to obtain the number of users currently accessing the target live broadcast if the first number of accesses is greater than or equal to a preset first threshold, so as to obtain a second number of accesses.
The first output unit 504 is configured to output, if the second access number is smaller than the first threshold, the target live broadcast through the client.
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 a client initiating a heartbeat request to a live server.
Illustratively, the second number of accesses is inversely proportional to the target polling time interval.
As can be seen in connection with fig. 5, in some embodiments, the first determining unit 505 comprises:
the first determining subunit 5051 is configured to determine a current limiting feedback code of the second access number according to the second access number and a preset access current limiting number.
The second determining subunit 5052 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 characterize a correspondence between the current-limiting feedback code and the time interval.
A third determining subunit 5053, configured to determine a target polling time interval according to the time interval.
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 a plurality, the plurality of live broadcasts including the target live broadcast; the control device 500 further includes:
a third obtaining unit 507, configured to obtain a third access number of accessing the plurality of live broadcasts.
A second determining unit 508, configured to determine a first polling time interval according to the third access number and a preset first access current limit number of the live server.
Accordingly, the first determining unit 505 includes:
A fourth determining subunit 5054, configured to determine a second polling time interval according to the second access number and a preset second access current limit number of the target live broadcast.
A fifth determining subunit 5055 is configured to determine a target polling time interval according to the first polling time interval and the second polling time interval.
An adjusting unit 509, configured to adjust the first access number to the same value as the second access number if the first access number is greater than or equal to the first threshold.
In some embodiments, the first number of accesses and the second number of accesses are determined based on a number of tokens in a token record, the token record being information stored in the form of a snapshot in a disk of the live server for a user accessing the target live, one for each token, the token record being stored based on a structured data storage system hash tairHash data structure.
In some embodiments, the token has a type attribute, the type attribute comprising a valid type, the first number of accesses being a total number of tokens in the token record; the second access number is the number of tokens of the valid type in the token record;
Aiming at a client corresponding to any token, if a heartbeat request initiated by the client in a preset period is received, the type attribute of the token corresponding to the client is an effective type.
And the second output unit 510 is configured to output, if the second number of accesses is greater than or equal to the first threshold, a prompt message through the client, where the prompt message is used to prompt that the user cannot access the target live broadcast currently.
And a third output unit 511, configured to output, if the first access number is smaller than the first threshold, the target live broadcast through the client.
According to another aspect of the present disclosure, there is further provided a control system for accessing live broadcast, including a live broadcast server and a user equipment, where the live broadcast server includes a control device for accessing live broadcast according to any of the foregoing embodiments, and the user equipment includes a client for initiating a request for accessing live broadcast to the control device for accessing 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 disclosure, as shown in fig. 6, the system includes: a user device and a live server, wherein,
The user equipment comprises a client, wherein the user is used for initiating a live broadcast access request to the live broadcast server, and the live broadcast access request is used for requesting to access a target live broadcast.
A keep-alive component is included in the client that can initiate a heartbeat request to the live server based on the target polling interval.
The live broadcast server includes: a flow break up assembly, a first flow restriction assembly, a coarse grain counter, a calibration assembly, a second flow restriction assembly, a fine grain counter, and a concurrent access lock subassembly.
Wherein the traffic breaking component is configured to determine a target polling interval.
The first current limiting component is used for realizing current limiting of the whole current limiting dimension, for example, the first current limiting component is provided with a first access current limiting quantity, and current limiting processing is carried out on the live broadcast server on the whole according to the third access quantity and the first access current limiting quantity.
The coarse granularity counter and the live broadcast are in one-to-one correspondence, and the coarse granularity counter with the correspondence is used for determining the accumulated number of the access live broadcast.
The calibration component is configured to adjust the cumulative number of coarse grain counters to the same value as the current number of fine grain counters.
The second current limiting component is used for limiting local dimensions, for example, the second current limiting component and the live broadcast are in one-to-one correspondence, and the second current limiting component with the corresponding relationship is used for carrying out current limiting processing on the corresponding access quantity of the live broadcast.
The fine granularity counter and the coarse granularity counter are in one-to-one correspondence, and if the accumulated number determined by the coarse granularity counter reaches a preset access upper limit value, the current number is determined by the fine granularity counter with the correspondence.
The concurrent access lock sub-assembly is used for controlling the operation of determining the current number by a thread execution fine granularity counter at the same time in a locking mechanism mode.
It should be understood that the implementation principles of the above components may be referred to the above embodiments, and are not repeated herein. And the above-described divisions of components are for exemplary illustration only, and components that may be included in the system are not to be construed as limitations on the components in the system.
Fig. 7 is a schematic hardware structure of an electronic device according to an embodiment of the 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 to enable the electronic device 700 to perform the technical solutions of any of the method embodiments described above.
Alternatively, the memory 702 may be separate or integrated with the processor 701.
When the memory 702 is separate from the processor 701, the electronic device 700 further includes: 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 solution of any one of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
The disclosed embodiments also provide a computer readable storage medium, in which a computer program is stored, for implementing the technical solution in any of the foregoing method embodiments when the computer program is executed by a processor.
The disclosed embodiments provide a computer program product comprising a computer program which, when executed by a processor, implements the technical solution in any of the foregoing method embodiments.
The embodiment of the disclosure also provides a chip, which comprises: the processing module and the communication interface, the processing module can execute the technical scheme in the embodiment of the method.
Further, the chip further includes a storage module (e.g., a memory), where the storage module is configured to store the instructions, and the processing module is configured to execute the instructions stored in the storage module, and 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 above Processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, a digital signal Processor (english: DIGITAL SIGNAL Processor, abbreviated as DSP), an Application-specific integrated Circuit (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), or the like. 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 for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present disclosure are not limited to only one bus or to one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile 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 disk. 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. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). 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 for illustrating the technical solution of the present disclosure, and not for limiting the same; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.

Claims (11)

1. A control method for accessing live broadcast, which is applied to a live broadcast server, the method comprising:
Receiving an access live broadcast request initiated by a user based on a client of user equipment, wherein the access live broadcast request is used for requesting to access a target live broadcast;
Acquiring the number of users of the accumulated access target live broadcast to obtain a first access number;
if the first access number is greater than or equal to a preset first threshold, acquiring the number of users currently accessing the target live broadcast, and obtaining a second access number, wherein the first threshold is an upper limit value of the number of users accessing the target live broadcast, the second access number is the number of users accessing the target live broadcast at the current moment, and the users accessing the live broadcast at the current moment are determined based on a heartbeat request initiated by a client to the live broadcast server;
And if the second access number is smaller than the first threshold, outputting the target live broadcast through the client.
2. The method of claim 1, after the obtaining the number of users currently accessing the target live broadcast if the first number of accesses is greater than or equal to a preset first threshold, obtaining a second number of accesses, the method further comprises:
And determining and sending a target polling time interval to the client according to the second access quantity, 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. A method according to claim 2 or 3, wherein determining and transmitting a target polling time interval to the client in accordance with the second number of accesses comprises:
Determining a current limiting feedback code of the second access quantity according to the second access quantity and a preset access current limiting quantity;
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. A method according to claim 2 or 3, wherein the number of live broadcasts played by the live broadcast server is a plurality, the plurality of live broadcasts comprising the target live broadcast; before the determining and sending the target polling time interval to the client according to the second access number, the method comprises:
acquiring a third access quantity for accessing the 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 determining and sending a polling time interval to the client according to the second access number, including: 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 claim 5, after the obtaining the number of users currently accessing the target live broadcast, obtaining a second number of accesses, the method further comprising:
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.
7. The method of claim 6, wherein the first number of accesses and the second number of accesses are determined based on a number of tokens in a token record, the token record being information stored in the form of a snapshot in a disk of the live server for a user accessing the target live, one for each token stored based on a structured data storage system hash tairHash data structure.
8. A control device for accessing live broadcast, applied to a live broadcast server, the device comprising:
The receiving unit is used for receiving an access live broadcast request initiated by a user based on a client of user equipment, wherein the access live broadcast request is used for requesting to access a target live broadcast;
the first acquisition unit is used for acquiring the number of users of the accumulated access target live broadcast to obtain a first access number;
The second obtaining unit is configured to obtain, if the first access number is greater than or equal to a preset first threshold, the number of users currently accessing the target live broadcast, and obtain a second access number, where the first threshold is an upper limit value of the number of users accessing the target live broadcast, the second access number is the number of users accessing the target live broadcast at the current moment, and the users accessing the live broadcast at the current moment are determined based on a heartbeat request initiated by a client to the live broadcast server;
and the first output unit is used for outputting the target live broadcast through the client if the second access number 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 memory stores instructions executable by the at least one processor to enable the electronic device to perform the method of any one of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1-7.
11. A control system for accessing live comprising a live server and a user device, the live server comprising the control device for accessing live of claim 8, the user device comprising a client for initiating a request for accessing live to the control device for accessing live.
CN202210552025.7A 2022-05-18 2022-05-18 Control method, device and system for accessing live broadcast Active CN115037954B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210552025.7A CN115037954B (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 CN115037954B (en) 2022-05-18 2022-05-18 Control method, device and system for accessing live broadcast

Publications (2)

Publication Number Publication Date
CN115037954A CN115037954A (en) 2022-09-09
CN115037954B true CN115037954B (en) 2024-06-07

Family

ID=83122020

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN115037954B (en)

Citations (19)

* 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
CN106791901A (en) * 2016-12-15 2017-05-31 Tcl集团股份有限公司 A kind of direct broadcast band sort method and its device
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170010853A1 (en) * 2015-07-12 2017-01-12 Jeffrey Gelles System for remote control and use of a radio receiver
US10664524B2 (en) * 2017-09-13 2020-05-26 Facebook, Inc. Highlighting portions of a live video broadcast

Patent Citations (19)

* 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
CN106791901A (en) * 2016-12-15 2017-05-31 Tcl集团股份有限公司 A kind of direct broadcast band sort method and its device
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》.2015,全文. *
一种可控对等网络流媒体直播系统;武娟;龙斌;庞涛;黄海;;电信科学;20100115(第01期);全文 *
大数据访问控制研究;李昊;张敏;冯登国;惠榛;;计算机学报(第01期);13 *

Also Published As

Publication number Publication date
CN115037954A (en) 2022-09-09

Similar Documents

Publication Publication Date Title
US10210342B2 (en) Centralized throttling service
CN107770571B (en) Live broadcast room recommendation method and device and storage medium
WO2013188777A2 (en) Methods and systems for providing event related information
CN110324680B (en) Video pushing method and device, server, client and storage medium
CN107734352B (en) Information determination method, device and storage medium
US20110221965A1 (en) Degrading a video
CN108235045A (en) A kind of direct broadcasting room recommends method, electronic equipment and readable storage medium storing program for executing
CN110445615B (en) Network request security verification method, device, medium and electronic equipment
US20190073668A1 (en) Browser-based payment for content
CN109428910B (en) Data processing method, device and system
CN116627333A (en) Log caching method and device, electronic equipment and computer readable storage medium
CN115037954B (en) Control method, device and system for accessing live broadcast
CN113139123B (en) Resource recommendation method, device, server side and storage medium
CN112667180B (en) Service data display method and device, computer equipment and storage medium
CN111353455B (en) Video content determining method and device, storage medium and electronic equipment
CN106934708B (en) Event recording method and device
US20170171333A1 (en) Method and electronic device for information pushing
CN107277640A (en) Interactive approach, device and storage medium based on live platform
CN111090818A (en) Resource management method, resource management system, server, and computer storage medium
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
CN112817742B (en) Data migration method, device, equipment and storage medium
CN111405348B (en) Method, apparatus and computer storage medium for media playing
CN110691143B (en) File pushing method and device, electronic equipment and medium
CN113438555A (en) Bandwidth detection method and device, computer equipment and storage medium
CN112541023A (en) Online people counting method, electronic device and storage medium

Legal Events

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