CN108184140B - Live broadcast wheat connecting method, server, storage medium and computer equipment - Google Patents

Live broadcast wheat connecting method, server, storage medium and computer equipment Download PDF

Info

Publication number
CN108184140B
CN108184140B CN201810023758.5A CN201810023758A CN108184140B CN 108184140 B CN108184140 B CN 108184140B CN 201810023758 A CN201810023758 A CN 201810023758A CN 108184140 B CN108184140 B CN 108184140B
Authority
CN
China
Prior art keywords
anchor
user
wheat
client
anchor user
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
CN201810023758.5A
Other languages
Chinese (zh)
Other versions
CN108184140A (en
Inventor
刘凯
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810023758.5A priority Critical patent/CN108184140B/en
Priority to PCT/CN2018/082506 priority patent/WO2019136862A1/en
Publication of CN108184140A publication Critical patent/CN108184140A/en
Application granted granted Critical
Publication of CN108184140B publication Critical patent/CN108184140B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2408Monitoring of the upstream path of the transmission network, e.g. client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4882Data services, e.g. news ticker for displaying messages, e.g. warnings, reminders

Abstract

The invention discloses a live broadcast wheat connecting method, a server, a storage medium and computer equipment, which are applied to the field of network live broadcast, and the method comprises the following steps: receiving a random wheat connecting request from a first main broadcast client of a first main broadcast user; matching a second anchor user for the first anchor user in a connecting candidate pool established by the connecting server; if the first anchor user and the second anchor user are successfully matched, the wheat connecting service between the first anchor client and the second anchor client where the second anchor user is located is established, so that the first anchor user and the second anchor user enter a wheat connecting state.

Description

Live broadcast wheat connecting method, server, storage medium and computer equipment
Technical Field
The invention relates to the field of network live broadcast, in particular to a live broadcast wheat connecting method, a server, a storage medium and computer equipment.
Background
At present, the video live broadcast industry is in an internet air port, and currently, the most common form of live broadcast is that a main broadcast carries out live broadcast on own vermicelli in a live broadcast room. The live broadcast mode with more interactivity is that two anchor users are connected with each other, the pictures of the two parties of the two anchor users are spliced in one window, so that the watching users of the two anchor users can see the live broadcast pictures of the two anchor users at the same time, and the two anchor users can interact with each other.
In terms of the current statistical data of the main broadcasting and the wheat connecting, some main broadcasting users have low popularity and too few wheat connecting objects, and limitation exists during wheat connecting, so that the success of wheat connecting of the main broadcasting is low, and some main broadcasting with high popularity can have wheat connecting queuing, so that the reliability of the main broadcasting and the wheat connecting in the prior art is low.
Disclosure of Invention
The embodiment of the invention provides a live broadcast wheat connecting method, a server, a storage medium and computer equipment, and solves the technical problem of low reliability of main broadcast wheat connecting in the prior art.
In a first aspect, an embodiment of the present invention provides a live broadcast wheat connecting method, which is applied to a wheat connecting server, and the method includes:
receiving a random wheat connecting request from a first main broadcast client of a first main broadcast user;
matching a second anchor user for the first anchor user in a connecting candidate pool established by the connecting server;
and if the first anchor user is successfully matched with the second anchor user, establishing a wheat connecting service between the first anchor client and the second anchor client where the second anchor user is located, so that the first anchor user and the second anchor user enter a wheat connecting state.
Optionally, the matching a second anchor user for the first anchor user in the candidate pool for connecting to the wheat established by the connecting to the wheat server includes:
when the random wheat connecting request from the first anchor client is received, inquiring whether an anchor user waiting for wheat connecting exists in the wheat connecting candidate pool or not;
if the online shopping candidate pool contains the anchor users waiting for online shopping, selecting one anchor user waiting for online shopping from the online shopping candidate pool, and determining the selected anchor user as the second anchor user;
matching the first anchor user and the second anchor user successfully;
and deleting the second anchor user from the continuous microphone candidate pool.
Optionally, the matching, for the first anchor user, of a second anchor user in the candidate pool for connecting to the wheat established by the connecting to the wheat server further includes:
after inquiring whether an anchor user waiting for wheat connection exists in the candidate wheat-connecting pool, if the anchor user waiting for wheat connection does not exist in the candidate wheat-connecting pool, adding the first anchor user into the candidate wheat-connecting pool, and recording a timestamp when the first anchor user is added into the candidate wheat-connecting pool;
keeping the first anchor user in the continuous microphone candidate pool within a preset time length taking the timestamp as an initial time;
if a random wheat connecting request initiated by the second anchor user is received within the preset time length, the first anchor user and the second anchor user are successfully matched, and the first anchor user is deleted from the wheat connecting candidate pool;
and if the time length that the first anchor user keeps in the continuous microphone candidate pool exceeds the preset time length, deleting the first anchor user from the continuous microphone candidate pool, and issuing a matching failure message to the first anchor client.
Optionally, after the first anchor user and the second anchor user are successfully matched, the method further includes:
sending a matching success message to the first anchor client and the second anchor client, wherein the matching success message is used for indicating that the first anchor client and the second anchor client hide matching waiting interfaces respectively;
and acquiring connecting wheat state data representing the connecting wheat state between the first main broadcasting user and the second main broadcasting user, and storing the connecting wheat state data into the connecting wheat session established by the connecting wheat server.
Optionally, after the first anchor user is added to the online candidate pool and before the first anchor user and the second anchor user are successfully matched, the method further includes:
and if a request for canceling the microphone connection from the first main broadcasting client is received, deleting the first main broadcasting user from the microphone connection candidate pool, and sending a successful deletion message to the first main broadcasting client where the first main broadcasting user is located.
Optionally, after the establishment of the session service between the first anchor client and the second anchor client where the second anchor user is located, the method further includes:
receiving a wheat connecting ending request, wherein the wheat connecting ending request is from the first main broadcast client or the second main broadcast client, and the wheat connecting ending request carries a user ID of the first main broadcast user and a user ID of the second main broadcast user;
constructing target query data according to the user ID of the first anchor user and the user ID of the second anchor user;
inquiring whether the target inquiry data exist in the microphone connecting session;
if the target query data exists in the session, ending the session service between the first main broadcasting client and the first main broadcasting client, deleting the session state data representing the session state between the first main broadcasting user and the second main broadcasting user from the session, and sending a session ending notification message to the first main broadcasting client and the second main broadcasting client;
and if the target query data does not exist in the wheat connecting session, returning an error message to the anchor client initiating the wheat connecting ending request.
Optionally, after the establishment of the session service between the first anchor client and the second anchor client where the second anchor user is located, the method further includes:
receiving a first heartbeat message sent by the first anchor client according to a preset heartbeat time interval and a second heartbeat message sent by the second anchor client according to the preset heartbeat time interval, wherein the first heartbeat message and the second heartbeat message both carry a user ID of the first anchor user and a user ID of the second anchor user;
updating the keep-alive timestamp of the first anchor user in the microphone connecting session when the first heartbeat message is received, and updating the keep-alive timestamp of the second anchor user in the microphone connecting session when the second heartbeat message is received;
if the first heartbeat message is not received after the preset check duration is exceeded, ending the connecting service between the first anchor client and the second anchor client, and sending an anchor loss message to the second anchor client;
and if the second heartbeat message is not received after the preset check duration is exceeded, ending the connecting service between the first anchor client and the second anchor client, and sending an anchor lost message to the first anchor client.
In a second aspect, an embodiment of the present invention provides a microphone server, including:
the system comprises a microphone connecting request receiving unit, a microphone connecting request receiving unit and a microphone connecting request sending unit, wherein the microphone connecting request receiving unit is used for receiving a random microphone connecting request from a first main broadcast client side where a first main broadcast user is located;
the audience matching unit is used for matching a second audience with the first audience in the candidate pool of the wheat connecting server;
and the wheat connecting service establishing unit is used for establishing a wheat connecting service between the first main broadcasting client and a second main broadcasting client where the second main broadcasting user is located if the first main broadcasting user and the second main broadcasting user are successfully matched, so that the first main broadcasting user and the second main broadcasting user enter a wheat connecting state.
Optionally, the anchor user matching unit includes:
the in-pool query subunit is configured to query whether an anchor user waiting for wheat connection exists in the candidate wheat-connection pool or not when the random wheat-connection request from the first anchor client is received;
a selecting subunit, configured to select one anchor user waiting for connecting to the barley from the candidate pool for connecting to the barley if there is an anchor user waiting for connecting to the barley in the candidate pool for connecting to the barley, and determine that the selected anchor user is the second anchor user;
a first matching subunit, configured to match the first anchor user and the second anchor user successfully;
and the first deleting subunit is used for deleting the second anchor user from the continuous microphone candidate pool.
Optionally, the anchor user matching unit further includes:
a adding subunit, configured to, after the query is performed to determine whether there is an anchor user waiting for a live line in the candidate live line pool, add the first anchor user to the candidate live line pool if there is no anchor user waiting for a live line in the candidate live line pool, and record a timestamp of when the first anchor user is added to the candidate live line pool;
the waiting subunit is configured to keep the first anchor user in the continuous microphone candidate pool within a preset time length taking the timestamp as an initial time;
a second matching subunit, configured to, if a random microphone connecting request initiated by the second anchor user is received within the preset time duration, successfully match the first anchor user with the second anchor user, and delete the first anchor user from the microphone connecting candidate pool;
and the second deleting subunit is configured to delete the first anchor user from the candidate pool for continuous playing if the duration that the first anchor user remains in the candidate pool for continuous playing exceeds the preset duration, and issue a matching failure message to the first anchor client.
Optionally, the microphone connecting server further includes:
a success message sending unit, configured to send, after the first anchor user and the second anchor user are successfully matched, a matching success message to the first anchor client and the second anchor client, where the matching success message is used to indicate that the first anchor client and the second anchor client hide respective matching waiting interfaces;
and the state data unit is used for acquiring the connecting state data representing the connecting state between the first main broadcasting user and the second main broadcasting user and storing the connecting state data into the connecting session established by the connecting server.
Optionally, the microphone connecting server further includes:
and the canceling microphone connecting processing unit is used for deleting the first anchor user from the microphone connecting candidate pool and sending a successful deleting message to the first anchor client where the first anchor user is located if a canceling microphone connecting request from the first anchor client is received after the first anchor user is added into the microphone connecting candidate pool and before the first anchor user and the second anchor user are successfully matched.
Optionally, the microphone connecting server further includes:
a wheat connection ending request receiving unit, configured to receive a wheat connection ending request after the establishment of a wheat connection service between the first anchor client and a second anchor client where the second anchor user is located, where the wheat connection ending request is from the first anchor client or the second anchor client, and the wheat connection ending request carries a user ID of the first anchor user and a user ID of the second anchor user;
the data construction unit is used for constructing target query data according to the user ID of the first anchor user and the user ID of the second anchor user;
the data query unit is used for querying whether the target query data exist in the microphone connecting session;
a complete wheat-connecting processing unit, configured to, if the target query data exists in the wheat-connecting session, complete a wheat-connecting service between the first anchor client and the first anchor client, delete, from the wheat-connecting session, wheat-connecting state data representing a wheat-connecting state between the first anchor user and the second anchor user, and send a wheat-connecting-complete notification message to the first anchor client and the second anchor client;
and the error message sending unit is used for returning an error message to the anchor client initiating the request for ending the wheat connecting if the target query data does not exist in the wheat connecting session.
Optionally, the microphone connecting server further includes:
a heartbeat message receiving unit, configured to receive, after the establishment of the microphone connection service between the first anchor client and a second anchor client where the second anchor user is located, a first heartbeat message sent by the first anchor client according to a preset heartbeat time interval and a second heartbeat message sent by the second anchor client according to the preset heartbeat time interval, where the first heartbeat message and the second heartbeat message both carry a user ID of the first anchor user and a user ID of the second anchor user;
a timestamp updating unit, configured to update the keep-alive timestamp of the first anchor user in the connected wheat session when the first heartbeat message is received, and update the keep-alive timestamp of the second anchor user in the connected wheat session when the second heartbeat message is received;
a first offline processing unit, configured to, if the first heartbeat message is not received after exceeding a preset check duration, end the online service between the first anchor client and the second anchor client, and send an anchor offline message to the second anchor client;
and the second offline processing unit is used for ending the online service between the first anchor client and the second anchor client and sending an anchor offline message to the first anchor client if the second heartbeat message is not received after the preset check duration is exceeded.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps described in any one of the possible implementation manners of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps described in any possible implementation manner of the first aspect.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
receiving a random wheat connecting request from a first main broadcast client of a first main broadcast user; matching a second anchor user for the first anchor user in a connecting candidate pool established by the connecting server; and if the first anchor user is successfully matched with the second anchor user, establishing a wheat connecting service between the first anchor client and the second anchor client where the second anchor user is located, so that the first anchor user and the second anchor user enter a wheat connecting state. Therefore, as long as two anchor clients initiating random wheat connecting requests exist, wheat connection can be successful without initiating a wheat connecting request to a certain designated anchor user, the wheat connecting success rate of the anchor client where the anchor user with low popularity is located is improved, and the load pressure of the anchor client where the anchor user with high popularity is located is relieved, so that the wheat connection among the anchor clients of the anchor users at different levels is balanced, and the reliability of the anchor wheat connection can be improved.
In addition, the embodiment of the invention also improves the interest of the anchor, thereby greatly improving the activity of connecting the wheat and further strengthening the interactivity among the anchor of the platform.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic diagram of a network architecture in which a live broadcast wheat-connecting method according to an embodiment of the present invention is located;
fig. 2 is a schematic flow chart of a live broadcast wheat-connecting method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a wheat-connecting server according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The live broadcast wheat connecting method provided by the embodiment of the invention is applied to a wheat connecting server, the wheat connecting server is connected with each anchor client through a communication network, and the wheat connecting server 10 can receive random wheat connecting requests initiated by each anchor client in the live broadcast process.
Referring to fig. 1, fig. 1 shows a network architecture according to an embodiment of the present invention, where the network architecture includes a microphone connecting server 10, a microphone connecting candidate pool 101 is established in the microphone connecting server 10, the microphone connecting candidate pool 101 is maintained by the microphone connecting server 10, and the network architecture further includes a plurality of anchor clients 20, each anchor client 20 logs in an anchor user, a data connection is established between each anchor client 20 and the microphone connecting server 10, each anchor client 20 can initiate a random microphone connecting request to the microphone connecting server 10, and another anchor client 20 that is not matched with the anchor client 20 immediately after initiating the random microphone connecting request but waits for random microphone connecting is added to the microphone connecting candidate pool 101.
Referring to fig. 2, a live broadcast wheat connecting method provided in an embodiment of the present invention, which is applied to a wheat connecting server, includes the following steps:
first, step S101 is performed: the connecting wheat server receives a random connecting wheat request from a first main broadcasting client side where a first main broadcasting user is located.
After the first anchor client starts and the first anchor user logs in to the first anchor user, the first anchor client may initiate a random wheat-connect request. Specifically, after the first anchor client starts and the first anchor user logs in to the first anchor client, if the first anchor user clicks the random wheat connecting button, the first anchor client sends a random wheat connecting request to the wheat connecting server in response to the clicking operation of the random wheat connecting button by the first anchor user, so that the wheat connecting server receives the random wheat connecting request from the first anchor client where the first anchor user is located.
It should be noted that the first anchor user is not specifically an anchor user, but at any anchor user in the network architecture, the first anchor client is any anchor client that the first anchor user can log in.
It should be further noted that the random microphone connecting request carries a random microphone connecting message, which may be named AP _ random phonestart, for example, when the first anchor user sends the random microphone connecting request to the microphone connecting server, a matching waiting interface is displayed on the first anchor client until the first anchor client receives a microphone connecting cancellation instruction generated by a click operation of the first anchor user on a microphone connecting cancellation button, or receives a response message from the microphone connecting server to the random microphone connecting request initiated by the first anchor client, where the response message of the microphone connecting server may be a matching failure message when the first anchor user fails to match the second anchor user, or a matching success message when the first anchor user succeeds in matching the second anchor user.
After step S101, step S102 is then performed: and the connecting server matches the first anchor user with a second anchor user in a connecting candidate pool established by the connecting server.
It should be noted that, before performing step S101, the linkman server establishes and maintains a linkman candidate pool, which may be named as randomphonebool, for example, where there are anchor users waiting for linkman.
Specifically, in an embodiment, the second anchor user is not a specific anchor user, but an anchor user who is randomly matched in the candidate pool for connecting to the wheat when the random request for connecting to the wheat of the first anchor client is received by the wheat connecting server, and in this embodiment, as long as there is an anchor user who is waiting for connecting to the wheat in the candidate pool for connecting to the wheat, the only one anchor user who is waiting for connecting to the wheat in the first anchor user and the candidate pool for connecting to the wheat will be successfully matched, so in this embodiment, there is only one anchor user who is waiting for connecting to the wheat or there is no anchor user who is waiting for connecting to the wheat in the candidate pool for connecting to the wheat all the time.
Specifically, in another embodiment, the second anchor user is: in the embodiment, a plurality of anchor users waiting for connecting the wheat may exist in the candidate connecting pool.
Specifically, one anchor user may be selected for the first anchor user from the linmai candidate pool in one of the following ways:
in the first mode, one anchor user with the number of connected malls less than a preset threshold value of the number of connected malls in a preset time period is selected from more than one anchor users in a candidate connected malls pool, and the selected anchor user is determined to be a second anchor user.
And secondly, selecting one anchor user with the current watching user amount larger than a preset watching user amount threshold value from more than one anchor users in the continuous microphone candidate pool, and determining the selected anchor user as a second anchor user.
And thirdly, randomly selecting one anchor user in the same region range from more than one anchor user in the continuous wheat candidate pool, and determining the selected anchor user as a second anchor user.
And selecting one anchor user with the current attention user amount larger than the preset attention user amount from more than one anchor users in the continuous microphone candidate pool, and determining the selected anchor user as a second anchor user.
In a specific implementation process, in order to improve the matching success probability of random continuous microphone, no matter one anchor user is randomly matched for the first anchor user in the continuous microphone candidate pool, or one anchor user satisfying a certain condition is selected from the anchor users waiting for continuous microphone in the continuous microphone candidate pool, the specific implementation process of step S102 may include the following steps:
first, step S1021 is executed: when the connecting wheat server receives a random connecting wheat request from a first main broadcasting client, the connecting wheat server inquires whether an main broadcasting user waiting for connecting wheat exists in a connecting wheat candidate pool, if so, the connecting wheat server sequentially executes steps S1022 to S1024, and if not, the connecting wheat server sequentially executes steps S1022 'to S1024'.
Specifically, when the continuous microphone server receives a random microphone connecting request of the first main broadcasting client, the continuous microphone server queries in a local maintenance continuous microphone candidate pool.
In the specific implementation process, the implementation processes of steps S1022 to S1024 are specifically as follows:
firstly, step S1022 is executed, the continuous microphone server selects one anchor user waiting for continuous microphone from the continuous microphone candidate pool and determines the anchor user as a second anchor user;
then, step S1023 is executed, and the connecting server successfully matches the first anchor user with the second anchor user;
next, step S1024 is executed, and the linkman server deletes the second anchor user from the linkman candidate pool.
In the specific implementation process, the implementation processes of steps S1022 'to S1024' are specifically as follows:
step S1022' is performed: and adding the first anchor user into the continuous microphone candidate pool, and recording a time stamp when the first anchor user is added into the continuous microphone candidate pool.
If the query result of S1021 is that there is no anchor user waiting for wheat connection in the candidate pool for wheat connection, it indicates that the candidate pool for wheat connection is empty, and it indicates that there is no anchor user waiting for wheat connection currently in the candidate pool for wheat connection, then the first anchor user currently initiating the random wheat connection request is added to the candidate pool for wheat connection, and a timestamp of the first anchor user added to the candidate pool for wheat connection is recorded, for example, may be named RandomWaitTimestamp.
Next, step S1023' is performed: and the continuous microphone server keeps the first main broadcasting user in a continuous microphone candidate pool within a preset time length taking the time stamp as the starting time.
In a specific implementation, the preset time period may be set according to actual requirements, for example, 28 seconds, or 30 seconds, or other approximate values.
Next, step S1024': if a random wheat connecting request initiated from a second anchor user is received within a preset time length, successfully matching the first anchor user with the second anchor user, and deleting the first anchor user from a wheat connecting candidate pool; and if the time length of the first anchor user kept in the candidate pool exceeds the preset time length, deleting the first anchor user from the candidate pool, and issuing a matching failure message to the first anchor client.
It should be noted that, if a random microphone connecting request initiated by any anchor user is not received within a preset time length, the time length that the first anchor user remains in the microphone connecting candidate pool exceeds the preset time length.
Specifically, in step S1024', the linkman server polls the linkman candidate pool every 1 second through a timer, checks a timestamp of the first anchor user added to the linkman candidate pool and a current time during each polling, and if a result of the checking indicates that a time difference between the current time and the timestamp is greater than a preset time, indicates that a time period during which the first anchor user remains in the linkman candidate pool exceeds the preset time period, the linkman server deletes the first anchor user from the linkman candidate pool, and sends a matching timeout message to the first anchor client where the first anchor user is located, which may be named as AP _ random phonemetimeout. After the first anchor client receives the matching overtime message, the first anchor client hides the matching waiting interface of the first anchor client and outputs information for prompting the first anchor user that the matching is overtime.
Specifically, after the first anchor user and the second anchor user are successfully matched in step S1023 or after the first anchor user and the second anchor user are successfully matched in step S1024', as long as the first anchor user and the second anchor user are successfully matched, the method further includes the following steps S1025 to S1026:
s1025, the connecting server sends a matching success message to the first anchor client and the second anchor client, where the matching success message carries the user ID (Identity) of the first anchor user and the user ID of the second anchor user.
It should be noted that the matching success message is used to instruct the first anchor client and the second anchor client to hide the matching waiting interfaces respectively. The matching success message may also be used to instruct the first anchor client and the second anchor client to output respective prompt information for prompting the first anchor user and the second anchor user to enter a connected-to-air state.
And S1026, the connecting wheat server acquires connecting wheat state data representing the connecting wheat state between the first main broadcasting user and the second main broadcasting user, and stores the connecting wheat state data into the connecting wheat session established by the connecting wheat server.
Specifically, the link-to-microphone state data is a Map data structure, i.e., a dictionary or an associated data structure, the Map data structure is used for storing data with a mapping relationship, and two sets of data are stored in the Map data structure: KEY and value, wherein the type of a set of data KEY is std:: pair < int, int >, the pair value is combined using both user IDs of the first and second anchor users, and the user ID is larger in front.
After step S102, step S103 is performed: and if the first anchor user is successfully matched with the second anchor user, the connecting wheat server establishes a connecting wheat service between the first anchor client and the second anchor client where the second anchor user is located, so that the first anchor user and the second anchor user enter a connecting wheat state.
In a further technical scheme, in order to realize that the connecting to the wheat can be canceled at any time before the connecting to the wheat service is established, the method further comprises the following steps: before the first anchor user and the second anchor user are successfully matched, if a request for canceling the wheat connection from the first anchor client is received, the wheat connection server deletes the first anchor user from the wheat connection candidate pool, and sends a successful deletion message to the first anchor client where the first anchor user is located.
In a further technical scheme, in order to realize that a main user can cancel the connecting to the wheat at any time after the connecting to the wheat service is established, the method further comprises the following steps:
step a1, after establishing the wheat connecting service between the first anchor client and the second anchor client where the second anchor user is located, the wheat connecting server receives a wheat connecting ending request from the first anchor client or the second anchor client, where the wheat connecting ending request carries the user ID of the first anchor user and the user ID of the second anchor user.
Specifically, in step a1, after the first and second anchor users enter the online state, both the first and second anchor users can click the end online button to end online anytime. The first anchor client sends a wheat connection ending request to the wheat connection server when receiving the click operation of the first anchor user on the wheat connection ending button, and the second anchor client sends a wheat connection ending request to the wheat connection server when receiving the click operation of the second anchor user on the wheat connection ending button, so that the step A2 is executed no matter whether the wheat connection server receives the wheat connection ending request from the first anchor client or the wheat connection ending request from the second anchor client.
In a preferred embodiment, when the time when the first anchor user and the second anchor user enter the wheat connecting state starts and reaches a preset wheat connecting duration, an indication indicating that the wheat connecting button is finished is issued, and the first anchor client and the second anchor client are indicated to display the wheat connecting finished button. In this way, malicious microphone connections can be avoided.
Specifically, the wheat connection ending request carries a wheat connection ending message AP _ random phonebover, and the wheat connection ending message carries a user ID of the first anchor user and a user ID of the second anchor user.
Step A2, if the connecting wheat server receives the request for ending the connecting wheat, the connecting wheat server constructs the target query data according to the user ID of the first main broadcasting user and the user ID of the second main broadcasting user.
It should be noted that the target query data is the KEY data in the Map data structure, the type of the KEY data is specifically std:: pair < int, int >, and is the same as the type of the KEY data of the session state data in the session, and the target query data includes the user ID of the first anchor user and the user ID of the second anchor user.
A3, the connecting wheat server inquires whether target inquiry data exists in the connecting wheat session; if the target query data exists in the session, step a4 is performed, and if the target query data does not exist in the session, step a5 is performed.
The step a4 specifically includes: the method comprises the steps that a connecting wheat server ends a connecting wheat service between a first main broadcast client and a first main broadcast client, deletes connecting wheat state data representing a connecting wheat state between a first main broadcast user and a second main broadcast user from a connecting wheat session, and sends a connecting wheat end notification message to the first main broadcast client and the second main broadcast client;
the step a5 specifically includes: and the connecting wheat server returns an error message to the anchor client initiating the request for finishing connecting wheat.
In a specific implementation process, the anchor client initiating the request for ending the wheat-connecting may be a first anchor client or a second anchor client.
Through the steps A1-A5, any one of the anchor users in the microphone connecting state can finish microphone connecting according to the requirement, and the microphone connecting flexibility is improved.
Further, after establishing the session service between the first anchor client and the second anchor client where the second anchor user is located, the method may further include the following steps:
step B1, the connecting wheat server receives a first heartbeat message sent by the first main broadcasting client according to a preset heartbeat time interval and a second heartbeat message sent by the second main broadcasting client according to the preset heartbeat time interval, and the first heartbeat message and the second heartbeat message both carry the user ID of the first main broadcasting user and the user ID of the second main broadcasting user. And when the second heartbeat message is received, the keep-alive timestamp of the second main player user is updated in the microphone connecting session.
In the specific implementation process, the preset heartbeat time interval is set according to actual requirements, for example, the preset heartbeat time interval can be set to any one value of 1-10 seconds, and the example is given by taking the preset heartbeat time interval as 5 seconds: after establishing the session service between the first anchor client and the second anchor client where the second anchor user is located, the first anchor client sends a first heartbeat message to the session service of the session server every 5 seconds, which may be named as AP _ random phone heartbeat, where the first heartbeat message carries the user ID of the first anchor user and the user ID of the second anchor user. And after the connecting service of the connecting microphone server receives the first heartbeat message, updating the keep-alive timestamp of the first main broadcasting user in the connecting microphone session. Similarly, the second anchor client sends the second heartbeat message to the mike-connecting service of the mike-connecting server every 5 seconds, which may be named as AP _ random phone heartbeat, where the second heartbeat message carries the user ID of the second anchor user and the user ID of the first anchor user. And after receiving the second heartbeat message from the second main broadcast user, the connecting service of the connecting server updates the keep-alive timestamp of the second main broadcast user in the connecting session.
And step B2, the connecting server checks whether the first heartbeat message is received or not according to a preset check time interval, checks whether the second heartbeat message is received or not according to the preset check time interval, if the first heartbeat message is not received after the preset check time length is exceeded, the step B3 is executed, and if the second heartbeat message is not received after the preset check time length is exceeded, the step B4 is executed.
Specifically, the preset check time interval and the preset check time duration can be set according to actual requirements, the preset check time interval can be set to any value of 1-3 seconds, and the preset check time duration can be set to any value of 10-15 seconds. For example, if the preset check time interval is set to 1 second, the continuous microphone server may check the keep-alive timestamps of all the anchor users in the continuous microphone state in the continuous microphone session every 1 second through the timer, where the keep-alive timestamps include the keep-alive timestamp of the first anchor user in the continuous microphone session and the keep-alive timestamp of the second anchor user in the continuous microphone session, and if the anchor client that does not receive the heartbeat message exceeds 15 seconds, the corresponding anchor user is considered to be disconnected.
And step B3, the wheat connecting server ends the wheat connecting service between the first anchor client and the second anchor client and sends an anchor loss message to the second anchor client.
Step B4, the connecting wheat server ends the connecting wheat service between the first main broadcasting client and the second main broadcasting client, and sends the main broadcasting losing connection message to the first main broadcasting client.
Through the steps B1-B4, whether two anchor users in a wheat-connecting state are disconnected or not can be monitored, and when one anchor user is disconnected, the anchor client of the other anchor user can be informed to prompt the other anchor user so as to connect the wheat again.
Next, an interactive embodiment is given for the live broadcast wheat-connecting method provided in the embodiment of the present invention, based on the anchor client a, the anchor client B, and the wheat-connecting server as an example, where the anchor client a logs in the anchor user X and the anchor client B logs in the anchor user Y, so as to understand the present invention:
the anchor client a: and after the anchor user X starts the anchor client A and logs in based on the user ID, clicking a random wheat connecting button, then the anchor client A initiates a random wheat connecting request, and displays a matching waiting interface on the anchor client A until the anchor user X clicks a random wheat connecting canceling button to cancel random wheat connecting or receives a response message of a wheat connecting server.
Connecting the wheat server: receiving a random wheat connecting request of an anchor client A, inquiring a locally maintained wheat connecting candidate pool, if the wheat connecting candidate pool is empty, indicating that no anchor user waits for wheat connection at present, adding an anchor user X into the wheat connecting candidate pool, and simultaneously recording a timestamp of the anchor user X added into the wheat connecting candidate pool. And if the candidate pool for connecting the wheat has the anchor user Y waiting for connecting the wheat, successfully matching the anchor user Y with the anchor user X. And deleting the anchor user Y from the candidate pool, and sending a random matching success message to the anchor user X and the anchor user Y, wherein the matching success message is provided with the user ID of the anchor user X and the user ID of the anchor user Y. And simultaneously storing the wheat connecting state data of the anchor user X and the anchor user Y into a wheat connecting session, hiding a matching waiting interface after the anchor client B and the anchor client A receive the matching success message, and prompting the anchor user Y and the anchor user X to enter a wheat connecting state with the other party. And the continuous microphone server polls the continuous microphone candidate pool once every 1 second through a timer, checks a timestamp and the current time of the anchor user X added into the continuous microphone candidate pool, deletes the anchor user X from the continuous microphone candidate pool if the waiting time of the anchor user X is more than 30 seconds, and sends a matching timeout message to the anchor client A.
The anchor client a: after receiving the overtime message, hiding the matching waiting interface to prompt the anchor user X to be overtime.
The anchor client a: after the anchor initiates a random wheat connecting request, the anchor waits for 30 seconds at most, and before the matching is successful, the anchor user X can click a wheat connecting canceling button to cancel the random wheat connecting. The anchor client a will cancel the connect-to-mic request to the connect-to-mic server.
Connecting the wheat server: and after receiving the request of canceling the connecting to the microphone, the connecting to the microphone service deletes the anchor user X from the candidate pool of connecting to the microphone and replies a successful deletion message.
The anchor client a: after the anchor user X and the anchor user Y are successfully matched randomly, the anchor user X and the anchor user Y enter a wheat connecting state, and the anchor user X can click a wheat connecting ending button to end wheat connecting at any time. The anchor client A sends a wheat connecting ending request to the wheat connecting server, and the message of the wheat connecting ending request carries the user ID of the anchor user X and the user ID of the anchor user Y.
The anchor client B: after the anchor user X and the anchor user Y are successfully matched randomly, the states of the anchor user X and the anchor user Y are in a wheat connecting state, and the anchor user Y can click a wheat connecting ending button to end wheat connecting at any time. The anchor client B sends a wheat connecting ending request to the wheat connecting server, and the message of the wheat connecting ending request carries the user ID of the anchor user X and the user ID of the anchor user Y.
Connecting the wheat server: and if the constructed construction KEY is not found, the fact that the connection between the anchor user X and the anchor user Y does not exist is indicated, and an error message is sent back to the client. And if the constructed construction KEY is found, ending the wheat connection between the anchor user X and the anchor user Y, deleting the corresponding wheat connection state data from the wheat connection candidate pool, and sending a wheat connection ending notification message to the anchor client B and the anchor client A.
The anchor client a: and after the anchor user X and the anchor user Y are successfully matched at random and enter the connected-to-wheat state, sending a heartbeat message to the connected-to-wheat server every 5 seconds.
The anchor client B: and after the anchor user X and the anchor user Y are successfully matched at random and enter the connected-to-wheat state, sending a heartbeat message to the connected-to-wheat server every 5 seconds.
Connecting the wheat server: keep-alive timestamps for each anchor user X are updated in the online session. Meanwhile, the keep-alive time of all the anchor users (including the anchor user X and the anchor user Y) in the connected-to-wheat state is checked once every 1 second through a timer, if the connected-to-wheat server does not receive the heartbeat message of the anchor client A for more than 15 seconds, the anchor user X is considered to be disconnected, the connection between the anchor user X and the anchor user Y is ended, and the message of the disconnected-to-anchor user X is sent to the anchor client B. If the connecting wheat server does not receive the heartbeat message of the main broadcasting client B for more than 15 seconds, the main broadcasting user Y is considered to be disconnected, the connecting wheat between the main broadcasting user X and the main broadcasting user Y is also ended, and the main broadcasting client A sends the message that the main broadcasting user Y is disconnected.
The anchor client a: and after receiving the message of the off-going connection of the anchor user Y, outputting the message for prompting the off-going connection of the anchor user Y, and disconnecting the connected microphone.
The anchor client B: and after receiving the message of the off-going connection of the anchor user X, outputting a message for prompting the off-going connection of the anchor user X, and disconnecting the connected microphone.
Based on the same inventive concept, an embodiment of the present invention provides a microphone server, which is shown in fig. 3 and includes:
a microphone connecting request receiving unit 201, configured to receive a random microphone connecting request from a first anchor client where a first anchor user is located;
an anchor user matching unit 202, configured to match a second anchor user for the first anchor user in the candidate pool for connecting to the wheat established by the wheat server;
a wheat connection service establishing unit 203, configured to establish a wheat connection service between the first anchor client and a second anchor client where the second anchor user is located if the first anchor user and the second anchor user are successfully matched, so that the first anchor user and the second anchor user enter a wheat connection state.
Optionally, the anchor user matching unit 202 includes:
the in-pool query subunit is configured to query whether an anchor user waiting for wheat connection exists in the candidate wheat-connection pool or not when the random wheat-connection request from the first anchor client is received;
a selecting subunit, configured to select one anchor user waiting for connecting to the barley from the candidate pool for connecting to the barley if there is an anchor user waiting for connecting to the barley in the candidate pool for connecting to the barley, and determine that the selected anchor user is the second anchor user;
a first matching subunit, configured to match the first anchor user and the second anchor user successfully;
and the first deleting subunit is used for deleting the second anchor user from the continuous microphone candidate pool.
Optionally, the anchor user matching unit 202 further includes:
a adding subunit, configured to, after the query is performed to determine whether there is an anchor user waiting for a live line in the candidate live line pool, add the first anchor user to the candidate live line pool if there is no anchor user waiting for a live line in the candidate live line pool, and record a timestamp of when the first anchor user is added to the candidate live line pool;
the waiting subunit is configured to keep the first anchor user in the continuous microphone candidate pool within a preset time duration taking the timestamp as an initial time;
a second matching subunit, configured to, if a random microphone connecting request initiated by the second anchor user is received within the preset time duration, successfully match the first anchor user with the second anchor user, and delete the first anchor user from the microphone connecting candidate pool;
and the second deleting subunit is configured to delete the first anchor user from the candidate pool for continuous playing if the duration that the first anchor user remains in the candidate pool for continuous playing exceeds the preset duration, and issue a matching failure message to the first anchor client.
Optionally, the microphone connecting server further includes:
a success message sending unit, configured to send, after the first anchor user and the second anchor user are successfully matched, a matching success message to the first anchor client and the second anchor client, where the matching success message is used to indicate that the first anchor client and the second anchor client hide respective matching waiting interfaces;
and the state data unit is used for acquiring the connecting state data representing the connecting state between the first main broadcasting user and the second main broadcasting user and storing the connecting state data into the connecting session established by the connecting server.
Optionally, the microphone connecting server further includes:
and the canceling microphone connecting processing unit is used for deleting the first anchor user from the microphone connecting candidate pool and sending a successful deleting message to the first anchor client where the first anchor user is located if a canceling microphone connecting request from the first anchor client is received after the first anchor user is added into the microphone connecting candidate pool and before the first anchor user and the second anchor user are successfully matched.
Optionally, the microphone connecting server further includes:
a wheat connection ending request receiving unit, configured to receive a wheat connection ending request after the establishment of a wheat connection service between the first anchor client and a second anchor client where the second anchor user is located, where the wheat connection ending request is from the first anchor client or the second anchor client, and the wheat connection ending request carries a user ID of the first anchor user and a user ID of the second anchor user;
the data construction unit is used for constructing target query data according to the user ID of the first anchor user and the user ID of the second anchor user;
the data query unit is used for querying whether the target query data exist in the microphone connecting session;
a complete wheat-connecting processing unit, configured to, if the target query data exists in the wheat-connecting session, complete a wheat-connecting service between the first anchor client and the first anchor client, delete, from the wheat-connecting session, wheat-connecting state data representing a wheat-connecting state between the first anchor user and the second anchor user, and send a wheat-connecting-complete notification message to the first anchor client and the second anchor client;
and the error message sending unit is used for returning an error message to the anchor client initiating the request for ending the wheat connecting if the target query data does not exist in the wheat connecting session.
Optionally, the microphone connecting server further includes:
a heartbeat message receiving unit, configured to receive, after the establishment of the microphone connection service between the first anchor client and a second anchor client where the second anchor user is located, a first heartbeat message sent by the first anchor client according to a preset heartbeat time interval and a second heartbeat message sent by the second anchor client according to the preset heartbeat time interval, where the first heartbeat message and the second heartbeat message both carry a user ID of the first anchor user and a user ID of the second anchor user;
a timestamp updating unit, configured to update the keep-alive timestamp of the first anchor user in the connected wheat session when the first heartbeat message is received, and update the keep-alive timestamp of the second anchor user in the connected wheat session when the second heartbeat message is received;
a first offline processing unit, configured to, if the first heartbeat message is not received after exceeding a preset check duration, end the online service between the first anchor client and the second anchor client, and send an anchor offline message to the second anchor client;
and the second offline processing unit is used for ending the online service between the first anchor client and the second anchor client and sending an anchor offline message to the first anchor client if the second heartbeat message is not received after the preset check duration is exceeded.
Based on the same inventive concept, an embodiment of the present invention provides a computer-readable storage medium 401, as shown in fig. 4, on which a computer program 402 is stored, where the program 402, when executed by a processor, implements the steps described in any of the foregoing embodiments of the live wheat connecting method.
Based on the same inventive concept, an embodiment of the present invention provides a computer apparatus 500, which is shown in fig. 5 and includes a memory 510, a processor 530, and a computer program 520 stored in the memory 510 and executable on the processor 530, where the processor 530 executes the computer program 520 to implement the steps described in any one of the foregoing embodiments of the live wheat-connecting method.
Since the server, the storage medium, and the computer device described above are adopted to implement the live microphone connecting method in the embodiment of the present invention, based on the live microphone connecting method described in the embodiment of the present invention, those skilled in the art can understand specific implementation manners and various variations of the server, the storage medium, and the computer device, and therefore, how to implement the live microphone connecting method in the embodiment of the present invention is not described in detail herein. As long as those skilled in the art implement the server, the storage medium, and the computer device used in the live broadcasting and wheat connecting method in the embodiments of the present invention, all of which are within the scope of the present invention are intended to be protected.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
receiving a random wheat connecting request from a first main broadcast client of a first main broadcast user; matching a second anchor user for the first anchor user in a connecting candidate pool established by the connecting server; and if the first anchor user is successfully matched with the second anchor user, establishing a wheat connecting service between the first anchor client and the second anchor client where the second anchor user is located, so that the first anchor user and the second anchor user enter a wheat connecting state. Therefore, as long as two anchor clients initiating random wheat connecting requests exist, wheat connection can be successful without initiating a wheat connecting request to a certain designated anchor user, the wheat connecting success rate of the anchor client where the anchor user with low popularity is located is improved, and the load pressure of the anchor client where the anchor user with high popularity is located is relieved, so that the wheat connection among the anchor clients of the anchor users at different levels is balanced, and the reliability of the anchor wheat connection can be improved.
In addition, the embodiment of the invention also improves the interest of the anchor, thereby greatly improving the activity of connecting the wheat and further strengthening the interactivity among the anchor of the platform.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (7)

1. A live broadcast wheat connecting method is applied to a wheat connecting server and is characterized by comprising the following steps:
when a random wheat connecting request from a first main broadcasting client side where a first main broadcasting user is located is received, whether main broadcasting users waiting for wheat connecting exist in a wheat connecting candidate pool or not is inquired;
if the online shopping candidate pool contains the anchor users waiting for online shopping, selecting one anchor user waiting for online shopping from the online shopping candidate pool, and determining the selected anchor user as a second anchor user;
successfully matching the first anchor user with the second anchor user, and deleting the second anchor user from the continuous wheat candidate pool;
if the first anchor user is successfully matched with the second anchor user, establishing a wheat connecting service between the first anchor client and the second anchor client where the second anchor user is located, so that the first anchor user and the second anchor user enter a wheat connecting state;
sending a matching success message to the first anchor client and the second anchor client, wherein the matching success message is used for indicating that the first anchor client and the second anchor client hide matching waiting interfaces respectively;
acquiring connecting state data representing a connecting state between the first main broadcasting user and the second main broadcasting user, and storing the connecting state data into a connecting session established by the connecting server;
receiving a wheat connecting ending request, wherein the wheat connecting ending request is from the first main broadcast client or the second main broadcast client, and the wheat connecting ending request carries a user ID of the first main broadcast user and a user ID of the second main broadcast user;
constructing target query data according to the user ID of the first anchor user and the user ID of the second anchor user;
inquiring whether the target inquiry data exist in the microphone connecting session; if the target query data exists in the session, ending the session service between the first main broadcasting client and the first main broadcasting client, deleting the session state data representing the session state between the first main broadcasting user and the second main broadcasting user from the session, and sending a session ending notification message to the first main broadcasting client and the second main broadcasting client; and if the target query data does not exist in the wheat connecting session, returning an error message to the anchor client initiating the wheat connecting ending request.
2. The live broadcast wheat-connecting method of claim 1, wherein after the querying whether there are anchor users waiting for wheat-connecting in the candidate pool of wheat-connecting, further comprising:
if no anchor user waiting for wheat connection exists in the candidate wheat-connecting pool, adding the first anchor user into the candidate wheat-connecting pool, and recording a timestamp when the first anchor user is added into the candidate wheat-connecting pool;
keeping the first anchor user in the continuous microphone candidate pool within a preset time length taking the timestamp as an initial time;
if a random wheat connecting request initiated by any one anchor user is received within the preset time length, determining the anchor user initiating the random wheat connecting request as a second anchor user, successfully matching the first anchor user with the second anchor user, and deleting the first anchor user from the wheat connecting candidate pool;
and if the time length that the first anchor user keeps in the continuous microphone candidate pool exceeds the preset time length, deleting the first anchor user from the continuous microphone candidate pool, and issuing a matching failure message to the first anchor client.
3. The live-broadcast wheat-connecting method of claim 2, wherein after adding the first anchor user to the candidate wheat-connecting pool and before the first anchor user and the second anchor user are successfully matched, the method further comprises:
and if a request for canceling the microphone connection from the first main broadcasting client is received, deleting the first main broadcasting user from the microphone connection candidate pool, and sending a successful deletion message to the first main broadcasting client where the first main broadcasting user is located.
4. The live broadcast wheat-connecting method of claim 1, wherein after the establishing of the wheat-connecting service between the first anchor client and a second anchor client where the second anchor user is located, the method further comprises:
receiving a first heartbeat message sent by the first anchor client according to a preset heartbeat time interval and a second heartbeat message sent by the second anchor client according to the preset heartbeat time interval, wherein the first heartbeat message and the second heartbeat message both carry a user ID of the first anchor user and a user ID of the second anchor user;
updating the keep-alive timestamp of the first anchor user in the microphone connecting session when the first heartbeat message is received, and updating the keep-alive timestamp of the second anchor user in the microphone connecting session when the second heartbeat message is received;
if the first heartbeat message is not received after the preset check duration is exceeded, ending the connecting service between the first anchor client and the second anchor client, and sending an anchor loss message to the second anchor client;
and if the second heartbeat message is not received after the preset check duration is exceeded, ending the connecting service between the first anchor client and the second anchor client, and sending an anchor lost message to the first anchor client.
5. A microphone server, comprising:
the system comprises a microphone connecting request receiving unit, a microphone connecting request receiving unit and a microphone connecting request sending unit, wherein the microphone connecting request receiving unit is used for receiving a random microphone connecting request from a first main broadcast client side where a first main broadcast user is located;
the system comprises an anchor user matching unit, a random connecting request receiving unit and a connecting request receiving unit, wherein the anchor user matching unit is used for inquiring whether an anchor user waiting for connecting the wheat exists in a wheat connecting candidate pool or not when receiving the random connecting request from a first anchor client where a first anchor user is located; if the online shopping candidate pool contains the anchor users waiting for online shopping, selecting one anchor user waiting for online shopping from the online shopping candidate pool, and determining the selected anchor user as a second anchor user; successfully matching the first anchor user with the second anchor user, and deleting the second anchor user from the continuous wheat candidate pool;
a microphone connecting service establishing unit, configured to establish a microphone connecting service between the first multicast client and a second multicast client where the second multicast user is located, so that the first multicast user and the second multicast user enter a microphone connecting state;
a success message sending unit, configured to send, after the first anchor user and the second anchor user are successfully matched, a matching success message to the first anchor client and the second anchor client, where the matching success message is used to indicate that the first anchor client and the second anchor client hide respective matching waiting interfaces;
a wheat connection ending request receiving unit, configured to receive a wheat connection ending request after the establishment of a wheat connection service between the first anchor client and a second anchor client where the second anchor user is located, where the wheat connection ending request is from the first anchor client or the second anchor client, and the wheat connection ending request carries a user ID of the first anchor user and a user ID of the second anchor user;
the data construction unit is used for constructing target query data according to the user ID of the first anchor user and the user ID of the second anchor user;
the data query unit is used for querying whether the target query data exist in the microphone connecting session;
a complete wheat-connecting processing unit, configured to, if the target query data exists in the wheat-connecting session, complete a wheat-connecting service between the first anchor client and the first anchor client, delete, from the wheat-connecting session, wheat-connecting state data representing a wheat-connecting state between the first anchor user and the second anchor user, and send a wheat-connecting-complete notification message to the first anchor client and the second anchor client;
and the error message sending unit is used for returning an error message to the anchor client initiating the request for ending the wheat connecting if the target query data does not exist in the wheat connecting session.
6. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of any one of the claims 1-4.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of any of claims 1-4 are implemented when the program is executed by the processor.
CN201810023758.5A 2018-01-10 2018-01-10 Live broadcast wheat connecting method, server, storage medium and computer equipment Active CN108184140B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810023758.5A CN108184140B (en) 2018-01-10 2018-01-10 Live broadcast wheat connecting method, server, storage medium and computer equipment
PCT/CN2018/082506 WO2019136862A1 (en) 2018-01-10 2018-04-10 Live streaming microphone connection method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810023758.5A CN108184140B (en) 2018-01-10 2018-01-10 Live broadcast wheat connecting method, server, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN108184140A CN108184140A (en) 2018-06-19
CN108184140B true CN108184140B (en) 2020-03-17

Family

ID=62550153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810023758.5A Active CN108184140B (en) 2018-01-10 2018-01-10 Live broadcast wheat connecting method, server, storage medium and computer equipment

Country Status (2)

Country Link
CN (1) CN108184140B (en)
WO (1) WO2019136862A1 (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109121013A (en) * 2018-07-25 2019-01-01 北京达佳互联信息技术有限公司 Method, apparatus, terminal, server and the storage medium of played data
CN109388924A (en) * 2018-09-30 2019-02-26 武汉斗鱼网络科技有限公司 A kind of auth method, device, server and storage medium
CN110971922B (en) * 2018-09-30 2021-11-09 武汉斗鱼网络科技有限公司 Live broadcast and microphone connection state monitoring method, client, server, medium and system
CN109257658A (en) * 2018-10-12 2019-01-22 北京潘达互娱科技有限公司 A kind of live streaming even wheat method, apparatus and server
CN109618191A (en) * 2018-12-17 2019-04-12 广州市百果园信息技术有限公司 Live streaming connects wheat method, apparatus, computer readable storage medium and terminal
CN109743587B (en) * 2019-01-03 2021-09-17 广州虎牙信息科技有限公司 Live broadcast connection monitoring method, terminal equipment and storage medium
CN109756504B (en) * 2019-01-16 2021-11-09 武汉斗鱼鱼乐网络科技有限公司 Communication method based on live broadcast platform and related device
CN110149525A (en) * 2019-05-23 2019-08-20 广州虎牙信息科技有限公司 A kind of live broadcasting method, device, equipment and storage medium
CN110311795B (en) * 2019-07-02 2020-10-20 广州华多网络科技有限公司 Method and system for creating friend group and server
CN110765366B (en) * 2019-10-30 2022-11-08 网易(杭州)网络有限公司 Live broadcast and live broadcast matching method, device and equipment and computer readable storage medium
CN110996180B (en) * 2019-12-17 2021-05-28 李昱颉 Network live broadcast chatting method, system and server
CN111683262B (en) * 2020-06-04 2022-03-15 广州酷狗计算机科技有限公司 Method, device, server, terminal and storage medium for determining continuous microphone time
CN112312154B (en) * 2020-10-30 2022-08-09 广州华多网络科技有限公司 Network live broadcast control and execution method and corresponding device, equipment and medium
CN113691872A (en) * 2021-06-18 2021-11-23 北京达佳互联信息技术有限公司 Live broadcast task allocation method and device, electronic equipment and storage medium
CN113141519B (en) * 2021-06-23 2021-09-17 大学长(北京)网络教育科技有限公司 Live broadcast data processing method and device
CN113645475B (en) * 2021-08-03 2023-10-13 杭州情咖网络技术有限公司 Live broadcast connection method and device
CN115996213A (en) * 2022-12-29 2023-04-21 百果园技术(新加坡)有限公司 Live-broadcast continuous-wheat processing method and device, equipment and medium thereof

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW571812U (en) * 2003-06-11 2004-01-11 Vision Electronics Co Ltd Audio device for TV game machine
WO2015073924A1 (en) * 2013-11-14 2015-05-21 Smiletime, Inc. Social multi-camera interactive live engagement system
CN104468395B (en) * 2014-10-20 2018-11-06 广州华多网络科技有限公司 The channel access method and system of direct broadcasting room
CN106156243A (en) * 2015-04-26 2016-11-23 上海灵域网络科技有限公司 A kind of social entertainment method and system
CN105812951B (en) * 2016-03-24 2019-10-18 广州华多网络科技有限公司 Stream medium data exchange method, terminal, server and system
CN106303657A (en) * 2016-08-18 2017-01-04 北京奇虎科技有限公司 A kind of even method that wheat is live and main broadcaster's end equipment
CN106454537B (en) * 2016-10-14 2020-04-14 广州华多网络科技有限公司 Video live broadcast method and related equipment
CN106488251B (en) * 2016-10-19 2019-09-20 北京小米移动软件有限公司 Realize the method and device, main broadcaster's client and user client for connecting wheat in live streaming

Also Published As

Publication number Publication date
CN108184140A (en) 2018-06-19
WO2019136862A1 (en) 2019-07-18

Similar Documents

Publication Publication Date Title
CN108184140B (en) Live broadcast wheat connecting method, server, storage medium and computer equipment
CN107911437B (en) Screen sharing method and device, electronic equipment and storage medium
CN106454537B (en) Video live broadcast method and related equipment
CN107295354A (en) Connect the live method for building up of wheat and device in a kind of network direct broadcasting
WO2019071829A1 (en) Method, storage medium, device and system for implementing microphone connection-based battle between hosts on pc
JP2007534076A (en) System and method for chat load management in a network chat environment
CN108881936B (en) Live broadcast resource sharing method, electronic device and medium
US10645039B2 (en) Information processing method and terminal, and computer storage medium
CN113518247A (en) Video playing method, related equipment and computer readable storage medium
CN110620890A (en) File uploading method and system
CN102185856B (en) Team organizing video method, device and system used in team organizing game
CN107249140B (en) List information acquisition method and apparatus
CN109257616B (en) Voice microphone-connected interaction method, device, equipment and medium
CN106453231B (en) Signaling acquisition and transmission method and device
CN111385666A (en) Communication link establishing method, device, equipment and storage medium
CN110996180B (en) Network live broadcast chatting method, system and server
US20220021715A1 (en) Live streaming method and apparatus, device and computer readable storage medium
EP4007283A1 (en) Video connection method and apparatus, and non-transitory computer-readable storage medium
CN113242462B (en) Screen projection method and device for realizing convergence terminal
CN111866544B (en) Data processing method, device, equipment and computer readable storage medium
WO2019071857A1 (en) Method and device preventing gift giving on live streaming platform
CN111131843A (en) Network live broadcast system and method
CN106657172A (en) Method and device for realizing information push
CN102025730B (en) Data transmission device based on HTTP protocol and implementation method thereof
CN106161196A (en) A kind of obtain the method for HTTP message state, equipment and system

Legal Events

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