Login method, device, electronic device and storage medium

The linked list structure is used to process login requests according to user priority, which solves the problem of server load pressure and target user waiting time under high concurrency, realizes fast login of priority users, and improves the login experience.

CN112861091BActive Publication Date: 2024-09-20NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202110293158.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-18
Publication Date
2024-09-20
Estimated Expiration
2041-03-18

AI Technical Summary

Technical Problem

The existing login system can easily cause server load pressure under high concurrency conditions and affect user login experience. In particular, it cannot meet the priority login needs of important target users.

Method used

Using a linked list structure, login requests are added and traversed according to the user priority level to ensure that users with higher priority log in first, and the login order is determined by user priority level to reduce waiting time.

Benefits of technology

It improves the login experience of target users, ensuring that users with high priority can log in first even if they arrive late, reducing waiting time and enhancing the fairness and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112861091B
    Figure CN112861091B
Patent Text Reader

Abstract

The embodiments of the present invention provide a login method, device, electronic device and storage medium, which are applied to a server, wherein the server includes a linked list, and the linked list has corresponding user priority levels, including: receiving a login request sent by a client, determining the user priority level corresponding to the login request; adding the login request to the corresponding linked list according to the user priority level; traversing the linked list in sequence according to the user priority level to determine the priority login request; and allowing the client corresponding to the priority login request to log in. The embodiments of the present invention traverse the linked list according to the user priority level of the linked list to determine the client corresponding to the target login request to log in. For the client of the target user with a high user priority, it may be processed first even if it arrives later, which reduces the waiting time of the target user and improves the login experience of the target user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a login method, a login device, an electronic device and a storage medium. Background Art

[0002] In applications such as games, the login system is the first system that users come into contact with. A robust login system must take into account a reasonable queuing mechanism. When a large number of users flock in at the same time period, without a robust login system, high-concurrency logins will inevitably bring huge load pressure to the server, causing server performance bottlenecks and affecting the user's login experience. In serious cases, it may directly lead to user loss during the login stage, causing huge losses to the developer.

[0003] Currently common login systems usually use queues to implement queuing. Users enter the queue at the end of the queue in order of login time. When the server opens login, users at the head of the queue are given priority to log in.

[0004] However, the above solution implemented by queue is relatively simple and fair. However, in some special cases, for example, when important target users log in, target users with higher levels need to log in first. In this case, the solution implemented by queue cannot meet the demand. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a login method and a corresponding login device, electronic device, and storage medium that overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problem, an embodiment of the present invention discloses a login method, which is applied to a server, wherein the server includes a linked list, and the linked list has corresponding user priority levels. The method includes:

[0007] Receive a login request sent by a client, and determine a user priority level corresponding to the login request;

[0008] Adding the login request to the corresponding linked list according to the user priority level;

[0009] Traversing the linked list in order according to the user priority levels to determine a priority login request;

[0010] The client corresponding to the priority login request is allowed to log in.

[0011] Optionally, the login request includes a user account of a user, and determining a user priority level corresponding to the login request includes:

[0012] Obtaining user information corresponding to the user account;

[0013] A user priority level corresponding to the login request is determined according to the user information.

[0014] Optionally, the linked list includes nodes, and adding the login request to the corresponding linked list according to the user priority level includes:

[0015] The linked list corresponding to the user priority level of the login request is used as the first target linked list;

[0016] When there are idle nodes in the first target linked list, the login request is added to the idle nodes in the target linked list.

[0017] Optionally, the linked list is a circular linked list, and traversing the linked list in sequence according to the user priority levels to determine the priority login request includes:

[0018] Regularly determine the number of user logins of the client that are allowed to log in;

[0019] The nodes of the linked list are traversed in sequence according to the user priority levels to obtain login requests with the number of user logins as priority login requests.

[0020] Optionally, before traversing the linked list in order according to the user priority levels to determine the priority login request, the method further includes:

[0021] When receiving a logout instruction for a first login request, using the linked list corresponding to the user priority level of the first login request as a second target linked list;

[0022] The node corresponding to the first login request is deleted from the second target linked list.

[0023] Optionally, before traversing the linked list in order according to the user priority levels to determine the priority login request, the method further includes:

[0024] When receiving a queue-jumping instruction for a second login request, taking the linked list corresponding to the user priority level of the second login request as a third target linked list;

[0025] A node is added to the third target linked list, and the second login request is added to the node.

[0026] Optionally, the user information includes at least one or a combination of account level, login duration and consumption amount.

