User matching method, apparatus, device, and storage medium

By dynamically dividing user queues using a distributed cluster server and adjusting based on user characteristics and traffic, the problem of server overload caused by a large number of users is solved, and matching efficiency and stability are improved.

CN115905883BActive Publication Date: 2026-03-27SHANGHAI TAOXINBAO NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

With a large user base, the existing online matching solution may overload the server, causing downtime or performance instability, thus affecting the user experience.

Method used

The system responds to user requests through a distributed cluster server, determines the matching level score based on user characteristic information, and dynamically divides user queues according to the query rate per second and the ordered queue threshold to achieve real-time traffic adjustment and distribute users to multiple queues for matching.

Benefits of technology

When dealing with a large number of users, fully leverage the advantages of distributed cluster servers to improve matching efficiency, reduce user waiting time, and avoid server overload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115905883B_ABST
    Figure CN115905883B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a user matching method and device, equipment and storage medium. In the embodiments of the present application, in response to a matching request of a target user, a matching grade of the target user is determined based on feature information of the target user; based on a query rate per second of the distributed cluster server at the time of the matching request and a query rate per second threshold of an ordered queue, a plurality of ordered queues are divided from a plurality of users to be matched in the distributed cluster server, and one ordered queue corresponds to one matching grade interval; from the plurality of ordered queues, a target ordered queue matched with the matching grade of the target user is determined; and the target user is matched with the user to be matched in the target ordered queue.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and particularly relates to a user matching method and device, equipment and a storage medium. BACKGROUND

[0002] At present, the mainstream online matching scheme mostly uses a time task to scan the users who have entered a matching queue, and then sorts the users according to the characteristic values of the users, and matches the users with similar characteristic values together. This can quickly respond to the matching request of the users when the number of users is small, but in the case that the number of users with matching requirements is large, the load of the server performing the matching operation may be exceeded, and the server may be down or unstable in performance, thereby affecting the user experience. SUMMARY

[0003] The present application provides a user matching method, device, equipment and storage medium, which can solve the problem that the load of the server performing the matching operation may be exceeded in the case that the number of users with matching requirements is large.

[0004] The present application provides a user matching method, which comprises the following steps: in response to a matching request of a target user, determining a matching grade interval of the target user based on characteristic information of the target user; dividing a plurality of users to be matched in a distributed cluster server into a plurality of ordered queues based on a query rate per second of the distributed cluster server at a time of the matching request and a query rate threshold per second of an ordered queue, one ordered queue corresponding to one matching grade interval; determining a target ordered queue matched with the matching grade interval of the target user from the plurality of ordered queues; and matching the target user with the users to be matched in the target ordered queue.

[0005] The present application also provides a user matching device, which comprises the following modules: a grade interval determination module, configured to determine a matching grade interval of a target user based on characteristic information of the target user in response to a matching request of the target user; a queue division module, configured to divide a plurality of users to be matched in a distributed cluster server into a plurality of ordered queues based on a query rate per second of the distributed cluster server at a time of the matching request and a query rate threshold per second of an ordered queue, one ordered queue corresponding to one matching grade interval; a queue determination module, configured to determine a target ordered queue matched with the matching grade interval of the target user from the plurality of ordered queues; and a user matching module, configured to match the target user with the users to be matched in the target ordered queue.

[0006] The embodiment of the present application further provides an electronic device, comprising a memory and a processor; the memory is used for storing a computer program; the processor is coupled with the memory and is used for executing the computer program, so as to: in response to a matching request of a target user, determine a matching level section of the target user based on feature information of the target user; based on a query rate per second of the distributed cluster server at the moment of the matching request and a query rate per second threshold of an ordered queue, divide a plurality of users to be matched in the distributed cluster server into a plurality of ordered queues, one ordered queue corresponding to one matching level section interval; from the plurality of ordered queues, determine a target ordered queue matching the matching level section of the target user; and match the target user with the users to be matched in the target ordered queue.

[0007] The embodiment of the present application further provides a computer readable storage medium storing a computer program, when the computer program is executed by a processor, the processor is caused to implement the steps in the user matching method provided by the embodiment of the present application.

[0008] In the embodiment of the present application, the distributed cluster server can respond to the matching request of the target user, determine the matching level section of the target user based on the feature information of the target user, and based on the query rate per second of the distributed cluster server at the moment of the matching request and the query rate per second threshold of an ordered queue, divide the plurality of users to be matched in the distributed cluster server into a plurality of ordered queues in real time, one ordered queue corresponding to one matching level section interval, so as to dynamically adjust the number of ordered queues according to real-time matching traffic, and then determine the target ordered queue matching the matching level section of the target user from the plurality of ordered queues divided in real time, and match the target user with the users to be matched in the target ordered queue. In this way, even in the case of a large number of users with matching requirements, the advantages of the distributed cluster server can be fully utilized to disperse the plurality of users to the corresponding plurality of user queues for matching, and the matching efficiency of the users is improved. BRIEF DESCRIPTION OF DRAWINGS

[0009] The accompanying drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute improper limitations on the present application. In the drawings:

[0010] Figure 1 A flowchart of a user matching method provided for the exemplary embodiments of the present application;

[0011] Figure 2 A schematic diagram of determining the number of ordered queues in the user matching method provided for the exemplary embodiments of the present application;

[0012] Figure 3 A flowchart of an actual scenario to which the user matching method provided by the exemplary embodiments of the present application is applied is shown in FIG. 3.

[0013] Figure 4 A flowchart of an actual scenario to which the user matching method provided by the exemplary embodiments of the present application is applied is shown in FIG. 3. Figure 3 A flowchart of an actual scenario to which the user matching method provided by the exemplary embodiments of the present application is applied is shown in FIG. 3.

[0014] Figure 5 A flowchart of an actual scenario to which the user matching method provided by the exemplary embodiments of the present application is applied is shown in FIG. 3.

[0015] Figure 6 A flowchart of an actual scenario to which the user matching method provided by the exemplary embodiments of the present application is applied is shown in FIG. 3.

[0016] Figure 7 A flowchart of an actual scenario to which the user matching method provided by the exemplary embodiments of the present application is applied is shown in FIG. 3. DETAILED DESCRIPTION

[0017] To make the objects, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0018] To solve the problem that the server performing the matching operation will be overloaded, and will be down or unstable in performance when there are a large number of users with matching requirements, in some embodiments of the present application, the distributed cluster server can respond to the matching request of a target user, determine the matching grade interval of the target user based on the characteristic information of the target user, and divide a plurality of users to be matched in the distributed cluster server into a plurality of ordered queues in real time based on the query rate per second of the distributed cluster server at the matching request time and the query rate per second threshold of the ordered queue, one ordered queue corresponding to one matching grade interval, so as to dynamically adjust the number of ordered queues according to the real-time matching traffic, and thus even when there are a large number of users with matching requirements, the advantages of the distributed cluster server can be fully utilized to disperse the plurality of users to a plurality of user queues for matching, and the matching efficiency of the users is improved.

[0019] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the drawings.

[0020] Figure 1 A flowchart of an actual scenario to which the user matching method provided by the exemplary embodiments of the present application is applied is shown in FIG. 3. Figure 1As shown, the method is applied to a distributed cluster server, and the method can include:

[0021] At step 110, in response to the matching request of the target user, a matching level score of the target user is determined based on the feature information of the target user.

[0022] In some example embodiments, to adapt to different interactive application scenarios and meet actual needs of different interactive application scenarios, a corresponding matching level score distribution function can be configured according to characteristics of the interactive application scenario, and a calculation rule of the matching level score of the user can be formulated based on different user feature information. Specifically, the matching level score of the target user is determined based on the feature information of the target user, including:

[0023] The matching level score of the target user is determined based on the feature information of the target user and the preset matching level score distribution function.

[0024] The feature information of the target user at least includes one of a user identifier of the target user, a user level of the target user, and an asset level of the target user, and the preset matching level score distribution function includes one of a normal distribution function, a linear distribution function, an exponential distribution function, and a uniform distribution function.

[0025] In some example embodiments, the feature information of the target user can include the user identifier of the target user, and the matching level score of the target user can be determined based on the user identifier of the target user and the preset matching level score distribution function. The user identifier of the target user can be, for example, a user ID of the target user, and the user ID can be a user account, a mobile phone number, an identity, or a string of numbers that can uniquely identify the target user. To avoid leakage of personal information of the target user, the matching level score of the target user can be a string of numbers obtained by performing a hash operation on the user identifier of the target user.

[0026] In some example embodiments, the feature information of the target user can further include the user level and / or the asset level, and the matching level score of the target user can be determined based on the user level and / or the asset level of the target user and the preset matching level score distribution function. Taking the target user of the target application as an example, the user level of the target user can be used to represent the length of time the target user uses the target application and / or the historical consumption amount, or can also be the user points accumulated by the target user using the target application. The asset level of the target user can be used to represent the asset amount of the target user in a payment application associated with the target application or the amount of the target user in the target application.

[0027] When the characteristic information of the target user includes one of the user level and the asset level, the matching level score of the target user can be equal to the user level or the asset level of the target user, or the matching level score of the target user can be obtained by performing an operation (such as multiplying a constant, dividing a constant, or subtracting a constant) on the user level or the asset level of the target user. When the characteristic information of the target user includes the user level and the asset level, the matching level score of the target user can be equal to the sum of the user level and the asset level of the target user, or the matching level score of the target user can be obtained by performing an operation such as multiplying the user level by a corresponding weight and adding the asset level by a corresponding weight. The operation mode of the matching level score of the target user can be set according to a preset matching level score distribution function, and the preset matching level score distribution function can be fitted according to historical data (including the matching level scores and corresponding characteristic information of a plurality of users who have completed matching in the past), and embodiments of the present application do not make specific limitations thereto.

[0028] Taking the normal distribution function as an example of the preset matching level score distribution function, the expected value μ and the variance σ of the characteristic information (including the characteristic information of the target user) of all the users to be matched in the distributed cluster server at the matching request time can be calculated first. 2 Then, the matching level score f(x) of the target user is calculated based on the calculation formula (1) of the normal distribution function, where x is the characteristic information of the target user.

[0029]

[0030] In step 120, based on the query rate per second of the distributed cluster server at the matching request time and the query rate threshold per second of an ordered queue, the plurality of users to be matched in the distributed cluster server are divided into a plurality of ordered queues, and one ordered queue corresponds to one matching level score interval.

[0031] The target user can be a user of a certain game application, such as a table game application, which usually needs 2-4 people to match a game room before starting the game process. If a large number of users need to be matched at the same time, it will have a great challenge to the load balancing and other performance of the server. In view of this, embodiments of the present application can dynamically expand or shrink the user queue according to the matching traffic generated by the users who currently have matching needs, so as to fully utilize the high concurrency and high availability of the distributed cluster server.

[0032] Wherein, the Queries-per-second (QPS) is a measure of how much traffic a server can handle in 1 second. The distributed cluster server is composed of multiple single servers, therefore, the QPS of the distributed cluster server at the moment of matching requests is the sum of the traffic handled by multiple single servers in 1 second. The QPS threshold of an ordered queue is the maximum traffic that an ordered queue can handle in 1 second.

[0033] In some exemplary embodiments, it should be understood that in the interactive application scenario, users usually expect to be matched with users whose abilities are more matched with theirs to interact. In order to match users with similar matching levels into a group so that users with similar abilities are divided into a group, when dividing the ordered queue, the matching level scores of the users to be matched can be sorted according to the size of the scores in order. Specifically, based on the QPS of the distributed cluster server at the moment of matching requests and the QPS threshold of an ordered queue, multiple users to be matched in the distributed cluster server are divided into multiple ordered queues, including:

[0034] Based on the ratio between the QPS of the distributed cluster server at the moment of matching requests and the QPS threshold of an ordered queue, the number of the multiple ordered queues is determined;

[0035] Based on the matching level scores of the multiple users to be matched, the multiple users to be matched are sorted;

[0036] Based on the number of the multiple ordered queues, the multiple users to be matched sorted are divided into the multiple ordered queues.

[0037] Figure 2The schematic diagram for determining the number of ordered queues in the user matching method provided for the exemplary embodiments of the present application is shown. It is assumed that the distributed cluster server comprises N single servers, server 1 to server N, each of which is internally provided with a counter for counting the number of query requests received by each server in the last second. The counter internally provided in each server can report the number of query requests received by each server in the last second to the cluster counter every second or every preset time period, and the cluster counter can count the total number of query requests received by the distributed cluster server in the last second. Wherein, the number of query requests received by server 1 in the last second at the matching request time is a, the number of query requests received by server 2 in the last second at the matching request time is b, the number of query requests received by server 3 in the last second at the matching request time is c, and the number of query requests received by server N in the last second at the matching request time is n. Then, the number of query requests received by the distributed cluster server in the last second at the matching request time, i.e., the query rate per second, is a+b+c+…+n. If the query rate per second threshold of an ordered queue is T, then the number of ordered queues is (a+b+c+…+n) / T rounded up, i.e., if (a+b+c+…+n) is divisible by T, then the number of ordered queues is (a+b+c+…+n) / T, and if (a+b+c+…+n) is not divisible by T, then the number of ordered queues is (a+b+c+…+n) / T+1.

[0038] The plurality of users to be matched can include ida, idb, idc, …, idn, a total of n users to be matched, wherein the matching level of the user to be matched ida is divided into x1, the matching level of the user to be matched idb is divided into x2, the matching level of the user to be matched idc is divided into x3, …, and the matching level of the user to be matched idn is divided into xn. Wherein, based on the matching level of the plurality of users to be matched, the plurality of users to be matched is sorted, which can be sorted in order from small to large according to the matching level of the plurality of users to be matched. It is assumed that the order of the matching level of the plurality of users to be matched after sorting is x1, x2, x3, …, xn, the number of ordered queues is m=(a+b+c+…+n) / T rounded up, and the number of users to be matched in each ordered queue is n / m rounded up, i.e., if n is divisible by m, then the number of ordered queues is n / m, and if n is not divisible by m, then the number of ordered queues is n / m+1.

[0039] For example, the number of the plurality of users to be matched is 10000, respectively id1-id10000, the order of the matching level part after sorting from small to large is x1, x2, x3, …, x10000, the number of the plurality of ordered queues is 2000, then the number of the users to be matched in each ordered queue is 10000 / 2000=5, when dividing the ordered queue, the users to be matched corresponding to the matching level part x1-x5 can be divided into the user queue 1, the users to be matched corresponding to the matching level part x6-x10 can be divided into the user queue 2, the users to be matched corresponding to the matching level part x11-x15 can be divided into the user queue 3, …, the users to be matched corresponding to the matching level part x9996-x10000 can be divided into the user queue 2000.

[0040] For example, the number of the plurality of users to be matched is 9999, respectively id1-id9999, the order of the matching level part after sorting from small to large is x1, x2, x3, …, x9999, the number of the plurality of ordered queues is 2000, then the number of the users to be matched in each ordered queue is 9999 / 2000+1=5, when dividing the ordered queue, the users to be matched corresponding to the matching level part x1-x5 can be divided into the user queue 1, the users to be matched corresponding to the matching level part x6-x10 can be divided into the user queue 2, the users to be matched corresponding to the matching level part x11-x15 can be divided into the user queue 3, …, the users to be matched corresponding to the matching level part x9996-x9999 can be divided into the user queue 2000.

