List generation method, device, electronic device and computer readable medium

By providing a collection of candidate user accounts in the candidate user pool cache, a user account information list is directly generated based on the list configuration information and the status information of the candidate user account, which solves the problem of low list generation efficiency in the prior art, and realizes efficient and fast list generation and response.

CN113901091BActive Publication Date: 2025-03-07BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111376327.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-03-07
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

In the prior art, when generating a friend list, it is necessary to obtain the status information of all friends and conduct a complete sorting process, resulting in low efficiency in list generation and inability to respond to user requests in a timely manner.

Method used

By providing a collection of candidate user accounts in the candidate user pool cache, in response to the generation request of the user account information list, a user account information list is directly generated based on the list configuration information and the status information of the candidate user account.

Benefits of technology

It effectively improves the efficiency of user account information list generation, improves the response rate, reduces the pressure of downstream calling services, and supports flexible online configuration and expansion to more scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901091B_ABST
    Figure CN113901091B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, electronic device and computer-readable medium for generating a list, and belongs to the field of Internet technology. The method includes: in response to a request for generating a user account information list, obtaining a candidate user account set from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts of multiple user types; obtaining the status information of the candidate user account according to the list configuration information and the user type; and generating a user account information list according to the list configuration information of the user account information list and the status information of the candidate user account. The present disclosure provides a candidate user account set in the candidate user pool cache, and when a list generation request is received, a user account information list can be directly generated according to the candidate user accounts in the candidate user account set, thereby effectively improving the efficiency of generating the user account information list and reducing the pressure of downstream calling services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular, to a method for generating a list, a device for generating a list, an electronic device, and a computer-readable medium. Background Art

[0002] Many application software have functions for inviting friends or interacting with friends. Therefore, it is necessary to generate a corresponding friend list in real time according to the online status or other status of the friends for the user to choose.

[0003] In the prior art, each time a friend list is generated, it is necessary to obtain status information of all friends and perform a complete sorting process, which results in low efficiency in list generation and failure to respond to user requests in a timely manner.

[0004] In view of this, there is an urgent need in the art for a method that can improve the efficiency of list generation.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a list generation method, a list generation device, an electronic device and a computer-readable medium, thereby improving the efficiency of list generation at least to a certain extent.

[0007] According to a first aspect of the present disclosure, a method for generating a list is provided, comprising:

[0008] In response to a request for generating a user account information list, obtaining a candidate user account set from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to multiple user types;

[0009] Acquire list configuration information of the user account information list, and acquire status information of the candidate user account according to the list configuration information and the user type;

[0010] The user account information list is generated according to the list configuration information of the user account information list and the status information of the candidate user accounts.

[0011] In an exemplary embodiment of the present disclosure, the generating the user account information list according to the list configuration information of the user account information list and the state information of the candidate user account includes:

[0012] Obtaining, according to the list configuration information of the user account information list, the total list length of the user account information list and the sub-list length corresponding to each of the user types;

[0013] Acquire the user type priority corresponding to each of the user types from the list configuration information, and sequentially acquire, in descending order of the user type priority, candidate user accounts corresponding to each of the user types that match the sub-list length from the candidate user account set as list user accounts;

[0014] When the number of the listed user accounts reaches the total list length, the user account information list is generated according to the listed user accounts and the user type priorities and status information of the listed user accounts.

[0015] In an exemplary embodiment of the present disclosure, generating the user account information list according to the listed user accounts and the user type priority and status information of the listed user accounts includes:

[0016] Obtaining the user status priority corresponding to the status information of the list user account corresponding to each of the user types according to the list configuration information;

[0017] All the listed user accounts are sorted according to the user type priority and the user status priority to obtain the user account information list.

[0018] In an exemplary embodiment of the present disclosure, it is characterized in that the method further comprises:

[0019] The candidate user account set in the candidate user pool cache is asynchronously updated according to a preset update time interval.

[0020] In an exemplary embodiment of the present disclosure, the method for updating the candidate user account set includes:

[0021] Obtaining a time difference between the current time and a previous update time when the candidate user account set was last updated;

[0022] If the time difference is greater than or equal to the preset update time interval, obtaining a cache update configuration of the candidate user account set, and obtaining the number of candidate user accounts corresponding to each user type according to the cache update configuration;

[0023] Obtaining an original user account information list and status information corresponding to the original user accounts in the original user account information list;

[0024] According to the number of candidate user accounts corresponding to each of the user types and the status information of the original user accounts, the original user accounts corresponding to each of the user types are obtained from the original user account information list as the candidate user accounts, and the candidate user account set is generated.

[0025] In an exemplary embodiment of the present disclosure, the obtaining the cache update configuration of the candidate user account set includes:

[0026] Obtain list configuration information of the user account information list, and determine a cache update configuration of the candidate user account set according to the list configuration information.

[0027] In an exemplary embodiment of the present disclosure, the acquiring, from the original user account information list, the original user accounts corresponding to the respective user types as the candidate user accounts, and generating the candidate user account set according to the number of candidate user accounts corresponding to the respective user types and the status information of the original user accounts, includes:

[0028] sorting the original user accounts corresponding to the user types in the original user account information list according to the status information of the original user accounts;

[0029] According to the number of candidate user accounts corresponding to each of the user types and the ranking result, the original user accounts corresponding to each of the user types are obtained from the original user account information list as the candidate user accounts, and the candidate user account set is generated.

[0030] In an exemplary embodiment of the present disclosure, the method further includes:

[0031] In response to the request for generating the user account information list, if the candidate user account set in the candidate user pool cache is empty, obtaining the number of candidate user accounts corresponding to each user type and the user type priority according to the list configuration information;

[0032] According to the number of candidate user accounts corresponding to each user type, the original user account corresponding to each user type is obtained from the original user account information list as a simplified list user account;

[0033] The simple list user accounts are sorted according to the user type priority, and a simple account information list is generated according to the sorting result.

[0034] According to a second aspect of the present disclosure, there is provided a device for generating a list, comprising:

[0035] A candidate user acquisition module is configured to execute, in response to a request for generating a user account information list, acquiring a candidate user account set from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to a plurality of user types;

[0036] a status information acquisition module, configured to execute acquisition of list configuration information of the user account information list, and acquire status information of the candidate user account according to the list configuration information and the user type;

