Disclosure of Invention
The invention mainly aims to disclose a client matching method based on a mobile terminal, a server and a client, so as to at least solve the problems that the selection mode of the communication client adopted by the current mobile phone user in the related technology is lack of convenience and entertainment, and the conditions for regulating the mood and enriching the life of the vast user group during the work can not be created.
According to one aspect of the invention, a client matching method based on a mobile terminal is provided.
The client matching method based on the mobile terminal comprises the following steps: receiving a request message of a random matching mobile terminal client from a first client of a mobile terminal, wherein the request message carries a matching condition; searching whether a second client meeting the matching condition exists in a pre-configured random matching user client list; and when the second client meeting the matching condition is found, notifying the first client of a first matching result, wherein the first matching result carries the identification information of the second client.
Preferably, after searching whether there is a second client meeting the matching condition in a preconfigured random matching user client list, the method further includes: when the second client meeting the matching condition is not found, adding the first client to the random matching user client list; when a request message of a random matching mobile terminal client from at least one other client is received, searching whether the client meets the matching conditions of the other clients in the random matching user client list; and within a preset time length from the addition of the first client to the random matching user client list, if the first client meets the matching conditions of other current clients, notifying a second matching result to the other current clients, wherein the second matching result carries the identification information of the first client.
Preferably, within a predetermined time period from the adding of the first client to the random matching user client list, if the first client does not satisfy the matching condition of the other clients, the method further includes: and sending a matching overtime notification message to the first client, and ending the random matching process of the first client.
According to another aspect of the present invention, a client matching method based on a mobile terminal is provided.
The client matching method based on the mobile terminal comprises the following steps: a first client of a mobile terminal sends a request message for randomly matching the client of the mobile terminal to a server, wherein the request message carries a matching condition; when the server finds a second client meeting the matching condition in a pre-configured random matching user client list, the first client receives a first matching result returned by the server, wherein the first matching result carries identification information of the second client.
Preferably, after the first client receives the first matching result returned from the server, the method further includes: the second client receives a call initiated by calling a call request by taking the first client as a calling party; the second client presents notification information of receiving the call and rejecting the call; and the second client responds to the operation of the user on the notification information and makes a call with the first client or rejects the call of the first client.
According to yet another aspect of the present invention, a server is provided.
The server according to the present invention includes: a first receiving module, configured to receive a request message from a first client of a mobile terminal for randomly matching a client of the mobile terminal, where the request message carries a matching condition; the first searching module is used for searching whether a second client meeting the matching condition exists in a pre-configured random matching user client list; and the first notification module is configured to notify the first client of a first matching result when the second client meeting the matching condition is found, where the first matching result carries identification information of the second client.
Preferably, the server further includes: an adding module, configured to add the first client to the list of randomly matched user clients when the second client that meets the matching condition is not found; the second searching module is used for searching whether the client side meeting the matching conditions of other client sides is found in the random matching user client side list when the request message of the random matching mobile terminal client side from at least one other client side is received; and the second notification module is used for notifying a second matching result to other current clients when the first client meets the matching conditions of other current clients within a preset time period from the time when the first client is added to the random matching user client list, wherein the second matching result carries the identification information of the first client.
Preferably, the server further includes: and the first sending module is used for sending a matching overtime notification message to the first client and ending the random matching process of the first client.
According to yet another aspect of the present invention, a client is provided.
The client according to the invention comprises: the system comprises a first client and a second client, wherein the first client comprises: the second sending module is used for sending a request message for randomly matching the mobile terminal client to the server, wherein the request message carries matching conditions; and a second receiving module, configured to receive a first matching result returned by the server when the server finds, in a preconfigured list of randomly matched user clients, that the second client meets the matching condition, where the first matching result carries identification information of the second client.
Preferably, the second client includes: a third receiving module, configured to receive a call initiated by the first client as a calling party invoking a call request; the presenting module is used for presenting the notification information of receiving the call and rejecting the call; and the response module is used for responding the operation of the user on the notification information, and carrying out communication with the first client or rejecting the call of the first client.
Compared with the prior art, the embodiment of the invention at least has the following advantages: the method has the advantages that the client side meeting the conditions is randomly matched in the preset randomly matched user client side list for the mobile terminal client side, convenience and entertainment are achieved, meanwhile, conditions can be created for adjusting mood and enriching life of a large number of user groups after work, the friend making circle of users can be expanded, and higher conversation experience is provided for the users.
Detailed Description
The following detailed description of specific embodiments of the present invention is provided in conjunction with the accompanying drawings.
Fig. 1 is a flowchart of a mobile terminal-based client matching method according to a first embodiment of the present invention. As shown in fig. 1, the client matching method based on the mobile terminal includes:
step S101: receiving a request message of a random matching mobile terminal client from a first client of a mobile terminal, wherein the request message carries a matching condition;
step S103: searching whether a second client meeting the matching condition exists in a pre-configured random matching user client list;
step S105: and when the second client meeting the matching condition is found, notifying the first client of a first matching result, wherein the first matching result carries the identification information of the second client.
By adopting the communication client selection mode shown in fig. 1, the client satisfying the conditions is randomly matched in the random matching user client list configured in advance for the mobile terminal client, so that the convenience and the entertainment are achieved, meanwhile, the conditions can be created for adjusting mood and enriching life of vast user groups after work, the friend-making circle of the user can be expanded, and higher conversation experience is provided for the user.
The matching conditions can be dynamically configured according to actual conditions, such as gender and/or age, and the like.
Preferably, after searching whether there is a second client meeting the matching condition in the preconfigured random matching user client list in step S105, the method may further include: when the second client meeting the matching condition is not found, adding the first client to the random matching user client list; when a request message of a random matching mobile terminal client from at least one other client is received, searching whether the client meets the matching conditions of the other clients in the random matching user client list; and within a preset time length from the addition of the first client to the random matching user client list, if the first client meets the matching conditions of other current clients, notifying a second matching result to the other current clients, wherein the second matching result carries the identification information of the first client.
Preferably, within a predetermined time period from the adding of the first client to the random matching user client list, if the first client does not satisfy the matching condition of the other clients, the method may further include: and sending a matching overtime notification message to the first client, and ending the random matching process of the first client.
And setting waiting time for the clients added into the queue, and if the clients meeting the conditions are not matched for the clients in the queue within the preset time, ending the random matching process for the clients.
Fig. 2 is a flowchart of a mobile terminal-based client matching method according to a second embodiment of the present invention. As shown in fig. 2, the client matching method based on the mobile terminal includes:
step S201: a first client of a mobile terminal sends a request message for randomly matching the client of the mobile terminal to a server, wherein the request message carries a matching condition;
step S203: when the server finds a second client meeting the matching condition in a pre-configured random matching user client list, the first client receives a first matching result returned by the server, wherein the first matching result carries identification information of the second client.
By adopting the communication client selection mode shown in fig. 2, the client satisfying the conditions is randomly matched in the random matching user client list configured in advance for the mobile terminal client, so that the convenience and the entertainment are achieved, meanwhile, the conditions can be created for adjusting mood and enriching life of a large number of user groups after work, the friend-making circle of the user can be expanded, and higher conversation experience is provided for the user.
Preferably, after the first client receives the first matching result returned from the server, the method may further include the following processing: the second client receives a call initiated by calling a call request by taking the first client as a calling party; the second client presents notification information of receiving the call and rejecting the call; and the second client responds to the operation of the user on the notification information and makes a call with the first client or rejects the call of the first client.
The above preferred embodiment is further described below in conjunction with fig. 3 and 4.
Fig. 3 is a flowchart of a mobile terminal-based client matching method according to a preferred embodiment of the present invention. As shown in fig. 3, the client matching method includes:
step S301, the user client A CALLS a random matching request (randomEnter) to send a request to a call server (called CALLS hereinafter) to enter a random matching process.
Step S303, the CALLS receives the random matching request of the user client A.
In step S305, the CALLS actively searches the random matching user client list (randomMatchList) for the user meeting the condition of the user client a, if not, step S309 is executed, otherwise, step S307 is executed.
Step S307: if the user client B is matched in the random matching user client list, the CALLS sends a matching result (randomMatchNotify) to notify the user client a, and at this time, the user client a completes the random matching user procedure.
Step S309: if the user client meeting the condition of the user client a is not found, the user client a is added to randomMatchList, and the other user clients are waited for matching and searching, and then step S311 is executed.
Step S311: the user client a waits in randomMatchList until there are other user clients to match the user client a or the matching is timed out according to steps S301, S303, S305 and S307. If there are other user clients matching the user client a, step S313 is performed. If no other user client is matched to the user client a, step S315 is performed.
Step S313: waiting for other user clients matched to the user client A to initiate calls.
In the preferred implementation process, if the user client a is successfully matched as a matched party, the CALLS may not send the matching result to notify the user client a, which is set based on the calling party and the called party of the two parties in the call, or may set to send the matching result to both the two parties in the matching.
Step S315, judging whether the user client A is matched in the randomMatchList for timeout, if yes, executing step S317, otherwise, returning to execute step S309.
Step S317, the CALLS sends a matching timeout (randomMatchTimeout) to inform the user client A that the random matching is finished. If the user client a further wants to perform random matching for the next time, the steps S301 to S315 may be repeated again.
Fig. 4 is a call flow diagram based on a mobile terminal according to a preferred embodiment of the present invention. As shown in fig. 4, the call flow based on the mobile terminal mainly includes:
step S401: the user client A receives randomMatchNotify and informs that the matched user is the user client B.
In the preferred implementation process, if the user client a actively matches to the user client B in the random matching process, the random matchnotify notification sent by CALLS is received to notify the matched user client B.
Step S403: after the user client A determines that the matched user client B is used as a calling party to initiate a call to the user client B, in the preferred implementation process, the user A is used as the calling party to call a call request callOut to initiate the call to the user client B.
Step S405: and after receiving the call request of the user client A, the user client B pops up the interface to be connected and refuses to be selected.
Step S407: and responding to the user operation, and judging whether to answer or reject. If yes, step S409 is executed, otherwise, the process ends.
Step S409: and the user client B connects the call if selecting answering.
Therefore, the random matching logic and the calling logic are independent from each other, and the whole implementation process is implemented in two steps. In the first step, the matched users meeting the conditions are screened out by the calculation of the random matching logic, in the second step, the call is initiated to the matched users, and the call is completed by the call logic. The advantage of this random matching and call logic decoupling is that the call logic is not affected when the need changes the screening conditions that require a match to be modified.
Fig. 5 is a block diagram of a server according to a third embodiment of the present invention. As shown in fig. 5, the server includes: a first receiving module 50, configured to receive a request message from a first client of a mobile terminal for randomly matching a client of the mobile terminal, where the request message carries a matching condition; a first searching module 52, configured to search, in a preconfigured random matching user client list, whether a second client meeting the matching condition exists; a first notifying module 54, configured to notify the first client of a first matching result when the second client meeting the matching condition is found, where the first matching result carries identification information of the second client.
In the server shown in fig. 5, the search module 52 randomly matches the clients meeting the conditions in the preconfigured list of randomly matched user clients for the mobile terminal client, and while having convenience and entertainment, can create conditions for adjusting mood and enriching life of the vast user group during work, and can expand the friend-making circle of the user and provide higher conversation experience for the user.
Preferably, as shown in fig. 6, the server may further include: an adding module 56, connected to the first searching module 52, configured to add the first client to the list of randomly matching user clients when the second client meeting the matching condition is not found; a second searching module 58, connected to the first searching module 52, configured to search, when receiving a request message from a random matching mobile terminal client of at least one other client, whether a client meeting the matching condition of the other client is in the random matching user client list; a second notification module 60, configured to notify a second matching result to the other current clients when the first client meets the matching conditions of the other current clients within a predetermined time period from when the first client is added to the list of random matching user clients, where the second matching result carries identification information of the first client.
Preferably, as shown in fig. 6, the server may further include: and a first sending module 62, connected to the second searching module 58, configured to send a matching timeout notification message to the first client, and end the random matching process for the first client.
Fig. 7 is a block diagram of a client according to a fourth embodiment of the present invention. As shown in fig. 7, the client mainly includes: a first client 70 and a second client 72, wherein the first client 70 comprises: a second sending module 700, configured to send a request message for randomly matching the mobile terminal client to the server, where the request message carries a matching condition; a second receiving module 702, configured to receive a first matching result returned by the server when the server finds, in a preconfigured random matching user client list, that the second client meets the matching condition, where the first matching result carries identification information of the second client.
Preferably, as shown in fig. 8, the second client 72 may further include: a third receiving module 720, configured to receive a call initiated by the first client as a calling party invoking a call request; a presenting module 722 for presenting notification information of receiving and rejecting the call; a response module 724, configured to respond to a user operation on the notification information, and perform a call with the first client or reject a call of the first client.
To sum up, with the above preferred embodiment provided by the present invention, a list of randomly matching user clients is configured on the call server (CALLS) side, a user client that needs to perform random matching only needs to send a random matching request to the call server, the CALLS searches for a user that meets the conditions in the random matching queue after receiving the user matching request, waits for other user clients in the queue to search for matching if the user is not matched, and notifies the client that needs to perform random matching of the matched user client ID if the matching is successful. The mobile phone communication terminal has the advantages that convenience and entertainment are realized, conditions can be created for adjusting mood and enriching life of vast mobile phone user groups after work, the friend making circle of users can be enlarged, and higher communication experience is provided for the users.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.