[0041] Step 130, determining the target ordered queue matched with the matching level part of the target user from the plurality of ordered queues.

[0042] Wherein, the target ordered queue contains at least one user to be matched.

[0043] Suppose the plurality of ordered queues includes ordered queue 0-ordered queue 10, the matching level part of the user to be matched in the ordered queue 0 is between 51-55, the matching level part of the user to be matched in the ordered queue 1 is between 56-60, the matching level part of the user to be matched in the ordered queue 2 is between 61-65, …, the matching level part of the user to be matched in the ordered queue 10 is between 96-100. The matching level part of the target user is 58, then the target ordered queue matched with the matching level part of the target user can be determined from the ordered queue 0-ordered queue 10 as the ordered queue 1.

[0044] Step 140, matching the target user with the user to be matched in the target ordered queue.

[0045] In some example embodiments, some interactive application scenarios often have certain requirements for the number of users, such as a game application scenario that can require 3 or 4 users to form a queue to complete user matching in the scenario. In this regard, when matching the target user with the to-be-matched users in the target ordered queue, it can be determined whether the sum of the number of to-be-matched users in the target ordered queue and the number of the target user satisfies the number of users that can form a game queue. Specifically, matching the target user with the to-be-matched users in the target ordered queue includes:

[0046] determining whether the number of to-be-matched users in the target ordered queue reaches a preset number;

[0047] if the number of to-be-matched users in the target ordered queue reaches the preset number, matching the target user with the to-be-matched users in the target ordered queue.

[0048] Taking a game application as an example, the preset number is used to indicate the necessary number of users that can form a game queue, and more specifically, the preset number can be the necessary number of users that can form a game queue minus 1. It should be understood that only when the number of to-be-matched users in the target ordered queue plus the number of the target user is greater than or equal to the necessary number of users that can form a game queue, the to-be-matched users in the target ordered queue and the target user can form a game queue.

[0049] In some example embodiments, if the number of to-be-matched users in the target ordered queue is greater than the preset number, matching the target user with the to-be-matched users in the target ordered queue under the premise that the number of at least one to-be-matched user reaches the preset number includes:

[0050] matching the target user with the first preset number of to-be-matched users in the target ordered queue that are closest to the target user in matching level;

[0051] or, matching the target user with the first preset number of to-be-matched users in the target ordered queue that have earlier enqueue time stamps.

[0052] In some example embodiments, if the number of at least one to-be-matched user is equal to the preset number, the target user can be directly matched with the to-be-matched users in the target ordered queue to form a queue.

[0053] In some exemplary embodiments, if the number of users to be matched in the target ordered queue is small and difficult to reach a preset number, the target user cannot form a queue with at least one user to be matched in the target ordered queue. In this case, the target user can be added to the target ordered queue to wait for users after the target user to match with it and form a queue. Specifically, if the number of users to be matched in the target user queue is less than the preset number, the target user is added to the target ordered queue.

[0054] Figure 3 This diagram illustrates the application of the user matching method provided in an exemplary embodiment of this application in a real-world scenario. Figure 3 In this scenario, users 1, 2, and 3 simultaneously send matching requests to the distributed cluster server, requesting the allocation of a game room. When users 1, 2, and 3 send their matching requests, the distributed cluster server can, based on... Figure 2 The method for determining the number of ordered queues shown is based on the real-time query request traffic (i.e., the traffic statistics shown in the figure) and the query request rate threshold of an ordered queue. The ordered queues are then divided according to the ascending order of the matching level scores of the users to be matched within the distributed cluster servers, and the number of users to be matched. Assume the re-divided ordered queues include... Figure 3 The ordered queues 1 to 5 shown correspond to a matching grade interval.

[0055] The system consists of three ordered queues: queue 1 corresponds to matching grade interval 1, containing users id1 to id4; queue 2 corresponds to matching grade interval 2, containing users id5 to id8; queue 3 corresponds to matching grade interval 3, containing users id9 to id12; queue 4 corresponds to matching grade interval 4, containing users id13 to id16; and queue 5 corresponds to matching grade interval 5, containing users id17 to id18. Then, based on the matching grade score of user i (i = 1, 2, 3), a match is made with the matching grade interval of ordered queue j (j = 1, 2, 3, 4, 5). For example, queue 1 matches the matching grade score of user 1, queue 3 matches the matching grade score of user 2, and queue 5 matches the matching grade score of user 3.

[0056] If the number of users waiting to be matched in the ordered queues matching user 1's match rating, user 2's match rating, and user 3's match rating all reach the preset number, then users 1 through 3 can all be successfully assigned to game rooms. However, if... Figure 3As shown, the ordered queue 1 matched with the matching level fraction of the user 1 and the ordered queue 3 matched with the matching level fraction of the user 2 can reach the preset number 4, and the number of the to-be-matched users in the ordered queue 5 matched with the matching level fraction of the user 3 is less than the preset number 4, so the user 1 can be allocated to a game room with id1-id4 in the ordered queue 1, the user 2 can be allocated to a game room with id9-id12 in the ordered queue 3, and the user 3 can be added to the ordered queue 5 matched with the matching level fraction of the user 3 to continue to wait to be matched with other users to successfully allocate a game room.