[0027] The embodiment of the present invention further discloses a login device, which is applied to a server. The server includes a plurality of linked lists, each of which has a corresponding user priority level. The device includes:

[0028] A user priority level determination module, used to receive a login request sent by a client, and determine a user priority level corresponding to the login request;

[0029] A login request adding module, used for adding the login request to the corresponding linked list according to the user priority level;

[0030] A priority login request determination module, used to traverse the linked list in order according to the user priority level to determine the priority login request;

[0031] The client login module is used to allow the client corresponding to the priority login request to log in.

[0032] Optionally, the user priority level determination module is used to obtain user information corresponding to the user account; and determine the user priority level corresponding to the login request based on the user information.

[0033] Optionally, the linked list includes nodes, and the login request adding module is used to use the linked list corresponding to the user priority level of the login request as the first target linked list; when there are idle nodes in the first target linked list, the login request is added to the idle nodes of the target linked list.

[0034] Optionally, the linked list is a circular linked list, and the priority login request determination module is used to periodically determine the number of user logins of the client that are allowed to log in; traverse the nodes of the linked list in sequence according to the user priority levels to obtain login requests with the number of user logins as priority login requests.

[0035] Optionally, the device also includes: a logout processing module, which is used to, when receiving a logout instruction for a first login request, use the linked list corresponding to the user priority level of the first login request as the second target linked list; and delete the node corresponding to the first login request from the second target linked list.

[0036] Optionally, the device also includes: a queue-jumping login processing module, which is used to, when receiving a queue-jumping instruction for a second login request, use the linked list corresponding to the user priority level of the second login request as a third target linked list; add a node to the third target linked list, and add the second login request to the node.

[0037] An embodiment of the present invention discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the login method described above when executed by the processor.

[0038] An embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the login method described above are implemented.

[0039] The embodiments of the present invention include the following advantages:

[0040] In an embodiment of the present invention, a login request sent by a client is received, and the user priority level corresponding to the login request is determined, so that the login request is added to the corresponding linked list according to the user priority level, and then the linked list is traversed in sequence according to the user priority level to determine the priority login request, and then the client corresponding to the priority login request is allowed to log in. The embodiment of the present invention traverses the linked list according to the user priority level of the linked list to determine the client corresponding to the target login request to log in. For the client of the target user with a high user priority, it may be processed first even if it arrives later, which reduces the waiting time of the target user and improves the login experience of the target user. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flowchart of steps of an embodiment of a login method of the present invention;

[0042] Figure 2 It is a schematic diagram of a linked list of the present invention;

[0043] Figure 3 is a schematic diagram of multiple linked lists of the present invention;

[0044] Figure 4 It is a structural block diagram of an embodiment of a login device of the present invention. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] The login method in the embodiment of the present application can be run on a terminal device or a server. Among them, the terminal device can be a local terminal device. When the login method is run on a server, it can be a cloud game.

[0047] In an optional implementation, cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating entity of the game program and the entity presenting the game screen are separated. The storage and operation of the login method are completed on the cloud gaming server. The role of the cloud gaming client is to receive and send data and present the game screen. For example, the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a television, a computer, a handheld computer, etc.; but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the player operates the cloud gaming client to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.

[0048] In an optional embodiment, the terminal device may be a local terminal device. The local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0049] Reference Figure 1 , shows a flowchart of a login method embodiment of the present invention, which is applied to a server, the server includes a linked list, the linked list has corresponding user priority levels, and the embodiment of the present invention may specifically include the following steps:

[0050] Step 101: receiving a login request sent by a client, and determining a user priority level corresponding to the login request.

[0051] Among them, a linked list is a non-continuous and non-sequential storage structure on a physical storage unit, and the logical order of data elements is realized by the pointer link order in the linked list. A linked list consists of a series of nodes (each data element in the linked list is called a node), and the nodes can be dynamically generated at runtime or pre-set before runtime. Each node includes two parts: one is a data field for storing data elements (such as a login request in an embodiment of the present invention), and the other is a pointer field for storing the address of the next node.

[0052] In the embodiment of the present invention, a linked list is pre-set in the server, and each linked list has a corresponding user priority level. Specifically, the user priority level is a parameter that determines whether each client can log in first when the server processes a login request sent by the client. The higher the user priority level, the higher the possibility of being able to log in in advance. Conversely, the lower the user priority level, the lower the possibility of being able to log in in advance. There can be one or more linked lists.