[0037] The user list generating module is configured to generate the user account information list according to the list configuration information of the user account information list and the status information of the candidate user account.

[0038] In an exemplary embodiment of the present disclosure, the user list generating module includes:

[0039] a list length determining unit, configured to obtain the total list length of the user account information list and the sub-list lengths corresponding to each of the user types according to the list configuration information of the user account information list;

[0040] a list user account acquisition unit, configured to acquire a user type priority corresponding to each of the user types from the list configuration information, and sequentially acquire, in descending order of the user type priority, candidate user accounts corresponding to each of the user types that match the sub-list length from the candidate user account set as list user accounts;

[0041] The user account information list generating unit is configured to generate the user account information list according to the listed user accounts and the user type priority and status information of the listed user accounts when the number of the listed user accounts reaches the total list length.

[0042] In an exemplary embodiment of the present disclosure, the user account information list generating unit includes:

[0043] A status priority determination unit is configured to execute, according to the list configuration information, obtaining a user status priority corresponding to the status information of the list user account corresponding to each of the user types;

[0044] The list user account sorting unit is configured to sort all the list user accounts according to the user type priority and the user status priority to obtain the user account information list.

[0045] In an exemplary embodiment of the present disclosure, it further includes:

[0046] The cache update module is configured to perform asynchronous update of the candidate user account set in the candidate user pool cache according to a preset update time interval.

[0047] In an exemplary embodiment of the present disclosure, the cache update module includes:

[0048] an update time difference determining unit, configured to execute obtaining a time difference between a current time and a previous update time when the candidate user account set was last updated;

[0049] A user quantity determination unit is configured to execute, if the time difference is greater than or equal to the preset update time interval, obtaining a cache update configuration of the candidate user account set, and obtaining the number of candidate user accounts corresponding to each of the user types according to the cache update configuration;

[0050] A user acquisition unit, configured to acquire an original user account information list and status information corresponding to the original user account in the original user account information list;

[0051] The candidate set generating unit is configured to obtain the original user account corresponding to each of the user types from the original user account information list as the candidate user account according to the number of candidate user accounts corresponding to each of the user types and the status information of the original user account, and generate the candidate user account set.

[0052] In an exemplary embodiment of the present disclosure, the user quantity determination unit includes:

[0053] The cache update configuration determining unit is configured to obtain list configuration information of the user account information list, and determine the cache update configuration of the candidate user account set according to the list configuration information.

[0054] In an exemplary embodiment of the present disclosure, the candidate set generating unit includes:

[0055] an original user account sorting unit, configured to sort the original user accounts corresponding to the respective user types in the original user account information list according to the status information of the original user accounts;

[0056] The candidate user account determination unit is configured to obtain the original user account corresponding to each of the user types from the original user account information list as the candidate user account according to the number of candidate user accounts corresponding to each of the user types and the ranking result, and generate the candidate user account set.

[0057] In an exemplary embodiment of the present disclosure, it further includes:

[0058] A user priority acquisition module, configured to execute in response to the request for generating the user account information list, and if the candidate user account set in the candidate user pool cache is empty, acquire the number of candidate user accounts corresponding to each user type and the user type priority according to the list configuration information;

[0059] A simplified list user account determination module is configured to obtain, from the original user account information list, original user accounts corresponding to each of the user types as simplified list user accounts according to the number of candidate user accounts corresponding to each of the user types;

[0060] The simple account information list generating module is configured to sort the simple list user accounts according to the user type priority, and generate a simple account information list according to the sorting result.

[0061] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any one of the above-described methods for generating a list.

[0062] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the above-described methods for generating a list.

[0063] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for generating a list described in any one of the above is implemented.

[0064] The exemplary embodiments of the present disclosure may have the following beneficial effects:

[0065] In the method for generating a list in the example implementation of the present disclosure, by providing a candidate user account set in the candidate user pool cache, when the server receives a request to generate a user account information list, it can directly select the corresponding candidate user account from the candidate user account set to generate a user account information list according to the list configuration information and the status information of the candidate user account. The method for generating a list in the example implementation of the present disclosure, on the one hand, by providing a candidate user pool cache and selecting the corresponding candidate user account from the candidate user account set to generate a user account information list, can effectively improve the efficiency of generating the user account information list, improve the response rate, and reduce the pressure of downstream calling services; on the other hand, by abstracting a set of list generation configurations, it can support flexible online configuration and support expansion to more scenarios.

[0066] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0068] Figure 1 A schematic diagram showing a flow chart of a method for generating a list in a related embodiment of the present disclosure is shown;

[0069] Figure 2 A schematic diagram showing a flow chart of a method for generating a list in another related embodiment of the present disclosure is shown;

[0070] Figure 3 A schematic diagram showing an exemplary system architecture of a method and device for generating a list to which the embodiments of the present disclosure can be applied;

[0071] Figure 4 A schematic diagram showing a flow chart of a method for generating a list according to an exemplary embodiment of the present disclosure;

[0072] Figure 5 A schematic diagram showing a process of generating a user account information list according to list configuration information and state information of candidate user accounts according to an example implementation of the present disclosure;

[0073] Figure 6 A schematic diagram of a process of asynchronously updating a set of candidate user accounts in a candidate user pool cache according to an exemplary embodiment of the present disclosure is shown;

[0074] Figure 7 A schematic diagram showing a process of generating a simplified account information list according to a downgrade strategy in an exemplary embodiment of the present disclosure;

[0075] Figure 8 A flowchart of a candidate user pool cache update mechanism in a specific implementation of the present disclosure;

[0076] Fig. 9 The following is a schematic diagram of a user account information list obtained according to a list generation method in a specific implementation manner of the present disclosure.

[0077] Fig.10 A schematic diagram showing a flow chart of a method for generating a list in a specific implementation manner of the present disclosure is shown;

[0078] Fig.11A schematic diagram showing a flow chart of a method for updating a candidate user pool cache in a specific implementation of the present disclosure is shown;

[0079] Fig.12 A block diagram showing a list generation device according to an exemplary embodiment of the present disclosure;

[0080] Fig.13 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0081] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0082] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein.

[0083] The following example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0084] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0085] Many application software have functions for inviting friends or interacting with friends. Therefore, it is necessary to generate a corresponding friend list in real time according to the online status or other status of the friends for the user to choose.

[0086] like Figure 1 FIG. 1 is a complete flow chart of a method for generating a list in a related embodiment of the present disclosure. The specific steps of the flow chart are as follows:

[0087] Step S101: The server receives a list generation request.

[0088] Step S102: Query the intimacy values ​​of friends and fans.

[0089] The server sends a query request to the intimacy value query service to query the intimacy values ​​of friends and fans.

[0090] Step S103: Obtain intimacy values ​​of friends and fans.

[0091] The server receives the intimacy values ​​of friends and fans returned by the intimacy value query service.

[0092] Step S104: Query the online status of friends and fans.

[0093] The server sends a query request to the online status query service to query the online status of friends and fans.

[0094] Step S105: Obtain the online status of friends and fans.

[0095] The server receives the online status of friends and fans returned by the online status query service.

[0096] Step S106: Sort friends' user names.

[0097] The server sorts the userIDs (user names) of the friends. If the number of friends does not reach the list length, the process proceeds to step S107. If the number of friends reaches the list length, the process directly proceeds to step S109.

[0098] Step S107: Sorting of fan user names.

[0099] When the number of friends does not reach the list length, the server sorts the userIDs of the fans. If the number of friends and fans does not reach the list length, go to step S108. If the number of friends and fans reaches the list length, go directly to step S109.

[0100] Step S108: Join recommended users.

[0101] When the number of friends and fans does not reach the list length, the userID of the recommended user is concatenated.

[0102] Step S109: Query user details.

[0103] The server sends a query request to the user details query service to query the detailed information such as the avatar and nickname of the listed user account.

[0104] Step S110: Obtain user details.

[0105] The server receives the user details information returned by the user details query service.

[0106] Step S111. Generate a user account information list.

[0107] The server generates the final user account information list and returns it to the client.

[0108] like Figure 1 The above-mentioned related embodiments shown have the following disadvantages:

[0109] 1. Lack of caching mechanism. Each query requires a complete sorting process. The interface layer traffic will be transmitted 1:1 to downstream services, such as intimacy value query service, online status query service, etc. When the downstream capacity is relatively small, the usage scenario is limited.

[0110] 2. All candidate elements are involved in the sorting. When the number of candidate elements is large, the interface response time becomes slow, affecting the user experience.

[0111] like Figure 2 FIG. 1 is a complete flow chart of a method for generating a list in another related embodiment of the present disclosure. The specific steps of the flow chart are as follows:

[0112] Step S201: The server receives a list generation request.

[0113] Step S202: Query the user account information list cache.

[0114] Step S203: Obtain user account information list cache.

[0115] If the user account information list cache is not empty, then directly proceed to step S204. If the user account information list cache is empty, then proceed to step S205.

[0116] Step S204: Return cached data.

[0117] The server directly returns the user account information list in the cache to the client.

[0118] Step S205: Query the intimacy values ​​of friends and fans.

[0119] The server sends a query request to the intimacy value query service to query the intimacy values ​​of friends and fans.

[0120] Step S206: Obtain intimacy values ​​of friends and fans.

[0121] The server receives the intimacy values ​​of friends and fans returned by the intimacy value query service.

[0122] Step S207: Query the online status of friends and fans.

[0123] The server sends a query request to the online status query service to query the online status of friends and fans.

[0124] Step S208: Obtain the online status of friends and fans.

[0125] The server receives the online status of friends and fans returned by the online status query service.

[0126] Step S209: Sort friends' user names.

[0127] The server sorts the userIDs (user names) of the friends. If the number of friends does not reach the list length, the process proceeds to step S210. If the number of friends reaches the list length, the process directly proceeds to step S212.

[0128] Step S210: Sorting of fan user names.

[0129] When the number of friends does not reach the list length, the server sorts the userIDs of the fans. If the number of friends and fans does not reach the list length, the process proceeds to step S211. If the number of friends and fans reaches the list length, the process proceeds directly to step S212.

[0130] Step S211: Join recommended users.

[0131] When the number of friends and fans does not reach the list length, the userID of the recommended user is concatenated.

[0132] Step S212: Query user details.

[0133] The server sends a query request to the user details query service to query the detailed information such as the avatar and nickname of the listed user account.

[0134] Step S213: Obtain user details.

[0135] The server receives the user details information returned by the user details query service.

[0136] Step S214: Generate a user account information list.

[0137] The server generates the final user account information list and returns it to the client.

[0138] like Figure 2 The disadvantages of the related embodiments shown are: the method lacks a cache update mechanism, the cache update depends on the cache expiration, and the user sees the sorted result of historical data. When the cache is empty, a new data is generated according to the current request and written into the cache. When the user visits next time, what is actually read is the previously generated list, so the user experience is not good.

[0139] Figure 3 A schematic diagram of a system architecture of an exemplary application environment to which a method and apparatus for generating a list according to an embodiment of the present disclosure can be applied is shown.

[0140] like Figure 3 As shown, the system architecture 300 may include multiple mobile terminals 301, 302, 303, a network 304, and a server 305. The network 304 is used to provide a medium for communication links between the mobile terminals 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wireless communication links, etc.

[0141] It should be understood that Figure 3 The number of mobile terminals, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of mobile terminals, networks and servers. For example, the server 305 may be a server cluster composed of multiple servers.

[0142] The mobile terminals 301, 302, and 303 may be various electronic devices with processors, including but not limited to smart phones, tablet computers, portable computers, and the like. The server 305 may be a server that provides various services. For example, the mobile terminals 301, 302, and 303 may send a request for generating a user account information list to the server 305 through the processor. The server 305 may obtain a candidate user account set from the candidate user pool cache, obtain list configuration information of the user account information list, and obtain status information of the candidate user account according to the list configuration information and the user type, and then generate a user account information list according to the list configuration information of the user account information list and the status information of the candidate user account, and return the user account information list to the mobile terminals 301, 302, and 303.

[0143] This example implementation first provides a method for generating a list. Figure 4 As shown, the method for generating the above list may include the following steps:

[0144] Step S410: In response to a request for generating a user account information list, a candidate user account set is obtained from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to multiple user types.

[0145] Step S420: Obtain list configuration information of the user account information list, and obtain status information of the candidate user account according to the list configuration information and the user type.

[0146] Step S430: Generate a user account information list according to the list configuration information of the user account information list and the status information of the candidate user accounts.

[0147] In the method for generating a list in the example implementation of the present disclosure, by providing a candidate user account set in the candidate user pool cache, when the server receives a request to generate a user account information list, it can directly select the corresponding candidate user account from the candidate user account set to generate a user account information list according to the list configuration information and the status information of the candidate user account. The method for generating a list in the example implementation of the present disclosure, on the one hand, by providing a candidate user pool cache and selecting the corresponding candidate user account from the candidate user account set to generate a user account information list, can effectively improve the efficiency of generating the user account information list, improve the response rate, and reduce the pressure of downstream calling services; on the other hand, by abstracting a set of list generation configurations, it can support flexible online configuration and support expansion to more scenarios.

[0148] Next, combine Figures 5 to 7 The above steps of this exemplary embodiment are described in more detail.

[0149] In step S410, in response to a request for generating a user account information list, a candidate user account set is obtained from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to multiple user types.

[0150] In this example implementation, the user can send a request to generate a user account information list to the server through the client, and then display the corresponding user account information list on the client interface according to the information returned by the server. For example, the user can send a request to generate a user account information list to the server by clicking the user account information list open control on the client interface.

[0151] When the server receives a request for generating a user account information list from a client, it first queries the candidate user pool cache, which is used to store a set of candidate user accounts that are updated regularly at a certain preset time interval. If the candidate user pool cache is not empty, the latest set of candidate user accounts is obtained from the candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to multiple user types, and the user types may include mutual friends, fans, recommended users, etc.

[0152] The candidate user pool cache can be stored in Redis (Remote Dictionary Server), and the specific storage content can be binary data serialized by Protobuf, where Protobuf is a platform-independent, language-independent, scalable, lightweight and efficient serialized data structure protocol that can be used for network communication and data storage. Storing in the above way can save storage space, reduce network bandwidth, and speed up data reading.

[0153] The candidate user account set can be asynchronously updated at preset time intervals according to a certain update strategy. During each update, candidate user accounts corresponding to each user type that meet certain conditions are obtained from the user account information list and put into the cache. The number of candidate user accounts corresponding to each user type is slightly more than the number finally displayed in the list to ensure the differentiation of the list and the real-time sorting.

[0154] In step S420, list configuration information of the user account information list is obtained, and status information of the candidate user account is obtained according to the list configuration information and the user type.

[0155] In this example implementation, the list generation configuration may include configuration information such as list generation conditions and final list length, wherein the list generation conditions may include the selection of user types, the setting of user type priority when displaying lists, and the setting of user status priority, etc., which may be set through specific parameters. For different applications or different activities, the corresponding list generation configuration may be different, and needs to be determined according to actual needs.

[0156] The status information of the candidate user account may include the online status of the candidate user account, the intimacy value with the current user, the time of becoming friends with the current user, the combat power value in the game, the game level, the number of game rewards obtained, etc. Different user status information may be included for different user types.

[0157] In addition to the configuration related to list generation, the list configuration information may also include relevant information of the candidate user pool cache. Among them, the relevant parameters of list generation may include, for example, the number of lists to be displayed in the end, whether it is necessary to filter the identification of online users, the retained cache when querying users, the public figure judgment conditions (such as the number of fans), the maximum number of friends and fans, the conditions for adding fans (such as the number of friends is less than 20), the maximum number of fans included in the list, the conditions for adding recommended users (such as the number of friends and fans is less than 20), the maximum number of recommended users, etc. The relevant parameters of the candidate user pool cache may include, for example, the number of friends in the user pool, the number of fans in the user pool, the number of recommended users in the user pool, the cache expiration time, the time interval for cache updates, the number of queries in each batch when querying the user's online status, the timeout time when querying the user's online status, the number of queries in each batch when querying the user's combat effectiveness, the number of queries in each batch when querying the number of medals of the user, etc.

[0158] In a specific embodiment, taking the friend mutual assistance list as an example, the specific content of the list generation configuration is as follows:

[0159] First, the user types displayed in the list may include three types: mutual friends participating in the activity, fans participating in the activity, and recommended users participating in the activity. Among them, mutual friends participating in the activity are the first priority, fans participating in the activity are the second priority, and recommended users participating in the activity are the third priority.

[0160] Secondly, for each user type, different user status priorities can be set. For example, among the mutual friends and fans participating in the event, whether the user is online is the first priority, the size of the intimacy value is the second priority, and the time of becoming friends (fans) is the third priority; among the recommended users participating in the event, the priority order of each user can be determined according to the recommendation model.

[0161] In addition, you can also set relevant conditions for list generation, for example, add fans when the number of mutually connected friends participating in the activity in the list is less than 20, or add recommended users when the sum of mutually connected friends and fans participating in the activity in the list is less than 20, as well as the upper limit on the number of users displayed for each type of user, etc.

[0162] In addition, you can also set some basic display logic for the list, for example, when the number of people on the currently displayed page is greater than 10, you can scroll down to view more users, and the list will be refreshed every time you re-enter the page, etc.

[0163] In another specific embodiment, taking the friend interaction list as an example, since it is necessary to use interactive props for other users in the friend interaction list, only users who have started the game are displayed in the list. At this time, the user status priority in the above list generation configuration can be adjusted as follows: among the mutual friends and fans participating in the activity, the number of rewards obtained is the first priority, the level of combat power parameters is the second priority, the size of the intimacy value is the third priority, and the time of becoming a friend (fan) is the fourth priority; among the recommended users participating in the activity, the priority order of each user is still determined according to the recommendation model.

[0164] In this example implementation, by providing a general solution for multi-element sorting and abstracting a set of configurations, it is possible to support flexible online configuration and support expansion to more scenarios.

[0165] In step S430, a user account information list is generated according to the list configuration information of the user account information list and the status information of the candidate user accounts.

[0166] In this example implementation, based on the list configuration information of the user account information list and the status information of each candidate user account in the candidate user account set, list user accounts that meet the list configuration information are selected from the candidate user accounts to generate a final user account information list.

[0167] In this example implementation, Figure 5 As shown, generating a user account information list according to the list configuration information of the user account information list and the status information of the candidate user accounts may specifically include the following steps:

[0168] Step S510: Obtain the total list length of the user account information list and the sub-list lengths corresponding to each user type according to the list configuration information of the user account information list.

[0169] The total list length of the user account information list can be obtained according to the list configuration information of the user account information list. In addition, the different sub-list lengths corresponding to each user type can also be obtained. In the user account information list finally generated, the number of listed user accounts in each user type generally cannot exceed the corresponding sub-list length.

[0170] Step S520. Obtain the user type priority corresponding to each user type from the list configuration information, and in descending order of the user type priority, sequentially obtain the candidate user accounts corresponding to each user type that matches the sub-list length from the candidate user account set as list user accounts.

[0171] According to the list configuration information of the user account information list, the user type priority corresponding to different user types can also be obtained. For example, in a specific embodiment, the priority of mutual friends is higher than the priority of fans, which is higher than the priority of recommended users. User types with higher priorities will be displayed first in the user account information list.

[0172] After obtaining the user type priority and list length corresponding to each user type from the list configuration information, the candidate user accounts corresponding to each user type are sequentially obtained from the candidate user account set as list user accounts according to the user type priority and the sublist length.

[0173] Step S530: When the number of listed user accounts reaches the total list length, a user account information list is generated according to the listed user accounts and the user type priorities and status information of the listed user accounts.

[0174] When the number of list user accounts obtained from the candidate user account set reaches the total list length, a user account information list is generated based on the obtained list user accounts and the user type priority and status information of the list user accounts. If the number of users corresponding to the user type with a higher priority has reached the total list length, there is no need to obtain the user type with a lower priority.

[0175] In this example implementation, in addition to the user type having a corresponding priority, the user's status information also has a corresponding user status priority. When generating the final user account information list, for the list user accounts of the same user type, the users in the list can be sorted according to the user status priority. Specifically, the user status priority corresponding to the status information of the list user account corresponding to each user type can be obtained according to the list configuration information, and all the list user accounts can be sorted according to the user type priority and the user status priority to obtain the user account information list.

[0176] In this example implementation, by providing a candidate user pool cache and selecting corresponding candidate user accounts from the candidate user account set to generate a user account information list, the efficiency of user account information list generation can be effectively improved, the response rate can be increased, and the pressure on downstream calling services can be reduced.

[0177] The following is a detailed introduction to the method for updating the candidate user account set in the candidate user pool cache.

[0178] In this example implementation, the candidate user account set in the candidate user pool cache can be asynchronously updated according to a preset update time interval. When the candidate user pool cache reaches the update time, it can be asynchronously updated by sending a Kafka message to notify the Kafka consumer to calculate the new candidate user pool cache offline. Among them, Kafka is a high-throughput distributed publish-subscribe message system that can process all action stream data of consumers on the website. Kafka consumers are used to subscribe to topics and receive messages from Kafka, and then verify and process messages and save the results. Kafka consumers are part of a consumer group. Consumers in a consumer group subscribe to the same topic, and each consumer receives messages from a part of the partition of the topic. The design of the consumer group is a horizontal scaling of consumers to solve the problem that the speed at which consumers consume data cannot keep up with the speed at which producers produce data. By adding consumers, they can share the load and process messages from some partitions separately, thereby improving processing efficiency.

[0179] In order to ensure the real-time nature of the sorting results, the asynchronous update calculation of the candidate user pool cache is triggered in the following two cases:

[0180] 1. The candidate user pool cache is empty

[0181] When this happens, it may be the first time that the user accesses the candidate user pool cache, or it may be that the candidate user pool cache has reached its expiration time and the data in the cache has been cleared.

[0182] 2. The candidate user pool cache has not been updated for a certain period of time

[0183] At this point, it is necessary to recalculate the set of candidate user accounts in the candidate user pool cache.

[0184] In this example implementation, the method for updating the candidate user account set may specifically include the following steps:

[0185] Step S610: Obtain the time difference between the current time and the previous update time when the candidate user account set was last updated.

[0186] For the candidate user pool cache, the current time is obtained in real time, and the time difference between the current time and the previous update time when the candidate user account set was last updated is calculated.

[0187] Step S620: If the time difference is greater than or equal to the preset update time interval, the cache update configuration of the candidate user account set is obtained, and the number of candidate user accounts corresponding to each user type is obtained according to the cache update configuration.

[0188] If the time difference is greater than or equal to the preset update time interval, the candidate user pool cache has reached the preset update time, and a new candidate user account set needs to be regenerated. At this time, the list configuration information of the user account information list can be obtained, and the cache update configuration of the candidate user account set can be determined according to the list configuration information. Then, the number of candidate user accounts corresponding to each user type is obtained according to the cache update configuration. Among them, the number of candidate user accounts corresponding to each user type should be slightly more than the number of list user accounts corresponding to the user type in the final displayed list.

[0189] In this example implementation, the preset update time interval can be set to 30 minutes or other time intervals, and the update time interval can be adjusted online according to the actual traffic. When the traffic is not high and the downstream service pressure is not large, the time interval can be shortened; otherwise, the time interval can be appropriately extended.

[0190] Step S630: Obtain an original user account information list and status information corresponding to the original user account in the original user account information list.

[0191] Query the original user account information list corresponding to the current user, and obtain the status information corresponding to all original user accounts of each user type in the original user account information list.

[0192] Step S640. According to the number of candidate user accounts corresponding to each user type and the status information of the original user account, the original user account corresponding to each user type is obtained from the original user account information list as a candidate user account, and a candidate user account set is generated.

[0193] In this example implementation, the original user accounts corresponding to each user type in the original user account information list may be sorted according to the status information of the original user accounts, and based on the number of candidate user accounts corresponding to each user type and the sorting result, the original user accounts corresponding to each user type are obtained from the original user account information list as candidate user accounts to generate a candidate user account set.

[0194] In this example implementation, by providing an asynchronous update mechanism for the candidate user pool cache, a large amount of computing processes are placed in the process of generating the candidate user account set offline while ensuring the real-time performance of the sorting results, thereby improving the efficiency of generating the user account information list.

[0195] In this example implementation, when the candidate user pool cache accessed by the user is empty, in addition to triggering the offline calculation of the candidate user account set, a simplified account information list generated by the downgrade strategy is also returned for this access. The downgrade strategy weakens the sorting calculation process in order to speed up the response time of the interface as much as possible.

[0196] like Figure 7 As shown, the method for generating a simplified account information list in this example implementation may specifically include the following steps:

[0197] Step S710: In response to the request for generating a user account information list, if the candidate user account set in the candidate user pool cache is empty, the number of candidate user accounts corresponding to each user type and the user type priority are obtained according to the list configuration information.