[0057] Figure 4 The user matching method provided by the exemplary embodiments of the present application is applied to a user matching system. Figure 3 The flowchart in the actual scenario shown includes:

[0058] S41, the user 1, the user 2 and the user 3 simultaneously send matching requests to the distributed cluster server.

[0059] S42, in response to the matching requests of the user 1, the user 2 and the user 3, the matching level fractions of the user 1, the user 2 and the user 3 are respectively determined based on the characteristic information of the user 1, the user 2 and the user 3 and the preset matching level fraction distribution function.

[0060] S43, based on the query rate per second of the distributed cluster server at the matching request moment and the query rate per second threshold of an ordered queue, the to-be-matched users in the distributed cluster server are divided into the ordered queue 1-ordered queue 5.

[0061] S44, the ordered queue j matched with the matching level fraction of the user i is determined from the ordered queue 1-ordered queue 5.

[0062] S45, it is determined whether the number of the to-be-matched users in the ordered queue j matched with the matching level fraction of the user i reaches a preset number.

[0063] If yes, S46 is executed, otherwise, S47 is executed.

[0064] S46, the user i is matched with the to-be-matched users in the ordered queue j.

[0065] Wherein, i = 1, 2, 3, j = 1, 2, 3, 4, 5. If the sum of the number of users i and the number of users to be matched in the ordered queue j is exactly the number of people required by the game queue, assuming 3, then the user i and the users to be matched in the ordered queue j form a game queue, and the users to be matched in the ordered queue j are deleted; if the sum of the number of users i and the number of users to be matched in the ordered queue j is greater than the number of people required by the game queue, then the user i and the two users to be matched in the ordered queue j closest to the matching level of the user i form a game queue, or the user i and the two users to be matched in the ordered queue j with the earliest time stamp form a game queue, and the users to be matched in the ordered queue j that form a game queue with the user i are deleted.

[0066] S47, the user i is added to the ordered queue j.

[0067] In some exemplary embodiments, in order to save the storage space of the distributed cluster server, after matching the target user with the users to be matched in the target ordered queue, the users to be matched in the target ordered queue that match the target user can be deleted. When there are other users with matching requirements later, the ordered queues in the distributed cluster server can be updated in real time according to the query rate per second of the distributed cluster server at the matching request time of other users and the query rate per second threshold of an ordered queue to adapt to the latest matching traffic.

[0068] In some exemplary embodiments, in order to avoid the users to be matched spending a lot of time waiting for matching, so that the users to be matched can be matched in time after joining the ordered queue, when each user to be matched joins the ordered queue, the time stamp of each user to be matched can be recorded, and when the difference between the time stamp and the current time is greater than the preset timeout length, these users to be matched can be matched separately to reduce the waiting time of the users to be matched. Specifically, a user to be matched corresponds to a time stamp, and the time stamp is used to indicate the time when the user to be matched joins the corresponding ordered queue.

[0069] In some exemplary embodiments, when there are not enough users to be matched in the ordered queue for matching, it will cause matching timeout, at this time a tailing task can be added to find out all the users to be matched that are not matched in timeout and process the matching. Specifically, from the plurality of ordered queues, the timeout matching users whose difference between the current time and the time stamp reaches the preset timeout length are obtained.

[0070] Based on the matching level of the timeout matching users and / or the timeout length of the timeout matching users, a first number of users are selected from the timeout matching users for matching, wherein the timeout length of the timeout matching users is the difference between the current time and the time stamp of the timeout matching users, and the first number is greater than the preset number by 1.

[0071] Figure 5 This is a schematic diagram of timeout matching in a user matching method provided as an exemplary embodiment of this application. Figure 4 In this system, users can be selected from multiple ordered queues based on the timer, using the difference between the current moment and the enqueue timestamp to reach a preset timeout duration for matching. For example, this includes users ida and idb in matching grade interval 1, and users idc and idd in matching grade interval 3. Users ida, idb, idc, and idd can be sorted in ascending order of their matching grade scores. Then, the first number of timeout matching users selected from the sorted list can be matched to form a queue, or the last number of timeout matching users selected from the sorted list can be matched to form a queue.

[0072] Alternatively, users ida, idb, idc, and idd can be sorted in descending order of their timeout durations, and then the first number of timeout-matching users selected from the sorted list are matched to form a queue. Alternatively, users ida, idb, idc, and idd can be sorted in ascending order of their match rating score and timeout duration calculated using a preset formula, and then the first number of timeout-matching users selected from the sorted list are matched to form a queue, or the last number of timeout-matching users selected from the sorted list are matched to form a queue. The preset formula can be y = a × x + b × t, where x is the match rating score of the timeout-matching user, a is the corresponding weight, t is the timeout duration of the timeout-matching user, and b is the corresponding weight.

[0073] like Figure 5 As shown, assuming the first quantity is 3, sorting users ida, idb, idc, and idd according to their timeout durations from longest to shortest results in the following order: user ida, user idb, user idc, user idd. Therefore, the first three timeout users can be matched to form a queue "ida, idb, idc". To reduce the matching wait time for timeout users, a fourth timeout user can be matched with a robot user to form a queue "idd, Robot1, Robot2".

