CN114189490A - User list processing method, system, electronic equipment and storage medium - Google Patents

User list processing method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN114189490A
CN114189490A CN202111422187.0A CN202111422187A CN114189490A CN 114189490 A CN114189490 A CN 114189490A CN 202111422187 A CN202111422187 A CN 202111422187A CN 114189490 A CN114189490 A CN 114189490A
Authority
CN
China
Prior art keywords
user list
user
traversal
segment
data
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
Application number
CN202111422187.0A
Other languages
Chinese (zh)
Other versions
CN114189490B (en
Inventor
莫汉辉
谢会桄
彭凌峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bigo Technology Singapore Pte Ltd
Original Assignee
Guangzhou Baiguoyuan Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN202111422187.0A priority Critical patent/CN114189490B/en
Publication of CN114189490A publication Critical patent/CN114189490A/en
Application granted granted Critical
Publication of CN114189490B publication Critical patent/CN114189490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a user list processing method, a user list processing system, electronic equipment and a storage medium. According to the technical scheme provided by the embodiment of the application, the user list is periodically traversed on the basis of the set dormancy time, the subscription time information of the last traversed user is recorded in each traversal period so as to mark the initial traversal user of the next traversal period, and the users in the user list are sequenced according to the subscription time information; according to the periodically traversed subscription time information and the set number of users in the segment lists, locating the initial positions of the user lists corresponding to the segment lists, generating segment data of the user lists based on the initial positions and caching the segment data; and when the user list is traversed to execute the associated service, extracting corresponding segmented data from the cache, and performing segmented traversal on the user list based on the segmented data. By adopting the technical means, the occupation of system computing resources can be reduced, the traversal timeliness of the user list is improved, and the traversal effect of the user list is optimized.

Description

User list processing method, system, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a user list processing method, a user list processing system, electronic equipment and a storage medium.
Background
Currently, in application scenarios such as live broadcast software and social software, traversing a user list is required to implement relevant service functions. For example, when a main broadcast is played, it is necessary to traverse the user list to push the broadcast message to all subscribing users. For the case of large number of subscribed users, when traversing the user list, splitting the user list into a plurality of segments in a way of parallel traversal of the segments of the list, positioning the users at the initial positions of the segments according to the ranking of the complete list and the number of the users of each segment, and then starting to traverse the segment list in parallel from the users at the initial positions to push the broadcast messages. Therefore, the message pushing timeliness can be improved, and the message pushing timeliness of the users at the tail of the list is prevented from being influenced.
However, when the existing parallel traversal segment list scheme performs user positioning at the start position, the start position corresponding to each segment list needs to be sequentially positioned from 0 to the position of the designated rank according to the real-time rank (according to the subscription time sequence) of the user in the user list, so as to determine the start position of the corresponding segment list. The whole process consumes a lot of time, and simultaneously occupies a large amount of computing resources of the system, and influences the service performance of the system and the normal operation of other services.
Disclosure of Invention
The embodiment of the application provides a user list processing method, a user list processing system, electronic equipment and a storage medium, which can improve the traversal timeliness of a user list and solve the technical problems of time consumption and low efficiency of user list traversal.
In a first aspect, an embodiment of the present application provides a user list processing method, including:
periodically traversing the user list based on the set dormancy time, wherein each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are ordered according to the subscription time information;
according to the periodically traversed subscription time information and the set number of users in the segment lists, locating the initial positions of the user lists corresponding to the segment lists, generating segment data of the user lists based on the initial positions and caching the segment data;
and when the user list is traversed to execute the associated service, extracting corresponding segmented data from the cache, and performing segmented traversal on the user list based on the segmented data.
In a second aspect, an embodiment of the present application provides a user list processing system, including:
the periodic traversal module is used for periodically traversing the user list based on the set dormancy time, each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are ordered according to the subscription time information;
the positioning module is used for positioning the initial position of each corresponding segmented list in the user list according to the periodically traversed subscription time information and the set number of the users in the segmented lists, and generating and caching the segmented data of the user list based on the initial position;
and the segmentation traversing module is used for extracting corresponding segmentation data from the cache when the user list is traversed and the associated service is executed, and performing segmentation traversing on the user list based on the segmentation data.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the user list processing method of the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the user list processing method according to the first aspect when executed by a computer processor.
According to the method, the list of the users is periodically traversed on the basis of the set dormancy time, each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are sequenced according to the subscription time information; according to the periodically traversed subscription time information and the set number of users in the segment lists, locating the initial positions of the user lists corresponding to the segment lists, generating segment data of the user lists based on the initial positions and caching the segment data; and when the user list is traversed to execute the associated service, extracting corresponding segmented data from the cache, and performing segmented traversal on the user list based on the segmented data. By adopting the technical means, the initial position of the segmented list is positioned and cached by periodically traversing the user list and combining the subscription time information, so that the subsequent associated service can be directly called, the occupation of the computing resources of the system can be reduced, the traversing timeliness of the user list is improved, and the traversing effect of the user list is optimized.
Drawings
Fig. 1 is a flowchart of a user list processing method provided in an embodiment of the present application;
FIG. 2 is a segmented data request flow diagram in an embodiment of the present application;
FIG. 3 is a segmented data return flow diagram in an embodiment of the present application;
FIG. 4 is a flow chart of default traversal data return in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a user list processing system according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The user list processing method aims to locate the initial position of the segmented list and cache the initial position by periodically traversing the user list and combining the subscription time information so as to directly call the segmented list data in the cache to perform user list segmented traversal when the user list associated service is subsequently executed. Therefore, the time consumption of user list traversal is saved, the user list traversal timeliness is improved, and the occupation of computing resources in the user list traversal process is reduced. For the traditional user list traversal mode, a segmented list parallel traversal mode is generally adopted during the user list traversal. Since the user list is stored using the zset (ordered set) data structure of pika (mass storage service). The key point for the zset data structure segments is to locate the starting position of each segment (i.e., the position of the first user of each segment list) based on which the segment list is traversed side-by-side. For example, for a zset set with 3000w users, it needs to be divided into 5 segments, the number of users per segment is 600w, and the starting position of each segment is 1, 600w, 1200w, 1800w, 2400w at the starting rank of the user list. The time it takes to locate the starting position is related to the starting rank size of the corresponding user in the user list. When the starting position is located, the first user (i.e. the user position with rank 1) with zset in the disk is found each time, and then the user is searched one after another until the users with the starting rank positions corresponding to 1, 600w, 1200w, 1800w and 2400w are found. Obviously, the larger the rank of the user at the starting position, the greater the time it takes to find the starting position according to the starting rank. Tests prove that for a zset set of 3000w users, the time consumption of 500w, 1000w, 1500w, 2000w and 2500w in the initial ranking fluctuates around 0.5s, 1s, 1.5s, 2s and 2.5s respectively. And the more time consuming, the more computing resources are consumed. Further, the response of pika to other requests is blocked, the processing time consumption of other services is increased, and the operation of other services is influenced. And each time a user list associated service (such as anchor broadcast message push) is carried out, the initial position needs to be relocated, a user list segmentation scheme is determined, and parallel traversal of the segmentation list is carried out according to the segmentation scheme, so that more service performance of the system is consumed, and the operation of the system is further influenced. Therefore, the user list processing method provided by the embodiment of the application is provided to solve the technical problems that the existing user list traversal is time-consuming and inefficient.
Example (b):
fig. 1 is a flowchart of a user list processing method provided in an embodiment of the present application, where the user list processing method provided in this embodiment may be executed by a user list processing device, the user list processing device may be implemented in a software and/or hardware manner, and the user list processing device may be formed by two or more physical entities or may be formed by one physical entity. In general, the user list processing device may be a processing device such as a server host.
The following description will be given taking the user list processing apparatus as an example of a main body that executes the user list processing method. Referring to fig. 1, the user list processing method specifically includes:
and S110, periodically traversing the user list based on the set sleep time, wherein each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are sequenced according to the subscription time information.
In order to improve the timeliness of user list traversal, shorten the time consumption of user list segmentation scheme calculation and reduce the resource occupation of segmentation scheme calculation, the embodiment of the application adopts a mode of periodically traversing the user list to locate the initial position of the segmentation scheme, and sleeps for a period of time between intervals so as to avoid the long-term occupation of system calculation resources by the segmentation scheme calculation process.
And each user in the user list is ordered based on the sequence of the subscription time information. The subscription time information is accurate to millisecond or even microsecond level, so that the uniqueness of the subscription time information can be ensured, and the overlapping of the subscription time information between two users is avoided. It can be understood that the subscription time information corresponds to a score, and the higher the subscription time information is, the larger the score is, the larger the ranking of the corresponding user in the user list is. Because the user list adopts a zset data structure to store each user, each user is ranked in sequence according to the subscription time information. When the pika storage service cluster carries out initial position positioning based on user ranking, the initial position located before cannot be memorized, and when each initial position positioning of the segmentation list is carried out, each positioning operation needs to sequentially traverse from the user with the ranking of 1 in the user list until the user corresponding to the initial ranking is determined as the initial position of the segmentation list. Therefore, when the user list is traversed periodically, the subscription time information of the last traversed user in the current period is recorded every time, so that the starting traversed user in the next traversal period can be marked, the condition that traversal needs to be performed from the first ranking every time of traversal operation is avoided, and the timeliness of the starting position of the segment list is further improved.
In the periodic traversal process, in order to avoid occupying system computing resources for a long time, in the embodiment of the application, a fixed number of traversal users is set for each period, after the traversal operation for setting the number of traversal users is completed, a traversal program sleeps for a set time length, and after the set time length of dormancy, based on the subscription time information of the last traversal user recorded in the previous traversal period, traversal of a user list in the current period is executed from the next user of the user corresponding to the subscription time information, and so on, the whole user list is traversed in a circulating manner until the initial positions of all the segment lists are located.
S120, according to the periodically traversed subscription time information and the set number of the users in the segment lists, locating the initial positions, corresponding to the segment lists, in the user lists, generating segment data of the user lists based on the initial positions and caching the segment data.
Furthermore, in the process of periodically traversing the user list based on the set sleep time, the number of traversed users can be determined according to the periodically traversed subscription time information, and the starting position of each segment list can be located by combining the preset number of users of the segment list. It will be appreciated that for the first segment list, whose starting position is the first user of the user list, the starting position location can be performed directly. After that, when the number of traversed users reaches the number of users in the segment list, it indicates that the traversal of all users in one segment list is completed, and the next traversed user is the starting position of the next segment list. And by analogy, the starting position of each segment list in the user list is finally positioned by continuously and periodically traversing the user list.
Illustratively, taking a 3000w fan anchor as an example, when the user list segmentation scheme is constructed, the user list is divided into five segments as an example. After the user list is segmented, the starting positions of the segmented lists are users arranged at the positions of 1, 600w, 1200w, 1800w and 2400w respectively. In locating the starting position of each segment list, the desired starting position of the segment list is gradually located by calling a score-based paging traversal tool zrangeByScore (key, score _ start, count) periodically for multiple times. In the paging traversal tool, "key" is identification information of the user list, and is used for determining the user list for periodic traversal. "score _ start" is the score of the starting traversal user (i.e., subscription time information) of the current traversal cycle. For the periodic traversal of the first user list, the initial traversal user is the first user of the user list, and the corresponding score is used as "score _ start". After that, according to the subscription time information of the last traversal user recorded in the previous traversal period, taking one piece of subscription time information after the subscription time information as the "score _ start" of the current traversal period, and further determining the starting traversal user of each traversal period. "count" is the number of users that need to be traversed per cycle.
And periodically traversing the user list based on the traversing tool until the number of the traversing users reaches the number of users in the segment list, determining the next traversing user as the initial position of the segment list, and so on to complete the initial position positioning of all the segment lists in the user list.
The resource consumption and the computation time of the pika storage service cluster are controlled by controlling the size of the count each time the paging traversal tool is called. And may sleep for a period of time (e.g., 20ms) after each call to the page traversal tool. Therefore, the resource consumption of the original centralized segmentation scheme calculation can be shared and completed for multiple times, and the influence on the execution of other services of the system when the pika storage service cluster calculates the segmentation scheme is avoided. Moreover, because the bottom layer of the pika storage service cluster only maintains the index of the subscription time information and the user association, the score of the initial positioning traversal user does not need to traverse the disk one by one from the first user of the user list every time like the initial positioning ranking position, but can be quickly positioned to the position of the user corresponding to the score of the initial traversal user on the disk according to the index. Therefore, the time efficiency of positioning the initial position of the segmentation list is improved, the time consumption of the segmentation scheme is reduced, and the occupation of computing resources is avoided.
It should be noted that the number of users "count" to be traversed in each period may be adaptively set according to the timeliness requirement calculated by the segmentation scheme and the reasonable usage duration of the system computing resource. Similarly, for the number of users in the segment list, the time complexity calculated by the segment scheme and the timeliness requirement of the user list traversal by the user list association service can be combined. In the embodiment of the present application, fixed limitations are not imposed on the values of the number of users in the segment list and the number of "counts" of users that need to be traversed in each period, which is not described herein in detail.
Further, according to the determined starting position of each segment list, segment data of the user list is generated, and the segment data is stored in a local cache as a segment scheme of the user list so as to be used for calling the subsequent user list associated service. It can be understood that, since the segmentation scheme of the user list is cached in advance, the subsequent user list associated service can be directly invoked, so that the timeliness of the execution of the user list associated service can be improved, the occupation of computing resources during the execution of the user list associated service is reduced, and the user list traversal effect is optimized.
Illustratively, taking the average speed of the user message pushing as 5w users per second as an example, if the number of users of each segment list fluctuates within 100w, the user message pushing of the segment list requires a total time consumption of 20 s. For a user list containing 3000w users, after five segments are divided, the length of each segment of the segment list is 600w, and when five segment lists are processed in parallel, the total time consumption is equivalent to the total time consumption of serially traversing the 600w user list. Assuming that the number of users in the user list increases to 3050w after one day, the user list is still traversed in 5 segments by updating the segmentation scheme periodically, each segment has a length of 612w, and the total time consumption is equivalent to the total time consumption of serially traversing 612w user list. Only when the total consumption of 12w/5 w-2.4S is increased, the influence on the message pushing of the user at the tail of the user list is little. The user list is generally a slowly growing process, and the daily growth amount rarely reaches the million level, so that the segmentation scheme does not need to be calculated in real time, and the updating can be realized every day. Based on the above, by periodically traversing the user list, locating the starting position of the segment list, the segmentation scheme of the user list can be calculated in advance and cached in the database, and then the segmentation scheme can be updated after a period of time (for example, one day), so as to optimize the user list traversal timeliness.
S130, when the user list is traversed to execute the associated service, corresponding segmented data is extracted from the cache, and segmented traversal of the user list is carried out based on the segmented data.
Based on the cached segment data, when the associated service of the user list is executed, the segment data corresponding to the user list can be extracted from the cache, and based on a segmentation scheme provided by the segment data, the user list is segmented and traversed in parallel, so that the timeliness of user list traversal is improved.
Specifically, as shown in fig. 2, when executing a user list association service, a request end sends a segment data request to a user list processing device (i.e., a server end) in the embodiment of the present application, and when receiving the segment data request, the user list processing device queries a cache according to a user list corresponding to the currently requested segment data, determines whether segment data corresponding to the user list exists in the cache, and returns a corresponding user list traversal scheme to the request end according to a query result. It can be understood that, when the segment data is stored, the identification information of the user list is used as a data index, so that the cache is queried according to the user list information, and whether the corresponding segment data is hit is judged.
And if the cache has the segment data, returning the corresponding segment data to the request end. As shown in fig. 3, the segmented data return flow includes:
s1301, receiving a segmented data request of a user list sent by a request end;
s1302, responding to the segment data request, extracting segment data corresponding to the user list from the cache;
and S1303, returning the segmented data to the request end for the request end to perform segmented traversal of the user list and execute the associated service of the user list.
The segmented data is returned to the request end after the segmented data in the cache is hit, so that a user list segmentation scheme is provided for the request end. The request terminal can correspondingly perform the segmented parallel traversal of the user list based on the segmented data.
For example, in a live platform operation scenario, the anchor broadcast information needs to be pushed to each user in the user list. Then, the server executing the current information push service is used as a request end, and a segment data request is sent to the user list processing device in the embodiment of the present application. And the user list processing equipment responds to the segmented data request, inquires the cache, and returns the segmented data to the request end after hitting the corresponding segmented data. The request end can correspondingly segment the user list into a plurality of segment lists based on the segment data, and starts to perform parallel traversal of the segment lists from the initial positions of the segment lists, and performs broadcast message push on the traversed users, so as to complete the associated service based on the user list in the embodiment of the application.
On the other hand, if no segmented data exists in the cache, a default traversal data is returned to the request end. As shown in fig. 4, the default traversal data return flow includes:
s1304, determining that no segmented data matched with the user list exists in the cache;
and S1305, responding to the segmented data request, and returning default traversal data to the request end so that the request end traverses the user list based on the default traversal data.
It can be understood that, in order to avoid that the request end does not request the segmented data and further affects the execution of the associated service, in the embodiment of the present application, a default traversal data is preset, so that when the matched segmented data is not queried, the default traversal data is returned to the request end, and the request end is instructed to perform the user list traversal operation with the default traversal data. Default traversal data is set according to actual needs, and the specific traversal scheme is not fixedly limited in the embodiment of the present application, which is not described herein repeatedly.
Optionally, the default traversal data is used to instruct the requesting end to perform serial traversal of the complete list over the user list. For the user list without segment data, in order to ensure the normal execution of the list traversal process, the request end is indicated by returning to perform serial traversal of the whole user list, and a smoothly-transitional user list traversal scheme is provided for the request end, so that the stability of the associated service processing is ensured.
It should be noted that the main body for traversing the user list based on the segment data to execute the associated service may be an independent server, or may be the user list processing device in the embodiment of the present application, that is, the generation of the segment data, the traversal of the user list, and the execution of the associated service (such as pushing the anchor broadcast message) may be executed on the user list processing device in the embodiment of the present application. According to the specific framework setting of the system, the main body can be adaptively selected to execute the associated service of the traversal user list, and the specific system framework is not fixedly limited in the embodiment of the application and is not described herein in detail.
Optionally, as shown in fig. 2, after determining that the system does not have corresponding segment data, the user list processing device further adds a segment data construction task, and constructs segment data matched with the user list based on the segment data construction task. It can be understood that, if the segment data corresponding to the user list is stored in the cache, in order to ensure that the next time the segmentation scheme is called, the corresponding segment data may be returned to the requesting end. The embodiment of the present application generates and caches the segment data of the user list by adding a segment data construction task and referring to the above steps S110 to S120, so as to facilitate the subsequent invocation by the requesting end. Therefore, the traversal stability of the user list can be further improved, and the service execution timeliness of the request end is improved.
In one embodiment, the user list processing device further detects whether the user list is updated at regular time, and updates the segment data corresponding to the user list in the cache when determining that the user list is updated. For example, whether the user list is updated is detected every other day, and after the user list is detected to be updated, the segment data of the user list is regenerated and updated into the cache by referring to the above steps S110 to S120, so as to further improve the time efficiency of traversal of the user list and ensure high availability of the segment data.
It should be noted that, because the user list is updated in real time and the segment data is updated at regular time, after the user list is updated, the user list is also directly traversed by using the corresponding segment data in the cache. For example, for a user list containing 3000w users, after dividing into five segments, the length of each segment list is 600 w. One hour later, the number of users in the user list increases to 3001w, and then the user list is still traversed from the original calculated starting position (i.e. positions 1, 600w, 1200w, 1800w, and 2400 w) based on the segment data in the cache. At this time, the last segment list has 1W more users, and taking the average speed of pushing the user message as 5W users per second as an example, the traversal time consumption of the segment list is 0.2s more than that of the original traversal time consumption, and the influence on the overall traversal time consumption is small. After that, after the cached segment data is updated, the initial positions of the segment lists are re-determined according to the average segment of the 3001w users, so that the time consumed by the traversal of the newly added users is distributed to the segment lists, the time consumed by the overall user list is further shortened, and the traversal time efficiency of the user list is improved.
In the above, the user list is periodically traversed based on the set sleep duration, each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are sorted according to the subscription time information; according to the periodically traversed subscription time information and the set number of users in the segment lists, locating the initial positions of the user lists corresponding to the segment lists, generating segment data of the user lists based on the initial positions and caching the segment data; and when the user list is traversed to execute the associated service, extracting corresponding segmented data from the cache, and performing segmented traversal on the user list based on the segmented data. By adopting the technical means, the initial position of the segmented list is positioned and cached by periodically traversing the user list and combining the subscription time information, so that the subsequent associated service can be directly called, the occupation of the computing resources of the system can be reduced, the traversing timeliness of the user list is improved, and the traversing effect of the user list is optimized.
Based on the above embodiments, fig. 5 is a schematic structural diagram of a user list processing system provided in the present application. Referring to fig. 5, the user list processing system provided in this embodiment specifically includes: a periodic traversal module 21, a positioning module 22 and a segmentation traversal module 23.
The periodic traversal module 21 is configured to periodically traverse the user list based on a set sleep duration, where each traversal cycle records subscription time information of a last traversed user to mark an initial traversal user of a next traversal cycle, and the users in the user list are sorted according to the subscription time information;
the positioning module 22 is configured to position an initial position in the user list corresponding to each segment list according to the periodically traversed subscription time information and the set number of users in the segment lists, and generate and cache segment data of the user list based on the initial position;
the segment traversing module 23 is configured to, when traversing the user list and executing the associated service, extract corresponding segment data from the cache, and perform segment traversal on the user list based on the segment data.
The periodic traversal module 21 is specifically configured to determine that the user position corresponding to the current subscription time information is the starting position when the rank of the current subscription time information corresponds to the number of users in the segment list.
The segment traversing module 23 is specifically configured to receive a segment data request of the user list sent by the request end; responding to the segment data request, and extracting segment data corresponding to the user list from the cache; and returning the segmented data to the request end for the request end to perform segmented traversal of the user list and execute the associated service of the user list.
The segment traversing module 23 is further configured to determine that no segment data matching the user list exists in the cache; responding to the segmented data request, returning default traversal data to the request end so that the request end can traverse the user list based on the default traversal data; the default traversal data is used to indicate that the requesting end performs a serial traversal of the complete list over the user list.
The segment traversing module 23 is further configured to add a segment data construction task, and construct segment data matched with the user list based on the segment data construction task.
The user list processing system is also used for detecting whether the user list is updated or not at regular time, and updating the segment data corresponding to the user list in the cache when the user list is determined to be updated.
In the above, the user list is periodically traversed based on the set sleep duration, each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are sorted according to the subscription time information; according to the periodically traversed subscription time information and the set number of users in the segment lists, locating the initial positions of the user lists corresponding to the segment lists, generating segment data of the user lists based on the initial positions and caching the segment data; and when the user list is traversed to execute the associated service, extracting corresponding segmented data from the cache, and performing segmented traversal on the user list based on the segmented data. By adopting the technical means, the initial position of the segmented list is positioned and cached by periodically traversing the user list and combining the subscription time information, so that the subsequent associated service can be directly called, the occupation of the computing resources of the system can be reduced, the traversing timeliness of the user list is improved, and the traversing effect of the user list is optimized.
The user list processing system provided by the embodiment of the application can be used for executing the user list processing method provided by the embodiment, and has corresponding functions and beneficial effects.
On the basis of the above practical example, an embodiment of the present application further provides an electronic device, with reference to fig. 6, the electronic device includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The memory 32 is a computer-readable storage medium that can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the user list processing method described in any embodiment of the present application (e.g., a periodic traversal module, a positioning module, and a segment traversal module in a user list processing system). The communication module 33 is used for data transmission. The processor executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory, that is, the user list processing method described above is realized. The input device 34 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 35 may include a display device such as a display screen. The electronic device provided by the above can be used to execute the user list processing method provided by the above embodiment, and has corresponding functions and beneficial effects.
On the basis of the above embodiments, the present application also provides a storage medium containing computer-executable instructions for performing a user list processing method when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the user list processing method described above, and may also perform related operations in the user list processing method provided in any embodiment of the present application.
The foregoing is considered as illustrative of the preferred embodiments of the invention and the technical principles employed. The present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.

Claims (10)

1. A user list processing method, comprising:
periodically traversing a user list based on a set dormancy time, wherein each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are ordered according to the subscription time information;
according to the periodically traversed subscription time information and the set number of users in the segment lists, locating the initial positions of the user lists corresponding to the segment lists, and generating and caching segment data of the user lists based on the initial positions;
when the user list is traversed to execute the associated service, extracting the corresponding segmented data from the cache, and performing segmented traversal on the user list based on the segmented data.
2. The method according to claim 1, wherein the extracting the corresponding segment data from the cache when traversing the user list to perform the association service, and performing the segment traversal of the user list based on the segment data comprises:
receiving a segmented data request of the user list sent by a request end;
in response to the segmented data request, extracting the segmented data corresponding to the user list from a cache;
and returning the segmented data to the request end to be used for the request end to perform segmented traversal on the user list and execute the associated service of the user list.
3. The user list processing method according to claim 2, further comprising, after receiving a segment data request of the user list sent by a requesting end:
determining that the segmented data matching the user list does not exist in a cache;
and responding to the segmented data request, and returning default traversal data to the request end so that the request end traverses the user list based on the default traversal data.
4. The method of claim 3, wherein the default traversal data is used to instruct the requesting end to serially traverse the complete list through the user list.
5. The user list processing method according to claim 3, further comprising, after determining that the segment data matching the user list does not exist in the cache:
and adding a segment data construction task, and constructing the segment data matched with the user list based on the segment data construction task.
6. The user list processing method according to claim 1, further comprising, after generating and buffering segment data of the user list based on the start position:
and regularly detecting whether the user list is updated or not, and updating the segment data corresponding to the user list in the cache when the user list is determined to be updated.
7. The method according to claim 1, wherein the locating a start position of each segment list in the user list according to the periodically traversed subscription time information and a set number of users in the segment lists comprises:
and when the ranking of the current subscription time information corresponds to the number of users in the segment list, determining the corresponding user position of the current subscription time information as the initial position.
8. A user list processing system, comprising:
the periodic traversal module is used for periodically traversing the user list based on the set dormancy time, each traversal period records the subscription time information of the last traversed user so as to mark the initial traversal user of the next traversal period, and the users in the user list are ordered according to the subscription time information;
the positioning module is used for positioning the initial position of each corresponding segmented list in the user list according to the periodically traversed subscription time information and the set number of the users in the segmented lists, and generating and caching segmented data of the user list based on the initial position;
and the segment traversing module is used for extracting corresponding segment data from a cache when traversing the user list and executing the associated service, and performing segment traversing on the user list based on the segment data.
9. An electronic device, comprising:
a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the user list processing method of any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the user list processing method of any one of claims 1 to 7 when executed by a computer processor.
CN202111422187.0A 2021-11-26 2021-11-26 User list processing method, system, electronic equipment and storage medium Active CN114189490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111422187.0A CN114189490B (en) 2021-11-26 2021-11-26 User list processing method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111422187.0A CN114189490B (en) 2021-11-26 2021-11-26 User list processing method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114189490A true CN114189490A (en) 2022-03-15
CN114189490B CN114189490B (en) 2023-03-31

Family

ID=80602755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111422187.0A Active CN114189490B (en) 2021-11-26 2021-11-26 User list processing method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114189490B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060008242A1 (en) * 2004-07-08 2006-01-12 International Business Machines Corporation Segmented processing of data recordings
CN102262526A (en) * 2010-05-31 2011-11-30 迈普通信技术股份有限公司 Ordered tree table segmented traversing method and software processing system
CN102761524A (en) * 2011-04-27 2012-10-31 中兴通讯股份有限公司 Steaming media storage and playing method and corresponding system
CN105446652A (en) * 2014-08-08 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for storing camera shooting data
CN110213643A (en) * 2019-06-11 2019-09-06 北京奇艺世纪科技有限公司 A kind of flow medium buffer method, apparatus and terminal device
CN111523920A (en) * 2019-04-04 2020-08-11 维肯智能(深圳)有限公司 Information pushing method and device and terminal equipment
CN112464165A (en) * 2020-11-25 2021-03-09 西安西热电站信息技术有限公司 Method for improving measuring point statistical efficiency, storage medium and computing device
CN112764988A (en) * 2021-01-08 2021-05-07 城云科技(中国)有限公司 Data segmentation acquisition method and device
CN112966132A (en) * 2021-03-23 2021-06-15 深圳市商汤科技有限公司 Data processing method, data processing device, storage medium and computer equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060008242A1 (en) * 2004-07-08 2006-01-12 International Business Machines Corporation Segmented processing of data recordings
CN102262526A (en) * 2010-05-31 2011-11-30 迈普通信技术股份有限公司 Ordered tree table segmented traversing method and software processing system
CN102761524A (en) * 2011-04-27 2012-10-31 中兴通讯股份有限公司 Steaming media storage and playing method and corresponding system
CN105446652A (en) * 2014-08-08 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for storing camera shooting data
CN111523920A (en) * 2019-04-04 2020-08-11 维肯智能(深圳)有限公司 Information pushing method and device and terminal equipment
CN110213643A (en) * 2019-06-11 2019-09-06 北京奇艺世纪科技有限公司 A kind of flow medium buffer method, apparatus and terminal device
CN112464165A (en) * 2020-11-25 2021-03-09 西安西热电站信息技术有限公司 Method for improving measuring point statistical efficiency, storage medium and computing device
CN112764988A (en) * 2021-01-08 2021-05-07 城云科技(中国)有限公司 Data segmentation acquisition method and device
CN112966132A (en) * 2021-03-23 2021-06-15 深圳市商汤科技有限公司 Data processing method, data processing device, storage medium and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MO SHA; YUCHEN LI;KIAN-LEE TAN: "GPU-based Graph Traversal on Compressed Graphs" *
郑东东 等: "基于分段的适应性流媒体缓存管理算法" *

Also Published As

Publication number Publication date
CN114189490B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
Liu et al. A new service mechanism for profit optimizations of a cloud provider and its users
US20090307329A1 (en) Adaptive file placement in a distributed file system
US20130232310A1 (en) Energy efficiency in a distributed storage system
CN109614347B (en) Processing method and device for multi-level cache data, storage medium and server
US8171228B2 (en) Garbage collection in a cache with reduced complexity
CN108694188B (en) Index data updating method and related device
US20240061712A1 (en) Method, apparatus, and system for creating training task on ai training platform, and medium
CN109299101B (en) Data retrieval method, device, server and storage medium
CN110688382A (en) Data storage query method and device, computer equipment and storage medium
CN109784065A (en) Access control method, device, server and storage medium
CN109885729B (en) Method, device and system for displaying data
CN112866339B (en) Data transmission method and device, computer equipment and storage medium
CN110069565B (en) Distributed database data batch processing method and device
US20210117316A1 (en) Data processing method and apparatus, and storage system
CN114189490B (en) User list processing method, system, electronic equipment and storage medium
CN113051271A (en) Cold and hot data separation method, device and equipment
Jia et al. Drum: A rhythmic approach to interactive analytics on large data
CN106549983B (en) Database access method, terminal and server
CN113448739B (en) Data processing method and device
US11836141B2 (en) Ranking database queries
CN112632027A (en) Log data storage method and device
Liang et al. Correlation-aware replica prefetching strategy to decrease access latency in edge cloud
JP7200299B2 (en) METHOD, APPARATUS, ELECTRONIC DEVICE, STORAGE MEDIUM AND PROGRAM FOR OPTIMIZING SEARCH SYSTEM
CN114780267B (en) Interface calling method, device, equipment and storage medium
US11615092B1 (en) Lightweight database pipeline scheduler

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230928

Address after: 31a, 15th floor, building 30, maple commercial city, bangrang Road, Brazil

Patentee after: Baiguoyuan Technology (Singapore) Co.,Ltd.

Address before: 511402 5-13 / F, West Tower, building C, 274 Xingtai Road, Shiqiao street, Panyu District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU BAIGUOYUAN INFORMATION TECHNOLOGY Co.,Ltd.