[0198] When the server receives a request to generate a user account information list from the client, it first queries the candidate user pool cache. If the candidate user account set in the candidate user pool cache is empty, the corresponding downgrade plan is automatically executed.

[0199] First, the number of candidate user accounts corresponding to each user type and the user type priority are obtained according to the list configuration information.

[0200] Step S720. According to the number of candidate user accounts corresponding to each user type, the original user accounts corresponding to each user type are obtained from the original user account information list as simplified list user accounts.

[0201] Secondly, according to the number of candidate user accounts corresponding to each user type, the original user accounts corresponding to each user type are obtained from the original user account information list as simplified list user accounts.

[0202] Step S730: Sort the simple list user accounts according to the user type priority, and generate a simple account information list according to the sorting result.

[0203] Finally, the user accounts in the simple list are sorted according to the user type priority, and a simple account information list is generated based on the sorting results. Among them, users in each user type are not sorted by status information priority, and there is no need to query and obtain the status information of the original user account. Only the users of each type are simply spliced ​​according to the user type priority to obtain the final simple account information list and return it to the client.

[0204] In this example implementation, by providing a supporting downgrade solution, when the candidate user pool cache accessed by the user is empty, a simple account information list can be quickly generated to ensure timely response and enhance user experience.

[0205] like Figure 8 The figure is a flowchart of a candidate user pool cache update mechanism in a specific implementation mode of the present disclosure. The specific contents of the flowchart are as follows:

[0206] When a user accesses the candidate user pool cache for the first time, the original user account information list is queried, a candidate user account set is generated and put into the cache, and at the same time, a simplified account information list is generated using the downgrade strategy and returned to the client.

[0207] When the user accesses the candidate user pool cache for the second time, the candidate user account set in the candidate user pool cache can be directly obtained, and the candidate user accounts are sorted according to the list configuration information, and a user account information list is generated and returned to the client.

[0208] For other triggering opportunities, such as when the candidate user pool cache reaches the update time, the original user account information list is queried by sending Kafka messages, and the original user accounts are sorted to generate a new set of candidate user accounts and put them into the cache.

[0209] The candidate user pool cache includes three parts: friends, fans, and recommended users. The number of each part is slightly larger than the number of lists finally displayed, which is convenient for read-time sorting, enhancing the differentiation of lists and the real-time nature of sorting results.

[0210] like Fig. 9 FIG. 1 is a schematic diagram of a user account information list obtained according to a method for generating a list in a specific embodiment of the present disclosure. Fig. 9 In the user account information list shown, the list user accounts are displayed in the order of priority of friends, fans, and recommended users. For users of the same type, they can be internally sorted according to their status information.

[0211] like Fig.10 The figure is a complete flow chart of a method for generating a list in a specific implementation of the present disclosure, which is an example of a timing diagram of the above steps in this example implementation, including the logic of reading the list. The specific steps of the flow chart are as follows:

[0212] Step S1001. The server receives a list generation request.

[0213] Step S1002: Query the candidate user pool cache.

[0214] Step S1003: Obtain candidate user pool cache.

[0215] If the candidate user pool cache is empty or needs to be updated, proceed to step S1004; if the candidate user pool cache is not empty and the update time has not arrived, proceed to step S1009.

[0216] Step S1004: Send Kafka message.

[0217] If the candidate user pool cache is empty, proceed to step S1005.

[0218] Step S1005: Query the friend list.

[0219] Step S1006: Query the fan list.

[0220] Step S1007: Query the recommended user account information list.

[0221] Step S1008: splicing degradation results.

[0222] The server obtains a simplified account information list according to the downgrade strategy and returns it to the client. The downgrade strategy can be, for example: simply concatenating friends, fans, and recommended users, and no longer querying the downstream sorting data for sorting each user type.

[0223] Step S1009. Query the intimacy values ​​of friends and fans.

[0224] The server sends a query request to the intimacy value query service to query the intimacy values ​​of friends and fans in the candidate user pool cache.

[0225] Step S1010. Obtain intimacy values ​​of friends and fans.

[0226] The server receives the intimacy values ​​of friends and fans returned by the intimacy value query service.

[0227] Step S1011. Query the online status of friends and fans.

[0228] The server sends a query request to the online status query service to query the online status of friends and fans in the candidate user pool cache.

[0229] Step S1012: Obtain the online status of friends and fans.

[0230] The server receives the online status of friends and fans returned by the online status query service.

[0231] Step S1013: Sort friends’ user names.

[0232] The server sorts the userIDs (user names) of the friends in the candidate user pool cache. If the number of friends does not reach the list length, proceed to step S1014. If the number of friends reaches the list length, proceed directly to step S1016.

[0233] Step S1014: Sorting of fan user names.

[0234] When the number of friends does not reach the list length, the server sorts the userIDs of the fans in the candidate user pool cache. If the number of friends and fans does not reach the list length, proceed to step S1015. If the number of friends and fans reaches the list length, proceed directly to step S1016.

[0235] Step S1015: Join recommended users.

[0236] When the number of friends and fans in the candidate user pool cache does not reach the list length, the userID of the recommended user is concatenated.

[0237] Step S1016: Query user details.

[0238] The server sends a query request to the user details query service to query the detailed information such as the avatar and nickname of the listed user account.

[0239] Step S1017: Obtain user details.

[0240] The server receives the user details information returned by the user details query service.

[0241] Step S1018. Generate a user account information list.

[0242] The server generates the final user account information list and returns it to the client.

[0243] like Fig.11 The figure shows a complete flow chart of a method for updating a candidate user pool cache in a specific implementation of the present disclosure, including asynchronous update logic of a candidate user pool cache. The specific steps of the flow chart are as follows:

[0244] Step S1101. Receive Kafka message.

[0245] The consumer receives the message sent by Kafka and then starts updating the candidate user pool cache.

[0246] Step S1102: Query the candidate user pool cache.

[0247] Step S1103: Obtain candidate user pool cache.

[0248] Step S1104: Determine whether recalculation is required.

[0249] Determine whether the candidate user pool cache needs to be recalculated based on the update time. If necessary, proceed to the next step.

[0250] Step S1105. Query list generation configuration.

[0251] List generation configuration can include: list generation conditions, final list length, list update timing, downstream call volume, etc., which can be flexibly configured according to needs. Among them, the downstream call volume plays a role in protecting the downstream. When the number of calls to the downstream exceeds this number, subsequent requests will no longer call the downstream.

[0252] Step S1106: Obtain list generation configuration.

[0253] Step S1107: Query the friend list.

[0254] Step S1108: Query the fan list.

[0255] Step S1109. Query the intimacy values ​​of friends and fans.

[0256] Step S1110. Query the online status of friends and fans.

[0257] Step S1111. Sort friends and fans.

[0258] Step S1112. Keep a specified number of friends and fans.

[0259] Step S1113: Query the recommended user account information list.

[0260] Step S1114: Obtain a list of recommended user account information.

[0261] Step S1115: Retain a specified number of recommended users.

[0262] Step S1116: Update the candidate user pool cache.

[0263] Generate a new candidate user pool and write it to the cache.

[0264] Step S1117. End update.

[0265] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0266] It should be noted that the user information involved in this disclosure (including but not limited to user device information, user personal information, etc.) is all information authorized by the user or fully authorized by all parties.

[0267] Furthermore, the present disclosure also provides a device for generating a list. Fig.12 As shown, the list generation device may include a candidate user acquisition module 1210, a state information acquisition module 1220, and a user list generation module 1230. Among them:

[0268] The candidate user acquisition module 1210 is configured to, in response to a request for generating a user account information list, acquire a candidate user account set from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to multiple user types;

[0269] The status information acquisition module 1220 is configured to acquire list configuration information of the user account information list, and acquire status information of the candidate user account according to the list configuration information and the user type;

[0270] The user list generating module 1230 is configured to generate a user account information list according to the list configuration information of the user account information list and the status information of the candidate user accounts.

[0271] In some exemplary embodiments of the present disclosure, the user list generation module 1230 may include a list length determination unit, a list user account acquisition unit, and a user account information list generation unit. Among them:

[0272] The list length determination unit is configured to obtain the total list length of the user account information list and the sub-list length corresponding to each user type according to the list configuration information of the user account information list;

[0273] The list user account acquisition unit is configured to acquire the user type priority corresponding to each user type from the list configuration information, and sequentially acquire the candidate user accounts corresponding to each user type matching the sub-list length from the candidate user account set in descending order of the user type priority as the list user account;

[0274] The user account information list generating unit is configured to generate a user account information list according to the listed user accounts and the user type priorities and status information of the listed user accounts when the number of the listed user accounts reaches the total list length.

[0275] In some exemplary embodiments of the present disclosure, the user account information list generation may include a status priority determination unit and a list user account ranking unit.

[0276] The status priority determination unit is configured to obtain the user status priority corresponding to the status information of the list user account corresponding to each user type according to the list configuration information;

[0277] The list user account sorting unit is configured to sort all the list user accounts according to the user type priority and the user status priority to obtain a user account information list.

[0278] In some exemplary embodiments of the present disclosure, a list generating device provided by the present disclosure may further include a cache update module configured to asynchronously update the set of candidate user accounts in the candidate user pool cache according to a preset update time interval.

[0279] In some exemplary embodiments of the present disclosure, the cache update module may include an update time difference determination unit, a user quantity determination unit, a user acquisition unit, and a candidate set generation unit.

[0280] The update time difference determination unit is configured to obtain a time difference between a current time and a previous update time when the candidate user account set was last updated;

[0281] The user quantity determination unit is configured to obtain a cache update configuration of the candidate user account set if the time difference is greater than or equal to a preset update time interval, and obtain the number of candidate user accounts corresponding to each user type according to the cache update configuration;

[0282] The user acquisition unit is configured to acquire an original user account information list and status information corresponding to the original user account in the original user account information list;

[0283] The candidate set generation unit is configured to obtain the original user accounts corresponding to each user type from the original user account information list as candidate user accounts according to the number of candidate user accounts corresponding to each user type and the status information of the original user accounts, and generate a candidate user account set.

[0284] In some exemplary embodiments of the present disclosure, the user quantity determination unit may include a cache update configuration determination unit configured to obtain list configuration information of the user account information list and determine the cache update configuration of the candidate user account set according to the list configuration information.

[0285] In some exemplary embodiments of the present disclosure, the candidate set generation unit may include an original user account ranking unit and a candidate user account determination unit.

[0286] The original user account sorting unit is configured to sort the original user accounts corresponding to each user type in the original user account information list according to the status information of the original user accounts;

[0287] The candidate user account determination unit is configured to obtain original user accounts corresponding to each user type from the original user account information list as candidate user accounts according to the number of candidate user accounts corresponding to each user type and the ranking result, and generate a candidate user account set.

[0288] In some exemplary embodiments of the present disclosure, a list generation device provided by the present disclosure may further include a user priority acquisition module, a simple list user account determination module, and a simple account information list generation module. Among them:

[0289] The user priority acquisition module is configured to respond to a request for generating a user account information list, and if the candidate user account set in the candidate user pool cache is empty, acquire the number of candidate user accounts corresponding to each user type and the user type priority according to the list configuration information;

[0290] The simplified list user account determination module is configured to obtain the original user account corresponding to each user type from the original user account information list as the simplified list user account according to the number of candidate user accounts corresponding to each user type;

[0291] The simple account information list generating module is configured to sort the simple list user accounts according to the user type priority, and generate a simple account information list according to the sorting result.

[0292] The specific details of each module / unit in the above-mentioned list generation device have been described in detail in the corresponding method embodiment part, and will not be repeated here.

[0293] Fig.13 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.

[0294] It should be noted that Fig.13 The computer system 1300 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0295] like Fig.13 As shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage part 1308 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for system operation are also stored. The CPU 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0296] The following components are connected to the I / O interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed, so that a computer program read therefrom is installed into the storage section 1308 as needed.

[0297] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1309, and / or installed from a removable medium 1311. When the computer program is executed by a central processing unit (CPU) 1301, various functions defined in the system of the present application are executed.

[0298] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0299] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0300] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0301] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules described above can be concretized in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be concretized.