[0074] In addition, the method provided by the embodiment can be applied to any application scenario in which user matching exists, and can adjust the number of ordered queues in the distributed cluster server for user matching and the matching users waiting in the ordered queues in real time according to the current matching demand of users, fully utilize the advantage of the distributed cluster server, and reduce the waiting time of user matching in the case of large user matching traffic.

[0075] In the user matching method provided by some embodiments of the application, the distributed cluster server can respond to the matching request of a target user, determine the matching level interval of the target user based on the feature information of the target user, divide a plurality of to-be-matched users in the distributed cluster server into a plurality of ordered queues in real time based on the query rate per second of the distributed cluster server at the moment of the matching request and the query rate per second threshold of an ordered queue, one ordered queue corresponding to one matching level interval, dynamically adjust the number of ordered queues according to real-time matching traffic, determine a target ordered queue matching the matching level interval of the target user from the plurality of ordered queues divided in real time, and match the target user with the to-be-matched user in the target ordered queue. In this way, even in the case of a large number of users with matching demand, the advantage of the distributed cluster server can be fully utilized to disperse the plurality of users to a plurality of user queues for matching, and the matching efficiency of the users is improved.

[0076] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can also be executed by different devices as the execution subject. For example, the execution subject of steps 110 to 130 can be device A; for another example, the execution subject of steps 110 to 120 can be device A, and the execution subject of step 130 can be device B; and the like.

[0077] In addition, in some of the processes described in the above embodiments and the accompanying drawings, a plurality of operations appearing in a specific order are included, but it should be clear that these operations can be executed in the order appearing in this document or in parallel, and the serial numbers of the operations, such as 110, 120, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes can include more or fewer operations, and the operations can be executed in sequence or in parallel. It should be noted that the "first", "second", etc. described herein are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence. In addition, "first" and "second" are different types.

[0078] Figure 6 A structural schematic diagram of a user matching device provided by an exemplary embodiment of the application is shown in FIG. 1. As shown in FIG. 1, the user matching device includes a feature information receiving unit 110, a matching level interval determining unit 120, a queue dividing unit 130, a matching unit 140, and a queue adjusting unit 150. Figure 6As shown, the apparatus comprises: a grade point determination module 610, a queue division module 620, a queue determination module 630, and a user matching module 640, wherein:

[0079] The grade point determination module 610 is configured to, in response to a matching request of a target user, determine a matching grade point of the target user based on feature information of the target user.

[0080] The queue division module 620 is configured to divide a plurality of users to be matched in the distributed cluster server into a plurality of ordered queues based on a query rate per second of the distributed cluster server at the time of the matching request and a query rate per second threshold of an ordered queue, wherein one ordered queue corresponds to one matching grade point interval.

[0081] The queue determination module 630 is configured to determine a target ordered queue matching the matching grade point of the target user from the plurality of ordered queues.

[0082] The user matching module 640 is configured to match the target user with a user to be matched in the target ordered queue.

[0083] The user matching apparatus provided by the embodiments of the present application can determine the matching grade point of the target user based on the feature information of the target user in response to the matching request of the target user by the distributed cluster server, and divide the plurality of users to be matched in the distributed cluster server into the plurality of ordered queues based on the query rate per second of the distributed cluster server at the time of the matching request and the query rate per second threshold of an ordered queue, wherein one ordered queue corresponds to one matching grade point interval. The number of ordered queues is dynamically adjusted according to the real-time matching traffic, the target ordered queue matching the matching grade point of the target user is determined from the plurality of ordered queues divided in real time, and the target user is matched with the user to be matched in the target ordered queue. In this way, even in the case where the number of users with matching requirements is large, the plurality of users can be dispersed to the corresponding plurality of user queues for matching by taking full advantage of the distributed cluster server, and the matching efficiency of the users is improved.

[0084] Further optionally, when the user matching module 640 matches the target user with the user to be matched in the target ordered queue, the user matching module 640 is specifically configured to:

[0085] determine whether the number of users to be matched in the target ordered queue reaches a preset number;

[0086] if the number of users to be matched in the target ordered queue reaches the preset number, match the target user with the user to be matched in the target ordered queue.

[0087] Further optionally, the apparatus further comprises:

[0088] a joining module configured to, if the number of the to-be-matched users in the target ordered queue is less than the preset number, join the target user into the target ordered queue.

[0089] Further optionally, one of the to-be-matched users corresponds to an enqueue timestamp, and the enqueue timestamp is used to indicate a time when the to-be-matched user is joined into the corresponding ordered queue.

[0090] Further optionally, the apparatus further comprises:

[0091] a timeout user obtaining module configured to obtain, from the plurality of ordered queues, timeout matched users whose difference between a current time and an enqueue timestamp reaches a preset timeout duration;

[0092] a timeout matching module configured to select a first number of users from the timeout matched users based on a matching level of the timeout matched users for matching.

[0093] Further optionally, when the queue dividing module 620 divides the plurality of to-be-matched users in the distributed cluster server into a plurality of ordered queues based on a query per second rate of the distributed cluster server at the matching request time and a query per second rate threshold of one ordered queue, the queue dividing module 620 is specifically configured to:

[0094] determine a number of the plurality of ordered queues based on a ratio between the query per second rate of the distributed cluster server at the matching request time and the query per second rate threshold of one ordered queue;

[0095] sort the plurality of to-be-matched users based on matching levels of the plurality of to-be-matched users;

[0096] divide the plurality of to-be-matched users after the sorting into the plurality of ordered queues based on the number of the plurality of ordered queues.

[0097] Further optionally, when the level determining module 610 determines the matching level of the target user based on the feature information of the target user, the level determining module 610 is specifically configured to:

[0098] determine the matching level of the target user based on the feature information of the target user and a preset matching level distribution function;

[0099] wherein the feature information of the target user at least includes one of a user identifier of the target user, a user level of the target user, and an asset level of the target user, and the preset matching level distribution function includes one of a normal distribution function, a linear distribution function, an exponential distribution function, and a uniform distribution function.

[0100] The user matching device can implement Figures 1-5 the method of the method embodiment, and the user matching method of the embodiment shown in Figures 1-5 will not be described in detail.

[0101] Figure 7 A structural schematic diagram of an electronic device is provided for the exemplary embodiments of the present application. As shown in Figure 7 , the device includes a memory 71 and a processor 72.

[0102] The memory 71 is configured to store computer programs and can be configured to store various other data to support operations on the computing device. Examples of such data include instructions for any application or method operating on the computing device, contact data, phonebook data, messages, pictures, videos, etc.

[0103] The processor 72 is coupled to the memory 71 and is configured to execute the computer programs in the memory 71 for: in response to a matching request of a target user, determining a matching grade section of the target user based on feature information of the target user; based on a query rate per second of the distributed cluster server at the time of the matching request and a query rate per second threshold of an ordered queue, dividing a plurality of users to be matched in the distributed cluster server into a plurality of ordered queues, one ordered queue corresponding to one matching grade section interval; from the plurality of ordered queues, determining a target ordered queue matching the matching grade section of the target user; and matching the target user with the users to be matched in the target ordered queue.

[0104] Further optionally, when the processor 72 matches the target user with the users to be matched in the target ordered queue, it is specifically configured to:

[0105] determine whether the number of users to be matched in the target ordered queue reaches a preset number;

[0106] If the number of users to be matched in the target ordered queue reaches the preset number, the target user is matched with the users to be matched in the target ordered queue.

[0107] Further optionally, the processor 72 is further configured to: if the number of users to be matched in the target ordered queue is less than the preset number, the target user is added to the target ordered queue.

[0108] Further optionally, one of the users to be matched corresponds to an enqueue timestamp, and the enqueue timestamp is used to indicate the time when the user to be matched is added to the corresponding ordered queue.

[0109] Further optionally, the processor 72 is further configured to: obtain, from the plurality of ordered queues, a timeout matching user whose difference between a current time and an entry time stamp reaches a preset timeout duration;

[0110] select, from the timeout matching users, a first number of users according to the matching score of the timeout matching users.

[0111] Further optionally, when the processor 72 divides the plurality of to-be-matched users in the distributed cluster server into a plurality of ordered queues based on the query rate per second of the distributed cluster server at the matching request time and a query rate per second threshold of an ordered queue, the processor 72 is specifically configured to:

[0112] determine the number of the plurality of ordered queues based on a ratio between the query rate per second of the distributed cluster server at the matching request time and the query rate per second threshold of an ordered queue;

[0113] sort the plurality of to-be-matched users based on the matching score of the plurality of to-be-matched users;

[0114] divide the plurality of to-be-matched users after the sorting into the plurality of ordered queues based on the number of the plurality of ordered queues.

[0115] Further optionally, when the processor 72 determines the matching score of the target user based on the feature information of the target user, the processor 72 is specifically configured to:

[0116] determine the matching score of the target user based on the feature information of the target user and a preset matching score distribution function;

[0117] wherein the feature information of the target user at least includes one of a user identifier of the target user, a user level of the target user, and an asset level of the target user, and the preset matching score distribution function includes one of a normal distribution function, a linear distribution function, an exponential distribution function, and a uniform distribution function.

[0118] Further, as shown in Figure 7 the electronic device further includes a communication component 73, a display 74, a power supply component 75, an audio component 76, and other components. Figure 7 only some components are shown schematically, and it does not mean that the electronic device only includes Figure 7 the components shown in the figure. In addition, according to different implementation forms of the traffic playback device, Figure 7 the components in the dashed box in the figure are optional components, not mandatory components. For example, when the electronic device is implemented as a terminal device such as a smartphone, a tablet computer, or a desktop computer, it can include Figure 7The components in the dashed box; when the electronic device is implemented as a server device such as a regular server, a cloud server, a data center, or a server array, the components in the dashed box can not be included Figure 7 The components in the dashed box.

[0119] Correspondingly, the embodiments of the present application also provide a computer readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the above-mentioned user matching method embodiments.

[0120] The communication component in the above-mentioned Figure 7 The communication component in the above-mentioned

[0121] The communication component in the above-mentioned Figure 7 The memory in the above-mentioned

[0122] The communication component in the above-mentioned Figure 7 The display in the above-mentioned

[0123] The communication component in the above-mentioned Figure 7 The power component in the above-mentioned

