A virtual sorting method and storage medium for accessing game applications
By adding a virtual sorting module to the user side, the problem of high server load pressure in the queuing system is solved, and the accuracy of queuing information and user experience are improved.
Patent Information
- Application Number
- CN202310172565.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-02-27
AI Technical Summary
The existing queuing system module is integrated on the server, causing multiple players to frequently access to obtain queuing information, resulting in high load pressure on the server and inaccurate queuing information.
A virtual sorting module is added to the user side, and the initial location and virtual sorting rules are provided through the server side, the number of waiting people and waiting time is estimated, and the real-time display is displayed on the user side, reducing the frequency of access between the user side and the server side.
It effectively reduces the server's carrying pressure, improves the accuracy and user experience of queued information, and reduces the number of visits from the user to the server.
Smart Images

Figure CN116099187B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game applications, and in particular to a virtual sorting method for accessing game applications and a storage medium. Background Art
[0002] Existing game operation strategies often rely on large-scale user diversion (e.g., launching new servers), resulting in a large number of players logging in concurrently. This creates a situation where the server needs to handle this large number of player logins, leading to spikes in CPU usage, increased memory usage, a dramatic increase in network bandwidth, and a surge in database access. This can lead to slow or no responses to player requests, and a large number of players being unable to log in. To address this, game developers have added a queuing system module to ensure orderly player login, effectively controlling the login rate and ensuring stable server operation.
[0003] The problem with the existing queuing system module is that the queuing system module is integrated on the server, and players need to access the server regularly to obtain the latest queuing information. When multiple players are queuing, it often causes multiple players to access the server at the same time on the same frequency band to obtain their respective queuing information, causing the server to always frequently respond to requests for queuing information. This not only causes inaccurate queuing information for players, but also increases the server's load pressure. Summary of the Invention
[0004] In view of the above problems, the present invention provides a virtual sorting method and storage medium for accessing game applications, which solves the problem that multiple players frequently access the server to obtain queue information during the queuing stage, resulting in inaccurate queue information given by the server and high server load pressure.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a virtual sorting method for accessing a game application, which is applicable to a server and a user, wherein the server includes a queue and the user includes a virtual sorting module. The method comprises the following steps:
[0006] After the server receives the access request for the game application sent by the user, it determines the initial position of the user in the queue according to the timestamp information of the access request received by the server;
[0007] The initial position is sent to the user end, and the virtual sorting module estimates the number of people and / or waiting time that the user end still needs to wait to access the game application on the server end based on the initial position and the set virtual sorting rules, and displays the number of people and / or waiting time in real time on the user end.
[0008] In some embodiments, after determining the initial position of the user terminal in the queue, the method further includes:
[0009] Obtaining identification information of the user terminal, determining whether the identification information of the user terminal meets a preset adjustment condition, and if so, adjusting the initial position of the user terminal in the queue;
[0010] Sending the initial position to the user terminal includes: sending the adjusted initial position to the user terminal.
[0011] In some embodiments, the method comprises:
[0012] Recording a set of several offline users who have been offline recently, where the offline user set includes identification information of multiple offline users;
[0013] Determining whether the identification information of the user terminal meets a preset adjustment condition, and if so, adjusting the initial position of the user terminal in the queue includes:
[0014] Determine whether the user's identification information is in the offline user set and whether the interval between the time of initiating the access request and the time of the last offline is less than a preset time interval. If so, adjust the initial position of the user in the queue to the head position;
[0015] Alternatively, it is determined whether the identification information of the user terminal is specific identification information, and if so, the initial position of the user terminal in the queue is adjusted to the head position or the tail position.
[0016] In some embodiments, the virtual sorting rules are set as follows:
[0017] Calculate a queue rate, and update the number of waiting people and / or waiting time in real time based on the queue rate and initial position;
[0018] The queuing rate calculation formula is as follows:
[0019] S = Max(0.001, Sf - Q1 + Q2), where S is the queue rate, Max is a mathematical function that takes the maximum value of two parameters, Sf is a preset fixed rate, Q1 is the weighted mobility factor for queue jumping, and Q2 is the weighted mobility factor for queue leaving;
[0020] The formula for calculating the number of waiting people is as follows:
[0021] Pn = P - nS, where Pn is the current number of people waiting, P is the number of people waiting at the initial position, S is the queue rate, and n is the waiting time from the initial position.
[0022] The calculation formula for waiting time is as follows:
[0023] t=P / S.
[0024] In some embodiments, the method further comprises:
[0025] Set the minimum time interval for synchronizing queue data between the user end and the server end to T-min, the maximum synchronization time interval to T-max, and the range of the queue coefficient N to N∈(0,1);
[0026] The time interval T for the next user-side synchronization data request is calculated as follows:
[0027] T=Max(T-min,Min(T-max,(P / S)*N));
[0028] Among them, Min represents a mathematical function that takes the minimum value between two parameters, and N represents initiating a synchronous data request to the server when the ratio of the current queue progress to the total queue progress is N.
[0029] In some embodiments, the method further comprises:
[0030] The predicted permutation position of the client before data synchronization is recorded as P-client, and the permutation rate before synchronization is recorded as S-old. After data synchronization, the current permutation position sent by the server to the client is recorded as P-server, and the current permutation rate is recorded as S-new.
[0031] The calculation formula for the refreshed arrangement position P1 within the first time period when the user terminal refreshes the arrangement position next time is as follows:
[0032] P1 = (P-server – S-new) + (P-client – P-server). The waiting time displayed in the first time period is t1 = P-server / S-new.
[0033] Then, after n time periods, the corresponding refreshed arrangement position Pn=Pn-1-S, and the expected waiting time is tn=Pn / S.
[0034] In some embodiments, the method further comprises:
[0035] Determine whether P-client is less than P-server. If so, use the calculated P1 formula to replace the arrangement position displayed in the next time period. Otherwise, keep the original arrangement position P unchanged.
[0036] In some embodiments, the method further comprises:
[0037] The difference between P-client and P-server is calculated, and the refresh rate is smoothly adjusted according to the calculated difference, so that the user end can smoothly display the estimated waiting time and / or the number of people waiting.
[0038] In some embodiments, the method further comprises:
[0039] Obtain historical habit data of the user end, and adjust the number of waiting people and / or waiting time according to the historical habit data before displaying them.
[0040] In a second aspect, the present invention further provides a computer-readable storage medium storing computer program instructions, which implement the method described in the first aspect when executed by a processor.
[0041] Different from the existing technology, the above technical solution adds a virtual sorting module on the user side to obtain the initial position of the current user side in the queue on the server side, and estimates the number of people and / or waiting time that the user side still needs to wait for accessing the game application on the server side according to the set virtual sorting rules, and displays it in real time, so that the current user side can obtain virtual queue information without frequently accessing the server side. The virtual queue information can be updated in real time on the user side according to predetermined rules, effectively reducing the frequency of the server side responding to the user side queue information and alleviating the carrying pressure on the server side.
[0042] The above-mentioned description of the invention content is only an overview of the technical solution of the present invention. In order to enable ordinary technicians in this field to more clearly understand the technical solution of the present invention, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned objects and other objects, features and advantages of the present invention easier to understand, the following is an explanation in combination with the specific implementation methods and drawings of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings are only used to illustrate the principles, implementations, applications, features, and effects of the specific embodiments of the present invention and other related contents, and are not to be considered as limiting the present invention.
[0044] In the drawings of the specification:
[0045] Figure 1 A diagram showing steps of a method according to a first exemplary embodiment of the present invention;
[0046] Figure 2 This is a flow chart of the virtual sorting method according to a specific embodiment of the present invention;
[0047] Figure 3 This is a queue sequence diagram according to a specific embodiment of the present invention;
[0048] Figure 4 This is a working diagram of the calling module according to a specific embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of client synchronous queuing according to a specific embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to explain in detail the possible application scenarios, technical principles, specific solutions that can be implemented, and the purpose and effects of the present invention, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present invention and are therefore only examples and are not intended to limit the scope of protection of the present invention.
[0051] References to "embodiments" herein mean that the specific features, structures, or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the term "embodiment" in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or relevance to other embodiments. In principle, in the present invention, as long as there are no technical contradictions or conflicts, the various technical features mentioned in the embodiments can be combined in any manner to form a corresponding implementable technical solution.
[0052] Unless otherwise defined, the technical terms used herein have the same meanings as those generally understood by those skilled in the art to which the present invention belongs. The use of relevant terms herein is only for describing specific embodiments and is not intended to limit the present invention.
[0053] In the description of the present invention, the term "and / or" is used to describe a logical relationship between objects, indicating that three possible relationships exist. For example, A and / or B means: A exists, B exists, and both A and B exist. Furthermore, the character " / " generally indicates that the objects are in a logical "or" relationship.
[0054] In the present invention, terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.
[0055] Without further limitations, in the present invention, the words "include", "comprise", "have" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product that includes the elements, so that the process, method or product that includes a series of elements may include not only those limited elements, but also other elements that are not explicitly listed, or also include elements inherent to such process, method or product.
[0056] Consistent with the understanding in the Examination Guidelines, in the present invention, expressions such as "greater than," "less than," and "exceed" are understood to exclude the number itself; expressions such as "above," "below," and "within" are understood to include the number itself. Furthermore, in the description of the embodiments of the present invention, "multiple" means two or more (including two), and similar expressions related to "multiple," such as "multiple groups" and "multiple times," are also understood in this manner, unless otherwise specifically defined.
[0057] See also Figure 1 To solve the above problems, in a first aspect, the present invention provides a virtual sorting method for accessing a game application, which is applicable to a server and a user. The server includes a queue, and the user includes a virtual sorting module. The method includes the following steps:
[0058] S1. After receiving the access request for the game application sent by the user, the server determines the initial position of the user in the queue according to the timestamp information of the access request received by the server;
[0059] S2. The initial position is sent to the user end. The virtual sorting module estimates the number of people who still need to wait and / or the waiting time for the user end to access the game application on the server end based on the initial position and the set virtual sorting rules, and displays the number of people waiting and / or the waiting time in real time on the user end.
[0060] In this embodiment, after the server receives the access request for the game application sent by the user terminal, it determines the initial position of the user terminal in the current queue based on the timestamp information of the access request received by the server, and sends the initial position of the current user terminal to the user terminal. After the virtual sorting module obtains the initial position of the current user terminal, it estimates the number of people and / or waiting time that the user terminal still needs to wait to access the game application of the server according to the set virtual sorting rules, and displays the number of waiting people and / or waiting time in real time on the user terminal. In this process, the interaction between the user terminal and the server ends after obtaining the initial position of the current user terminal in the queue of the server.
[0061] Compared with existing technical solutions, this method can reduce the number of times a user terminal visits the queue by several times. When multiple users access the server in parallel, the advantage is more obvious, and it can significantly reduce the carrying pressure on the server.
[0062] In some embodiments, after determining the initial position of the user terminal in the queue, the method further includes:
[0063] Obtaining identification information of the user terminal, determining whether the identification information of the user terminal meets a preset adjustment condition, and if so, adjusting the initial position of the user terminal in the queue;
[0064] Sending the initial position to the user terminal includes: sending the adjusted initial position to the user terminal.
[0065] In this embodiment, the user terminal's identification information can be a game ID or information closely tied to personal information, such as the current user's mobile phone number or email address. A determination is made as to whether the user terminal's identification information meets preset adjustment conditions. If so, the user terminal's initial position in the queue is adjusted. Preset adjustment conditions may specifically include: whether the user terminal is accidentally disconnected, whether the user terminal is a VIP customer with a high recharge amount, or whether the user terminal is a game operation and maintenance account. The initial position of the user terminal in the queue is adjusted, and a specific adjustment step may be to place the current user terminal at the top of the queue, thereby granting the current user terminal priority access to the game application.
[0066] The adjusted initial position is sent to the user, allowing the current user to obtain accurate queue information. By adding user identification information and performing a judgment step based on the user identification information, users who are temporarily or accidentally offline can enter the game without waiting too long. This model can improve the user experience in some competitive and battle games. It also facilitates game operations and maintenance personnel to enter the game in a timely manner for maintenance, making the user experience more user-friendly during the login queue process and meeting the queuing needs in specific scenarios.
[0067] In some embodiments, the method comprises:
[0068] Recording a set of several offline users who have been offline recently, where the offline user set includes identification information of multiple offline users;
[0069] Determining whether the identification information of the user terminal meets a preset adjustment condition, and if so, adjusting the initial position of the user terminal in the queue includes:
[0070] Determine whether the user's identification information is in the offline user set and whether the interval between the time of initiating the access request and the time of the last offline is less than a preset time interval. If so, adjust the initial position of the user in the queue to the head position;
[0071] Alternatively, it is determined whether the identification information of the user terminal is specific identification information, and if so, the initial position of the user terminal in the queue is adjusted to the head position or the tail position.
[0072] In this embodiment, determining the user's identification information involves determining whether the user is temporarily offline. Therefore, data from recently offline users needs to be collected. A collection of several recently offline users is recorded. This collection includes the identification information of multiple offline users. During this process, the collection of recently offline users is subject to scheduled maintenance. For example, if the most recent time period is set to 15 minutes, then a collection of offline users who were offline within the last 15 minutes is recorded. If the scheduled maintenance frequency for this collection is set to once per minute, then at the 16th minute, the identification information of users who have been offline for 16 minutes needs to be removed from the collection, and the identification information of newly added offline users within the last minute needs to be recorded.
[0073] In this embodiment, a determination is made as to whether the user terminal's identification information satisfies a preset adjustment condition. This preset adjustment condition includes determining whether the current user terminal's identification information indicates a user terminal that is temporarily offline or accidentally disconnected. This determination involves two criteria: whether the user terminal is within the set of offline users, and whether the user terminal's offline time is excessive. The latter specifically includes the following steps: whether the interval between the time the access request is initiated and the time the user was last offline is less than a preset time interval. The preset time interval is set based on different game settings. For example, in Game A, if the average match period is 15 minutes, the preset time interval can be set to 5 minutes; in Game B, if the average match period is 2 minutes, the preset time interval can be set to 20 seconds. If the user terminal's temporary offline time interval meets the preset time interval, the user terminal's initial position in the queue is adjusted to the head position, granting the current user terminal priority access to the game application.
[0074] In this embodiment, it is determined whether the identification information of the user terminal meets the preset adjustment conditions. This preset adjustment condition also includes: determining whether the identification information of the current user terminal belongs to a VIP member with a large recharge amount or excellent game account quality, whether it belongs to a game operation and maintenance personnel, etc. If the user terminal belongs to any of the above categories, a specific mark will be generated in the identification information of the user terminal. When making a judgment, it is only necessary to directly judge the identification information of the user terminal to obtain the result, thereby protecting the rights and interests of the user terminal. For example, if a user terminal belongs to an account with a recharge amount ranked in the top few in this service, the word SVIP will be attached to the identification information of its user terminal, thereby obtaining the right to log in to the game application with priority; if a user terminal belongs to an account of an operation and maintenance personnel, the specific mark of the operation and maintenance personnel will be attached to the identification information of its user terminal, thereby obtaining the right to log in to the game application with priority.
[0075] By adding identification information to the user side and performing steps to judge the identification information of the user side, users who are temporarily offline or accidentally offline can enter the game without waiting too long. In some competitions and battle games, this mode can improve the user experience; at the same time, it also makes it convenient for game operation and maintenance personnel and repair personnel to enter the game in time to maintain the game, making the user side experience more friendly during the login queue process and meeting the queuing needs in specific scenarios.
[0076] In some embodiments, the virtual sorting rules are set as follows:
[0077] Calculate a queue rate, and update the number of waiting people and / or waiting time in real time based on the queue rate and initial position;
[0078] The queuing rate calculation formula is as follows:
[0079] S = Max(0.001, Sf - Q1 + Q2), where S is the queue rate, Max is a mathematical function that takes the maximum value of two parameters, Sf is a preset fixed rate, Q1 is the weighted mobility factor for queue jumping, and Q2 is the weighted mobility factor for queue leaving;
[0080] The formula for calculating the number of waiting people is as follows:
[0081] Pn = P - nS, where Pn is the current number of people waiting, P is the number of people waiting at the initial position, S is the queue rate, and n is the waiting time from the initial position.
[0082] The calculation formula for waiting time is as follows:
[0083] t=P / S.
[0084] In this embodiment, the above algorithm can be understood with reference to specific examples:
[0085] When a client successfully applies to join the queue, the server proactively queries the client's initial position in the queue and returns the following information to the client: the player's (i.e., client's) current queue position P and the current queue rate S (unit: person / second). The default fixed call time is M milliseconds, so the fixed queue rate (i.e., the default fixed rate) Sf = 1000 / M (unit: person / second), the weighted movement factor Q1 (unit: person / second) of priority queue-jumping per second in the last 90 seconds, and the weighted movement factor Q2 (unit: person / second) of queue-leaving per second in the last 90 seconds, is used. The queue rate S = Max(0.001, S-fixed-Q1+Q2).
[0086] The calculation process of Q1 and Q2 factors is as follows:
[0087] Assume that the server's last three departure factors are q3, q2, and q1. The number of people who left the queue between the last 1 and 30 seconds is q3, the number of people who left the queue between the last 31 and 60 seconds is q2, and the number of people who left the queue between the last 61 and 90 seconds is q1. The corresponding weights of q3, q2, and q1 are w3, w2, and w1 (w3+w2+w1=1). Based on the moving weighted average, the next departure factor is calculated as: q4=q3*w3+q2*w2+q1*w1. Then, the departure factor Q1=q4 / 30=(q3*w3+q2*w2+q1*w1) / 30. Similarly, the calculation formula for the Q2 queue-jumping factor is as above.
[0088] Specific example: q3=50, q2=55, q1=45, w3=0.5, w2=0.3, w1=0.2, substitute into the calculation q4=50.5, and obtain the predicted departure factor Q1=q4 / 30=1.68 (people / second) in the next 30 seconds.
[0089] In this embodiment, the calling system is a queuing calling system in the prior art, and the interval statistical time is selected as 30 seconds. Through testing, it is found that 30 seconds is a relatively ideal statistical time point.
[0090] The client receives the current queue position P and the current queue rate S (unit: people / second) from the server. The client's estimated login time t = P / S (unit: seconds). The client updates the current progress and estimated login time every second. That is, after the first second, position P1 = P – S, and estimated login time t1 = P1 / S... Similarly, after the nth second, position Pn = Pn-1 – S, and estimated login time tn = Pn / S.
[0091] By calculating pre-set virtual sorting rules, we can decouple the sorting method from the game login logic, improving maintainability and portability. Currently, users no longer need to frequently access the server to obtain queue information, reducing the frequency of server responses to user queue information and alleviating server traffic pressure. This provides users with a more user-friendly experience during the login queue process, improving the smoothness of the queuing system transition.
[0092] In some embodiments, the method further comprises:
[0093] Set the minimum time interval for synchronizing queue data between the user end and the server end to T-min, the maximum synchronization time interval to T-max, and the range of the queue coefficient N to N∈(0,1);
[0094] The time interval T for the next user-side synchronization data request is calculated as follows:
[0095] T=Max(T-min,Min(T-max,(P / S)*N));
[0096] Among them, Min represents a mathematical function that takes the minimum value between two parameters, and N represents initiating a synchronous data request to the server when the ratio of the current queue progress to the total queue progress is N.
[0097] For example, an N value of 0.5 indicates that the current progress will be corrected synchronously when the queue reaches half of the predicted progress, and an N value of 1 / 3 indicates that the current progress will be corrected synchronously when the queue reaches 1 / 3 of the predicted progress.
[0098] By periodically accessing the server at the frequency specified by the queuing coefficient N, the latest queuing position information of the current user terminal is obtained, and then the queuing position information of the current user terminal in the virtual sorting module is corrected using this queuing position information, thereby reducing the number of times the user terminal accesses the server queue. At the same time, the sorting information presented to the user terminal by the current virtual sorting module can be corrected and calibrated, thereby improving the user experience while reducing the carrying pressure on the server.
[0099] In some embodiments, the method further comprises:
[0100] The predicted permutation position of the client before data synchronization is recorded as P-client, and the permutation rate before synchronization is recorded as S-old. After data synchronization, the current permutation position sent by the server to the client is recorded as P-server, and the current permutation rate is recorded as S-new.
[0101] The calculation formula for the refreshed arrangement position P1 within the first time period when the user terminal refreshes the arrangement position next time is as follows:
[0102] P1 = (P-server – S-new) + (P-client – P-server). The waiting time displayed in the first time period is t1 = P-server / S-new.
[0103] Then, after n time periods, the corresponding refreshed arrangement position Pn=Pn-1-S, and the expected waiting time is tn=Pn / S.
[0104] In this embodiment, after receiving synchronization data from the server, the virtual sorting module does not immediately update the synchronization data of the current user. Instead, it corrects and refreshes the current queue position the next time the user refreshes the queue position. This prevents sudden jumps in the queue number displayed on the current user, making the user's login and queueing experience more user-friendly and improving the smoothness of the queuing system transition.
[0105] In some embodiments, the method further comprises:
[0106] Determine whether P-client is less than P-server. If so, use the calculated P1 formula to replace the arrangement position displayed in the next time period. Otherwise, keep the original arrangement position P unchanged.
[0107] In this embodiment, if P-client is less than P-server, it means that the virtual sorting speed calculated by the virtual sorting module of the current user terminal is greater than the sorting speed actually provided by the server terminal. In this case, it is necessary to slow down the current virtual sorting speed or maintain the update method of the original arrangement position P unchanged. As a preferred embodiment, only when the arrangement position P is 0 or 1, the original arrangement position is maintained unchanged, which makes the user terminal experience more user-friendly during the login queue process and improves the smoothness of the queuing system transition.
[0108] In some embodiments, if the virtual sorting speed calculated by the virtual sorting module of the current user end is greater than the sorting speed actually given by the server end, that is, P-client>P-server, it is necessary to speed up the current virtual sorting speed, or directly modify the current virtual sorting value to the queue value given by the server end, so as to reduce the user's irritability during the waiting process, make the user end experience more friendly during the login queue process, and improve the smoothness of the queuing system transition.
[0109] In some embodiments, the method further comprises:
[0110] The difference between P-client and P-server is calculated, and the refresh rate is smoothly adjusted according to the calculated difference, so that the user end can smoothly display the estimated waiting time and / or the number of people waiting.
[0111] In this way, the queue number displayed on the current user side will not suddenly jump, making the user side experience more friendly during the login queue process and improving the smoothness of the queue system transition.
[0112] In some embodiments, the method further comprises:
[0113] Obtain historical habit data of the user end, and adjust the number of waiting people and / or waiting time according to the historical habit data before displaying them.
[0114] The historical habit data specifically represents the corresponding waiting time of the current user terminal when logging into this game application. For example, when the user terminal logs into this game application multiple times, most of the waiting time is around 50 seconds. The historical habit data will record 50 seconds as the most commonly used waiting time. After the virtual sorting module obtains the initial position of the current user terminal in the queue on the server side, the waiting time displayed on the user terminal can start from around 50 seconds, for example, from 55 seconds or from 45 seconds, to improve the user experience.
[0115] In a second aspect, the present invention further provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the method described in the first aspect. The storage medium includes, but is not limited to, RAM, ROM, magnetic disks, magnetic tapes, optical disks, flash memory, USB flash drives, mobile hard drives, memory cards, memory sticks, network server storage, and network cloud storage.
[0116] The above technical solution adds a virtual sorting module on the user side to obtain the initial position of the current user side in the queue on the server side, and estimates the number of people and / or waiting time that the user side still needs to wait for accessing the game application on the server side according to the set virtual sorting rules, and displays it in real time. Therefore, the current user side does not need to frequently access the server side to obtain queue information, which reduces the frequency of the server side responding to the user side queue information and alleviates the carrying pressure on the server side. Specific embodiment:
[0118] In existing queuing systems, users update their predicted position and time based on their average login rate over a period of time. This results in high prediction errors and poor smoothness. Regardless of whether a player is ranked 1st, 100th, or 1000th, their current progress is synchronized at a fixed time, T. To correct for this error, traditional queuing systems synchronize their current queue position and rate at a fixed time, T. If T is too large, prediction lags will be significant; if T is too small, frequent synchronization messages will increase the server burden and impact stability. To address this issue, existing technical solutions use a more appropriate T value derived through stress testing. However, due to the lack of improvements to the underlying principles of the queuing system, even with T within an appropriate range, the high error rate and poor smoothness observed in existing queuing systems remain unresolved. Consequently, even after implementing this improved approach online, player feedback remains unsatisfactory. The user's predicted queue progress may have already reached 0, while the server's actual position has not yet reached 0. The slow T synchronization makes it impossible to correct the user's prediction error.
[0119] See also Figures 2 to 5 , this embodiment provides a process in which multiple players (ie, user terminals) log in to the game using a virtual sorting method.
[0120] See also Figure 2 , a player applies to queue. The system determines whether the player meets the priority queue-jumping rules. If so, the priority player Y is placed at the head of the queue. If not, the player U is placed at the tail of the queue as an ordinary player. In this embodiment, Y refers to a priority player, and U refers to an ordinary player. The same applies below. The player maintains a long connection and waits for his number to be called. The calling system obtains the number of the player at the head of the queue every M milliseconds. When the current user's client is called, the queuing system on the server (i.e., the queue) sends a token to the player, who uses the token to log in to the game.
[0121] Figure 2 The following table shows the queue-jumping rules for priority players. If there are multiple priority players, they are placed at the head of the queue in the order they applied, and ordinary players are placed at the end of the queue in the order they applied. During this process, if a priority player leaves the queue, ordinary players will be placed in the queue of the priority player who left the queue.
[0122] Figure 3 、 Figure 4 The display shows the calling rules, and the dotted line represents the user end called by the current calling system.
[0123] Figure 5 Shows the data synchronization process between the virtual sorting module and the server.
[0124] The queuing system calls numbers at a fixed interval of M milliseconds, which can be configured based on the server deployment and load balancing. For example, if the queuing system is configured with a 20 millisecond interval, the queuing system can call numbers 50 times per second. In theory, a maximum of 50 players can be called into the game per second (because some players may leave the queue during the game).
[0125] The design of a fixed M millisecond call number has the following advantages:
[0126] 1. The token output during offline time is smoother and more stable, and players can log into the game more smoothly. Basically, there is no possibility of sudden QPS increase when logging into the game.
[0127] 2. Calling numbers at fixed times will make the predicted position displayed on the user end more accurate. Although this system allows queue jumping (referred to as queue jumping factor Q1) and players leaving the queue midway (referred to as leaving factor Q2), the influence factors of Q1 and Q2 are relatively small, so the error in the predicted queue rate will be smaller and the displayed results will be more accurate.
[0128] 3. The server performance load is often proportional to the login QPS (number of players logging into the game per second), and other factors have little impact. Therefore, this system simplifies and does not adopt the traditional method of real-time monitoring of system indicators to dynamically adjust the login rate. The designed queuing system is simpler and more stable.
[0129] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of the present invention, this does not limit the scope of patent protection of the present invention. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concepts of the present invention using the contents recorded in the specification and drawings of the present invention, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of the present invention.
Claims
1. A virtual sorting method for accessing game applications, applicable to both a server and a user, characterized in that: The server includes a queue, the user includes a virtual sorting module, and the method includes the following steps: After the server receives the access request for the game application sent by the user, determining the initial position of the user in the queue according to the timestamp information of the server receiving the access request; The initial position is sent to the user terminal, and the virtual sorting module estimates the number of people who still need to wait and / or the waiting time for the user terminal to access the game application on the server terminal based on the initial position and the set virtual sorting rules, and displays the number of people who still need to wait and / or the waiting time on the user terminal in real time; The virtual sorting rules set are as follows: Calculating a queuing rate, and updating the number of waiting people and / or waiting time in real time according to the queuing rate and the initial position; The queuing rate calculation formula is as follows: S=Max(0.001,S f -Q1+Q2), where S is the queuing rate, Max represents the mathematical function that takes the maximum value between the two parameters, and S f is a preset fixed rate, Q1 is the weighted mobility factor for queue insertion, and Q2 is the weighted mobility factor for queue departure; The calculation formula for the number of waiting people is as follows: Pn = P - nS, where Pn is the current number of people waiting, P is the number of people waiting at the initial position, S is the queue rate, and n is the waiting time from the initial position. The calculation formula for the waiting time is as follows: t=P / S; The method further comprises: Set the minimum time interval for synchronizing queue data between the user end and the server end to T-min, the maximum synchronization time interval to T-max, and the range of the queue coefficient N to N∈(0,1); The time interval T for the next user-side synchronization data request is calculated as follows: T=Max(T-min,Min(T-max,(P / S)*N)); Among them, Min represents a mathematical function that takes the minimum value between two parameters, and N represents initiating a synchronization data request to the server when the ratio of the current queue progress to the total queue progress is N; The method further comprises: The predicted permutation position of the client before data synchronization is recorded as P-client, and the permutation rate before synchronization is recorded as S-old. After data synchronization, the current permutation position sent by the server to the client is recorded as P-server, and the current permutation rate is recorded as S-new. The calculation formula for the refreshed arrangement position P1 within the first time period when the user terminal refreshes the arrangement position next time is as follows: P1 = (P-server – S-new) + (P-client – P-server). The waiting time displayed in the first time period is t1 = P-server / S-new. Then after n time periods, the corresponding refreshed arrangement position P n =P n-1 -S, estimated waiting time is t n =P n / S; The method further comprises: Determine whether P-client is less than P-server. If so, use the calculated P1 formula to replace the arrangement position displayed in the next time period. Otherwise, keep the original arrangement position P unchanged.
2. The virtual sorting method for accessing game applications according to claim 1, characterized in that: After determining the initial position of the user terminal in the queue, the method further includes: Obtaining identification information of the user terminal, determining whether the identification information of the user terminal meets a preset adjustment condition, and if so, adjusting the initial position of the user terminal in the queue; Sending the initial position to the user terminal includes: sending the adjusted initial position to the user terminal.
3. The virtual sorting method for accessing game applications according to claim 2, wherein: The method comprises: Recording a set of several offline users who have been offline recently, wherein the set of offline users includes identification information of multiple offline users; The determining whether the identification information of the user terminal satisfies a preset adjustment condition, and if so, adjusting the initial position of the user terminal in the queue includes: Determine whether the identification information of the user terminal is in the offline user set and whether the interval between the time point of initiating the access request and the time point of the last offline is less than a preset time interval. If so, adjust the initial position of the user terminal in the queue to the head position; Alternatively, it is determined whether the identification information of the user terminal is specific identification information, and if so, the initial position of the user terminal in the queue is adjusted to the head position or the tail position.
4. The virtual sorting method for accessing game applications according to claim 1, wherein: The method further comprises: The difference between P-client and P-server is calculated, and the refresh rate is smoothly adjusted according to the calculated difference, so that the user end can smoothly display the estimated waiting time and / or the number of people waiting.
5. The virtual sorting method for accessing game applications according to claim 1, wherein: The method further comprises: The historical habit data of the user terminal is obtained, and the number of waiting people and / or the waiting time are adjusted according to the historical habit data before being displayed.
6. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Online game login queue method
CN102664883A
Task distribution method, device and system and computer readable storage medium
CN109783227A