[0302] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0303] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating a list, characterized in that: include: In response to a request for generating a user account information list, obtaining a candidate user account set from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to multiple user types; Acquire list configuration information of the user account information list, and acquire status information of the candidate user account according to the list configuration information and the user type; Obtaining, according to the list configuration information of the user account information list, the total list length of the user account information list and the sub-list length corresponding to each of the user types; Acquire the user type priority corresponding to each of the user types from the list configuration information, and sequentially acquire, in descending order of the user type priority, candidate user accounts corresponding to each of the user types that match the sub-list length from the candidate user account set as list user accounts; When the number of the listed user accounts reaches the total list length, the user account information list is generated according to the listed user accounts and the user type priorities and status information of the listed user accounts.

2. The method for generating a list according to claim 1, characterized in that: The generating the user account information list according to the listed user accounts and the user type priority and status information of the listed user accounts includes: Obtaining the user status priority corresponding to the status information of the list user account corresponding to each of the user types according to the list configuration information; All the listed user accounts are sorted according to the user type priority and the user status priority to obtain the user account information list.

3. The method for generating a list according to claim 1, characterized in that: It is characterized in that The method further comprises: The candidate user account set in the candidate user pool cache is asynchronously updated according to a preset update time interval.

4. The method for generating a list according to claim 3, characterized in that: The method for updating the candidate user account set includes: Obtaining a time difference between the current time and a previous update time when the candidate user account set was last updated; If the time difference is greater than or equal to the preset update time interval, obtaining a cache update configuration of the candidate user account set, and obtaining the number of candidate user accounts corresponding to each user type according to the cache update configuration; Obtaining an original user account information list and status information corresponding to the original user accounts in the original user account information list; According to the number of candidate user accounts corresponding to each of the user types and the status information of the original user accounts, the original user accounts corresponding to each of the user types are obtained from the original user account information list as the candidate user accounts, and the candidate user account set is generated.

5. The method for generating a list according to claim 4, characterized in that: The obtaining of the cache update configuration of the candidate user account set includes: Obtain list configuration information of the user account information list, and determine a cache update configuration of the candidate user account set according to the list configuration information.

6. The method for generating a list according to claim 4, characterized in that: The acquiring, according to the number of candidate user accounts corresponding to each of the user types and the status information of the original user account, the original user account corresponding to each of the user types from the original user account information list as the candidate user account, and generating the candidate user account set, comprises: sorting the original user accounts corresponding to the user types in the original user account information list according to the status information of the original user accounts; According to the number of candidate user accounts corresponding to each of the user types and the ranking result, the original user accounts corresponding to each of the user types are obtained from the original user account information list as the candidate user accounts, and the candidate user account set is generated.

7. The method for generating a list according to claim 1, characterized in that: The method further comprises: In response to the request for generating the user account information list, if the candidate user account set in the candidate user pool cache is empty, obtaining the number of candidate user accounts corresponding to each user type and the user type priority according to the list configuration information; According to the number of candidate user accounts corresponding to each user type, the original user account corresponding to each user type is obtained from the original user account information list as a simplified list user account; The simple list user accounts are sorted according to the user type priority, and a simple account information list is generated according to the sorting result.

8. A device for generating a list, characterized in that: include: A candidate user acquisition module is configured to execute, in response to a request for generating a user account information list, acquiring a candidate user account set from a candidate user pool cache, wherein the candidate user account set includes candidate user accounts corresponding to a plurality of user types; a status information acquisition module, configured to execute acquisition of list configuration information of the user account information list, and acquire the status information of the candidate user account according to the list configuration information and the user type; The user list generation module is configured to execute the steps of obtaining the total list length of the user account information list and the sub-list length corresponding to each of the user types according to the list configuration information of the user account information list; obtaining the user type priority corresponding to each of the user types from the list configuration information, and obtaining, in descending order of the user type priority, candidate user accounts corresponding to each of the user types that match the sub-list length from the candidate user account set as list user accounts; and generating the user account information list according to the list user accounts and the user type priority and status information of the list user accounts when the number of the list user accounts reaches the total list length.

9. The list generating device according to claim 8, characterized in that: The user list generation module includes: A status priority determination unit is configured to execute, according to the list configuration information, obtaining a user status priority corresponding to the status information of the list user account corresponding to each of the user types; The list user account sorting unit is configured to sort all the list user accounts according to the user type priority and the user status priority to obtain the user account information list.

10. The list generating device according to claim 8, characterized in that: Also includes: The cache update module is configured to perform asynchronous update of the candidate user account set in the candidate user pool cache according to a preset update time interval.

11. The list generating device according to claim 10, characterized in that: The cache update module includes: an update time difference determining unit, configured to execute obtaining a time difference between a current time and a previous update time when the candidate user account set was last updated; A user quantity determination unit is configured to execute, if the time difference is greater than or equal to the preset update time interval, obtaining a cache update configuration of the candidate user account set, and obtaining the number of candidate user accounts corresponding to each of the user types according to the cache update configuration; A user acquisition unit, configured to acquire an original user account information list and status information corresponding to the original user account in the original user account information list; The candidate set generating unit is configured to obtain the original user account corresponding to each of the user types from the original user account information list as the candidate user account according to the number of candidate user accounts corresponding to each of the user types and the status information of the original user account, and generate the candidate user account set.

12. The list generating device according to claim 11, characterized in that: The user quantity determination unit comprises: The cache update configuration determining unit is configured to obtain list configuration information of the user account information list, and determine the cache update configuration of the candidate user account set according to the list configuration information.

13. The list generating device according to claim 11, characterized in that: The candidate set generating unit comprises: an original user account sorting unit, configured to sort the original user accounts corresponding to the respective user types in the original user account information list according to the status information of the original user accounts; The candidate user account determination unit is configured to obtain the original user account corresponding to each of the user types from the original user account information list as the candidate user account according to the number of candidate user accounts corresponding to each of the user types and the ranking result, and generate the candidate user account set.

14. The list generating device according to claim 8, characterized in that: Also includes: A user priority acquisition module, configured to execute in response to the request for generating the user account information list, and if the candidate user account set in the candidate user pool cache is empty, obtain the number of candidate user accounts corresponding to each user type and the user type priority according to the list configuration information; A simplified list user account determination module is configured to obtain, from the original user account information list, original user accounts corresponding to each of the user types as simplified list user accounts according to the number of candidate user accounts corresponding to each of the user types; The simple account information list generating module is configured to sort the simple list user accounts according to the user type priority, and generate a simple account information list according to the sorting result.

15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for generating a list as claimed in any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for generating a list as claimed in any one of claims 1 to 7.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for generating a list according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Dynamic contacts list management

    CN102822811A