[0124] The communication component in the above-mentioned Figure 7The audio component 160 in the illustrated example can be configured to output and / or input audio signals. For example, the audio component 160 includes a microphone (MIC) that is configured to receive an external audio signal when the device in which the audio component 160 is included is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory or transmitted via the communication component 170. In some embodiments, the audio component 160 also includes a speaker for outputting audio signals.

[0125] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, an apparatus (system) or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code.

[0126] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0127] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0129] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0130] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) having a common memory space employing many flash memory devices. The memory is an example of computer readable media.

[0131] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0132] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that includes the recited element.

[0133] The above description is merely illustrative of the application, and not restrictive. Various modifications and changes can become apparent to those skilled in the art. The disclosure is intended to embrace all such modifications and changes that fall within the scope of the present application.

Claims

1. A user matching method, characterized by, The method is applied to a distributed cluster server, and the method comprises: In response to a matching request of a target user, determining a matching level section of the target user based on feature information of the target user; Based on a query rate per second of the distributed cluster server at a matching request moment and a query rate per second threshold of an ordered queue, a plurality of users to be matched in the distributed cluster server are divided into a plurality of ordered queues, and one ordered queue corresponds to one matching level section interval; From the plurality of ordered queues, a target ordered queue matching the matching level section of the target user is determined; The target user is matched with the users to be matched in the target ordered queue.

2. The method of claim 1, wherein, The matching of the target user with the users to be matched in the target ordered queue comprises: Determining whether the number of users to be matched in the target ordered queue reaches a preset number; If the number of users to be matched in the target ordered queue reaches the preset number, the target user is matched with the users to be matched in the target ordered queue.

3. The method of claim 2, wherein, The method further comprises: If the number of users to be matched in the target ordered queue is less than the preset number, the target user is added to the target ordered queue.

4. The method of claim 2 or 3, wherein One of the users to be matched corresponds to an enqueue timestamp, and the enqueue timestamp is used to indicate a time when the user to be matched is added to the corresponding ordered queue.

5. The method of claim 4, wherein, The method further comprises: From the plurality of ordered queues, a timeout matching user whose difference between a current time and an enqueue timestamp reaches a preset timeout duration is obtained; Based on the matching level section of the timeout matching user and / or a timeout duration of the timeout matching user, a first number of users are selected from the timeout matching user for matching, wherein the timeout duration of the timeout matching user is the difference between the current time and the enqueue timestamp of the timeout matching user, and the first number is greater than the preset number by 1.

6. The method of claim 1, wherein, Based on the query rate per second of the distributed cluster server at the matching request moment and the query rate per second threshold of an ordered queue, the plurality of users to be matched in the distributed cluster server are divided into a plurality of ordered queues, comprising: Based on a ratio between the query rate per second of the distributed cluster server at the matching request moment and the query rate per second threshold of an ordered queue, the number of the plurality of ordered queues is determined; Based on the matching level sections of the plurality of users to be matched, the plurality of users to be matched are sorted; Based on the number of the plurality of ordered queues, the plurality of sorted users to be matched are divided into the plurality of ordered queues.

7. The method of claim 1, wherein, After the matching of the target user with the users to be matched in the target ordered queue, the method further comprises: The users to be matched in the target ordered queue that are matched with the target user are deleted.

8. The method of claim 1, wherein, Based on the feature information of the target user, the matching level section of the target user is determined, comprising: Based on the feature information of the target user and a preset matching level section distribution function, the matching level section of the target user is determined; The characteristic information of the target user at least includes one of a user identifier of the target user, a user level of the target user, and an asset level of the target user, and the preset matching level distribution function includes one of a normal distribution function, a linear distribution function, an exponential distribution function, and a uniform distribution function.

9. A user matching apparatus, characterized by comprising: The device is applied to a distributed cluster server, and includes: a level distribution determination module configured to determine a matching level distribution of a target user based on characteristic information of the target user in response to a matching request of the target user; a queue division module configured to divide a plurality of users to be matched in the distributed cluster server into a plurality of ordered queues based on a query rate per second of the distributed cluster server at a matching request moment and a query rate per second threshold of an ordered queue, and one ordered queue corresponding to one matching level distribution interval; a queue determination module configured to determine a target ordered queue matching the matching level distribution of the target user from the plurality of ordered queues; a user matching module configured to match the target user with a user to be matched in the target ordered queue.

10. An electronic device, comprising: The device includes: a memory and a processor; the memory is configured to store a computer program; the processor is coupled to the memory and configured to execute the computer program to: determine a matching level distribution of a target user based on characteristic information of the target user in response to a matching request of the target user; divide a plurality of users to be matched in a distributed cluster server into a plurality of ordered queues based on a query rate per second of the distributed cluster server at a matching request moment and a query rate per second threshold of an ordered queue, and one ordered queue corresponding to one matching level distribution interval; determine a target ordered queue matching the matching level distribution of the target user from the plurality of ordered queues; match the target user with a user to be matched in the target ordered queue.

11. A computer readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the processor is caused to implement the steps in the user matching method of any one of claims 1-8.

Citation Information

Patent Citations

  • User matching method and device, server and storage medium

    CN107837532A

  • Method and device for outputting information

    CN110427474A