[0053] Among them, the login request is a request sent by the client to log in to the application, such as a request sent by a game application to the server. After the server allows login, the user can enter the application through the client and perform corresponding operations.

[0054] Specifically, after receiving the login request sent by the client, the user priority level corresponding to the login request is determined, wherein the user priority level can be flexibly determined according to different requirements. For example, assuming that the user priority levels include V1, V2, V3...Vn, n is an integer, then the login request can be determined as any of the above user priority levels.

[0055] Step 102: Add the login request to the corresponding linked list according to the user priority level.

[0056] In the embodiment of the present invention, the login request is added to the corresponding linked list according to the user priority level of the login request. For example, assuming that the linked lists include list 1, list 2, list 3...list n, and the user priority level corresponding to each linked list is V1, V2, V3...Vn, if it is determined that the user priority level of the login request is V2, the login request can be added to list 2.

[0057] Step 103: traverse the linked list in order according to the user priority levels to determine the priority login request.

[0058] Step 104: Allow the client corresponding to the priority login request to log in.

[0059] In the embodiment of the present invention, under the premise of first-come-first-served and last-served in chronological order, a priority weight parameter, i.e., user priority level, is introduced to determine the order in which the clients corresponding to the login requests log in. Specifically, when the server opens the login, the linked list is traversed in sequence according to the user priority level, so that the login requests are obtained from the linked list in sequence as the target login requests, and the clients corresponding to the target login requests are allowed to log in. For example, assuming that the linked list includes list 1, list 2, list 3...list n, and the user priority level corresponding to each linked list is V1, V2, V3...Vn, if V1<V2<V3<...<Vn, the traversal order of the linked list is list n...list 3, list 2, list 1.

[0060] In the above login method, a login request sent by a client is received, and the user priority level corresponding to the login request is determined, so that the login request is added to the corresponding linked list according to the user priority level, and then the linked list is traversed in sequence according to the user priority level to determine the priority login request, and then the client corresponding to the priority login request is allowed to log in. The embodiment of the present invention traverses the linked list according to the user priority level of the linked list to determine the client corresponding to the target login request to log in. For the client of the target user with a high user priority, it may be processed first even if it arrives later, which reduces the waiting time of the target user and improves the login experience of the target user.

[0061] It should be noted that, since the embodiment of the present invention implements the processing of the client's login request based on a linked list, the implementation is simple, has high versatility, is completely decoupled from the specific application, and can be implemented on a variety of applications.

[0062] In an exemplary embodiment, the login request includes a user account of the user, and the step 101 of determining a user priority level corresponding to the login request includes:

[0063] Obtaining user information corresponding to the user account;

[0064] A user priority level corresponding to the login request is determined according to the user information.

[0065] Among them, the user account refers to the account used by the user when logging into the client, such as the game account when the player logs into the game client, and the user information is the relevant information related to the user account. As an optional example of the present invention, the user information may include at least one or a combination of the account level, login time, and consumption amount. Taking the game account as an example, the user information may include the player level, game time, or consumption amount, etc.

[0066] In the embodiment of the present invention, the user priority level corresponding to the login request is determined according to the user information corresponding to the user account, wherein the user priority level can be flexibly customized according to the actual project requirements, for example, according to the account level, login time, and consumption amount, etc. Optionally, the higher the account level, the longer the login time, or the higher the consumption amount, the higher the corresponding user priority level, and the more likely the corresponding client is to log in in advance.

[0067] In the above embodiment, the user priority is determined according to the user information corresponding to the login request, so that different clients can log in according to the corresponding user priority, avoiding the target client with high user priority from consuming a long queuing time, thereby improving the user's login experience.

[0068] In an exemplary embodiment, the step 102 of adding the login request to the corresponding linked list according to the user priority level includes:

[0069] The linked list corresponding to the user priority level of the login request is used as the first target linked list;

[0070] When there are idle nodes in the first target linked list, the login request is added to the idle nodes in the target linked list.

[0071] Among them, the linked list can be a circular linked list. A circular linked list is a form of chain storage structure, which is characterized in that the pointer field of the last node (tail node) in the linked list points to the head node, and the entire linked list forms a ring, so the circular linked list can also be called a ring linked list. Optionally, the circular linked list can include a unidirectional circular linked list (circular unidirectional linked list) or a bidirectional circular linked list (circular bidirectional linked list), etc. Of course, the above is only an example, and can be adjusted according to needs during specific implementation, and the embodiment of the present invention does not need to be limited to this.

[0072] Each linked list allows a preset number of login requests to be stored. For example, a linked list may only allow 100 login requests to be stored. If 100 login requests have been stored in the linked list, it indicates that the linked list is full. In an embodiment of the present invention, a target linked list is determined from the linked list according to the user priority level of the login request, and then it is determined whether there is an idle node in the target linked list, that is, a node that has not stored a login request. If there is an idle node, the login request can be added to the idle node. If the target linked list is full and there is no idle node, the login request in the target linked list is determined to be a target login request that allows login, thereby obtaining an idle node, and then the login request is added to the idle node.

[0073] In the above embodiment, the target linked list is determined from the linked list according to the user priority level corresponding to the login request, and when there is an idle node in the target linked list, the login request is added to the idle node. In this way, in the process of continuously receiving login requests, the login requests can still be processed in order according to the user priority level, thereby ensuring the login experience of the target user.

[0074] In an exemplary embodiment, the linked list is a circular linked list, the circular linked list includes nodes, and the traversing the linked list in sequence according to the user priority levels to determine the priority login request includes:

[0075] Regularly determine the number of user logins of the client that are allowed to log in;

[0076] The nodes of the linked list are traversed in sequence according to the user priority levels to obtain login requests with the number of user logins as priority login requests.

[0077] In an embodiment of the present invention, in order to prevent performance bottlenecks caused by high concurrency, it is set that only a preset number of clients are allowed to log in within a certain period of time. For example, assuming that the number of user logins within 0.1 seconds is set to 100, it means that only 100 clients are allowed to log in within 0.1 seconds.

[0078] Specifically, a timer is used to periodically obtain a priority login request from the login requests. For example, the timer may execute a process of obtaining a priority login request every 0.1 seconds. Assuming that the number of user logins is 100, within 0.1 seconds, the linked list is traversed in descending order of user priority to obtain 100 login requests as priority login requests. For example, suppose there are linked lists list 1, list 2, list 3...list n, and the user priority level corresponding to each linked list is V1, V2, V3...Vn, V1<V2<V3<...<Vn, then the traversal order of the linked lists is list n...list 3, list2, list 1. If list n has 120 login requests, 100 login requests can be directly obtained from list n as priority login requests, and traversal of the next linked list can be stopped. If list n has 80 login requests, 80 login requests can be directly obtained from list n as priority login requests, and traversal of the next linked list list n-1 can be continued until 100 login requests are obtained as priority login requests.

[0079] Among them, if a new login request is received within 0.1 seconds, the new login request will be added to the linked list of the corresponding user priority level for queueing. After the next 0.1 seconds, the linked list will be traversed in descending order of user priority to obtain 100 login requests as priority login requests.

[0080] In the above example, the number of clients that log in within a certain period of time is limited to prevent performance bottlenecks caused by high concurrency and ensure orderly processing of login requests.

[0081] In an exemplary embodiment, the method may further include: when receiving a logout instruction for a first login request, using the linked list corresponding to the user priority level of the first login request as a second target linked list; and deleting the node corresponding to the first login request from the second target linked list.

[0082] In the embodiment of the present invention, the client is allowed to log out while waiting in line for login. Specifically, if the user performs a logout operation on the client, a logout instruction corresponding to the login request will be generated, and the target linked list storing the login request can be determined according to the logout instruction, and the node corresponding to the login request can be deleted from the target linked list. For example, assuming that the target linked list includes nodes P1, P2, P3...Px, x is an integer, if the node corresponding to a logout request is P2, then the node P2 in the target linked list can be deleted, and the pointer field of P1 can be modified to point to node P3.

[0083] In the above embodiment, when an exit instruction of a login request is received, the target linked list is determined based on the user priority level of the login request and the corresponding node is deleted therefrom. Then, when a priority login request is determined next time, there is no need to process the login request, thereby reducing unnecessary processing operations.

[0084] In an exemplary embodiment, the method may further include: when receiving a queue-jumping instruction for a second login request, using the linked list corresponding to the user priority level of the second login request as a third target linked list; adding a node in the third target linked list, and adding the second login request to the node.

[0085] In an embodiment of the present invention, a client is allowed to jump in line to log in while waiting in line for login. Specifically, if a user performs a queue-jumping operation on a client, a queue-jumping instruction corresponding to the login request will be generated, and the target linked list corresponding to the priority level of the login request can be determined according to the queue-jumping instruction, and then a node is added to the target linked list, so that the login request can be added to the node. For example, assuming that a login request for queue-jumping login is received, and the target linked list corresponding to the login request includes nodes P1, P2, P3...Px, where x is an integer, if the target linked list is full, a new node Px+1 can be added to the target linked list, and then the login request can be added to the node Px+1.

[0086] In the above embodiment, when a queue-jumping instruction for a login request is received, a target linked list is determined based on the user priority level of the login request and a node is added thereto to store the login request. Then, the next time a priority login request is determined, the login request can be processed in a timely manner, thereby improving the login experience of the target user.

[0087] In order to enable those skilled in the art to better understand the embodiments of the present invention, a specific example is used for illustration below. This embodiment proposes a login queuing system based on user priority. Compared with the traditional first-come-first-processed and last-come-last-processed login system, this system introduces an additional user priority. For login requests sent by clients with higher user priorities, they may be processed first even if they arrive later.

[0088] Specifically, the implementation steps of this embodiment are as follows:

[0089] 1. For login requests with the same user priority, a one-way circular linked list is used as the queuing data structure, as follows: Figure 2 As shown, assuming that the same user priority supports at most M people queuing at the same time, 0 and M are the same position, where head points to the head of the queue and tail points to the tail of the queue. When initialized, both head and tail point to 0, and the full mark is_full = False, indicating that the linked list does not store M login requests at this time.

[0090] 2. When receiving the login request sent by the client, select the linked list corresponding to the user priority to join the queue. Specifically, first determine whether the linked list is full. If not, put the login request into the tail position of the linked list and move the tail backward, tail = tail->next. If tail == head after the move, it means that the linked list has stored M login requests. The full flag is_full is set to True, indicating that the linked list has stored M login requests.

[0091] 3. Assuming there are n user priorities, there are n linked lists, and the final queue data structure is as follows Figure 3 As shown, the larger the n is, the higher the user priority is, and the smaller the n is, the lower the user priority is.

[0092] 4. When the server releases login, it traverses the head of the linked list in order of user priority from high to low, extracts the queued login request as the priority login request for login, that is, takes out the login request at the head position in the Vn linked list, and moves the head backward, head = head->next; if the full mark is_full == True, set is_full to False.

[0093] In summary, the application of the embodiments of the present invention has at least the following advantages:

[0094] 1. It is highly versatile and completely decoupled from specific applications, so it can be quickly ported to various products that require queuing login. For example, it can be applied to queuing login for game applications, queuing login for shopping applications, and queuing login for ticket purchasing applications.

[0095] 2. Under the premise of ensuring relative fairness, for example, under the premise of maintaining the chronological order of first-come-first-served and last-come-last, by increasing the user priority level, the client corresponding to the important login request can log in first. At the same time, because the chronological order of first-come-first-served and last-come-last is still maintained, other users with the same user priority level can also log in normally.

[0096] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0097] Reference Figure 4 , shows a structural block diagram of an embodiment of a login device of the present invention, which is applied to a server, and the server includes a plurality of linked lists, each of which has a corresponding user priority level. The embodiment of the present invention may specifically include the following modules:

[0098] The user priority level determination module 401 is used to receive a login request sent by a client and determine the user priority level corresponding to the login request;

[0099] A login request adding module 402, used to add the login request to the corresponding linked list according to the user priority level;

[0100] A priority login request determination module 403, configured to sequentially traverse the linked list according to the user priority levels to determine a priority login request;

[0101] The client login module 404 is used to allow the client corresponding to the priority login request to log in.

[0102] In an optional embodiment of the present invention, the user priority level determination module 401 is used to obtain user information corresponding to the user account; and determine the user priority level corresponding to the login request according to the user information.

[0103] In an optional embodiment of the present invention, the linked list includes nodes, and the login request adding module 402 is used to use the linked list corresponding to the user priority level of the login request as the first target linked list; when there are idle nodes in the first target linked list, the login request is added to the idle nodes of the target linked list.

[0104] In an optional embodiment of the present invention, the linked list is a circular linked list, and the priority login request determination module 403 is used to periodically determine the number of user logins of the client that are allowed to log in; and traverse the nodes of the linked list in sequence according to the user priority levels to obtain login requests of the number of user logins as priority login requests.

[0105] In an optional embodiment of the present invention, the device also includes: a logout processing module, which is used to, when receiving a logout instruction for a first login request, use the linked list corresponding to the user priority level of the first login request as the second target linked list; and delete the node corresponding to the first login request from the second target linked list.

