CN108184140A - A kind of live streaming connects wheat method and device - Google Patents
A kind of live streaming connects wheat method and device Download PDFInfo
- Publication number
- CN108184140A CN108184140A CN201810023758.5A CN201810023758A CN108184140A CN 108184140 A CN108184140 A CN 108184140A CN 201810023758 A CN201810023758 A CN 201810023758A CN 108184140 A CN108184140 A CN 108184140A
- Authority
- CN
- China
- Prior art keywords
- main broadcaster
- wheat
- user
- client
- broadcaster 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
- H04N21/2393—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
- H04N21/2408—Monitoring of the upstream path of the transmission network, e.g. client requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management 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/254—Management at additional data server, e.g. shopping server, rights management server
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management 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/258—Client 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/25866—Management of end-user data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/488—Data services, e.g. news ticker
- H04N21/4882—Data services, e.g. news ticker for displaying messages, e.g. warnings, reminders
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Graphics (AREA)
- Telephonic Communication Services (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of live streaming even wheat method and connect wheat server, applied to network direct broadcasting field, this method includes:It receives the random of first main broadcaster's client where coming from the first main broadcaster user and connects wheat request;In company's wheat candidate pool that even wheat server is established the second main broadcaster user is matched for the first main broadcaster user;If the first main broadcaster user and second main broadcaster user's successful match, establish company's wheat service between second main broadcaster's client where first main broadcaster's client and the second main broadcaster user, so that entering between the first main broadcaster user and the second main broadcaster user even, wheat state, the present invention solve main broadcaster in the prior art and connect the technical issues of wheat reliability is not high.
Description
Technical field
The present invention relates to network direct broadcasting field more particularly to a kind of live streamings even wheat method and device.
Background technology
Present net cast industry is in internet air port, and it is that main broadcaster is broadcast live at oneself that most common form is broadcast live at present
Between be broadcast live towards the bean vermicelli of oneself.More interactive direct-seeding is the company of progress wheat between two main broadcaster users, two
Both sides' picture of a main broadcaster user is spelled in a window, allows the viewing user of two main broadcaster users that can see two main broadcasters simultaneously
The live streaming picture of user, two main broadcaster users can carry out interaction.
From the point of view of connecting wheat statistical data with regard to current main broadcaster, some main broadcaster users are not since popularity is high, and even wheat object is very little, even
There are limitations during wheat, and therefore, company's wheat successful of this part main broadcaster is not high, and the higher main broadcaster of some popularities can have even wheat
It is lined up, it is seen then that it is not high to connect wheat reliability by main broadcaster in the prior art.
Invention content
The embodiment of the present invention by provide it is a kind of live streaming even wheat method and device, solve main broadcaster in the prior art connect wheat can
By property it is not high the technical issues of.
In a first aspect, the embodiment of the present invention provides a kind of live streaming even wheat method, applied to even wheat server, the method packet
It includes:
It receives the random of first main broadcaster's client where coming from the first main broadcaster user and connects wheat request;
It is that the first main broadcaster user matches the second main broadcaster use in company's wheat candidate pool that wheat server is established described even
Family;
If the first main broadcaster user and the second main broadcaster user successful match, establish the first main broadcaster client
Company's wheat service between second main broadcaster's client where the second main broadcaster user so that the first main broadcaster user and institute
It states and enters even wheat state between the second main broadcaster user.
Optionally, described is the first main broadcaster user matching in company's wheat candidate pool that wheat server is established described even
Second main broadcaster user, including:
Receive from the first main broadcaster client it is described it is random connect wheat request when, inquire the even wheat candidate pool
In whether there is the company of waiting wheat main broadcaster user;
If there is the main broadcaster user of the company of waiting wheat in the even wheat candidate pool, selected from the even wheat candidate pool
The main broadcaster user of one company of waiting wheat is determined as the second main broadcaster user;
By the first main broadcaster user and the second main broadcaster user successful match;
The second main broadcaster user is deleted from the even wheat candidate pool.
Optionally, described is the first main broadcaster user matching in company's wheat candidate pool that wheat server is established described even
Second main broadcaster user, further includes:
After main broadcaster user in the inquiry even wheat candidate pool with the presence or absence of the company of waiting wheat, if described
The main broadcaster user of the company of waiting wheat is even not present in wheat candidate pool, the first main broadcaster user is added in candidate to the even wheat
Pond, and record timestamp when the first main broadcaster user is added into the even wheat candidate pool;
The first main broadcaster user is maintained to the even wheat in the preset duration using the timestamp as initial time
In candidate pool;
Connect wheat request at random from the second main broadcaster Client-initiated if received in the preset duration, by institute
The first main broadcaster user and the second main broadcaster user successful match are stated, and first master is deleted from the even wheat candidate pool
Broadcasting user;
If the duration that the first main broadcaster user is maintained in the even wheat candidate pool is more than the preset duration, from institute
Delete the first main broadcaster user in the company's of stating wheat candidate pool, and to the first main broadcaster client message that issues that it fails to match.
Optionally, after the first main broadcaster user and the second main broadcaster user successful match, the method is also wrapped
It includes:
Successful match message, the successful match are sent to the first main broadcaster client and the second live streaming client
Message is used to indicate the first main broadcaster client and each self-hiding matching of the second main broadcaster client waits for interface;
The company's wheat status data for characterizing and connecting wheat state between the first main broadcaster user and the second main broadcaster user is obtained,
It stores into company's wheat session that wheat server is established described even.
Optionally, the first main broadcaster user is being added in the even wheat candidate pool, and in the described first master
Before broadcasting user and the second main broadcaster user successful match, the method further includes:
If receiving the cancellation from the first main broadcaster client connects wheat request, deleted from the even wheat candidate pool
The first main broadcaster user, and delete to the first main broadcaster client transmission where the first main broadcaster user and successfully disappear
Breath.
Optionally, the first main broadcaster client and the second main broadcaster visitor where the second main broadcaster user are established described
After company's wheat service between the end of family, the method further includes:
It receives and terminates even wheat request, it is described to terminate even wheat request from the first main broadcaster client or second master
Broadcast client, the User ID for terminating to carry the first main broadcaster user in even wheat request and the second main broadcaster user's
User ID;
According to the User ID of the first main broadcaster user and the User ID of second main broadcaster user structure target query number
According to;
Inquiry is carried out with the presence or absence of the target query data in the even wheat session;
If described even in wheat session there are the target query data, terminate the first main broadcaster client and described the
Company wheat service between one main broadcaster's client, and delete from the even wheat session characterize the first main broadcaster user with it is described
Connect company's wheat status data of wheat state between second main broadcaster user, also to the first main broadcaster client and second main broadcaster visitor
Family end sends even wheat end notification message;
If there is no the target query data in the even wheat session, to the initiation main broadcaster for terminating even wheat request
Client returns to error message.
Optionally, the first main broadcaster client and the second main broadcaster visitor where the second main broadcaster user are established described
After company's wheat service between the end of family, the method further includes:
Receive the first heartbeat message sent from the first main broadcaster client according to default heartbeat time interval and institute
State the second heartbeat message that second main broadcaster's client is sent according to the default heartbeat time interval, first heartbeat message and
The User ID of the first main broadcaster user and the User ID of the second main broadcaster user are carried in second heartbeat message;
When receiving first heartbeat message, the keep-alive of the first main broadcaster user is updated in the even wheat session
Timestamp when receiving second heartbeat message, updates the keep-alive of the second main broadcaster user in the even wheat session
Timestamp;
If it exceeds default check that duration is not received by first heartbeat message, then terminate the first main broadcaster client
Company wheat between end and the second main broadcaster client services, and sends main broadcaster to the second main broadcaster client and lose and even disappear
Breath;
If it exceeds default check that duration is not received by second heartbeat message, then terminate the first main broadcaster client
Company wheat between end and the second main broadcaster client services, and sends main broadcaster to the first main broadcaster client and lose and even disappear
Breath.
Second aspect, the embodiment of the present invention provide a kind of even wheat server, including:
Even wheat request reception unit comes from the random of first main broadcaster's client where the first main broadcaster user for receiving
Even wheat request;
Main broadcaster's subscriber matching unit, for being first master in company's wheat candidate pool that wheat server is established described even
Broadcasting user matches the second main broadcaster user;
Unit is established in even wheat service, if for the first main broadcaster user and the second main broadcaster user successful match,
Company's wheat service between second main broadcaster's client where the first main broadcaster client and the second main broadcaster user is established, is made
It obtains and enters even wheat state between the first main broadcaster user and the second main broadcaster user.
Optionally, main broadcaster's subscriber matching unit, including:
Subelement is inquired in pond, for described random connecting wheat request receive from the first main broadcaster client
When, inquire the main broadcaster user that whether there is the company of waiting wheat in the even wheat candidate pool;
Subelement is selected, if for the main broadcaster user that even there is the company of waiting wheat in wheat candidate pool, from described
The main broadcaster user of the company of a waiting wheat is even selected in wheat candidate pool, is determined as the second main broadcaster user;
First coupling subelement, for by the first main broadcaster user and the second main broadcaster user successful match;
First deletes subelement, for deleting the second main broadcaster user from the even wheat candidate pool.
Optionally, main broadcaster's subscriber matching unit, further includes:
Subelement is added in, is used for the main broadcaster with the presence or absence of the company of waiting wheat in the inquiry even wheat candidate pool
After family, if the main broadcaster user of the company of waiting wheat is not present in the even wheat candidate pool, the first main broadcaster user is added
Enter to the even wheat candidate pool, and record timestamp when the first main broadcaster user is added into the even wheat candidate pool;
Wait for subelement, for by the first main broadcaster user in the preset duration using the timestamp as initial time
It is maintained in the even wheat candidate pool;
Second coupling subelement, if initiated for being received in the preset duration from the second main broadcaster user
It is random connect wheat request, by the first main broadcaster user and the second main broadcaster user successful match, and from the company wheat time
The first main broadcaster user is deleted in scavenger;
Second deletes subelement, if the duration for the first main broadcaster user to be maintained in the even wheat candidate pool surpasses
The preset duration is crossed, the first main broadcaster user is even deleted in wheat candidate pool from described, and to the first main broadcaster client
Message that end issues that it fails to match.
Optionally, the even wheat server further includes:
Success message transmitting element, for the first main broadcaster user and the second main broadcaster user successful match it
Afterwards, successful match message, the successful match message are sent to the first main broadcaster client and the second live streaming client
It is used to indicate the first main broadcaster client and each self-hiding matching of the second main broadcaster client waits for interface;
Status data unit connects wheat shape for obtaining to characterize between the first main broadcaster user and the second main broadcaster user
Company's wheat status data of state is stored into company's wheat session that wheat server is established described even.
Optionally, the even wheat server further includes:
Cancel even wheat processing unit, for the first main broadcaster user being added in the even wheat candidate pool, and
And before the first main broadcaster user and the second main broadcaster user successful match, if received from first main broadcaster
The cancellation of client connects wheat request, deletes the first main broadcaster user from the even wheat candidate pool, and lead to described first
The first main broadcaster client where broadcasting user, which is sent, deletes success message.
Optionally, the even wheat server further includes:
Terminate even wheat request reception unit, for establishing the first main broadcaster client and second main broadcaster use described
It after company wheat between second main broadcaster's client where family services, receives and terminates even wheat request, even wheat request comes for the end
It is described to terminate to carry first master in even wheat request from the first main broadcaster client or the second main broadcaster client
The User ID of broadcasting user and the User ID of the second main broadcaster user;
Data construction unit, for the User ID according to the first main broadcaster user and the user of the second main broadcaster user
ID builds target query data;
Data query unit, for carrying out inquiry with the presence or absence of the target query data in the even wheat session;
Terminate even wheat processing unit, if for there are the target query data in the even wheat session, terminate described
Company's wheat service between first main broadcaster's client and the first main broadcaster client, and delete characterization from the even wheat session
Connect company's wheat status data of wheat state between the first main broadcaster user and the second main broadcaster user, also to first main broadcaster
Client and the second main broadcaster client send even wheat end notification message;
Error message transmitting element, if for the target query data to be not present in the even wheat session, to initiation
The main broadcaster's client for terminating even wheat request returns to error message.
Optionally, the even wheat server further includes:
Heartbeat message receiving unit, for establishing the first main broadcaster client and the second main broadcaster user institute described
Second main broadcaster's client between the service of company wheat after, receive from the first main broadcaster client according to default heartbeat when
Between be spaced the first heartbeat message of transmission and the second main broadcaster client is sent according to the default heartbeat time interval the
The user of the first main broadcaster user is carried in two heartbeat message, first heartbeat message and second heartbeat message
ID and the User ID of the second main broadcaster user;
Update of time stamp unit, for when receiving first heartbeat message, updating institute in the even wheat session
The keep-alive timestamp of the first main broadcaster user is stated, when receiving second heartbeat message, updates institute in the even wheat session
State the keep-alive timestamp of the second main broadcaster user;
First company's of mistake processing unit, for checking that duration is not received by first heartbeat message if it exceeds presetting,
Then terminate the company wheat service between the first main broadcaster client and the second main broadcaster client, and to second main broadcaster
Client sends main broadcaster and loses even message;
Second company's of mistake processing unit, for checking that duration is not received by second heartbeat message if it exceeds presetting,
Then terminate the company wheat service between the first main broadcaster client and the second main broadcaster client, and to first main broadcaster
Client sends main broadcaster and loses even message.
The third aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program,
The step described in any possible realization method of first aspect is realized when the program is executed by processor.
Fourth aspect, the embodiment of the present invention provide a kind of computer equipment, including memory, processor and are stored in storage
On device and the computer program that can run on a processor, the processor realize any of first aspect when performing described program
Step described in the possible realization method of kind.
The one or more technical solutions provided in the embodiment of the present invention, have at least the following technical effects or advantages:
It receives the random of first main broadcaster's client where coming from the first main broadcaster user and connects wheat request;In even wheat server
In the company's wheat candidate pool established the second main broadcaster user is matched for the first main broadcaster user;If the first main broadcaster user and the second main broadcaster
User's successful match establishes company's wheat clothes between second main broadcaster's client where first main broadcaster's client and the second main broadcaster user
Business so that enter even wheat state between the first main broadcaster user and the second main broadcaster user.Therefore, as long as there are two initiate to connect wheat at random
Main broadcaster's client of request, it will be able to which even wheat success, the main broadcaster user for not needing to specify to some initiate even wheat request, improve
Company's wheat success rate of main broadcaster's client where the not high main broadcaster user of popularity, where alleviating the higher main broadcaster user of popularity
The load pressure of main broadcaster's client, therefore, the company wheat between the main broadcaster's client for the main broadcaster user for balancing different stage, into
And the reliability that main broadcaster connects wheat can be improved.
In addition, also improve through the embodiment of the present invention main broadcaster interest, and then can the company's of greatly promoting wheat activity, into
And strengthen the interactivity between platform main broadcaster.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention, for those of ordinary skill in the art, without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Schematic diagrames of the Fig. 1 for the network architecture where live streaming provided in an embodiment of the present invention even wheat method;
Fig. 2 is the flow diagram that live streaming provided in an embodiment of the present invention connects wheat method;
Fig. 3 is the flow diagram of even wheat server provided in an embodiment of the present invention;
Fig. 4 is the structure diagram of computer readable storage medium provided in an embodiment of the present invention;
Fig. 5 is the structure diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiments obtained without creative efforts shall fall within the protection scope of the present invention.
It is provided in an embodiment of the present invention it is a kind of live streaming even wheat method, applied to even wheat server, even wheat server with it is each
It is established and connected by communication network between main broadcaster's client, even wheat server 10 can receive each main broadcaster's client in live streaming process
The random of middle initiation connects wheat request.
Refering to what is shown in Fig. 1, Fig. 1 provides the network architecture residing for the embodiment of the present invention, which includes even wheat service
Device 10, being established in even wheat server 10 has even wheat candidate pool 101, and by connecting 10 company's of maintenance wheat candidate pool 101 of wheat server,
Multiple main broadcaster's clients 20 are further included, main broadcaster user have been logged in each main broadcaster's client 20, each main broadcaster's client 20 is with connecting
Being established between wheat server 10 has data connection, and each main broadcaster's client 20 can be initiated to connect wheat at random to even wheat server 10
Request, even add in wheat candidate pool 101 there is initiation to connect wheat request at random after do not match main broadcaster's client 20 immediately but
Waiting for random another main broadcaster's client 20 for connecting wheat.
Refering to what is shown in Fig. 2, live streaming provided in an embodiment of the present invention connects wheat method, using even wheat server, including walking as follows
Suddenly:
First, step S101 is performed:Even the reception of wheat server comes from the first main broadcaster client where the first main broadcaster user
The random of end connects wheat request.
After first main broadcaster's client terminal start-up and the first main broadcaster user log on to the first main broadcaster user, the first main broadcaster visitor
Family end can initiate to connect wheat request at random.Specifically, it is logged on in first main broadcaster's client terminal start-up and the first main broadcaster user
After first main broadcaster's client, if the first main broadcaster user clicks connects wheat button at random, first main broadcaster's client can be in response to the
One main broadcaster user sends to even wheat server to connecting the clicking operation of wheat button at random and connects wheat request at random, so as to even wheat service
The random of first main broadcaster's client that device receives where coming from the first main broadcaster user connects wheat request.
It should be noted that the first main broadcaster user is not to refer in particular to some main broadcaster user, and in the network architecture
Any main broadcaster user, first main broadcaster's client are any main broadcaster's clients that the first main broadcaster user can log in.
Connect wheat message at random it should also be noted that, connecting carried in wheat request at random, for example, AP_ can be named as
RandomPhoneStart, can be in the first main broadcaster visitor when the first main broadcaster user sends to even wheat server and connects wheat request at random
Show that matching waits for interface on the end of family, until first main broadcaster's client receives point of the first main broadcaster user to cancellation even wheat button
Hit operation caused by cancel even wheat instruction or receive from even wheat server to first main broadcaster's client initiate with
Machine connects the response message of wheat request, specifically, even the response message of wheat server may be for the first main broadcaster user matching second
Message that it fails to match when main broadcaster user fails is also likely to be matched for the first main broadcaster user when the second main broadcaster user succeeds
With success message.
After step slol, step S102 is then performed:Even wheat server is in the Lian Maihou that even wheat server is established
In scavenger the second main broadcaster user is matched for the first main broadcaster user.
It should be noted that between step S101 is performed, even wheat server is established and safeguards company's wheat candidate pool, than
Such as, RandomPhonePool can be named as, is even the main broadcaster user of the company of waiting wheat present in wheat candidate pool.
Specifically, in one embodiment, the second main broadcaster user is not some the main broadcaster user refered in particular to, but even wheat
Server is as the random main broadcaster for connecting the random fit in even wheat candidate pool when wheat is asked for receiving first main broadcaster's client
User, in this embodiment, will be by the first main broadcaster as long as even there is the main broadcaster user of the company of waiting wheat in wheat candidate pool
User and the only one main broadcaster user's successful match for having the company of waiting wheat in even wheat candidate pool, so in this embodiment
Under, the main broadcaster user or the master there is no the company of waiting wheat that even only exist the company of waiting wheat in wheat candidate pool always
Broadcasting user.
Specifically, in another embodiment, the second main broadcaster user is:Even wheat server receives first main broadcaster's client
Random one that meets certain condition is selected in the main broadcaster user of company of waiting wheat from even wheat candidate pool when connecting wheat request
Main broadcaster user is determined as the second main broadcaster user, under this embodiment, even in wheat candidate pool may there are it is multiple etc.
The main broadcaster user of wheat to be connected.
Specifically, can be that a kind of following mode selects a main broadcaster to use from even wheat candidate pool for the first main broadcaster user
Family:
Mode one selects Nei Lianmai number of preset time period from more than one main broadcaster user present in even wheat candidate pool
Less than default even wheat one main broadcaster user of frequency threshold value, it is determined as the second main broadcaster user.
Mode two selects currently viewing user volume to be more than in advance from more than one main broadcaster user present in even wheat candidate pool
If watching a main broadcaster user of user volume threshold value, it is determined as the second main broadcaster user.
Mode three, random selection is in same territorial scope from more than one main broadcaster user present in even wheat candidate pool
A main broadcaster user, be determined as the second main broadcaster user.
Mode four selects current concern user volume more than pre- from more than one main broadcaster user present in even wheat candidate pool
If paying close attention to a main broadcaster user of user volume, it is determined as the second main broadcaster user.
In specific implementation process, in order to improve the random successful match probability for connecting wheat, either in even wheat candidate pool
It is first main broadcaster user's random fit, one main broadcaster user still from even in wheat candidate pool in the main broadcaster user of the company of waiting wheat
Selection meets a main broadcaster user of certain condition, and the specific implementation process of step S102 may each comprise following steps:
First, step S1021 is performed:It is received in even wheat server and connects wheat request at random from first main broadcaster's client
When, even wheat server inquiry connects the main broadcaster user that whether there is the company of waiting wheat in wheat candidate pool, if even in wheat candidate pool
In the presence of the main broadcaster user of the company of waiting wheat, even wheat server performs step S1022~S1024 successively, if even wheat candidate pool
In be not present the company of waiting wheat main broadcaster user, then connect wheat server and perform step S1022 '~S1024 ' successively.
Specifically, even wheat server receives when connecting wheat request at random of first main broadcaster's client, and even wheat server exists
It is inquired in company's wheat candidate pool of local maintenance.
In specific implementation process, the implementation process of step S1022~S1024 is specific as follows:
First, it performs step S1022, connect the main broadcaster that wheat server selects the company of a waiting wheat from even wheat candidate pool
User is determined as the second main broadcaster user;
Then, it performs step S1023, connect wheat server by the first main broadcaster user and second main broadcaster user's successful match;
Then, step S1024 is performed, company's wheat server deletes the second main broadcaster user from even wheat candidate pool.
In specific implementation process, the implementation process of step S1022 '~S1024 ' is specific as follows:
Perform step S1022 ':First main broadcaster user is added in even wheat candidate pool, and records the first main broadcaster user and is added
Enter timestamp during even wheat candidate pool.
If the query result of S1021 is to connect the main broadcaster user that the company of waiting wheat is not present in wheat candidate pool, show
Even wheat candidate pool is sky, is illustrated in even wheat candidate pool currently without any one main broadcaster user in company of waiting wheat, then ought
The first main broadcaster user that preceding initiation connects wheat request at random is added in even wheat candidate pool, while is recorded the first main broadcaster user and added in even wheat
Timestamp when in candidate pool, for example, RandomWaitTimestamp can be named as.
Then, step S1023 ' is performed:Connect wheat server by the first main broadcaster user using timestamp as the pre- of initial time
If in duration in the company of being maintained at wheat candidate pool.
In specific implementation process, preset duration can be configured according to actual demand, for example, could be provided as 28
Second or 28 seconds or 30 seconds or other approximate numerical value.
Then, step S1024 ' is performed:If it is received in preset duration random from second main broadcaster's Client-initiated
Even wheat request by the first main broadcaster user and second main broadcaster user's successful match, and deletes the first main broadcaster from even wheat candidate pool
User;If the duration that the first main broadcaster user is maintained in even wheat candidate pool is more than preset duration, deleted from even wheat candidate pool
First main broadcaster user, and to first main broadcaster's client message that issues that it fails to match.
If it is asked it should be noted that not received in preset duration and connecting wheat at random from any main broadcaster's Client-initiated
It asks, then it is more than preset duration that can lead to the duration that the first main broadcaster user is maintained in even wheat candidate pool.
Specifically, in step S1024 ', even wheat server once connects wheat candidate pool by timer every the inquiry of 1 second wheel,
Timestamp and current time that the first main broadcaster user adds in even wheat candidate pool can be verified during each poll, if check results is work as
The time difference is more than preset duration between preceding time and timestamp, then show the first main broadcaster user be maintained at even in wheat candidate pool when
Length alreadys exceed preset duration, then connects wheat server and delete the first main broadcaster user, and to the first main broadcaster from even wheat candidate pool
First main broadcaster's client where user sends matching time exceeded message, can be named as AP_RandomPhoneTimeout.So that
After first main broadcaster's client receives matching time exceeded message, the matching for hiding first main broadcaster's client waits for interface, and in the first master
Client output is broadcast for the first main broadcaster user to be prompted to match the information of time-out.
Specifically, the first main broadcaster user either in step S1023 is with after second main broadcaster user's successful match, going back
It is after the first main broadcaster user in performing step S1024 ' and second main broadcaster user's successful match, as long as the first main broadcaster user
With second main broadcaster user's successful match, following steps S1025~S1026 is further included:
S1025, even wheat server send successful match message to first main broadcaster's client and the second live streaming client,
In, User ID (Identity, identity number) and the second main broadcaster of the first main broadcaster user are carried in successful match message
The User ID of user.
It should be noted that successful match message is used to indicate first main broadcaster's client and second main broadcaster's client is respectively hidden
It hides matching and waits for interface.Successful match message may be used to indicate that first main broadcaster's client and second main broadcaster's client are respectively defeated
Go out the first main broadcaster user and the second main broadcaster user is prompted to enter the prompt message of even wheat state.
S1026, even wheat server obtains the company wheat for connecting wheat state between the first main broadcaster user of characterization and the second main broadcaster user
Status data is stored into company's wheat session that even wheat server is established.
Specifically, company's wheat status data is a Map data structure, i.e. dictionary or associated data structures, Map data structures
For preserving the data with mapping relations, two groups of data are preserved in Map data structures:Key and value, one of which data
The type of KEY is std::pair<int,int>, pair values using the first main broadcaster user and the second main broadcaster user two parties
ID is combined, and User ID is larger in front.
After step s 102, step S103 is performed:If the first main broadcaster user and second main broadcaster user's successful match, even
Wheat server establishes company's wheat service between second main broadcaster's client where first main broadcaster's client and the second main broadcaster user, makes
It obtains the first main broadcaster user and enters even wheat state with the second main broadcaster user.
In further technical solution, in order to which even wheat can be cancelled at any time before the wheat service of the real company of now setting up, further include
Following steps:Before the first main broadcaster user and second main broadcaster user's successful match, if received from the first main broadcaster client
The cancellation at end connects wheat request, and even wheat server is from even deleting the first main broadcaster user in wheat candidate pool, and to the first main broadcaster user
First main broadcaster's client at place, which is sent, deletes success message.
In further technical solution, after the wheat service of the real company of now setting up, main broadcaster user can cancel company at any time
Wheat further includes following steps:
Step A1, the company between second main broadcaster's client where establishing first main broadcaster's client and the second main broadcaster user
After wheat service, even end of the wheat server reception from first main broadcaster's client or second main broadcaster's client connects wheat request,
Terminate to carry the User ID of the first main broadcaster user and the User ID of the second main broadcaster user in even wheat request.
Specifically, in step A1, after the first main broadcaster user enters even wheat state with the second main broadcaster user, the first master
Broadcasting user and the second main broadcaster user can click end even wheat button, with this come terminate at any time even wheat.First main broadcaster's client
It is sent when receiving the first main broadcaster user to terminating the even clicking operation of wheat button to even wheat server and terminates even wheat request, second
It is sent when main broadcaster's client receives the second main broadcaster user to terminating the even clicking operation of wheat button to even wheat server and terminates to connect
Wheat ask, therefore, connect wheat server receive the end from first main broadcaster's client connect wheat request or come from second
The end of main broadcaster's client connects wheat request, is carried out step A2.
In a preferred embodiment mode, at the time of the first main broadcaster user and the second main broadcaster user enter even wheat state
Start, when reaching default even wheat duration, issue the instruction that instruction display terminates even wheat button, indicate first main broadcaster's client and the
The display of two main broadcaster's clients terminates even wheat button.In this way, it is avoided that malice connects wheat.
Specifically, terminating to carry end even wheat message AP_RandomPhoneOver in even wheat request, terminate even wheat and disappear
The User ID of the first main broadcaster user and the User ID of the second main broadcaster user are carried in breath.
If step A2, even wheat server receives end even wheat request, even wheat server is according to the first main broadcaster user's
User ID and the User ID of the second main broadcaster user structure target query data.
It should be noted that target query data are the KEY data in Map data structures, the type of KEY data is specially
std::pair<int,int>, target query data identical with the type of the KEY data of company's wheat status data in even wheat session
In include the User ID of the first main broadcaster user and the User ID of the second main broadcaster user.
Step A3, even wheat server carries out inquiry with the presence or absence of target query data in even wheat session;If Lian Maihui
There are target query data in words, then perform step A4, if even there is no target query data in wheat session, perform step
A5。
Step A4 is specially:Even wheat server terminates company's wheat clothes between first main broadcaster's client and first main broadcaster's client
Business, and the company's wheat status number for connecting wheat state between the first main broadcaster user of characterization and the second main broadcaster user is deleted from even wheat session
According to also to first main broadcaster's client and the transmission of second main broadcaster's client even wheat end notification message;
Step A5 is specially:Even wheat server returns to error message to the main broadcaster's client for initiating to terminate even wheat request.
In specific implementation process, the main broadcaster's client for initiating to terminate even wheat request can be first main broadcaster's client,
It can be second main broadcaster's client.
It, can be as needed in any one main broadcaster user in even wheat state by above-mentioned steps A1~A5
Terminate even wheat, the flexibility of the company of improving wheat.
Further, between second main broadcaster's client where establishing first main broadcaster's client and the second main broadcaster user
Even after wheat service, it can also include the following steps:
Step B1, even wheat server receives first sent from first main broadcaster's client according to default heartbeat time interval
The second heartbeat message that heartbeat message and second main broadcaster's client are sent according to default heartbeat time interval, the first heartbeat message and
The User ID of the first main broadcaster user and the User ID of the second main broadcaster user are carried in second heartbeat message.Receiving first
During heartbeat message, the keep-alive timestamp of the first main broadcaster user is updated in even wheat session, when receiving the second heartbeat message,
The keep-alive timestamp of the second main broadcaster user is even updated in wheat session.
In specific implementation process, default heartbeat time interval is configured according to actual demand, for example, default heart time
Interval could be provided as any one numerical value in 1~10 second, be carried out for example as 5 seconds using default heartbeat time interval:
It establishes after company's wheat service between second main broadcaster's client where first main broadcaster's client and the second main broadcaster user, the first master
It broadcasts client and sends first heartbeat message every company's wheat service to even wheat server in 5 seconds, AP_ can be named as
RandomPhoneHeartbeat carries User ID and the second main broadcaster user of the first main broadcaster user in the first heartbeat message
User ID.After even company's wheat service of wheat server receives the first heartbeat message, the first main broadcaster user of update is in even wheat session
Keep-alive timestamp.Likewise, second main broadcaster's client sent second heartbeat every company's wheat service to even wheat server in 5 seconds
Message can be named as AP_RandomPhoneHeartbeat, the user of the second main broadcaster user is carried in the second heartbeat message
ID and the User ID of the first main broadcaster user.Even company's wheat service of wheat server receives second received from the second main broadcaster user
After heartbeat message, keep-alive timestamp of the second main broadcaster user of update in even wheat session.
Step B2, company's wheat server is checked whether according to default check time interval is connected to the first heartbeat message and presses
It is checked whether according to default check time interval and receives the second heartbeat message, if it exceeds default check that duration is not received by
First heartbeat message then performs step B3, if it exceeds default check that duration is not received by the second heartbeat message, then performs
Step B4.
Specifically, default check time interval and default inspection duration can be configured according to actual demand, inspection is preset
It looks into time interval and could be provided as any value in 1-3 seconds, the default any value that checks duration and could be provided as in 10~15.
For example, default check time interval is set as 1 second, then primary all places can be checked every 1 second by timer by connecting wheat server
In even wheat state main broadcaster user in the keep-alive timestamp even in wheat session, wherein, including the first main broadcaster user in even wheat session
In keep-alive timestamp and the second main broadcaster user in the keep-alive timestamp even in wheat session, if it exceeds 15 seconds do not receive heartbeat
Main broadcaster's client of message, then it is assumed that corresponding main broadcaster user, which loses, to be connected.
Step B3, the company wheat that even wheat server terminates between first main broadcaster's client and second main broadcaster's client services, and
And it sends main broadcaster to second main broadcaster's client and loses even message.
Step B4, the company wheat that even wheat server terminates between first main broadcaster's client and second main broadcaster's client services, and
And it sends main broadcaster to the first main broadcaster client and loses even message.
By above-mentioned steps B1~B4 can monitor in even wheat state two main broadcaster users whether the company of mistake, in a side master
When broadcasting user is lost even, even if main broadcaster's client where can notifying the opposing party main broadcaster user, the opposing party main broadcaster user is prompted, with
Just connected wheat again.
In the following, to live streaming provided in an embodiment of the present invention even wheat method, based on main broadcaster's customer end A, main broadcaster's customer end B and company
An interaction embodiment is provided for wheat server, main broadcaster user X has been logged in main broadcaster's customer end A, has been logged in main broadcaster's customer end B
Main broadcaster user Y, to understand the present invention:
Main broadcaster's customer end A:Main broadcaster user X start main broadcaster's customer end A and based on User ID log in after, click at random connect wheat by
Button, then main broadcaster's customer end A initiation connect wheat request, show that matching waits for interface in main broadcaster's customer end A, until main broadcaster user at random
X clicks the random wheat button that connects of cancellation and carries out cancelling the random response message for connecting wheat or the company's of receiving wheat server.
Even wheat server:The random company's wheat candidate pool for connecting wheat request, inquiring local maintenance of main broadcaster's customer end A is received, such as
Fruit connects wheat candidate pool for sky, illustrates to connect wheat in waiting currently without any one main broadcaster user, then main broadcaster user X is added in even wheat
In candidate pool, while record the timestamp that main broadcaster user X adds in even wheat candidate pool.If even wheat candidate pool has the master of the company of waiting wheat
Broadcasting user Y, then main broadcaster user Y and main broadcaster user's X successful match.Main broadcaster user Y is deleted, and from even wheat candidate pool to master
Broadcasting user X and main broadcaster user Y send random fit success message, taken in successful match message main broadcaster user X User ID and
The User ID of main broadcaster user Y.Simultaneously company's wheat status data storage of main broadcaster user X and main broadcaster user Y to even wheat session, main broadcaster
After customer end B and main broadcaster's customer end A receive successful match message, hide matching and wait for interface, main broadcaster user Y is prompted to be used with main broadcaster
Family X enters company's wheat state with other side.Even wheat server is ask by timer every 1 second wheel once connects wheat candidate pool, verification master
Broadcasting user X adds in the timestamp and current time of even wheat candidate pool, if it find that main broadcaster user X waitings already exceed 30 seconds, then
Main broadcaster user X is deleted, and send matching time exceeded message to main broadcaster's customer end A from even wheat candidate pool.
Main broadcaster's customer end A:It after receiving time exceeded message, hides matching and waits for interface, prompt main broadcaster user X time-out.
Main broadcaster's customer end A:Main broadcaster is initiated after connecting wheat request at random, at most waiting 30 seconds, before successful match, Zhu Boyong
Family X can click cancellation even wheat button, cancel and connect wheat at random.Main broadcaster's customer end A can cancel even wheat to even wheat server please
It asks.
Even wheat server:Even wheat service receive cancellation even wheat request after, main broadcaster user X from connect wheat candidate pool in delete,
And reply deletion success message.
Main broadcaster's customer end A:After main broadcaster user X and main broadcaster user Y random fits are successful, with main broadcaster user X and main broadcaster user Y
Into even wheat state, main broadcaster user X can click end at any time, and even wheat button terminates even wheat.Main broadcaster's customer end A can be to even wheat clothes
Being engaged in, even wheat is asked for device transmission end, terminates to connect the User ID that main broadcaster user X is carried in the message that wheat is asked with main broadcaster user Y's
User ID.
Main broadcaster's customer end B:After main broadcaster user X and main broadcaster user Y random fits are successful, with main broadcaster user X and main broadcaster user Y
Into even wheat state, main broadcaster user Y can click end at any time, and even wheat button terminates even wheat.Main broadcaster's customer end B can be to even wheat clothes
Being engaged in, even wheat is asked for device transmission end, terminates to connect the User ID that main broadcaster user X is carried in the message that wheat is asked with main broadcaster user Y's
User ID.
Even wheat server:End even wheat request is received, according to the User ID of main broadcaster user X and the User ID of main broadcaster user Y
Construct KEY, even inquired in wheat session according to KEY, if can not find out constructed construction KEY, illustrate main broadcaster user X with
Company wheat between main broadcaster user Y is not present, and error message is returned to client.If finding constructed construction KEY, terminate to lead
Company wheat between broadcasting user X and main broadcaster user Y deletes corresponding even wheat status data from even wheat candidate pool, and gives main broadcaster visitor
Family end B and main broadcaster's customer end A send even wheat end notification message.
Main broadcaster's customer end A:After main broadcaster user X and main broadcaster user's Y random fits are successfully entered even wheat state, every 5 seconds to
Even wheat server sends a heartbeat message.
Main broadcaster's customer end B:After main broadcaster user X and main broadcaster user's Y random fits are successfully entered even wheat state, every 5 seconds to
Even wheat server sends a heartbeat message.
Even wheat server:The keep-alive timestamp of each main broadcaster user X is updated in even wheat session.Simultaneously by timer every
Check within 1 second primary all keep-alive times in the even main broadcaster user (including main broadcaster user X, main broadcaster user Y) of wheat state, if
Even wheat server is more than 15 seconds heartbeat message for not receiving main broadcaster's customer end A, then it is assumed that the main broadcaster user X, which loses, to be connected, and at this moment can
Terminate the company wheat between main broadcaster user X and main broadcaster user Y, the message of main broadcaster user X mistakes company is sent to main broadcaster's customer end B.If
Even wheat server is more than 15 seconds heartbeat message for not receiving main broadcaster's customer end B, then it is assumed that the main broadcaster user Y, which loses, to be connected, at this moment
It can terminate the company wheat between main broadcaster user X and main broadcaster user Y, main broadcaster's customer end A sends main broadcaster user Y and loses the message connected.
Main broadcaster's customer end A:After receiving the message that main broadcaster user Y loses company, output prompting main broadcaster user Y loses the information connected, disconnected
Kai Lianmai.
Main broadcaster's customer end B:After receiving the message that main broadcaster user X loses company, output prompting main broadcaster user X loses the information connected, disconnected
Kai Lianmai.
Based on same inventive concept, the embodiment of the present invention provides a kind of even wheat server, refering to what is shown in Fig. 3, including:
Even wheat request reception unit 201 comes from first main broadcaster's client where the first main broadcaster user for receiving
It is random to connect wheat request;
Main broadcaster's subscriber matching unit 202, for being described the in even company's wheat candidate pool for being established of wheat server
One main broadcaster user matches the second main broadcaster user;
Unit 203 is established in even wheat service, if matched into for the first main broadcaster user with the second main broadcaster user
Work(establishes company's wheat clothes between second main broadcaster's client where the first main broadcaster client and the second main broadcaster user
Business so that enter even wheat state between the first main broadcaster user and the second main broadcaster user.
Optionally, main broadcaster's subscriber matching unit 202, including:
Subelement is inquired in pond, for described random connecting wheat request receive from the first main broadcaster client
When, inquire the main broadcaster user that whether there is the company of waiting wheat in the even wheat candidate pool;
Subelement is selected, if for the main broadcaster user that even there is the company of waiting wheat in wheat candidate pool, from described
The main broadcaster user of the company of a waiting wheat is even selected in wheat candidate pool, is determined as the second main broadcaster user;
First coupling subelement, for by the first main broadcaster user and the second main broadcaster user successful match;
First deletes subelement, for deleting the second main broadcaster user from the even wheat candidate pool.
Optionally, main broadcaster's subscriber matching unit 202, further includes:
Subelement is added in, is used for the main broadcaster with the presence or absence of the company of waiting wheat in the inquiry even wheat candidate pool
After family, if the main broadcaster user of the company of waiting wheat is not present in the even wheat candidate pool, the first main broadcaster user is added
Enter to the even wheat candidate pool, and record timestamp when the first main broadcaster user is added into the even wheat candidate pool;
Wait for subelement, for by the first main broadcaster user in the preset duration using the timestamp as initial time
It is interior, it is maintained in the even wheat candidate pool;
Second coupling subelement, if initiated for being received in the preset duration from the second main broadcaster user
It is random connect wheat request, by the first main broadcaster user and the second main broadcaster user successful match, and from the company wheat time
The first main broadcaster user is deleted in scavenger;
Second deletes subelement, if the duration for the first main broadcaster user to be maintained in the even wheat candidate pool surpasses
The preset duration is crossed, the first main broadcaster user is even deleted in wheat candidate pool from described, and to the first main broadcaster client
Message that end issues that it fails to match.
Optionally, the even wheat server further includes:
Success message transmitting element, for the first main broadcaster user and the second main broadcaster user successful match it
Afterwards, successful match message, the successful match message are sent to the first main broadcaster client and the second live streaming client
It is used to indicate the first main broadcaster client and each self-hiding matching of the second main broadcaster client waits for interface;
Status data unit connects wheat shape for obtaining to characterize between the first main broadcaster user and the second main broadcaster user
Company's wheat status data of state is stored into company's wheat session that wheat server is established described even.
Optionally, the even wheat server further includes:
Cancel even wheat processing unit, for the first main broadcaster user being added in the even wheat candidate pool, and
And before the first main broadcaster user and the second main broadcaster user successful match, if received from first main broadcaster
The cancellation of client connects wheat request, deletes the first main broadcaster user from the even wheat candidate pool, and lead to described first
The first main broadcaster client where broadcasting user, which is sent, deletes success message.
Optionally, the even wheat server further includes:
Terminate even wheat request reception unit, for establishing the first main broadcaster client and second main broadcaster use described
It after company wheat between second main broadcaster's client where family services, receives and terminates even wheat request, even wheat request comes for the end
It is described to terminate to carry first master in even wheat request from the first main broadcaster client or the second main broadcaster client
The User ID of broadcasting user and the User ID of the second main broadcaster user;
Data construction unit, for the User ID according to the first main broadcaster user and the user of the second main broadcaster user
ID builds target query data;
Data query unit, for carrying out inquiry with the presence or absence of the target query data in the even wheat session;
Terminate even wheat processing unit, if for there are the target query data in the even wheat session, terminate described
Company's wheat service between first main broadcaster's client and the first main broadcaster client, and delete characterization from the even wheat session
Connect company's wheat status data of wheat state between the first main broadcaster user and the second main broadcaster user, also to first main broadcaster
Client and the second main broadcaster client send even wheat end notification message;
Error message transmitting element, if for the target query data to be not present in the even wheat session, to initiation
The main broadcaster's client for terminating even wheat request returns to error message.
Optionally, the even wheat server further includes:
Heartbeat message receiving unit, for establishing the first main broadcaster client and the second main broadcaster user institute described
Second main broadcaster's client between the service of company wheat after, receive from the first main broadcaster client according to default heartbeat when
Between be spaced the first heartbeat message of transmission and the second main broadcaster client is sent according to the default heartbeat time interval the
The user of the first main broadcaster user is carried in two heartbeat message, first heartbeat message and second heartbeat message
ID and the User ID of the second main broadcaster user;
Update of time stamp unit, for when receiving first heartbeat message, updating institute in the even wheat session
The keep-alive timestamp of the first main broadcaster user is stated, when receiving second heartbeat message, updates institute in the even wheat session
State the keep-alive timestamp of the second main broadcaster user;
First company's of mistake processing unit, for checking that duration is not received by first heartbeat message if it exceeds presetting,
Then terminate the company wheat service between the first main broadcaster client and the second main broadcaster client, and to second main broadcaster
Client sends main broadcaster and loses even message;
Second company's of mistake processing unit, for checking that duration is not received by second heartbeat message if it exceeds presetting,
Then terminate the company wheat service between the first main broadcaster client and the second main broadcaster client, and to first main broadcaster
Client sends main broadcaster and loses even message.
Based on same inventive concept, an embodiment of the present invention provides a kind of computer readable storage medium 401, with reference to figure 4
It is shown, computer program 402 is stored thereon with, which realizes that even wheat method is implemented for aforementioned live streaming when being executed by processor
Step described in any of example embodiment.
Based on same inventive concept, an embodiment of the present invention provides a kind of computer equipment 500, refering to what is shown in Fig. 5, including
Memory 510, processor 530 and it is stored in the computer program 520 that can be run on memory 510 and on processor 530, institute
It states and realizes aforementioned live streaming even described in any of wheat embodiment of the method embodiment when processor 530 performs described program 520
Step.
Since above-mentioned introduced server, storage medium and computer equipment are aforementioned straight in the embodiment of the present invention to implement
The company's of broadcasting wheat method is used, so wheat method, the affiliated technology people in this field are connected based on the live streaming described in the embodiment of the present invention
Member can understand the specific embodiment and its various change form of server, storage medium and computer equipment, so
It is no longer detailed that this live streaming how realized for server, storage medium and computer equipment in the embodiment of the present invention connects wheat method
It introduces.As long as the live streaming that those skilled in the art implement in the embodiment of the present invention connects server used by wheat method, deposits
Storage media and computer equipment belong to the range of the invention to be protected.
The one or more technical solutions provided in the embodiment of the present invention, have at least the following technical effects or advantages:
It receives the random of first main broadcaster's client where coming from the first main broadcaster user and connects wheat request;In even wheat server
In the company's wheat candidate pool established the second main broadcaster user is matched for the first main broadcaster user;If the first main broadcaster user and the second main broadcaster
User's successful match establishes company's wheat clothes between second main broadcaster's client where first main broadcaster's client and the second main broadcaster user
Business so that enter even wheat state between the first main broadcaster user and the second main broadcaster user.Therefore, as long as there are two initiate to connect wheat at random
Main broadcaster's client of request, it will be able to which even wheat success, the main broadcaster user for not needing to specify to some initiate even wheat request, improve
Company's wheat success rate of main broadcaster's client where the not high main broadcaster user of popularity, where alleviating the higher main broadcaster user of popularity
The load pressure of main broadcaster's client, therefore, the company wheat between the main broadcaster's client for the main broadcaster user for balancing different stage, into
And the reliability that main broadcaster connects wheat can be improved.
In addition, also improve through the embodiment of the present invention main broadcaster interest, and then can the company's of greatly promoting wheat activity, into
And strengthen the interactivity between platform main broadcaster.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware can be used in the present invention
Apply the form of example.Moreover, the computer for wherein including computer usable program code in one or more can be used in the present invention
The computer program production that usable storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real
The device of function specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or
The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation
Property concept, then additional changes and modifications may be made to these embodiments.So appended claims be intended to be construed to include it is excellent
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of live streaming connects wheat method, applied to even wheat server, which is characterized in that the method includes:
It receives the random of first main broadcaster's client where coming from the first main broadcaster user and connects wheat request;
It is that the first main broadcaster user matches the second main broadcaster user in company's wheat candidate pool that wheat server is established described even;
If the first main broadcaster user and the second main broadcaster user successful match, establish the first main broadcaster client and institute
State company's wheat service between second main broadcaster's client where the second main broadcaster user so that the first main broadcaster user and described the
Enter even wheat state between two main broadcaster users.
2. live streaming as described in claim 1 connects wheat method, which is characterized in that described in the company that even wheat server is established
It is that the first main broadcaster user matches the second main broadcaster user in wheat candidate pool, including:
Receive from the first main broadcaster client it is described it is random connect wheat request when, inquiring in the even wheat candidate pool is
The no main broadcaster user that there is the company of waiting wheat;
If there is the main broadcaster user of the company of waiting wheat in the even wheat candidate pool, one is selected from the even wheat candidate pool
The main broadcaster user of the company of waiting wheat is determined as the second main broadcaster user;
By the first main broadcaster user and the second main broadcaster user successful match;
The second main broadcaster user is deleted from the even wheat candidate pool.
3. live streaming as claimed in claim 2 connects wheat method, which is characterized in that described in the company that even wheat server is established
It is that the first main broadcaster user matches the second main broadcaster user in wheat candidate pool, further includes:
After main broadcaster user in the inquiry even wheat candidate pool with the presence or absence of the company of waiting wheat, if the even wheat
The main broadcaster user of the company of waiting wheat is not present in candidate pool, the first main broadcaster user is added in the even wheat candidate pool,
And record timestamp when the first main broadcaster user is added into the even wheat candidate pool;
The first main broadcaster user is maintained to the even wheat candidate in the preset duration using the timestamp as initial time
Chi Zhong;
Connect wheat request at random from the second main broadcaster Client-initiated if received in the preset duration, by described the
One main broadcaster user and the second main broadcaster user successful match, and delete first main broadcaster from the even wheat candidate pool and use
Family;
If the duration that the first main broadcaster user is maintained in the even wheat candidate pool is more than the preset duration, from the company
Delete the first main broadcaster user in wheat candidate pool, and to the first main broadcaster client message that issues that it fails to match.
4. the live streaming as described in any one of claim 1-3 connects wheat method, which is characterized in that the first main broadcaster user with
After the second main broadcaster user successful match, the method further includes:
Successful match message, the successful match message are sent to the first main broadcaster client and the second live streaming client
It is used to indicate the first main broadcaster client and each self-hiding matching of the second main broadcaster client waits for interface;
Obtain the company's wheat status data for characterizing and connecting wheat state between the first main broadcaster user and the second main broadcaster user, storage
Into company's wheat session that wheat server is established described even.
5. live streaming as claimed in claim 4 connects wheat method, which is characterized in that is added in by the first main broadcaster user to described
Even after wheat candidate pool, and before the first main broadcaster user and the second main broadcaster user successful match, the method
It further includes:
If receiving the cancellation from the first main broadcaster client connects wheat request, from the even wheat candidate pool described in deletion
First main broadcaster user, and sent to the first main broadcaster client where the first main broadcaster user and delete success message.
6. live streaming as claimed in claim 4 even wheat method, which is characterized in that it is described establish the first main broadcaster client with
After company's wheat service between second main broadcaster's client where the second main broadcaster user, the method further includes:
It receives and terminates even wheat request, it is described to terminate even wheat request from the first main broadcaster client or second main broadcaster visitor
Family end, the user of the User ID and the second main broadcaster user for terminating to carry the first main broadcaster user in even wheat request
ID;
According to the User ID of the first main broadcaster user and the User ID of second main broadcaster user structure target query data;
Inquiry is carried out with the presence or absence of the target query data in the even wheat session;
If there are the target query data in the even wheat session, terminate the first main broadcaster client and the described first master
Company's wheat service between client is broadcast, and is deleted from the even wheat session and characterizes the first main broadcaster user and described second
Connect company's wheat status data of wheat state between main broadcaster user, also to the first main broadcaster client and the second main broadcaster client
The company's of transmission wheat end notification message;
If there is no the target query data in the even wheat session, to the initiation main broadcaster client for terminating even wheat request
End returns to error message.
7. live streaming as claimed in claim 4 even wheat method, which is characterized in that it is described establish the first main broadcaster client with
After company's wheat service between second main broadcaster's client where the second main broadcaster user, the method further includes:
Receive the first heartbeat message for being sent from the first main broadcaster client according to default heartbeat time interval and described the
The second heartbeat message that two main broadcaster's clients are sent according to the default heartbeat time interval, first heartbeat message and described
The User ID of the first main broadcaster user and the User ID of the second main broadcaster user are carried in second heartbeat message;
When receiving first heartbeat message, the keep-alive time of the first main broadcaster user is updated in the even wheat session
Stamp when receiving second heartbeat message, updates the keep-alive time of the second main broadcaster user in the even wheat session
Stamp;
If it exceeds default check that duration is not received by first heartbeat message, then terminate the first main broadcaster client with
Company's wheat service between the second main broadcaster client, and send main broadcaster to the second main broadcaster client and lose even message;
If it exceeds default check that duration is not received by second heartbeat message, then terminate the first main broadcaster client with
Company's wheat service between the second main broadcaster client, and send main broadcaster to the first main broadcaster client and lose even message.
8. a kind of even wheat server, which is characterized in that including:
Even wheat request reception unit connects wheat for receiving the random of first main broadcaster's client where coming from the first main broadcaster user
Request;
Main broadcaster's subscriber matching unit, for being that first main broadcaster uses in company's wheat candidate pool that wheat server is established described even
Family matches the second main broadcaster user;
Unit is established in even wheat service, if for the first main broadcaster user and the second main broadcaster user successful match, is established
Company wheat between the first main broadcaster client and second main broadcaster's client where the second main broadcaster user services so that institute
It states and enters even wheat state between the first main broadcaster user and the second main broadcaster user.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor
The step described in any one of claim 1-7 is realized during row.
10. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor
Calculation machine program, which is characterized in that the processor realizes the step described in any one of claim 1-7 when performing described program
Suddenly.
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 true CN108184140A (en) | 2018-06-19 |
CN108184140B 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) |
Cited By (16)
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 |
CN109257658A (en) * | 2018-10-12 | 2019-01-22 | 北京潘达互娱科技有限公司 | A kind of live streaming even wheat method, apparatus and server |
CN109388924A (en) * | 2018-09-30 | 2019-02-26 | 武汉斗鱼网络科技有限公司 | A kind of auth method, device, server and storage medium |
CN109618191A (en) * | 2018-12-17 | 2019-04-12 | 广州市百果园信息技术有限公司 | Live streaming connects wheat method, apparatus, computer readable storage medium and terminal |
CN109743587A (en) * | 2019-01-03 | 2019-05-10 | 广州虎牙信息科技有限公司 | Live streaming connection monitoring method, terminal device and storage medium |
CN109756504A (en) * | 2019-01-16 | 2019-05-14 | 武汉斗鱼鱼乐网络科技有限公司 | A kind of communication means and relevant apparatus based on live streaming platform |
CN110149525A (en) * | 2019-05-23 | 2019-08-20 | 广州虎牙信息科技有限公司 | A kind of live broadcasting method, device, equipment and storage medium |
CN110311795A (en) * | 2019-07-02 | 2019-10-08 | 广州华多网络科技有限公司 | The creation method and system, server of friendly neighbour group |
CN110971922A (en) * | 2018-09-30 | 2020-04-07 | 武汉斗鱼网络科技有限公司 | Live broadcast and microphone connecting state monitoring method, device, storage medium and system |
CN110996180A (en) * | 2019-12-17 | 2020-04-10 | 李昱颉 | Network live broadcast chatting method, system and server |
CN111683262A (en) * | 2020-06-04 | 2020-09-18 | 广州酷狗计算机科技有限公司 | Method, device, server, terminal and storage medium for determining continuous microphone time |
CN112312154A (en) * | 2020-10-30 | 2021-02-02 | 广州华多网络科技有限公司 | Network live broadcast control and execution method and corresponding device, equipment and medium |
CN113141519A (en) * | 2021-06-23 | 2021-07-20 | 大学长(北京)网络教育科技有限公司 | Live broadcast data processing method and device |
CN113645475A (en) * | 2021-08-03 | 2021-11-12 | 杭州情咖网络技术有限公司 | Live broadcast connection method and device |
CN113691872A (en) * | 2021-06-18 | 2021-11-23 | 北京达佳互联信息技术有限公司 | Live broadcast task allocation method and device, electronic equipment and storage medium |
CN115996213A (en) * | 2022-12-29 | 2023-04-21 | 百果园技术(新加坡)有限公司 | Live-broadcast continuous-wheat processing method and device, equipment and medium thereof |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110765366B (en) * | 2019-10-30 | 2022-11-08 | 网易(杭州)网络有限公司 | Live broadcast and live broadcast matching method, device and equipment and computer readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040254017A1 (en) * | 2003-06-11 | 2004-12-16 | Vision Electronics Co., Ltd. | [sound device of video game system] |
CN104468395A (en) * | 2014-10-20 | 2015-03-25 | 广州华多网络科技有限公司 | Direct-broadcasting-room channel access method and system |
US20160150286A1 (en) * | 2013-11-14 | 2016-05-26 | Smiletime, Inc. | Social multi-camera interactive live engagement system |
CN105812951A (en) * | 2016-03-24 | 2016-07-27 | 广州华多网络科技有限公司 | Stream media data interaction method, terminal, server and system |
CN106156243A (en) * | 2015-04-26 | 2016-11-23 | 上海灵域网络科技有限公司 | A kind of social entertainment method and system |
CN106488251A (en) * | 2016-10-19 | 2017-03-08 | 北京小米移动软件有限公司 | Realize the live middle even method and device of wheat, main broadcaster's client and subscription client |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
-
2018
- 2018-01-10 CN CN201810023758.5A patent/CN108184140B/en active Active
- 2018-04-10 WO PCT/CN2018/082506 patent/WO2019136862A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040254017A1 (en) * | 2003-06-11 | 2004-12-16 | Vision Electronics Co., Ltd. | [sound device of video game system] |
US20160150286A1 (en) * | 2013-11-14 | 2016-05-26 | Smiletime, Inc. | Social multi-camera interactive live engagement system |
CN104468395A (en) * | 2014-10-20 | 2015-03-25 | 广州华多网络科技有限公司 | Direct-broadcasting-room channel access method and system |
CN106156243A (en) * | 2015-04-26 | 2016-11-23 | 上海灵域网络科技有限公司 | A kind of social entertainment method and system |
CN105812951A (en) * | 2016-03-24 | 2016-07-27 | 广州华多网络科技有限公司 | Stream media data interaction method, terminal, server and system |
CN106488251A (en) * | 2016-10-19 | 2017-03-08 | 北京小米移动软件有限公司 | Realize the live middle even method and device of wheat, main broadcaster's client and subscription client |
Cited By (23)
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 |
CN110971922A (en) * | 2018-09-30 | 2020-04-07 | 武汉斗鱼网络科技有限公司 | Live broadcast and microphone connecting state monitoring method, device, storage medium and system |
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 |
CN109743587A (en) * | 2019-01-03 | 2019-05-10 | 广州虎牙信息科技有限公司 | Live streaming connection monitoring method, terminal device and storage medium |
CN109743587B (en) * | 2019-01-03 | 2021-09-17 | 广州虎牙信息科技有限公司 | Live broadcast connection monitoring method, terminal equipment and storage medium |
CN109756504A (en) * | 2019-01-16 | 2019-05-14 | 武汉斗鱼鱼乐网络科技有限公司 | A kind of communication means and relevant apparatus based on live streaming platform |
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 |
CN110311795A (en) * | 2019-07-02 | 2019-10-08 | 广州华多网络科技有限公司 | The creation method and system, server of friendly neighbour group |
CN110996180A (en) * | 2019-12-17 | 2020-04-10 | 李昱颉 | Network live broadcast chatting method, system and server |
CN110996180B (en) * | 2019-12-17 | 2021-05-28 | 李昱颉 | Network live broadcast chatting method, system and server |
CN111683262A (en) * | 2020-06-04 | 2020-09-18 | 广州酷狗计算机科技有限公司 | Method, device, server, terminal and storage medium for determining continuous microphone time |
CN111683262B (en) * | 2020-06-04 | 2022-03-15 | 广州酷狗计算机科技有限公司 | Method, device, server, terminal and storage medium for determining continuous microphone time |
CN112312154A (en) * | 2020-10-30 | 2021-02-02 | 广州华多网络科技有限公司 | 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 |
CN113141519A (en) * | 2021-06-23 | 2021-07-20 | 大学长(北京)网络教育科技有限公司 | Live broadcast data processing method and device |
CN113645475A (en) * | 2021-08-03 | 2021-11-12 | 杭州情咖网络技术有限公司 | Live broadcast connection 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 |
Also Published As
Publication number | Publication date |
---|---|
CN108184140B (en) | 2020-03-17 |
WO2019136862A1 (en) | 2019-07-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108184140A (en) | A kind of live streaming connects wheat method and device | |
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 | |
RU2513761C2 (en) | Method and server for instant messaging | |
WO2019071829A1 (en) | Method, storage medium, device and system for implementing microphone connection-based battle between hosts on pc | |
WO2020248658A1 (en) | Abnormal account detection method and apparatus | |
US20160308878A1 (en) | Exception prompting method, apparatus, and system using the same | |
CN107251035A (en) | Account recovers agreement | |
CN103259715B (en) | A kind of manage the method for multi-conference, Apparatus and system | |
CN105323308A (en) | Community interconnection method and system based on geographical location information | |
CN105872577A (en) | Method, device and system for obtaining video data | |
CN106331772A (en) | Data verification method and apparatus and smart television system | |
WO2019071859A1 (en) | Method and apparatus for preventing gift swiping on live broadcast platform | |
CN102137070A (en) | Method, system and device for restricting user from logging in chat room | |
CN110996180B (en) | Network live broadcast chatting method, system and server | |
WO2015109991A1 (en) | Data processing method and apparatus for internet application | |
CN107613313A (en) | A kind of player method and device of multiple live videos | |
WO2019071857A1 (en) | Method and device preventing gift giving on live streaming platform | |
CN104093081A (en) | On-line instant chat system based on digital television and implementation method | |
CN111881276B (en) | Virtual resource transfer method and device, storage medium and electronic equipment | |
CN112565385B (en) | Server address information configuration method and device and electronic equipment | |
CN102209084A (en) | Processing method of Push message, apparatus thereof and communication system | |
US8544109B2 (en) | Methods and systems involving survey administration | |
CN111934983B (en) | Data interaction method and device, storage medium and electronic equipment |
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 |