User matching method, device, equipment and storage medium
By adding users to the matching pool and matching them to the corresponding queues based on user dimensions, the problem of low user matching efficiency is solved, an efficient user matching process is achieved, and the system's processing efficiency and user experience are improved.
Patent Information
- Application Number
- CN202111258214.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-10-27
AI Technical Summary
In the user matching process, the mutual matching between different users in the prior art results in low matching efficiency, which is particularly evident during peak hours.
By adding users to the matching pool and determining the matching queue of the corresponding queue dimension from multiple matching queues based on the user dimension, the matching is completed when the matching queue reaches the preset number, reducing repeated matching and cyclic calculations.
It improves user matching efficiency, reduces cyclic calculation operations, enhances user experience, and ensures data security and processing efficiency through storage middleware.
Smart Images

Figure CN114130035B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a user matching method, apparatus, device, and storage medium. Background Art
[0002] In business scenarios that require user matching, such as user connections and game data interaction, it is necessary to pair different users according to certain logic and variables. For example, users can be matched with related users based on gender, rating, and other dimensions. To ensure a balanced user experience, it is necessary to match the right users.
[0003] Generally, when a matching request is received from a user, the user is added to the matching queue and matched in a loop. However, during peak periods of user matching requests, the matching queue needs to traverse every user that joins, resulting in mutual matching between different users, which leads to low user matching efficiency. Summary of the Invention
[0004] The embodiments of the present application provide a user matching method, apparatus, device, and storage medium to solve the technical problem of low user matching efficiency caused by matching different users with each other in the prior art. User matching can be completed when the matching queue matches enough users, effectively improving user matching efficiency.
[0005] In a first aspect, an embodiment of the present application provides a user matching method, comprising:
[0006] In response to a user matching request associated with a first user, adding the first user to a matching pool;
[0007] Determining a first matching queue having a corresponding queue dimension from multiple matching queues according to the user dimension of the first user, and adding the first user to the first matching queue, where different matching queues correspond to different queue dimensions;
[0008] When a preset number of first users are matched in the matching queue, the matched first users are deleted from the matching pool and all matching queues, and a matching result is determined based on the matched first users.
[0009] In a second aspect, an embodiment of the present application provides a user matching device, including a request response module, a queue management module, and a matching processing module, wherein:
[0010] The request response module is configured to add the first user to a matching pool in response to a user matching request associated with the first user;
[0011] The queue management module is configured to determine a first matching queue having a corresponding queue dimension from multiple matching queues based on the user dimension of the first user, and add the first user to the first matching queue, where different matching queues correspond to different queue dimensions;
[0012] The matching processing module is configured to delete the matched first users from the matching pool and all matching queues when a preset number of first users are matched in the matching queue, and determine a matching result based on the matched first users.
[0013] In a third aspect, an embodiment of the present application provides a user matching device, including: a memory and one or more processors;
[0014] The memory is used to store one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the user matching method as described in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the user matching method as described in the first aspect.
[0017] In an embodiment of the present application, the first user associated with the user matching request is added to the matching pool, and a first matching queue of a corresponding queue dimension is determined from multiple matching queues according to the user dimension of the first user, and the first user is added to the first matching queue. When the number of first users matched by the matching queue reaches a preset number, the matched first user is deleted from the matching pool and all matching queues, thereby reducing repeated matching of the first user that has been matched by other matching queues, and determining a matching result based on the matched first user, thereby achieving matching of the first user in matching queues of multiple queue dimensions, and matching of the first user is performed independently between each matching queue. When one of the matching queues meets the preset number, user matching can be completed, and there is no need to repeatedly traverse and match different users, thereby reducing a large number of cyclic calculation operations in the matching process, and effectively improving user matching efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flowchart of a user matching method provided by an embodiment of the present application;
[0019] Figure 2 This is a schematic diagram of a response process to a user matching request provided by an embodiment of the present application;
[0020] Figure 3 This is a flowchart of another user matching method provided by an embodiment of the present application;
[0021] Figure 4 This is a schematic diagram of a user matching architecture provided in an embodiment of the present application;
[0022] Figure 5 This is a schematic diagram of changes in a matching pool and matching queue provided in an embodiment of the present application;
[0023] Figure 6 This is another schematic diagram of changes in the matching pool and matching queue provided in an embodiment of the present application;
[0024] Figure 7 is a structural diagram of a user matching device provided in an embodiment of the present application;
[0025] Figure 8 This is a structural diagram of a user matching device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. It should also be noted that, for ease of description, only parts related to the present application, not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0027] Figure 1 A flowchart of a user matching method provided in an embodiment of the present application is given. The user matching method provided in an embodiment of the present application can be performed by a user matching device, which can be implemented in hardware and / or software and integrated into a user matching device (e.g., a server).
[0028] The following description is made by taking the user matching device executing the user matching method as an example. Figure 1 , the user matching method includes:
[0029] S101: In response to a user matching request associated with a first user, add the first user to a matching pool.
[0030] The user matching request is issued by a client (e.g., a mobile phone, tablet, or computer logged in by a first user), and is associated with the first user logged in on the client. When the first user needs to connect or interact with game data, the first user sends a user matching request associated with the first user to the user matching device.
[0031] Exemplarily, after receiving a user matching request from a client, the user matching request is verified, and if verified, the first user associated with the user matching request is added to the matching pool. In this embodiment, multiple user matching devices are deployed in different regions, and each user matching device may be configured with one or more matching pools. When a user matching device receives a user matching request, it may synchronize the user matching request with user matching devices in other regions, which then add the first user associated with the user matching request to their corresponding matching pools.
[0032] In one possible embodiment, when a user matching request is received, it can be determined whether the matching pool that the first user wants to join has a capacity limit. If there is a capacity limit, the matching pool is checked for capacity to determine whether to add the first user to the corresponding matching pool or determine the time to join the matching pool.
[0033] S102: Determine a first matching queue having a corresponding queue dimension from multiple matching queues according to the user dimension of the first user, and add the first user to the first matching queue. Different matching queues correspond to different queue dimensions.
[0034] This embodiment provides multiple matching queues, and different matching queues correspond to different queue dimensions. Different matching queues can be deployed in the same user matching device or in different user matching devices.
[0035] Exemplarily, after the first user is added to the matching pool, the user dimension corresponding to the first user is determined, and the user dimension is compared with the queue dimensions of all matching queues to determine the queue dimension that matches the user dimension. The matching queue corresponding to the matching queue dimension is determined as the first matching queue that matches the current user matching request, the first user is taken out of the matching pool, and the first user is added to the first matching queue.
[0036] In one possible embodiment, the matching pool and / or matching queue provided in this embodiment stores the added first user via storage middleware. The storage middleware includes one or more of kv storage middleware, vector storage middleware, list storage middleware, and kafka storage middleware.
[0037] For example, a matching pool needs to store all first users who have submitted matching requests across the entire user matching system. For example, this can be done using key-value storage middleware such as Redis, Memcache, or etcd. When using Redis to store first users, either the zset or ttl data structures can be used. When using the zset data structure, the key can be used as the first user's user identifier (uuid or uid), and the score can be used as the timestamp of the first user's entry into the matching pool. This allows for rapid retrieval of all first users from the matching pool who have not matched with other users within a set timeout period and are added to the corresponding matching queue. When using the ttl data structure, Redis's ttl expiration callback configuration (for example, setting notify-keyspace-events "Ex" in redis.conf and listening for the callback event) can be used to handle the timeout of a first user's matching request. When using etcd to store first users, a lease, listener, and prefix approach can be used to implement the matching pool functionality. The automatic expiration notification features of Redis and etcd can be leveraged to quickly detect and handle expired users.
[0038] Matching queues require ordered data and easy scalability. These can be constructed using the queue structure of a key-value storage middleware, a vector or list storage middleware using an in-memory structure, or a Kafka-based message queue middleware. For example, if Redis is used to store the first user, a matching queue can be constructed using the list data structure and the lpush, lpop, rpush, and rpop tools. Adding to the matching queue is done with the lpush command, and retrieving matching queue values can be done with the lrange and lpop commands. Redis's high availability architecture provides disaster recovery, ensuring data is not lost during service restarts or upgrades. If etcd is used to store the first user, the prefix feature of etcd can be used to construct a queue. For example, the prefix of the matching queue can be specified as mathcQueue-ABCD / . The first user who meets the A, B, C, and D criteria can be pushed to this matching queue and become a new key. For example, the key corresponding to the first user uid1 is mathcQueue-ABCD / uid1. At the same time, etcd uses the paxos algorithm to ensure data consistency within the cluster, thereby achieving disaster recovery and restarting without data loss. For using kafka to store the first user, turn on the switch for automatically creating a new topic in kafka (a matching queue can be considered as a topic), and then calculate the matching queue to which the user needs to be assigned according to the pre-set dimension calculation script. The consumer process subscribes to the new topic, and each topic handles the matching request separately. This solution uses a storage middleware to store the first user added. When the matching process or queue processing process is restarted (it may be a restart caused by system downtime, network problems, program problems, or system upgrades), the service governance dynamic scheduling function of the storage middleware will route the user matching request associated with the first user to other nodes, and other nodes will continue to provide services, making the matching process a stateless process, reducing the loss of matching information after the service restarts.
[0039] S103: When a preset number of first users are matched in the matching queue, the matched first users are deleted from the matching pool and all matching queues, and a matching result is determined based on the matched first users.
[0040] Each matching queue is set with a corresponding preset number. Each matching queue only traverses itself and pairs the first user who joins it. When the number of users who join the first user reaches the preset number, the matching queue is considered to have completed matching.
[0041] Exemplarily, when one of the matching queues completes matching (i.e., matches a preset number of first users), the matched first users are deleted from all matching pools and matching queues (including the matching queue that completed matching). In this embodiment, when a matching queue completes matching, the matched first user is deleted from all matching pools and matching queues to prevent other matching queues from repeatedly matching the already matched first user.
[0042] Furthermore, after successfully deleting the matched first user from all matching pools and matching queues, a matching result is determined based on these matched first users. The matching result can be fed back to the client corresponding to the first user or the next layer of business to continue the logic of the lower layer of business.
[0043] Figure 2 A schematic diagram of a response process to a user matching request provided by an embodiment of the present application is given, such as Figure 2 Assume that there are n matching queues (queues 1 to n in the figure). When receiving user matching requests from different clients, the first users associated with different user matching requests (user 1 and user 2 in the figure) are added to the matching pool. According to the user dimensions of user 1 and user 2, they are added to the matching queues of the corresponding queue dimensions. In the figure, user 1 is added to queue 1 and queue n, and user 2 is added to queue 2 and queue 3. Each matching queue detects the number of users of the first user added. When the number of users in a matching queue reaches the set number, the matched first user is deleted from all matching pools and matching queues, and the matching result is fed back to the client based on the matched first user.
[0044] In the above, by adding the first user associated with the user matching request to the matching pool, determining the first matching queue of the corresponding queue dimension from multiple matching queues based on the user dimension of the first user, and adding the first user to the first matching queue, when the matching queue matches a preset number of first users, the matched first user is deleted from the matching pool and all matching queues, reducing the repeated matching of the first user by other matching queues, and determining the matching result based on the matched first user, achieving the matching of the first user in the matching queues of multiple queue dimensions, and each matching queue independently matches the first user. When one of the matching queues meets the preset number, the user matching can be completed, eliminating the need to repeatedly traverse and match different users, reducing the large number of cyclic calculation operations in the matching process, and effectively improving user matching efficiency. At the same time, the first user added to the matching pool and matching queue and related data are saved by the storage middleware, improving the efficiency and security of data storage and processing, effectively solving the problem of data loss caused by system restart, and ensuring user experience.
[0045] Based on the above embodiments, Figure 3 A flowchart of another user matching method provided in an embodiment of the present application is given, which is a specific implementation of the above-mentioned user matching method. Figure 3 , the user matching method includes:
[0046] S201: In response to a user matching request associated with a first user, add the first user to a matching pool.
[0047] S202: Determine the user dimension according to the user indicator information of the first user through a pre-set dimension calculation script, where the dimension calculation script is configured based on the queue dimension.
[0048] In this embodiment, a dimension calculation script is configured for each matching pool. Upon receiving a newly added first user, the matching pool calls the corresponding dimension calculation script and uses it to determine the user dimension of the first user based on the first user's user indicator information. The dimension calculation script is configured based on the queue dimension, meaning it is written based on the queue dimension corresponding to the applicable matching queue.
[0049] The dimension calculation script provided in this embodiment is used to calculate the user dimension of the first user based on the user indicator information. The user indicator information can be provided by the client, for example, by carrying the user indicator information of the first user in the user matching request, or it can be obtained from the server. The user indicator information reflects the dimension that the first user expects to match. The user indicator information can be the gender, score, region, etc. of the first user, and multiple user indicator information of the same type can be set. For example, the first user expects to match the regional dimension including the first region and the second region. Then, the parameters reflecting the regional dimension in the user indicator information include the first region and the second region. The first user can be added to the matching queue corresponding to the first region and the matching queue corresponding to the second region respectively (assuming that other types of dimensions are ignored). Among them, the user dimension can correspond one-to-one with the user indicator information, and the user dimension can be restricted or expanded based on the user indicator information, so as to more flexibly match the applicable matching queue for the first user. In a specific implementation manner, the dimension calculation script provided in this embodiment is a Lua script. The Lua script is applied to the server side (server) so that the dynamic expansion of the matching dimension can be completed without modifying the binary file.
[0050] In one possible embodiment, the dimension calculation script can be updated according to the update of the matching queue. Based on this, the user matching method provided by this embodiment also includes: updating the dimension calculation script according to the queue dimension corresponding to the matching queue that needs to be updated. When adding, deleting, or modifying a matching queue or a queue dimension of a matching queue, the dimension calculation script can be modified synchronously to improve the flexibility of the dimension calculation script, thereby allowing different computer rooms, deployments, and instances of the matching pool to use different matching rules. That is, only the corresponding configuration file needs to be modified and the specified instance loads the specified dimension calculation script to achieve the change of the matching rule. Matching between users in different regional ranges can be achieved at no cost (for example, the first user can be added to the matching queues in the same city, the same country, and the global dimensions at the same time), which has good scalability. Optionally, a string is used as the queue name of the matching queue. When a matching queue with a new queue dimension needs to be added, there is no need to modify the binary code of the user matching program. The expansion of the queue dimension can be completed by modifying the dimension calculation script.
[0051] S203: Determine a first matching queue corresponding to the queue dimension from the multiple matching queues according to the user dimension and the queue dimensions of the multiple matching queues, and add the first user to the first matching queue.
[0052] After determining the user dimension of the first user, the user dimension is compared with the queue dimensions of each matching queue to determine the queue dimension to which the user dimension is adapted. The adapted queue dimension is confirmed as the first matching queue, and the first user is added to the first matching queue. The first user can be added to the matching pool and matching queue by adding the first user's identification information and / or corresponding user indicator information as object information to the matching pool and matching queue.
[0053] S204: When a preset number of first users are matched in the matching queue, it is determined whether all the matched first users exist in the matching pool.
[0054] Specifically, each matching queue monitors the first users added to its own queue and detects changes in its own queue. When the number of matched first users reaches a preset number, the user match is determined to be successful. The matching queue then further checks whether these matched first users are still stored in the matching pool. If so, the process proceeds to step S205; otherwise, the process proceeds to step S206.
[0055] In one possible embodiment, each matching queue monitors the first user according to its own set queue reading time or queue reading frequency. Based on this, after adding the first user to the first matching queue, it also includes: determining the number of users of the first user added to the matching queue based on the queue reading time or queue reading frequency corresponding to the matching queue, and the queue reading time or queue reading frequency is determined based on the set priority of the corresponding matching queue.
[0056] Each matching queue detects the number of users of the first user added to it according to its set queue reading time or queue reading frequency, and determines that the user matching is successful when the number of users of the matched first user reaches the preset number. The queue reading time or queue reading frequency provided in this embodiment is determined based on the set priority of the corresponding matching queue, and the higher the set priority, the shorter the corresponding queue reading time and the higher the queue reading frequency. It can be understood that for multiple matching queues with the same queue dimension under different servers, setting a matching queue with a higher priority can complete user matching faster, promptly delete the first user that has been matched in other matching queues, and reduce repeated matching of other matching queues.
[0057] It is understandable that each matching queue is managed by a separate process (or thread, coroutine). By setting the queue reading time or queue reading frequency of the matching queue, the time for matching between multiple first users is reduced. As long as a matching queue meets the conditions (the number of users reaches the set number), the matching can be completed. By exchanging space for time, a large number of cyclic matching calculations are reduced, and the time complexity of user matching is reduced from the exponential level to the constant level, reducing the waiting time for user matching and greatly improving the user experience.
[0058] S205: When all matched first users exist in the matching pool, the matched first users are deleted from the matching pool and all matching queues, and a matching result is determined based on the matched first users.
[0059] When all matched first users are saved in the matching pool, it can be confirmed that these first users have not been matched by other matching queues. In this case, it is necessary to promptly remove these matched first users from the matching pool and matching queue to avoid other matching queues from repeatedly matching invalid users (first users who have already been matched).
[0060] Specifically, the matched first user is deleted from the matching pool and all matching queues, a matching result is determined based on the matched first user, and the matching result is fed back to the client or the next layer of business.
[0061] S206: When the first user does not exist in the matching pool, delete the first user that does not exist in the matching pool from the matching queue.
[0062] If there are first users among the matched first users that are not saved in the matching pool, it can be determined that these unsaved first users have been matched by other matching processes. In this case, the first users that do not exist in the matching pool will be deleted from the matching queue that has currently matched the set number of first users. In this case, the number of matched users in the matching queue is less than the set number. The matching queue will continue to monitor the number of matched users until the next match with the preset number of first users, and then determine again whether all matched first users exist in the matching pool.
[0063] In one possible embodiment, a public matching queue is set up to handle low-priority user matching requests. This public matching queue is used as a timeout matching queue to receive the first user who has not been successfully matched after a timeout. The public matching queue then matches the user based on a predefined matching strategy. If the first user still has not been successfully matched after a predefined period of time, the matching strategy for the first user is modified, a robot is matched to the first user, or the client is notified of the matching failure.
[0064] Figure 4 A schematic diagram of a user matching architecture provided in an embodiment of the present application is given, such as Figure 3 As shown, this embodiment sets the user matching architecture in the user matching device as a matching process + storage middleware + queue processing process architecture, where the matching process acts as a producer and the queue processing process acts as a consumer. The number of queue processing processes corresponds to the number of matching queues, and each matching queue is managed by a separate queue processing process. The storage middleware is used to store the first user added to the matching pool and matching queue, that is, the corresponding data. The storage middleware can be a Redis storage middleware, a Kafka storage middleware, or an etcd storage middleware. The matching process responds to and processes user matching requests issued by the client. The matching process calls the corresponding dimension calculation script to calculate the user dimension of the first user and delivers the first user to different matching queues. The queue processing process can detect changes in the corresponding matching queue. When the number of users added reaches a set number, the current matching queue is considered a successful match. It then checks whether all matched first users exist in the matching pool. If so, it deletes the first user matched by its own matching queue, notifies the matching pool and other matching queues to delete the matched first user, and feedbacks the matching results to the client or related services based on the matched first user.
[0065] Figure 5 A schematic diagram of the changes of a matching pool and a matching queue provided in an embodiment of the present application is given, such as Figure 5As shown, assume that at time T1, the matching pool stores the first users A, B, and C, matching queue Q1 stores the first users A and B, matching queue Q2 stores the first users A and C, and assume that the set number of matching queues Q1 and Q2 is 3. Assume that at time T2, a user request associated with the first user D is received, and the first user is added to the matching pool and matching queue Q1. At this time, the matching pool stores the first users A, B, C, and D, matching queue Q1 stores the first users A, B, and D, and matching queue Q2 stores the first users A and C. At this time, matching queue Q1 successfully matches, and at time T3, the first users A, B, and D are deleted from the matching pool and all matching queues, and the corresponding matching result is returned. At this time, the first users A, B, and D are no longer stored in the matching pool or matching queue Q1, and matching queue Q2 stores the first user C.
[0066] Figure 6 A schematic diagram of another change of the matching pool and matching queue provided in an embodiment of the present application is given, such as Figure 6 As shown, assume that at time T1, the matching pool stores first users A, B, and C, matching queue Q1 stores first users A and B, and matching queue Q2 stores first users A and C. Assume that the set number of matching queues Q1 and Q2 is 3. Assume that at time T2, a user request associated with first user D is received, and first user D is added to the matching pool and matching queue Q1. At this time, the matching pool stores first users A, B, C, and D, matching queue Q1 stores first users A, B, and D, and matching queue Q2 stores first users A and C. At this time, matching queue Q1 successfully matches, and at time T3, notifies the matching pool and all matching queues to delete first users A, B, and D, and returns the corresponding matching result. Assume that matching queue Q2 does not delete first user A (for example, the deletion fails or no deletion notification is received). At this time, first users A, B, and D are cleared from the matching pool and matching queue Q1, and matching queue Q2 stores first users A and C. Assume that a user request associated with the first user E is received at time T4, and the first user E is added to the matching pool and matching queue Q2. At this time, the matching pool saves the first users C and E, the matching queue Q1 does not save the first user, and the matching queue Q2 saves the first users A, C, and E. At this time, the matching queue Q2 successfully matches, and when notifying the deletion of the first users A, C, and E at time T5, it is found that the matching pool does not save the first user A. The matching queue Q2 deletes the invalid first user A and continues to monitor the number of users who have joined.
[0067] In the above, by adding the first user associated with the user matching request to the matching pool, determining the first matching queue of the corresponding queue dimension from multiple matching queues based on the user dimension of the first user, and adding the first user to the first matching queue, when the matching queue matches a preset number of first users, the matched first user is deleted from the matching pool and all matching queues, reducing repeated matching of the already matched first user by other matching queues, and determining the matching result based on the matched first user, achieving the matching of the first user in matching queues of multiple queue dimensions. Each matching queue independently matches the first user, and the user matching is completed when one of the matching queues meets the preset number, eliminating the need to repeatedly traverse and match different users, reducing the large number of cyclic calculation operations in the matching process, and effectively improving user matching efficiency. At the same time, when the matching queue matches the preset number of first users, it first determines whether the matched first users are all present in the matching pool to reduce the situation where the matched first user has already been matched by other matching queues, resulting in incorrect matching results, thereby ensuring the accuracy of user matching. In addition, the user dimension of the first user is calculated through a dynamically configurable dimension calculation script, facilitating the dynamic expansion of matching rules for different queue dimensions.
[0068] Figure 7 A schematic diagram of the structure of a user matching device provided in an embodiment of the present application is given. Figure 7 The user matching device includes a request response module 71 , a queue management module 72 and a matching processing module 73 .
[0069] Among them, the request response module 71 is used to respond to the user matching request associated with the first user and add the first user to the matching pool; the queue management module 72 is used to determine the first matching queue of corresponding queue dimension from multiple matching queues according to the user dimension of the first user, and add the first user to the first matching queue, where different matching queues correspond to different queue dimensions; the matching processing module 73 is used to delete the matched first users from the matching pool and all matching queues when the matching queue matches a preset number of first users, and determine the matching result based on the matched first users.
[0070] The embodiment of the present application also provides a user matching device, which can integrate the user matching apparatus provided in the embodiment of the present application. Figure 8 This is a schematic diagram of the structure of a user matching device provided in an embodiment of the present application. Figure 8The user matching device includes an input device 83, an output device 84, a memory 82, and one or more processors 81. The memory 82 is used to store one or more programs. When the one or more programs are executed by the one or more processors 81, the one or more processors 81 implement the user matching method provided in the above embodiments. The user matching device, equipment, and computer provided above can be used to implement the user matching method provided in any of the above embodiments, and have the corresponding functions and beneficial effects.
[0071] The embodiment of the present application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the user matching method provided in the above embodiment. Of course, the storage medium containing computer-executable instructions provided in the embodiment of the present application is not limited to the user matching method as above, and can also execute the relevant operations in the user matching method provided in any embodiment of the present application. The user matching device, equipment, and storage medium provided in the above embodiment can execute the user matching method provided in any embodiment of the present application. For technical details not described in detail in the above embodiment, please refer to the user matching method provided in any embodiment of the present application.
[0072] The above are only preferred embodiments of the present application and the technical principles employed. The present application is not limited to the specific embodiments described herein, and any obvious changes, readjustments, and substitutions that are apparent to those skilled in the art will not depart from the scope of protection of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the claims.
Claims
1. A user matching method, characterized in that: include: In response to a user matching request associated with a first user, adding the first user to a matching pool; Determining a first matching queue having a corresponding queue dimension from multiple matching queues according to the user dimension of the first user, and adding the first user to the first matching queue, where different matching queues correspond to different queue dimensions; Detecting the number of first users added to the matching queue according to a set queue reading time or queue reading frequency, and when the matching queue matches a preset number of first users, determining whether all the matched first users exist in the matching pool; When all matched first users exist in the matching pool, the matched first users are deleted from the matching pool and all the matching queues, and a matching result is determined based on the matched first users.
2. The user matching method according to claim 1, characterized in that: The method further comprises: When the first user does not exist in the matching pool, the first user that does not exist in the matching pool is deleted from the matching queue.
3. The user matching method according to claim 1, characterized in that: The determining, according to the user dimension of the first user, a first matching queue having a corresponding queue dimension from a plurality of matching queues, and adding the first user to the first matching queue includes: Determining a user dimension according to the user indicator information of the first user by using a pre-set dimension calculation script, wherein the dimension calculation script is configured based on the queue dimension; According to the user dimension and queue dimensions of the multiple matching queues, a first matching queue corresponding to the queue dimension is determined from the multiple matching queues, and the first user is added to the first matching queue.
4. The user matching method according to claim 3, characterized in that: The method further comprises: The dimension calculation script is updated according to the queue dimension corresponding to the matching queue that needs to be updated.
5. The user matching method according to claim 1, characterized in that: After adding the first user to the first matching queue, the method further includes: The number of users of the first user added to the matching queue is determined based on a queue reading time or a queue reading frequency corresponding to the matching queue, where the queue reading time or the queue reading frequency is determined based on a set priority of the corresponding matching queue.
6. The user matching method according to claim 1, characterized in that: The matching pool and / or the matching queue stores the first user through storage middleware, and the storage middleware includes one or more combinations of kv storage middleware, Vector storage middleware, List storage middleware, and Kafka storage middleware.
7. A user matching device, characterized in that: It includes a request response module, a queue management module and a matching processing module, among which: The request response module is configured to add the first user to a matching pool in response to a user matching request associated with the first user; The queue management module is configured to determine a first matching queue having a corresponding queue dimension from multiple matching queues based on the user dimension of the first user, and add the first user to the first matching queue, where different matching queues correspond to different queue dimensions; The matching processing module is used to detect the number of first users added to the matching queue according to the set queue reading time or queue reading frequency, and when the matching queue matches a preset number of first users, determine whether all the matched first users exist in the matching pool; when all the matched first users exist in the matching pool, delete the matched first users from the matching pool and all the matching queues, and determine the matching results based on the matched first users.
8. A user matching device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the user matching method according to any one of claims 1 to 6.
9. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the user matching method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Corporation matching method and device, equipment and readable storage medium
CN112675548A