[0106] In an optional embodiment of the present invention, the device also includes: a queue-jumping login processing module, which is used to, when receiving a queue-jumping instruction for a second login request, use the linked list corresponding to the user priority level of the second login request as a third target linked list; add a node to the third target linked list, and add the second login request to the node.

[0107] In an optional embodiment of the present invention, the user information includes at least one or a combination of account level, login duration, and consumption amount.

[0108] In summary, in the embodiment of the present invention, a login request sent by a client is received, and the user priority level corresponding to the login request is determined, so that the login request is added to the corresponding linked list according to the user priority level, and then the linked list is traversed in sequence according to the user priority level to determine the priority login request, and then the client corresponding to the priority login request is allowed to log in. The embodiment of the present invention traverses the linked list according to the user priority level of the linked list to determine the client corresponding to the target login request to log in. For the client of the target user with a high user priority, it may be processed first even if it arrives later, which reduces the waiting time of the target user and improves the login experience of the target user.

[0109] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0110] An embodiment of the present invention discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps described in the above login method embodiment when executed by the processor.

[0111] An embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps described in the above login method embodiment are implemented.

[0112] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0113] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0114] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0117] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0118] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0119] The above is a detailed introduction to a login method, a login device, an electronic device and a storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A login method, characterized in that: Applied to a server, the server comprising a linked list, the linked list having corresponding user priority levels, the method comprising: Receive a login request sent by a client, and determine a user priority level corresponding to the login request; Adding the login request to the corresponding linked list according to the user priority level; Regularly determine the number of user logins of the client that are allowed to log in; Traversing the nodes of the linked list in order according to the user priority levels to obtain login requests with the number of user logins as priority login requests; Allowing the client corresponding to the priority login request to log in; The login request includes a user account of a user, and determining a user priority level corresponding to the login request includes: Obtaining user information corresponding to the user account, where the user account is a game account used by the player when logging into a game client, and the user information includes at least one or a combination of an account level, a login duration, and a consumption amount; Determining a user priority level corresponding to the login request according to the user information; The linked list includes nodes, and adding the login request to the corresponding linked list according to the user priority level includes: The linked list corresponding to the user priority level of the login request is used as the first target linked list; When there are idle nodes in the first target linked list, the login request is added to the idle nodes in the target linked list.

2. The method according to claim 1, characterized in that: The linked list is a circular linked list.

3. The method according to claim 1, characterized in that Before traversing the linked list in order according to the user priority levels to determine the priority login request, the method further includes: When receiving a logout instruction for a first login request, using the linked list corresponding to the user priority level of the first login request as a second target linked list; Delete the node corresponding to the first login request from the second target linked list.

4. The method according to claim 1, characterized in that: Before traversing the linked list in order according to the user priority levels to determine the priority login request, the method further includes: When receiving a queue-jumping instruction for a second login request, taking the linked list corresponding to the user priority level of the second login request as a third target linked list; A node is added to the third target linked list, and the second login request is added to the node.

5. A login device, characterized in that: Applied to a server, the server includes a plurality of linked lists, each of which has a corresponding user priority level, and the device includes: A user priority level determination module, used to receive a login request sent by a client, and determine a user priority level corresponding to the login request; A login request adding module, used for adding the login request to the corresponding linked list according to the user priority level; A priority login request determination module, used to periodically determine the number of user logins of the client that are allowed to log in, and traverse the nodes of the linked list in order according to the user priority levels to obtain login requests of the number of user logins as priority login requests; A client login module, used for allowing the client corresponding to the priority login request to log in; The user priority level determination module is used to obtain user information corresponding to the user account, where the user account is a game account used by a player when logging into a game client, and the user information includes at least one or a combination of an account level, a login duration, and a consumption amount; and determine the user priority level corresponding to the login request based on the user information; Wherein, the linked list includes nodes, and the login request adding module is used to use the linked list corresponding to the user priority level of the login request as the first target linked list; when there are idle nodes in the first target linked list, the login request is added to the idle nodes of the target linked list.

6. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the login method according to any one of claims 1 to 4 when executed by the processor.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the login method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Priority queue design method and priority queue design device

    CN104965686A

  • Method and system for achieving target server logging by user and central server

    CN105337967A

  • User account login management method and device, and electronic equipment

    CN105553984A

  • Storage server task response method, client side, server and system thereof

    CN106257893A

  • Method for accessing computer data by multiple users

    CN109992938A