CN113901091A - Method, apparatus, electronic device, and computer-readable medium for generating a list - Google Patents
Method, apparatus, electronic device, and computer-readable medium for generating a list Download PDFInfo
- Publication number
- CN113901091A CN113901091A CN202111376327.5A CN202111376327A CN113901091A CN 113901091 A CN113901091 A CN 113901091A CN 202111376327 A CN202111376327 A CN 202111376327A CN 113901091 A CN113901091 A CN 113901091A
- Authority
- CN
- China
- Prior art keywords
- list
- user
- user account
- candidate
- candidate user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2457—Query processing with adaptation to user needs
- G06F16/24578—Query processing with adaptation to user needs using ranking
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/01—Social networking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Economics (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure relates to a list generation method and device, electronic equipment and a computer readable medium, and belongs to the technical field of internet. The method comprises the following steps: responding to a generation request of a user account information list, and acquiring a candidate user account set from a candidate user pool cache, wherein the candidate user account set comprises candidate user accounts of a plurality of user types; acquiring state information of a 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 state information of the candidate user accounts. According to the method and the device, the candidate user account set is provided in the candidate user pool cache, and when the list generation request is received, the user account information list can be directly generated according to the candidate user accounts in the candidate user account set, so that the generation efficiency of the user account information list is effectively improved, and the pressure of downstream calling service is reduced.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a list generation method, a list generation apparatus, an electronic device, and a computer-readable medium.
Background
In many application software, a function of inviting a friend or interacting with the friend is required, so that a corresponding friend list needs to be generated in real time according to the online condition or other states of the friend for a user to select.
In the prior art, when a buddy list is generated each time, state information of all buddies needs to be acquired and a complete sorting process is performed once, so that the list generation efficiency is low, and a user request cannot be responded in time.
In view of the above, there is a need in the art for a method that can improve the list generation efficiency.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a list generation method, a list generation device, an electronic apparatus, and a computer-readable medium, which can improve the efficiency of list generation at least to some extent.
According to a first aspect of the present disclosure, there is provided a list generation method, including:
responding to a generation request of a user account information list, and acquiring a candidate user account set from a candidate user pool cache, wherein the candidate user account set comprises candidate user accounts corresponding to a plurality of user types;
acquiring list configuration information of the user account information list, and acquiring state information of the candidate user account according to the list configuration information and the user type;
and 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.
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 status information of the candidate user account includes:
obtaining 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;
acquiring user type priorities corresponding to the user types from the list configuration information, and sequentially acquiring candidate user accounts corresponding to the user types matched with the sub-list length from the candidate user account set as list user accounts according to the sequence of the user type priorities from high to low;
and when the number of the list user accounts reaches the length of the total list, generating the user account information list according to the list user accounts and the user type priority and state information of the list user accounts.
In an exemplary embodiment of the present disclosure, the generating the user account information list according to the list user account and the user type priority and status information of the list user account includes:
obtaining user state priorities corresponding to the state information of the list user accounts corresponding to the user types according to the list configuration information;
and sequencing all the list user accounts according to the user type priority and the user state priority to obtain the user account information list.
In an exemplary embodiment of the present disclosure, the method further includes:
and asynchronously updating the candidate user account set in the cache of the candidate user pool according to a preset updating time interval.
In an exemplary embodiment of the present disclosure, the method for updating the candidate user account set includes:
obtaining a time difference between a current time and a previous update time when the candidate user account set was updated last time;
if the time difference is greater than or equal to the preset updating time interval, acquiring cache updating configuration of the candidate user account set, and obtaining the number of candidate user accounts corresponding to each user type according to the cache updating configuration;
acquiring an original user account information list and state information corresponding to an original user account in the original user account information list;
and according to the number of the candidate user accounts corresponding to each user type and the state information of the original user accounts, acquiring the original user accounts corresponding to each user type from the original user account information list as the candidate user accounts, and generating the candidate user account set.
In an exemplary embodiment of the disclosure, the obtaining of the cache update configuration of the candidate user account set includes:
and acquiring list configuration information of the user account information list, and determining cache updating configuration of the candidate user account set according to the list configuration information.
In an exemplary embodiment of the present disclosure, the acquiring, 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 from the original user account information list as the candidate user account, and generating the candidate user account set includes:
sequencing original user accounts corresponding to the user types in the original user account information list according to the state information of the original user accounts;
and according to the number of the candidate user accounts corresponding to each user type and the sequencing result, acquiring the original user account corresponding to each user type from the original user account information list as the candidate user account, and generating the candidate user account set.
In an exemplary embodiment of the present disclosure, the method further comprises:
responding to a generation request of the user account information list, and if the candidate user account set in the candidate user pool cache is empty, acquiring the number of candidate user accounts corresponding to each user type and user type priority according to the list configuration information;
acquiring original user accounts corresponding to the user types from an original user account information list according to the number of the candidate user accounts corresponding to the user types to serve as simple list user accounts;
and sorting the user accounts of the simple list according to the user type priority, and generating a simple account information list according to a sorting result.
According to a second aspect of the present disclosure, there is provided a list generation apparatus, including:
the candidate user acquisition module is configured to execute a generation request responding to a user account information list and acquire a candidate user account set from a candidate user pool cache, wherein the candidate user account set comprises candidate user accounts corresponding to a plurality of user types;
the state information acquisition module is configured to execute the acquisition of list configuration information of the user account information list and acquire the state information of the candidate user account according to the list configuration information and the user type;
a user list generation module configured to perform generation of the user account information list according to list configuration information of the user account information list and status information of the candidate user accounts.
In an exemplary embodiment of the present disclosure, the user list generating module includes:
the list length determining 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;
the list user account acquisition unit is configured to execute the steps of acquiring user type priorities corresponding to the user types from the list configuration information, and sequentially acquiring candidate user accounts corresponding to the user types matched with the sub-list length from the candidate user account set as list user accounts according to the sequence from high to low of the user type priorities;
and the user account information list generating unit is configured to execute the step of generating the user account information list according to the list user accounts and the user type priority and the state information of the list user accounts when the number of the list user accounts reaches the total list length.
In an exemplary embodiment of the present disclosure, the user account information list generating unit includes:
the state priority determining unit is configured to execute user state priority corresponding to the state information of the list user account corresponding to each user type according to the list configuration information;
and the list user account sorting unit is configured to sort all the list user accounts according to the user type priority and the user state priority to obtain the user account information list.
In an exemplary embodiment of the present disclosure, further comprising:
and the cache updating module is configured to perform asynchronous updating on the candidate user account set in the cache of the candidate user pool according to a preset updating time interval.
In an exemplary embodiment of the present disclosure, the cache update module includes:
an update time difference determination unit configured to perform obtaining a time difference between a current time and a previous update time when the set of candidate user accounts was last updated;
the user number determining unit is configured to execute cache updating configuration of the candidate user account set if the time difference is greater than or equal to the preset updating time interval, and obtain the number of the candidate user accounts corresponding to each user type according to the cache updating configuration;
the system comprises a user acquisition unit, a state information acquisition unit and a state information acquisition unit, wherein the user acquisition unit is configured to acquire an original user account information list and state information corresponding to an original user account in the original user account information list;
and the candidate set generating unit is configured to execute acquiring, according to the number of candidate user accounts corresponding to each user type and the state information of the original user account, the original user account corresponding to each user type from the original user account information list as the candidate user account, and generate the candidate user account set.
In an exemplary embodiment of the present disclosure, the user number determination unit includes:
and the cache updating configuration determining unit is configured to execute the steps of obtaining the list configuration information of the user account information list and determining the cache updating configuration of the candidate user account set according to the list configuration information.
In an exemplary embodiment of the present disclosure, the candidate set generating unit includes:
the original user account sorting unit is configured to execute sorting of original user accounts corresponding to the user types in the original user account information list according to the state information of the original user accounts;
and the candidate user account determining unit is configured to execute acquiring, according to the number of candidate user accounts corresponding to each user type and the sorting result, an original user account corresponding to each user type from the original user account information list as the candidate user account, and generate the candidate user account set.
In an exemplary embodiment of the present disclosure, further comprising:
a user priority obtaining module configured to execute a request for generating a user account information list in response to the request, and if the candidate user account set in the candidate user pool cache is empty, obtain the number of candidate user accounts and user type priority corresponding to each user type according to the list configuration information;
the abbreviated list user account determining module is configured to execute acquiring original user accounts corresponding to the user types from an original user account information list as abbreviated list user accounts according to the number of the candidate user accounts corresponding to the user types;
and the simple account information list generation module is configured to execute sorting of the simple list user accounts according to the user type priority and generate a simple account information list according to a sorting result.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the list generation method of any one of the above.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of generating a list as described in any one of the above.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of generating a list of any of the above.
The exemplary embodiments of the present disclosure may have the following advantageous effects:
in the list generation method according to the exemplary embodiment of the present disclosure, one candidate user account set is provided in the candidate user pool cache, and when the server receives a generation request of the user account information list, the server may directly select a corresponding candidate user account from the candidate user account set according to the list configuration information and the state information of the candidate user account to generate the user account information list. On one hand, the list generation method in the disclosed example embodiment selects a corresponding candidate user account from the candidate user account set to generate the user account information list by providing the candidate user pool cache, so that the generation efficiency of the user account information list can be effectively improved, the response rate is improved, and the pressure of downstream calling service is reduced; on the other hand, a set of list generation configuration is abstracted, so that the online flexible configuration can be supported, and the expansion to more scenes can be supported.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a flow chart diagram illustrating a method of generating a list in a related embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of a method of list generation in another related embodiment of the present disclosure;
FIG. 3 is a diagram illustrating an exemplary system architecture to which a list generation method and apparatus of embodiments of the present disclosure may be applied;
FIG. 4 shows a flow diagram of a method of generating a list of example embodiments of the present disclosure;
FIG. 5 illustrates a flowchart of generating a list of user account information based on list configuration information and status information of candidate user accounts according to an example embodiment of the present disclosure;
FIG. 6 illustrates a flowchart of an asynchronous update of a set of candidate user accounts in a cache of a candidate user pool in an example embodiment of the present disclosure;
FIG. 7 illustrates a flowchart of generating a list of easy account information according to a destage policy, according to an example embodiment of the present disclosure;
FIG. 8 is a block flow diagram of a candidate user pool cache update mechanism in accordance with an embodiment of the present disclosure;
fig. 9 schematically shows a schematic diagram of a user account information list obtained by a list generation method according to an embodiment of the present disclosure.
FIG. 10 is a flow chart diagram illustrating a method of generating a list in an embodiment of the present disclosure;
FIG. 11 is a flow chart diagram illustrating a method for updating a candidate user pool cache in an embodiment of the present disclosure;
fig. 12 shows a block diagram of a list generation apparatus of an example embodiment of the present disclosure;
FIG. 13 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein.
The following example embodiments may be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In many application software, a function of inviting a friend or interacting with the friend is required, so that a corresponding friend list needs to be generated in real time according to the online condition or other states of the friend for a user to select.
Fig. 1 is a complete flow chart of a list generation method in a related embodiment of the present disclosure, and the specific steps of the flow chart are as follows:
step S101, a server receives a list generation request.
And S102, inquiring the intimacy values of friends and fans.
And the server sends a query request to the intimacy value query service to query the intimacy values of the friends and the fans.
And S103, acquiring the intimacy values of friends and vermicelli.
And the server receives the intimacy values of the friends and the fans returned by the intimacy value query service.
And S104, inquiring the online states of the friends and the fans.
And the server sends a query request to the online state query service to query the online states of the friends and the fans.
And S105, acquiring the online states of friends and fans.
And the server receives the online states of the friends and fans returned by the online state query service.
And S106, sequencing friend user names.
The server orders the userID (user name) of the buddy. If the number of buddies does not reach the length of the list, step S107 is entered. If the number of friends reaches the length of the list, the process goes directly to step S109.
And S107, sequencing the fan user names.
And when the number of the friends does not reach the length of the list, the server sorts the userIDs of the fans. If the number of friends and fans does not reach the length of the list, step S108 is entered. If the number of friends and fans reaches the length of the list, the process goes directly to step S109.
And S108, splicing and recommending the user.
And splicing the userID of the recommended user when the number of the friends and the fans does not reach the length of the list.
And S109, inquiring user details.
And the server sends a query request to the user detail query service to query the list of detail information such as the head portrait, the nickname and the like of the user account.
And S110, obtaining user details.
And the server receives the user detail information returned by the user detail inquiry service.
And S111, generating a user account information list.
And the server generates a final user account information list and returns the final user account information list to the client.
The above-described related embodiment as shown in fig. 1 has the following disadvantages:
1. and a cache mechanism is lacked, a complete sequencing process needs to be carried out once for each query, and the flow of an interface layer is transmitted to downstream services in a ratio of 1:1, such as affinity numerical query service, online state query service and the like. When the downstream capacity is small, the usage scenario is limited.
2. All candidate elements participate in sequencing, and when the number of the candidate elements is large, the response time of the interface is slow, so that the user experience is influenced.
Fig. 2 is a complete flow chart of a list generation method in another related embodiment of the present disclosure, and the specific steps of the flow chart are as follows:
step S201. the server receives a list generation request.
Step S202, inquiring the user account information list cache.
And S203, obtaining a user account information list for caching.
If the user account information list cache is not empty, the process proceeds to step S204 directly. If the user account information list cache is empty, the process proceeds to step S205.
And S204, returning the cache data.
And the server directly returns the user account information list in the cache to the client.
And S205, inquiring the intimacy values of friends and fans.
And the server sends a query request to the intimacy value query service to query the intimacy values of the friends and the fans.
And S206, acquiring the intimacy values of friends and vermicelli.
And the server receives the intimacy values of the friends and the fans returned by the intimacy value query service.
And S207, inquiring the online states of friends and fans.
And the server sends a query request to the online state query service to query the online states of the friends and the fans.
And S208, acquiring the online states of friends and fans.
And the server receives the online states of the friends and fans returned by the online state query service.
And S209, sequencing friend user names.
The server orders the userID (user name) of the buddy. If the number of friends does not reach the length of the list, step S210 is entered. If the number of friends reaches the length of the list, the process goes directly to step S212.
And S210, sequencing fan user names.
And when the number of the friends does not reach the length of the list, 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 length of the list, the process goes directly to step S212.
And S211, splicing and recommending the user.
And splicing the userID of the recommended user when the number of the friends and the fans does not reach the length of the list.
Step S212, user details are inquired.
And the server sends a query request to the user detail query service to query the list of detail information such as the head portrait, the nickname and the like of the user account.
And S213, acquiring user details.
And the server receives the user detail information returned by the user detail inquiry service.
And S214, generating a user account information list.
And the server generates a final user account information list and returns the final user account information list to the client.
The disadvantages present in the related embodiment as shown in fig. 2 are: the method lacks a cache updating mechanism, the cache updating depends on the expiration of the cache, and the user sees the ordered result of the historical data. And when the cache is empty, generating a new copy of data according to the current request, and writing the new copy of data into the cache. When the user accesses next time, the list generated before is actually read, so the user experience is not good.
Fig. 3 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a list generation method and apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 3, the system architecture 300 may include multiple ones of the mobile terminals 301, 302, 303, a network 304, and a server 305. The network 304 serves as a medium for providing communication links between the mobile terminals 301, 302, 303 and the server 305. Network 304 may include various connection types such as wireless communication links and the like.
It should be understood that the number of mobile terminals, networks, and servers in fig. 3 is merely illustrative. There may be any number of mobile terminals, networks, and servers, as desired for implementation. For example, server 305 may be a server cluster comprised of multiple servers, or the like.
The mobile terminals 301, 302, 303 may be various electronic devices having a processor including, but not limited to, smart phones, tablet computers, portable computers, and the like. Server 305 may be a server that provides various services. For example, the mobile terminal 301, 302, 303 may send a request for generation of a list of user account information 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, obtain status information of the candidate user account according to the list configuration information and the user type, 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 terminal 301, 302, 303.
The present exemplary embodiment first provides a list generation method. Referring to fig. 4, the method for generating the list may include the following steps:
step 410, responding to a generation request of a user account information list, and obtaining a candidate user account set from a candidate user pool cache, wherein the candidate user account set comprises candidate user accounts corresponding to a plurality of user types.
Step S420, list configuration information of the user account information list is obtained, and state information of the candidate user accounts is obtained according to the list configuration information and the user types.
And S430, generating a user account information list according to the list configuration information of the user account information list and the state information of the candidate user accounts.
In the list generation method according to the exemplary embodiment of the present disclosure, one candidate user account set is provided in the candidate user pool cache, and when the server receives a generation request of the user account information list, the server may directly select a corresponding candidate user account from the candidate user account set according to the list configuration information and the state information of the candidate user account to generate the user account information list. On one hand, the list generation method in the disclosed example embodiment selects a corresponding candidate user account from the candidate user account set to generate the user account information list by providing the candidate user pool cache, so that the generation efficiency of the user account information list can be effectively improved, the response rate is improved, and the pressure of downstream calling service is reduced; on the other hand, a set of list generation configuration is abstracted, so that the online flexible configuration can be supported, and the expansion to more scenes can be supported.
Next, the above steps of the present exemplary embodiment will be described in more detail with reference to fig. 5 to 7.
In step S410, in response to a request for generating a user account information list, a candidate user account set is obtained from the candidate user pool cache, where the candidate user account set includes candidate user accounts corresponding to multiple user types.
In this exemplary embodiment, a user may send a request for generating a user account information list to a server through a client, and then display a corresponding user account information list on a client interface according to information returned by the server. For example, the user may open the control by clicking a user account information list on the client interface, and send a request for generating the user account information list to the server.
When receiving a request for generating a user account information list sent by a client, a server firstly queries a candidate user pool cache, wherein the candidate user pool cache is used for storing a candidate user account set which is updated regularly according to a certain preset time interval. And if the cache of the candidate user pool is not empty, acquiring a latest candidate user account set from the cache of the candidate user pool, wherein the candidate user account set comprises candidate user accounts corresponding to a plurality of user types, and the user types can comprise related friends, fans, recommended users and the like.
The candidate user pool cache may select a Remote Dictionary service (Redis) for storage, and the specific storage content may be binary data serialized by Protobuf, where Protobuf is a protocol of a platform-independent, language-independent, extensible, lightweight, and efficient serialized data structure, and may be used for network communication and data storage. By the storage in the mode, the storage space can be saved, the network bandwidth is reduced, and the data reading speed is increased.
The candidate user account set can be asynchronously updated according to a certain updating strategy and a preset time interval, during each updating, candidate user accounts corresponding to user types meeting certain conditions are obtained from the user account information list and are placed in a cache, and the number of the candidate user accounts corresponding to each user type is slightly more than that finally displayed in the list, so that the differentiation and the sorting instantaneity of the list are ensured.
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.
In this exemplary embodiment, the list generation configuration may include configuration information such as a list generation condition and a final list length, where the list generation condition may include selection of a user type, setting of user type priority when the list is presented, setting of user state priority, and the like, and may be set by specific parameters. For different applications or different activities, the corresponding list generation configuration may be different and needs to be specifically determined according to actual requirements.
The status information of the candidate user account may include an online status of the candidate user account, an affinity value with the current user, a time to be a friend with the current user, a fighting power value in the game, a game level, a number of game awards earned, and the like. Different user status information may be included for different user types.
The list configuration information may include information about the cache of the candidate user pool, in addition to the relevant configuration for list generation. The list generation related parameters may be, for example: the number of final displays of the list, whether the identification of the online user needs to be filtered, the reserved cache when the user is queried, the public character judgment condition (such as the number of fans), the maximum number of friends and fans, the condition of fan adding (such as the number of friends is less than 20), the number of fans most contained in the list, the condition of a recommended user adding (such as the number of friends and fans is less than 20), the maximum number of the recommended user and the like. The relevant parameters of the candidate user pool cache may be, 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, cache expiration time, a cache update time interval, the number of queries in each batch when inquiring the online state of the user, the timeout time when inquiring the online state of the user, the number of queries in each batch when inquiring the fighting capacity of the user, the number of queries in each batch when inquiring the number of medals of the user, and the like.
In a specific embodiment, taking a friend mutual help list as an example, specific contents of list generation configuration are as follows:
first, the user types shown in the list may include three types, i.e., a related friend participating in the activity, a fan participating in the activity, and a recommended user participating in the activity, where the related friend participating in the activity is of a first priority, the fan participating in the activity is of a second priority, and the recommended user participating in the activity is of a third priority.
Secondly, for each user type, different user state priorities can be set, for example, in the related friends and fans participating in the activity, whether the user is online is the first priority, the degree of affinity value is the second priority, and the time of becoming friends (fans) is the third priority; among the recommending users participating in the activity, the priority order of the users can be determined according to a recommendation model.
In addition, it is also possible to set a relevant condition of list generation, for example, to add fans when the number of the related friends participating in the activity in the list is less than 20, or to add recommended users when the sum of the related friends and fans participating in the activity in the list is less than 20, and also to have an upper limit number of presentations per user type, and the like.
In addition, some basic display logic of the list may be set, for example, the list may be slid down to view more users when the number of currently displayed pages is greater than 10, and the list may be refreshed each time it re-enters, etc.
In another specific embodiment, taking the friend interaction list as an example, only users who have started a game are shown in the list because the interactive props need to be used for other users in the friend interaction list. At this time, the user status priority in the above list generation configuration may be adjusted as follows: in the related friends and fans participating in the activity, the number of acquired rewards is the first priority, the level of the fighting capacity parameter is the second priority, the degree of the intimacy value is the third priority, and the time of the friends (fans) is the fourth priority; among the recommending users participating in the activity, the priority order of the users is still determined according to the recommending model.
In the exemplary embodiment, by providing a multi-element ordering general solution and abstracting a set of configuration, online flexible configuration can be supported, and expansion to more scenes can be supported.
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.
In this exemplary embodiment, a list user account satisfying the list configuration information is selected from the candidate user accounts according to 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, and a final user account information list is generated.
In this exemplary embodiment, as shown in fig. 5, generating 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 may specifically include the following steps:
step 510, obtaining 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.
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, different sub-list lengths corresponding to each user type can also be obtained, and in the finally generated user account information list, the list user account number in each user type generally cannot exceed the corresponding sub-list length.
And S520, acquiring user type priorities corresponding to the user types from the list configuration information, and sequentially acquiring candidate user accounts corresponding to the user types matched with the sub-list length from the candidate user account set as list user accounts according to the sequence of the user type priorities from high to low.
According to the list configuration information of the user account information list, user type priorities corresponding to different user types can be obtained, for example, in a specific embodiment, the priority of the correlated friends is greater than the priority of the fans and is greater than the priority of the recommended users. The user type with high priority is preferentially shown in the user account information list.
And after the user type priority and the list length corresponding to each user type are obtained from the list configuration information, the candidate user accounts corresponding to each user type are sequentially obtained from the candidate user account set as the list user accounts according to the user type priority and the sub-list length.
And S530, when the number of the list user accounts reaches the length of the total list, generating a user account information list according to the list user accounts and the user type priority and state information of the list user accounts.
And when the number of the list user accounts acquired from the candidate user account set reaches the total list length, generating a user account information list according to the acquired list user accounts and the user type priority and state information of the list user accounts. And if the number of the users corresponding to the user type with higher priority reaches the total list length, the user type with lower priority does not need to be acquired.
In this exemplary embodiment, in addition to the user type having the corresponding priority, the status information of the user also has the 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 may be sorted according to the user status priority. Specifically, the user status priority corresponding to the status information of the list user accounts corresponding to each user type can be obtained according to the list configuration information, and all the list user accounts are sorted according to the user type priority and the user status priority to obtain the user account information list.
In the embodiment of the present invention, by providing the candidate user pool cache and selecting the corresponding candidate user account from the candidate user account set to generate the user account information list, the efficiency of generating the user account information list can be effectively improved, the response rate is improved, and the pressure of downstream service invocation is reduced.
The following describes in detail an update method of a candidate user account set in a cache of a candidate user pool.
In this example embodiment, the candidate user account set in the candidate user pool cache may be asynchronously updated according to a preset update time interval. When the candidate user pool cache reaches the updating time, the Kafka message is sent to play a role of asynchronous updating, and a Kafka consumer is informed to calculate a new candidate user pool cache offline. Kafka, among other things, is a high-throughput distributed publish-subscribe messaging system that can handle all the action flow data of a consumer in a web site. Kafka consumers subscribe to topics and receive Kafka's messages, then validate and process the 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 portion of the topic. The design of the consumer group is a horizontal expansion and contraction for consumers, the problem that the consumption speed of the consumers cannot keep pace with the production speed of the producer data is solved, the consumers can share the load by increasing the number of the consumers, and the partial partitioned messages are respectively processed, so that the processing efficiency is improved.
In order to ensure the real-time performance of the sorting result, the asynchronous update calculation of the cache of the candidate user pool is triggered under the following two conditions:
1. the buffer of the candidate user pool is empty
When the situation occurs, the user may access the candidate user pool cache for the first time, or the candidate user pool cache reaches the expiration time, and the data in the cache is cleaned.
2. The candidate user pool caches the updates for a certain time
At this time, the candidate user account set in the candidate user pool cache needs to be recalculated.
In this exemplary embodiment, the method for updating the candidate user account set may specifically include the following steps:
step S610, obtaining the time difference between the current time and the previous updating time when the candidate user account set is updated last time.
And for the candidate user pool cache, acquiring the current time in real time, and calculating the time difference between the current time and the previous updating time when the candidate user account set is updated last time.
And S620, if the time difference is larger than or equal to the preset updating time interval, acquiring the cache updating configuration of the candidate user account set, and obtaining the number of the candidate user accounts corresponding to each user type according to the cache updating configuration.
If the time difference is greater than or equal to the preset updating time interval, the cache of the candidate user pool reaches the preset updating time, and a new candidate user account set needs to be generated again. At this time, list configuration information of the user account information list may be acquired, and cache update configuration of the candidate user account set may be determined according to the list configuration information. And then, obtaining the number of the candidate user accounts corresponding to each user type according to the cache updating configuration. The number of the candidate user accounts corresponding to each user type is slightly more than the number of the list user accounts corresponding to the user types in the list displayed finally.
In this exemplary embodiment, the preset update time interval may be set to 30 minutes or other time intervals, and the update time interval may be adjusted on-line according to the actual flow rate. When the flow is not high and the downstream service pressure is not large, the time interval can be shortened; conversely, the time interval may be extended appropriately.
Step S630, an original user account information list and state information corresponding to an original user account in the original user account information list are obtained.
And inquiring an original user account information list corresponding to the current user, and acquiring state information corresponding to all original user accounts of all user types in the original user account information list.
And step 640, acquiring the original user accounts corresponding to the user types from the original user account information list as candidate user accounts according to the number of the candidate user accounts corresponding to the user types and the state information of the original user accounts, and generating a candidate user account set.
In this example embodiment, 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 the original user accounts corresponding to each user type may be acquired from the original user account information list as candidate user accounts according to the number of the candidate user accounts corresponding to each user type and the sorting result, so as to generate a candidate user account set.
In the present exemplary embodiment, by providing an asynchronous update mechanism for the candidate user pool cache, a large number of calculation processes are put into the process of generating the candidate user account set offline while the real-time performance of the sorting result is ensured, so that the efficiency of generating the user account information list is improved.
In this exemplary embodiment, when the cache of the candidate user pool accessed by the user is empty, in addition to triggering the offline calculation of the candidate user account set, a simple account information list generated by a downgrading policy is returned for the access. The downgrade policy weakens the ordering computation process in an effort to speed up the response time of the interface.
As shown in fig. 7, the method for generating a simple account information list in this exemplary embodiment may specifically include the following steps:
step S710, responding to a generation request of the user account information list, and if the candidate user account set in the candidate user pool cache is empty, acquiring the number of the candidate user accounts corresponding to each user type and the priority of the user type according to the list configuration information.
When receiving a user account information list generation request sent by a client, a server firstly queries a candidate user pool cache, and if a candidate user account set in the candidate user pool cache is empty, a matched degradation scheme is automatically executed.
Firstly, the number of candidate user accounts corresponding to each user type and the user type priority are obtained according to the list configuration information.
And S720, acquiring the original user account corresponding to each user type from the original user account information list as the simple list user account according to the number of the candidate user accounts corresponding to each user type.
And secondly, acquiring the original user account corresponding to each user type from the original user account information list as the simple list user account according to the number of the candidate user accounts corresponding to each user type.
And S730, sorting the user accounts of the simple list according to the user type priority, and generating a simple account information list according to a sorting result.
And finally, sequencing the user accounts of the simple list according to the user type priority, and generating a simple account information list according to a sequencing result, wherein the user in each user type does not sequence the state information priority, the state information of the original user account is not required to be inquired and acquired, and the users of all types are simply spliced according to the user type priority to obtain a final simple account information list and return the final simple account information list to the client.
In the embodiment of the present invention, by providing a supporting degradation scheme, when the buffer of the candidate user pool accessed by the user is empty, a simple account information list can be quickly generated, so as to ensure timely response and enhance user experience.
Fig. 8 is a flowchart of a candidate user pool cache update mechanism according to a specific embodiment of the present disclosure, where the details of the flowchart are as follows:
when a user accesses the cache of the candidate user pool for the first time, the original user account information list is inquired, a candidate user account set is generated and placed in the cache, and meanwhile, the simple account information list is generated by using a degradation strategy and returned to the client.
When the user accesses the cache of the candidate user pool for the second time, the candidate user account set in the cache of the candidate user pool can be directly obtained, the candidate user accounts are sequenced according to the list configuration information, a user account information list is generated and returned to the client.
For other trigger occasions, such as the time when the cache of the candidate user pool reaches the update time, the Kafka message is sent, the original user account information list is inquired, the original user accounts in the original user account information list are sequenced, a new candidate user account set is generated and is placed into the cache.
The candidate user pool cache comprises three parts of friends, fans and recommended users. The number of each part is slightly more than that of the list finally displayed, so that the sorting is convenient to perform during reading, and the differentiation of the list and the real-time performance of the sorting result are enhanced.
Fig. 9 is a schematic diagram of a user account information list obtained by a list generation method according to an embodiment of the present disclosure. In the user account information list shown in fig. 9, list user accounts are displayed in the order of priority of friends, fans, and recommended users, and users of the same type may be internally sorted according to their status information.
Fig. 10 is a complete flowchart of a method for generating a list in a specific embodiment of the present disclosure, which is an illustration of a timing chart of the above steps in the present exemplary embodiment, and includes a read logic of the list, and the specific steps in the flowchart are as follows:
step S1001, the server receives a list generation request.
Step S1002, inquiring the cache of the candidate user pool.
And S1003, acquiring a candidate user pool cache.
If the buffer memory of the candidate user pool is empty or needs to be updated, the step S1004 is entered; if the candidate user pool buffer is not empty and the update time is not up, the process proceeds to step S1009.
Step S1004, sending the Kafka message.
If the candidate user pool buffer is empty, the process proceeds to step S1005.
Step S1005, inquiring the friend list.
And S1006, inquiring the fan list.
Step S1007, inquiring a recommended user account information list.
And S1008, splicing the degraded result.
And the server obtains a simple account information list according to the degradation strategy and returns the list to the client. The downgrade policy may be, for example: only simple splicing is carried out on friends, fans and recommended users, and each user type does not inquire the downstream sequencing data any more for sequencing.
And S1009, inquiring the intimacy numerical values of friends and fans.
And the server sends a query request to the intimacy degree value query service to query the intimacy degree values of friends and fans in the cache of the candidate user pool.
And S1010, acquiring the intimacy values of friends and vermicelli.
And the server receives the intimacy values of the friends and the fans returned by the intimacy value query service.
And S1011, inquiring the online states of friends and fans.
And the server sends a query request to the online state query service to query the online states of the friends and fans in the cache of the candidate user pool.
And S1012, acquiring the online states of friends and fans.
And the server receives the online states of the friends and fans returned by the online state query service.
And S1013, sequencing friend user names.
The server ranks userID (user names) of the friends in the cache of the candidate user pool. If the number of friends does not reach the length of the list, step S1014 is entered. If the number of buddies reaches the length of the list, proceed directly to step S1016.
And S1014, sequencing the fan user names.
And when the number of the friends does not reach the length of the list, the server sorts the userIDs of the fans in the cache of the candidate user pool. If the number of friends and fans does not reach the list length, the process proceeds to step S1015. If the number of friends and fans reaches the length of the list, the process goes directly to step S1016.
And S1015, splicing and recommending the user.
And splicing the userID of the recommended user when the number of the friends and fans in the cache of the candidate user pool does not reach the length of the list.
And S1016, inquiring user details.
And the server sends a query request to the user detail query service to query the list of detail information such as the head portrait, the nickname and the like of the user account.
And S1017, obtaining user details.
And the server receives the user detail information returned by the user detail inquiry service.
And step S1018, generating a user account information list.
And the server generates a final user account information list and returns the final user account information list to the client.
Fig. 11 is a complete flowchart of an update method of a candidate user pool cache in an embodiment of the present disclosure, including an asynchronous update logic of the candidate user pool cache, where the steps of the flowchart are as follows:
step S1101. receiving Kafka message.
The consumer receives the message sent by Kafka and then begins to update the candidate user pool cache.
Step S1102, inquiring the cache of the candidate user pool.
And S1103, acquiring a candidate user pool cache.
And S1104, judging whether recalculation is needed.
And judging whether the cache of the candidate user pool needs to be recalculated according to the updating time. If necessary, the subsequent steps are entered.
Step S1105, generating configuration by inquiring the list.
The list generation configuration may include: list generating conditions, final list length, list updating time, downstream call volume and the like can be flexibly configured according to requirements. The downstream call volume plays a role in protecting the downstream, and when the call volume of the downstream exceeds the downstream call volume, a subsequent request does not call the downstream any more.
Step S1106, obtaining list generation configuration.
Step S1107, inquiring the friend list.
And S1108, inquiring the fan list.
And S1109, inquiring the intimacy values of friends and vermicelli.
And S1110, inquiring the online states of friends and fans.
And S1111, sequencing the friends and the fans.
And S1112, reserving a specified number of friends and fans.
And S1113, inquiring a recommended user account information list.
And S1114, acquiring a list of the recommended user account information.
And S1115, reserving a specified number of recommended users.
Step S1116, the candidate user pool cache is updated.
And generating a new candidate user pool and writing the new candidate user pool into a cache.
And S1117, ending the updating.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) referred to in the present disclosure is information authorized by the user or sufficiently authorized by each party.
Further, the present disclosure also provides a list generation apparatus. Referring to fig. 12, the list generating means may include a candidate user acquiring module 1210, a state information acquiring module 1220, and a user list generating module 1230. Wherein:
the candidate user obtaining module 1210 is configured to, in response to a request for generating a user account information list, obtain a candidate user account set from a candidate user pool cache, where the candidate user account set includes candidate user accounts corresponding to a plurality of user types;
the status information obtaining module 1220 is configured to obtain list configuration information of the user account information list, and obtain status information of candidate user accounts according to the list configuration information and the user type;
the user list generation module 1230 is configured to generate a list of user account information according to the list configuration information of the list of user account information and the status information of the candidate user account.
In some exemplary embodiments of the present disclosure, the user list generating module 1230 may include a list length determining unit, a list user account acquiring unit, and a user account information list generating unit. Wherein:
the list length determining 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;
the list user account acquisition unit is configured to acquire user type priorities corresponding to the user types from the list configuration information, and sequentially acquire candidate user accounts corresponding to the user types matched with the sub-list length from the candidate user account set as list user accounts according to the sequence of the user type priorities from high to low;
the user account information list generating unit is configured to generate a user account information list according to the list user accounts and the user type priority and the state information of the list user accounts when the number of the list user accounts reaches the total list length.
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. Wherein:
the state priority determining unit is configured to obtain user state priorities corresponding to the state information of the list user accounts corresponding to the user types according to the list configuration information;
the list user account sorting unit is configured to sort all list user accounts according to the user type priority and the user state priority to obtain a user account information list.
In some exemplary embodiments of the present disclosure, a list generation apparatus provided by the present disclosure may further include a cache update module configured to asynchronously update a candidate user account set in a cache of a candidate user pool according to a preset update time interval.
In some exemplary embodiments of the present disclosure, the cache update module may include an update time difference determination unit, a number of users determination unit, a user acquisition unit, and a candidate set generation unit. Wherein:
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;
the user number determining unit is configured to obtain cache updating configuration of the candidate user account set if the time difference is greater than or equal to a preset updating time interval, and obtain the number of the candidate user accounts corresponding to each user type according to the cache updating configuration;
the user acquisition unit is configured to acquire an original user account information list and state information corresponding to an original user account in the original user account information list;
the candidate set generating unit is configured to acquire the original user accounts corresponding to the user types from the original user account information list as candidate user accounts according to the number of the candidate user accounts corresponding to the user types and the state information of the original user accounts, and generate a candidate user account set.
In some exemplary embodiments of the present disclosure, the user number determination unit may include a cache update configuration determination unit configured to acquire 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.
In some exemplary embodiments of the present disclosure, the candidate set generating unit may include an original user account ranking unit and a candidate user account determining unit. Wherein:
the original user account sorting unit is configured to sort original user accounts corresponding to each user type in the original user account information list according to the state information of the original user accounts;
the candidate user account determining unit is configured to acquire the original user accounts corresponding to the user types from the original user account information list as candidate user accounts according to the number of the candidate user accounts corresponding to the user types and the sorting result, and generate a candidate user account set.
In some exemplary embodiments of the present disclosure, a list generation apparatus 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. Wherein:
the user priority obtaining module is configured to respond to a generation request of a user account information list, and if a candidate user account set in a candidate user pool cache is empty, obtain the number of candidate user accounts corresponding to each user type and user type priority according to list configuration information;
the abbreviated list user account determining module is configured to acquire an original user account corresponding to each user type from the original user account information list as an abbreviated list user account according to the number of the candidate user accounts corresponding to each user type;
the simple account information list generation 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 a sorting result.
The specific details of each module/unit in the above list generating apparatus have been described in detail in the corresponding method embodiment section, and are not described herein again.
FIG. 13 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 1300 of the electronic device shown in fig. 13 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 13, the computer system 1300 includes a Central Processing Unit (CPU)1301 that 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 section 1308 into a Random Access Memory (RAM) 1303. In the RAM 1303, various programs and data necessary 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 bus 1304.
The following components are connected to the I/O interface 1305: an input portion 1306 including a keyboard, a mouse, and the like; an output section 1307 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1308 including a hard disk and the like; and a communication section 1309 including a network interface card such as a LAN card, a modem, or the like. 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, or the like is mounted on the drive 1310 as necessary, so that a computer program read out therefrom is mounted into the storage portion 1308 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications component 1309 and/or installed from removable media 1311. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 1301.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments above.
It should be noted that although in the above detailed description several modules of the device for action execution are mentioned, this division is not mandatory. Indeed, the features and functionality of two or more of the modules described above may be embodied in one module, in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module described above may be further divided into embodiments by a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
It will be understood that the present disclosure is not limited to the precise arrangements 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 (10)
1. A method for generating a list, comprising:
responding to a generation request of a user account information list, and acquiring a candidate user account set from a candidate user pool cache, wherein the candidate user account set comprises candidate user accounts corresponding to a plurality of user types;
acquiring list configuration information of the user account information list, and acquiring state information of the candidate user account according to the list configuration information and the user type;
and 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.
2. The method for generating the list according to claim 1, wherein the generating 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 comprises:
obtaining 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;
acquiring user type priorities corresponding to the user types from the list configuration information, and sequentially acquiring candidate user accounts corresponding to the user types matched with the sub-list length from the candidate user account set as list user accounts according to the sequence of the user type priorities from high to low;
and when the number of the list user accounts reaches the length of the total list, generating the user account information list according to the list user accounts and the user type priority and state information of the list user accounts.
3. The method for generating a list according to claim 2, wherein the generating the user account information list according to the list user account and the user type priority and status information of the list user account comprises:
obtaining user state priorities corresponding to the state information of the list user accounts corresponding to the user types according to the list configuration information;
and sequencing all the list user accounts according to the user type priority and the user state priority to obtain the user account information list.
4. Method for generating a list according to claim 1, characterized in that it further comprises:
and asynchronously updating the candidate user account set in the cache of the candidate user pool according to a preset updating time interval.
5. The list generation method of claim 4, wherein the method for updating the set of candidate user accounts comprises:
obtaining a time difference between a current time and a previous update time when the candidate user account set was updated last time;
if the time difference is greater than or equal to the preset updating time interval, acquiring cache updating configuration of the candidate user account set, and obtaining the number of candidate user accounts corresponding to each user type according to the cache updating configuration;
acquiring an original user account information list and state information corresponding to an original user account in the original user account information list;
and according to the number of the candidate user accounts corresponding to each user type and the state information of the original user accounts, acquiring the original user accounts corresponding to each user type from the original user account information list as the candidate user accounts, and generating the candidate user account set.
6. Method for generating a list according to claim 1, characterized in that it further comprises:
responding to a generation request of the user account information list, and if the candidate user account set in the candidate user pool cache is empty, acquiring the number of candidate user accounts corresponding to each user type and user type priority according to the list configuration information;
acquiring original user accounts corresponding to the user types from an original user account information list according to the number of the candidate user accounts corresponding to the user types to serve as simple list user accounts;
and sorting the user accounts of the simple list according to the user type priority, and generating a simple account information list according to a sorting result.
7. An apparatus for generating a list, comprising:
the candidate user acquisition module is configured to execute a generation request responding to a user account information list and acquire a candidate user account set from a candidate user pool cache, wherein the candidate user account set comprises candidate user accounts corresponding to a plurality of user types;
the state information acquisition module is configured to execute the acquisition of list configuration information of the user account information list and acquire the state information of the candidate user account according to the list configuration information and the user type;
a user list generation module configured to perform generation of the user account information list according to list configuration information of the user account information list and status information of the candidate user accounts.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of generating a list of any of claims 1 to 6.
9. A computer-readable storage medium, whose instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of generating a list as claimed in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements a method of generating a list according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111376327.5A CN113901091B (en) | 2021-11-19 | 2021-11-19 | List generation method, device, electronic device and computer readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111376327.5A CN113901091B (en) | 2021-11-19 | 2021-11-19 | List generation method, device, electronic device and computer readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113901091A true CN113901091A (en) | 2022-01-07 |
CN113901091B CN113901091B (en) | 2025-03-07 |
Family
ID=79194801
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111376327.5A Active CN113901091B (en) | 2021-11-19 | 2021-11-19 | List generation method, device, electronic device and computer readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113901091B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114615516A (en) * | 2022-03-15 | 2022-06-10 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN115118774A (en) * | 2022-07-05 | 2022-09-27 | 珠海格力电器股份有限公司 | Equipment updating method and device, electronic equipment and storage medium |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102822811A (en) * | 2010-03-19 | 2012-12-12 | 微软公司 | Dynamic contacts list management |
US20130111366A1 (en) * | 2011-10-27 | 2013-05-02 | Disney Enterprises, Inc. | Friends lists with dynamic ordering and dynamic avatar appearance |
WO2016164978A1 (en) * | 2015-04-16 | 2016-10-20 | Andrew Muirhead | A web server for serving a categorised listing image comparison and list selection preference rank ordering interface |
CN106470110A (en) * | 2015-08-18 | 2017-03-01 | 腾讯科技(深圳)有限公司 | Method and device to the multiple user's pocket transmission news in user list |
CN106878406A (en) * | 2017-02-07 | 2017-06-20 | 腾讯科技(深圳)有限公司 | Information sharing method, apparatus and system |
CN108282393A (en) * | 2017-12-29 | 2018-07-13 | 五八有限公司 | A kind of good friend's adding method, device, computer equipment and readable storage medium storing program for executing |
CN110727720A (en) * | 2019-10-21 | 2020-01-24 | 腾讯科技(深圳)有限公司 | List display and query method and device, storage medium and computer equipment |
CN111382178A (en) * | 2020-03-10 | 2020-07-07 | 澳克多普有限公司 | Network task allocation method, system, equipment and storage medium |
CN112101994A (en) * | 2020-09-11 | 2020-12-18 | 广州华多网络科技有限公司 | Member rights management method, member rights management device, computer equipment and readable storage medium |
CN112948738A (en) * | 2021-03-18 | 2021-06-11 | 四川虹美智能科技有限公司 | Data processing method and device based on MQTT |
CN113342822A (en) * | 2021-06-29 | 2021-09-03 | 招商局金融科技有限公司 | Data query method and device based on multi-type database, electronic equipment and medium |
CN113626681A (en) * | 2020-05-08 | 2021-11-09 | 北京达佳互联信息技术有限公司 | Account information processing method and device, electronic equipment and storage medium |
CN115278287A (en) * | 2022-08-05 | 2022-11-01 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment, server and storage medium |
-
2021
- 2021-11-19 CN CN202111376327.5A patent/CN113901091B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102822811A (en) * | 2010-03-19 | 2012-12-12 | 微软公司 | Dynamic contacts list management |
US20130111366A1 (en) * | 2011-10-27 | 2013-05-02 | Disney Enterprises, Inc. | Friends lists with dynamic ordering and dynamic avatar appearance |
WO2016164978A1 (en) * | 2015-04-16 | 2016-10-20 | Andrew Muirhead | A web server for serving a categorised listing image comparison and list selection preference rank ordering interface |
CN106470110A (en) * | 2015-08-18 | 2017-03-01 | 腾讯科技(深圳)有限公司 | Method and device to the multiple user's pocket transmission news in user list |
CN106878406A (en) * | 2017-02-07 | 2017-06-20 | 腾讯科技(深圳)有限公司 | Information sharing method, apparatus and system |
CN108282393A (en) * | 2017-12-29 | 2018-07-13 | 五八有限公司 | A kind of good friend's adding method, device, computer equipment and readable storage medium storing program for executing |
CN110727720A (en) * | 2019-10-21 | 2020-01-24 | 腾讯科技(深圳)有限公司 | List display and query method and device, storage medium and computer equipment |
CN111382178A (en) * | 2020-03-10 | 2020-07-07 | 澳克多普有限公司 | Network task allocation method, system, equipment and storage medium |
CN113626681A (en) * | 2020-05-08 | 2021-11-09 | 北京达佳互联信息技术有限公司 | Account information processing method and device, electronic equipment and storage medium |
CN112101994A (en) * | 2020-09-11 | 2020-12-18 | 广州华多网络科技有限公司 | Member rights management method, member rights management device, computer equipment and readable storage medium |
CN112948738A (en) * | 2021-03-18 | 2021-06-11 | 四川虹美智能科技有限公司 | Data processing method and device based on MQTT |
CN113342822A (en) * | 2021-06-29 | 2021-09-03 | 招商局金融科技有限公司 | Data query method and device based on multi-type database, electronic equipment and medium |
CN115278287A (en) * | 2022-08-05 | 2022-11-01 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment, server and storage medium |
Non-Patent Citations (1)
Title |
---|
汪晔: "基于用户关系链的微博收听推荐系统设计与实现", 《CNKI优秀硕士学位论文全文库》, 15 June 2014 (2014-06-15) * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114615516A (en) * | 2022-03-15 | 2022-06-10 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN115118774A (en) * | 2022-07-05 | 2022-09-27 | 珠海格力电器股份有限公司 | Equipment updating method and device, electronic equipment and storage medium |
CN115118774B (en) * | 2022-07-05 | 2023-08-15 | 珠海格力电器股份有限公司 | Equipment updating method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113901091B (en) | 2025-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6012052A (en) | Methods and apparatus for building resource transition probability models for use in pre-fetching resources, editing resource link topology, building resource link topology templates, and collaborative filtering | |
CN100585598C (en) | Method and system for updating portlet information | |
US20100211638A1 (en) | Method and device for creating computer applications | |
CN113901091B (en) | List generation method, device, electronic device and computer readable medium | |
CN111552880A (en) | Data processing method, device and medium based on knowledge graph and electronic equipment | |
WO1999036868A1 (en) | Methods and apparatus for building attribute transition probability models for use in pre-fetching resources | |
WO1999036866A1 (en) | Methods and apparatus for using resource transition probability models for pre-fetching resources | |
CN111552835B (en) | File recommendation method, device and server | |
CN103618787B (en) | A kind of webpage represents system and method | |
CN110658961B (en) | Information display method and device and electronic equipment | |
CN110781373B (en) | List updating method and device, readable medium and electronic equipment | |
CN112906353A (en) | Method and system for collaboratively editing document | |
CN114186126B (en) | Object recommendation method and device, electronic equipment and storage medium | |
CN112818654A (en) | Message storage method, message generation method, message storage device, electronic equipment and computer readable medium | |
CN107807935B (en) | Using recommended method and device | |
CN112767045A (en) | Lost user recovery method and device and electronic equipment | |
CN103150172A (en) | Method and equipment for realizing individual scene | |
EP4105869A1 (en) | Method and apparatus for outputting information | |
CN111369025A (en) | Information display method and device, storage medium and electronic equipment | |
CN110135822A (en) | Method of network payment, system and electronic equipment | |
JP7307766B2 (en) | Traffic adjustment method, apparatus, electronic equipment, computer readable recording medium and computer program | |
CN115422215A (en) | Data updating method, device, equipment and medium based on table | |
JP2022106992A (en) | Account intimacy generation methods, devices, electronic devices and storage media | |
CN113554385A (en) | Distribution robot control method, distribution robot control device, electronic equipment and computer readable medium | |
CN114979289B (en) | Data distribution method, apparatus, system, device, medium and program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |