Ranking list processing method and device, storage medium and electronic device
By dynamically expanding the ranking data range and performing fuzzy sorting, the problem of balancing accuracy and performance loss in sorting large amounts of data is solved, and the accuracy and performance of sorting are improved.
Patent Information
- Application Number
- CN202211096690.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-08
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-09-08
AI Technical Summary
In large-scale data sorting scenarios, existing technologies find it difficult to balance sorting accuracy and performance loss at the same time. Fuzzy sorting leads to decreased accuracy or excessive performance loss.
By dynamically expanding the data range of the ranking list, it is determined whether the data to be processed is within the data range of the ranking list. If it is exceeded, the data space is iteratively expanded until the data is within the range, and then fuzzy sorting is performed to determine its order.
It improves sorting accuracy and reduces performance loss in large data sorting scenarios, and enhances the flexibility and compatibility of the ranking list.
Smart Images

Figure CN115414673B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a ranking list processing method, a ranking list processing device, a computer-readable storage medium, and an electronic device. Background Art
[0002] When the amount of data to be sorted is too large, performing precise sorting may result in a long sorting process. To reduce the huge time and performance overhead of precise sorting, fuzzy sorting is gradually being widely used in large data sorting scenarios, such as bucket sorting, segment tree sorting, and skip list sorting.
[0003] In related technologies, when performing fuzzy sorting, the data to be sorted is usually pre-divided into multiple increasing or decreasing intervals, and data objects with values within the interval are stored together and no longer sorted, making it difficult to balance sorting accuracy and performance loss.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0005] The present disclosure provides a ranking list processing method, a ranking list processing device, a computer-readable storage medium, and an electronic device, thereby at least to some extent solving the problem in related technologies of the difficulty in balancing sorting accuracy and performance loss.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.
[0007] According to a first aspect of the present disclosure, a ranking list processing method is provided, which is applied to, in response to a sorting request for data to be processed, determining whether the data to be processed is within a data range of a ranking list, the ranking list comprising one or more first data spaces; if the data to be processed exceeds the data range of the ranking list, then based on the first data space, iteratively expanding the data range of the ranking list until the data to be processed is within the data range of the ranking list; if the data to be processed is within the data range of the ranking list, then fuzzy sorting of the data to be processed is performed on the ranking list to determine the fuzzy sorting order of the data to be processed.
[0008] In an exemplary embodiment of the present disclosure, if the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is iteratively expanded based on the first data space, including: if the data range of the ranking list is the initialization data range, the initialization data range is iteratively expanded by a first number of the first data spaces until the number of first data spaces included in the data range of the ranking list reaches a preset data space capacity, the first number being the number of the first data spaces included in the initialization data range.
[0009] In an exemplary embodiment of the present disclosure, after iteratively expanding the initialized data range by a first number of the first data spaces until the number of first data spaces contained in the data range of the ranking list reaches a preset data space capacity, the method further includes: if the data to be processed exceeds the data range of the ranking list, determining the second data space of the ranking list, and expanding the data range of the ranking list by a second number of the first data spaces, the second number being 1 less than the first number, and the second data space of the ranking list containing the first number of first data spaces.
[0010] In an exemplary embodiment of the present disclosure, after completing at least one round of iterative expansion of the second data space, determining the second data space of the ranking list includes: determining the second data space of this round based on the second data space of the previous round, and the second data space of this round is adjacent to the second data space of the previous round and contains the first number of first data spaces.
[0011] In an exemplary embodiment of the present disclosure, when the first round of iterative expansion of the second data space is not completed, determining the second data space of the ranking list includes: taking the entire data space corresponding to the initialization data range of the ranking list as the first second data space of the ranking list, and the second data space contains the first number of first data spaces.
[0012] In an exemplary embodiment of the present disclosure, after determining the second data space of the ranking list and expanding the data range of the ranking list by the second number of the first data spaces, the method further includes: if the data to be processed exceeds the data range of the ranking list, iteratively expanding the second data space by the first number of the first data spaces, and expanding the data range of the ranking list by the first number of the first data spaces after each iterative expansion of the second data space, until the number of the first data spaces contained in the second data space reaches the preset data space capacity.
[0013] In an exemplary embodiment of the present disclosure, after iteratively expanding the second data space by the first number of the first data spaces, and expanding the data range of the ranking list by the first number of the first data spaces after each iterative expansion of the second data space, until the number of the first data spaces contained in the second data space reaches the preset data space capacity, the method further includes: if the data to be processed exceeds the data range of the ranking list, determining the next round of second data space, performing the next round of iterative expansion of the second data space, and expanding the data range of the ranking list by the first number of the first data spaces after each iterative expansion, until the number of the second data spaces reaches the preset data space capacity, and the number of the first data spaces contained in each of the second data spaces reaches the preset data space capacity.
[0014] In an exemplary embodiment of the present disclosure, if the number of the second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each of the second data spaces reaches the preset data space capacity, the method further includes: if the data to be processed exceeds the data range of the ranking list, then the second data spaces of the preset data space capacity in the ranking list are merged into a new second data space, and based on the new second data space, the data range of the ranking list is iteratively expanded.
[0015] In an exemplary embodiment of the present disclosure, fuzzy sorting of the data to be processed in the ranking list to determine the fuzzy sorting order of the data to be processed includes: determining one or more target data spaces to which the data to be processed belongs in the ranking list; determining, in accordance with the data space depth of each target data space, the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space; and determining the fuzzy sorting order of the data to be processed according to the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space.
[0016] In an exemplary embodiment of the present disclosure, the method further includes: in response to a data update request of the data to be processed, determining a data space to be updated in the ranking list, and updating the amount of sorted data corresponding to the data space to be updated.
[0017] In an exemplary embodiment of the present disclosure, the method includes: obtaining one or more pieces of data update information to be processed sent by a slave node device, and determining the data space to be updated in the ranking list based on the one or more pieces of data update information to be processed; updating the sorted data volume corresponding to the data space to be updated, and returning the updated result to the slave node device.
[0018] According to a second aspect of the present disclosure, a ranking processing device is provided, the device comprising: a sorting request response module, for responding to a sorting request for data to be processed, and determining whether the data to be processed is within a data range of a ranking list, the ranking list comprising one or more first data spaces; a ranking expansion module, for iteratively expanding the data range of the ranking list based on the first data space until the data to be processed is within the data range of the ranking list if the data to be processed exceeds the data range of the ranking list; and a data sorting module, for fuzzily sorting the data to be processed within the ranking list if the data to be processed is within the data range of the ranking list, and determining a fuzzy sorting order of the data to be processed.
[0019] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned ranking list processing method is implemented.
[0020] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-mentioned ranking list processing method by executing the executable instructions.
[0021] The technical solution disclosed in this disclosure has the following beneficial effects:
[0022] In the ranking processing process described above, in response to a request to sort the data to be processed, a determination is made as to whether the data to be processed is within the data range of the ranking, which includes one or more first data spaces. If the data to be processed exceeds the data range of the ranking, the data range of the ranking is iteratively expanded based on the first data space until the data to be processed is within the data range of the ranking. If the data to be processed is within the data range of the ranking, the data to be processed is fuzzy sorted within the ranking to determine the fuzzy sort order of the data to be processed. The above process achieves an increase in the adaptability of the ranking capacity through dynamic expansion, making the ranking more flexible and compatible. This not only ensures sorting accuracy but also mitigates, to a certain extent, the performance loss caused by the sorting operation.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, serve to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and it is possible for a person skilled in the art to derive other drawings based on these drawings without inventive effort.
[0025] Figure 1 A flowchart showing a ranking list processing method in this exemplary embodiment is shown;
[0026] Figure 2 An example diagram of an initial data structure of a ranking list in this exemplary embodiment is shown;
[0027] Figure 3 An example diagram of an expanded ranking data structure in this exemplary embodiment is shown;
[0028] Figure 4 A diagram showing an example of an expanded ranking data structure in this exemplary embodiment is shown;
[0029] Figure 5 A flowchart illustrating a method of expanding the data range of a ranking list in this exemplary embodiment is shown;
[0030] Figure 6 A structural block diagram of a ranking processing device in this exemplary embodiment is shown;
[0031] Figure 7 An electronic device for implementing the above-mentioned ranking list processing method in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the 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, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0033] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0034] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0035] In related art, fuzzy sorting typically involves pre-dividing the data to be sorted into multiple ascending or descending intervals. Data objects with values within these intervals are then grouped together and no longer sorted. Because intervals cannot be changed once defined, overly large intervals can reduce sorting accuracy, while overly small intervals can lead to significant performance loss. This makes it difficult to balance sorting accuracy and performance.
[0036] In view of one or more of the above problems, an exemplary embodiment of the present disclosure provides a ranking processing method that can be applied to ranking scenarios with large amounts of data. For example, the method can be used to process game rankings.
[0037] The exemplary embodiment of the present disclosure provides a ranking list processing method, such as Figure 1 As shown, the ranking list processing method may specifically include the following steps S110 to S130:
[0038] Step S110 , in response to a ranking request for the data to be processed, determining whether the data to be processed is within a data range of a ranking list, where the ranking list includes one or more first data spaces;
[0039] Step S120: If the data to be processed exceeds the data range of the ranking list, iteratively expand the data range of the ranking list based on the first data space until the data to be processed is within the data range of the ranking list;
[0040] Step S130 : If the data to be processed is within the data range of the ranking list, the data to be processed is fuzzy sorted in the ranking list to determine the fuzzy sorting order of the data to be processed.
[0041] During the above ranking processing, the adaptive increase of ranking capacity is achieved through dynamic expansion, making the ranking more flexible and compatible. This not only ensures the accuracy of sorting, but also reduces the performance loss caused by the sorting operation to a certain extent.
[0042] It should be noted that the ranking processing method in this scheme can realize fuzzy sorting of the data to be processed, that is, it can eventually determine the data space to which the data to be processed belongs within the data range of the ranking list, and use the data space to which the data to be processed belongs within the data range of the ranking list to reflect the sorting status of the data to be processed.
[0043] The following are Figure 1 Each step is described in detail.
[0044] Step S110 , in response to a sorting request for the data to be processed, determining whether the data to be processed is within a data range of a ranking list, where the ranking list includes one or more first data spaces.
[0045] The data range of the ranking list can be used to represent the data capacity of the ranking list and can be composed of one or more first data spaces. The first data space is the smallest data space, that is, it does not include smaller data spaces. The corresponding data space depth is 1. The data range of the smallest data space is pre-set by the developer based on actual needs and is not specifically limited here. Optionally, the data spaces included in the ranking list can be stored using arrays or hash tables.
[0046] It should be noted that the data space depth here can be used to represent the depth of a smaller data space contained in a data space. For example, if data space a contains data space b, data space b contains data space c, and data space c is the smallest data space, then the data space depth of data space a is 3.
[0047] The data to be processed refers to data that can be sorted in a ranking list, for example, a player's game score can be sorted in a game ranking list.
[0048] After receiving a sorting request for the data to be processed, the data to be processed needs to be sorted in the ranking list. It should be noted that before sorting the data to be processed, it can be pre-determined whether the data to be processed is within the data range of the ranking list. If the data to be processed is outside the data range of the ranking list, step S120 can be executed; if the data to be processed is within the data range of the ranking list, step S130 can be executed.
[0049] Step S120 : If the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is iteratively expanded based on the first data space until the data to be processed is within the data range of the ranking list.
[0050] If the data to be processed exceeds the data range of the ranking list, the ranking list is iteratively expanded based on the first data space until the data to be processed is within the data range of the ranking list. After the data to be processed is within the data range of the ranking list, step S130 can be executed to sort the data to be processed.
[0051] In an optional embodiment, if the data to be processed exceeds the data range of the ranking list in the above step S120, the data range of the ranking list is iteratively expanded based on the first data space, which can be specifically achieved through the following steps: if the data range of the ranking list is the initialization data range, the initialization data range is iteratively expanded by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, and the first number is the number of first data spaces included in the initialization data range.
[0052] The initialization data range refers to the initial data range of the leaderboard before the expansion operation is performed. The initialization data range may include one or more first data spaces. It should be noted that the initialization data range of the leaderboard can be set according to actual needs and is not specifically limited here.
[0053] When the data range of the ranking list is the initial data range, the ranking list may be a one-layer structure with a data space depth of 1, including a first number of first data spaces.
[0054] For example, if the first number is M and the size of the first data space is S, the data range corresponding to the ranking list may be [A, A+M*S], where A is the lower limit of the initial data range of the ranking list.
[0055] When the data to be processed exceeds the data range, the initial data range of the data to be processed can be iteratively expanded. Specifically, iteratively expanding the initial data range by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity can be achieved by: each time the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is expanded by a first number of first data spaces until the number of first data spaces included in the ranking list reaches the preset data space capacity.
[0056] For example, Figure 2As shown, the initial data range of the ranking list is [A, A+M*S]. When the data to be processed exceeds the initial data range [A, A+M*S], the initial data range of the ranking list [A, A+M*S] is expanded by M first data spaces 201. At this time, the data range of the ranking list is [A, A+2M*S], where M is the number of first data spaces included in the initial data range. Whenever the data to be processed exceeds the upper limit of the ranking list's data range, the upper limit of the ranking list's data range is expanded by a first number of first data spaces until the number of first data spaces included in the ranking list reaches the preset data space capacity N. At this time, the data range of the ranking list can be [A, A+N*S].
[0057] It should be noted that the above exemplary description explains the expansion of the upper limit of the ranking list. In actual application, the lower limit of the ranking list can also be expanded in a corresponding manner. The specific setting can be based on actual needs and is not specifically limited here.
[0058] In the above process, by setting the preset data space capacity, the data spaces within the data range are classified into different levels and the number of sub-data spaces that can be contained within each level of data space is controlled to further reduce performance loss. Gradually expanding the ranking list based on the minimum data space can further ensure the accuracy of the sorting.
[0059] In an optional embodiment, after iteratively expanding the initialized data range by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, the following steps can be performed to further expand the ranking list: if the data to be processed exceeds the data range of the ranking list, determine the second data space of the ranking list, and expand the data range of the ranking list by a second number of first data spaces, the second number being 1 less than the first number; the second data space of the ranking list contains the first number of first data spaces.
[0060] The second data space is a data space with a data space depth greater than 1, that is, the second data space may include multiple sub-data spaces.
[0061] When determining the second data space of the ranking list, there may be two situations: one is that the first round of iterative expansion of the second data space is not completed, and the other is that at least one round of iterative expansion of the second data space is completed. The following describes how to determine the second data space of the ranking list in these two situations.
[0062] When the first round of iterative expansion of the second data space is not completed, the above-mentioned determination of the second data space of the ranking list can be specifically achieved in the following way: the entire data space corresponding to the initialization data range of the ranking list is used as the first second data space of the ranking list, and the second data space includes the first number of first data spaces.
[0063] For example, Figure 3 As shown, the first M minimum data spaces in the ranking list can be merged into the first second data space 301. In this case, the ranking list is upgraded to two layers. The first layer of the ranking list can include one second data space and NM minimum data spaces. The first second data space 301 contains M minimum data spaces, where N is the preset number of data spaces and M is the number of first data spaces included in the initialization data range. After determining the first second data space, the data range of the ranking list can be expanded by the second number of first data spaces. In this case, the data range of the ranking list can be [A, A+(N+M-1)*S].
[0064] After completing at least one round of iterative expansion of the second data space, the above-mentioned determination of the second data space of the ranking list can be specifically achieved in the following manner: based on the second data space of the previous round, the second data space of this round is determined, and the second data space of this round is adjacent to the second data space of the previous round and contains the first number of first data spaces.
[0065] In the above steps, after determining the second data space, the data range of the ranking list is further expanded by the second minimum data space. By determining the second data space, the data space is upgraded, and the ranking list is layered. By expanding the minimum data space by a specific number, the number of data spaces contained in each layer of the ranking list is further ensured to be limited, thereby further reducing performance loss.
[0066] In an optional embodiment, after determining the second data space of the ranking list and expanding the data range of the ranking list by the second number of first data spaces, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, the second data space is iteratively expanded by the first number of first data spaces, and after each iterative expansion of the second data space, the data range of the ranking list is expanded by the first number of first data spaces until the number of first data spaces contained in the second data space reaches the preset data space capacity.
[0067] The above-mentioned iterative expansion of the second data space by the first number of first data spaces, and the expansion of the data range of the ranking list by the first number of first data spaces after each iterative expansion of the second data space, until the number of first data spaces contained in the second data space reaches the preset data space capacity, can be specifically achieved through the following steps: after expanding the second data space by the first number of first data spaces, the data range of the ranking list is expanded by the first number of first data spaces; if the data to be processed exceeds the data range of the ranking list, continue to expand the second data space by the first number of first data spaces, and expand the data range of the ranking list by the first number of first data spaces, until the number of first data spaces contained in the second data space reaches the preset data space capacity.
[0068] For example, Figure 4 As shown, after a round of expansion of the first second data space, the data range of the ranking list can be [A, A+(2N-1)*S].
[0069] In the above process, the second data space is iteratively expanded to further expand the data range of the ranking list. By limiting the minimum number of data spaces contained in the second data space, it is possible to further ensure that the number of data spaces contained in each level of the ranking list is not excessive, thereby further reducing performance loss.
[0070] In an optional embodiment, after iteratively expanding the second data space by the first number of first data spaces, and expanding the data range of the ranking list by the first number of first data spaces after each iterative expansion of the second data space, until the number of first data spaces contained in the second data space reaches the preset data space capacity, the following steps may also be performed: if the data to be processed exceeds the data range of the ranking list, determine the next round of second data space, perform the next round of iterative expansion of the second data space, and expand the data range of the ranking list by the first number of first data spaces after each iterative expansion, until the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space also reaches the preset data space capacity.
[0071] At this time, the data range of the ranking list may be [A, A+N*N*S]. In the above steps, each second data space is supplemented to the maximum number of data spaces that can be accommodated, so as to further adaptively expand the ranking list.
[0072] In an optional embodiment, if the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity, the following steps may be performed: if the data to be processed exceeds the data range of the ranking list, the second data spaces within the preset data space capacity of the ranking list are merged into a new second data space, and the data range of the ranking list is iteratively expanded based on the new second data space. This iterative expansion is continued in this manner.
[0073] It should be noted that after each expansion, the ranking list can determine whether the data to be processed is within the data range of the ranking list. If the data to be processed is within the data range of the ranking list, the expansion of the data range of the ranking list will be stopped, achieving exponential expansion.
[0074] like Figure 5 As shown, a flowchart for expanding the data range of the ranking list is provided, which may specifically include the following steps S501 to S508:
[0075] Step S501, in response to a ranking request for data to be processed, determining whether the data to be processed is within a data range of a ranking list;
[0076] Step S502: If the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is expanded by a first number of first data spaces;
[0077] Step S503, determining whether the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, if not, skip to step S502, if yes, continue to step S504;
[0078] Step S504: if the data to be processed exceeds the data range of the ranking list, determine a second data space to be processed in the ranking list, and expand the data range of the ranking list by a second number of first data spaces;
[0079] Step S505 , if the data to be processed exceeds the data range of the ranking list, the second data space to be processed is expanded by the first number of first data spaces, and the data range of the ranking list is expanded by the first number of first data spaces;
[0080] Step S506, determining whether the number of first data spaces contained in the second data space to be processed reaches the preset data space capacity, if not, skip to step S505, if yes, continue to step S507;
[0081] Step S507: Determine whether the number of second data spaces included in the ranking list reaches the preset data space capacity, and the number of first data spaces included in each second data space reaches the preset data space capacity. If not, jump to step S504; if so, continue to step S508;
[0082] Step S508: If the data to be processed exceeds the data range of the ranking list, the second data spaces of the ranking list that are preset to accommodate the number of data spaces are merged into a new second data space, and the data range of the ranking list is iteratively expanded based on the new second data space.
[0083] Figure 5 The steps shown achieve exponential dynamic expansion of the ranking list. A ranking list with a smaller capacity is pre-set. In actual application, new data can be continuously received and the capacity of the ranking list can be expanded to facilitate efficient ranking list query and update.
[0084] Step S130 : If the data to be processed is within the data range of the ranking list, the data to be processed is fuzzy sorted in the ranking list to determine the fuzzy sorting order of the data to be processed.
[0085] In an optional embodiment, in step S130, the data to be processed are fuzzy sorted in the ranking list, and the fuzzy sorting order of the data to be processed is determined, which can be achieved by the following steps: determining one or more target data spaces to which the data to be processed belongs in the ranking list; determining in sequence the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space according to the data space depth of each target data space; determining the fuzzy sorting order of the data to be processed according to the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space.
[0086] The target data space includes the data space to which the data to be processed belongs within the data range of the ranking list. The preceding data space of the target data space may be the data space that precedes the target data space in its parent target data space. The following data space may be the data space that follows the target data space in its parent target data space.
[0087] When performing order statistics, two situations may occur: one is that the minimum number of data spaces in the ranking reaches the D power of the preset data space capacity; the other is that the minimum number of data spaces in the ranking does not reach the D power of the space capacity, where D is the maximum data space depth of the ranking.
[0088] For example, the data range of the ranking list is [A, A+N D*S], the ranking list meets the first case above, where D represents the maximum data space depth of the ranking list. In this case, when the value of the data to be processed is R, it can be calculated by The result of the calculation is rounded down to get the target data space with a data space depth of D to which data R belongs in the ranking list. The target data space can be numbered as B1, and the sorted data corresponding to the preceding data space of the target data space B1 in the data range of the ranking list is summed up, and the summed result is recorded as C1. At this time, the data range corresponding to the target data space B1 is [B1*N, B1*N+N D-1 *S]. Next, the target data space number of the data space depth D-1 to which data R belongs in the target data space B1 can be recorded as B2, and the sorted data corresponding to the preceding data space of target data space B2 in target data space B1 can be summed up, and the summed result can be recorded as C2. Similarly, the final fuzzy sorting order of data R can be obtained as C1+C2+…+C D , where C D Target data space B D-1 The target data space B with a data space depth of 1 D The result of summing up the sorted data corresponding to the pre-order data space.
[0089] For example, for the second case above, when the maximum data space depth of the ranking list is D, the number of data spaces with a data space depth of 1 in the ranking list is less than N. D . There may be the following two situations: one is that the data space depth of the target data space B1 is D, and the other is that the data space depth of the target data space B1 is D-1. When the value of the data to be processed is R, if the data space depth of the target data space B1 is D, then the sum of the sorted data corresponding to the preceding data space of the target data space B1 with a data space depth of D in the data range of the ranking list can be recorded as C1; the sum of the sorted data corresponding to the preceding data space of the target data space B2 with a data space depth of D-1 in the target data space B1 is obtained to obtain C2; and so on, the target data space B D-1 The target data space B with a data space depth of 1 D Sum the sorted data corresponding to the pre-order data space of C D Finally, the final fuzzy sorting order of data R is C1+C2+…+C DWhen the value of the data to be processed is R, if the data space depth of the target data space B1 is D-1, then the sum of the sorted data corresponding to the preceding data space of the target data space B1 with a data space depth of D-1 in the data range of the ranking list can be recorded as C1; the sum of the sorted data corresponding to the preceding data space of the target data space B2 with a data space depth of D-2 in the target data space B1 can be obtained by summing up, and C2 can be obtained; and so on, the target data space B D-2 The target data space B with a data space depth of 1 D-1 Sum the sorted data corresponding to the pre-order data space of C D-1 Finally, the final fuzzy sorting order of data R is C1+C2+…+C D-1 .
[0090] In addition, in order to further improve the statistical efficiency of the sorting order, if the target data space B i-1 The target data space B contained in i Satisfy B i >N / 2, the B of the target data space can be i Sum the post-order data space and get C′ i , and then the target data space B i-1 The total amount of sorted data minus C′ i , and get C i Among them, B i Can represent the number of any target data space, B i-1 For B i The parent target data space.
[0091] In the above process, statistics are performed downward in sequence according to the depth of the data space to reduce the data space to be counted as much as possible, which can improve the order statistics efficiency of the data to be processed to a certain extent.
[0092] Furthermore, in an optional implementation, in response to a data update request for the data to be processed, the data space to be updated in the ranking list may be determined, and the amount of sorted data corresponding to the data space to be updated may be updated.
[0093] The data update request for the pending data can be an operation such as adding, modifying, or deleting the pending data. The operations such as adding, modifying, or deleting the pending data can be abstracted as an increase or decrease in the amount of sorted data corresponding to the data space in the ranking list.
[0094] For example, if the data to be processed is increased, the data space where the data to be processed is located is used as the data space to be updated, and the amount of sorted data corresponding to the data space to be updated is increased by one.
[0095] For example, if the data to be processed is modified, the data space where the original value of the data to be processed is located and the data space where the new value of the data to be processed is located are used as the data space to be updated, and the amount of sorted data corresponding to the data space where the original value of the data to be processed is located is reduced by one, and the amount of sorted data corresponding to the data space where the new value of the data to be processed is located is increased by one.
[0096] For example, if the data to be processed is deleted, the data space where the data to be processed is located is used as the data space to be updated, and the amount of sorted data corresponding to the data space to be updated is reduced by one.
[0097] In the above process, the sorting data volume corresponding to the corresponding data space is updated in real time so that the latest statistical sorting order can be obtained when performing statistical sorting, thereby improving the accuracy of sorting.
[0098] In addition, in an optional embodiment, one or more pieces of pending data update information sent by the slave node device can be obtained, and based on the one or more pieces of pending data update information, the data space to be updated in the ranking list can be determined; the sorted data volume corresponding to the data space to be updated is updated, and the updated result is returned to the slave node device.
[0099] Each user can be assigned a slave node device through a hashing method. The slave node device is responsible for recording the pending data update information of one or more users. The slave node device can periodically submit the pending data update information, for example, once every 10 minutes, so that the data space of the leaderboard can be updated in batches, thereby reducing network load and memory resource pressure.
[0100] When there is a large amount of data to be processed, a single process or server may not be able to perform various data operations on the leaderboard in a timely manner. The above steps can alleviate the problem of excessive network load and memory resource pressure to a certain extent by setting up slave node devices.
[0101] The exemplary embodiment of the present disclosure further provides a ranking processing device, such as Figure 6 As shown, the ranking processing device 600 may include:
[0102] A ranking request response module 610 is configured to respond to a ranking request for data to be processed and determine whether the data to be processed is within a data range of a ranking list, where the ranking list includes one or more first data spaces;
[0103] A ranking list expansion module 620 is configured to iteratively expand the data range of the ranking list based on the first data space if the data to be processed exceeds the data range of the ranking list until the data to be processed is within the data range of the ranking list;
[0104] The data sorting module 630 is configured to perform fuzzy sorting on the data to be processed in the ranking list if the data to be processed is within the data range of the ranking list, and determine the fuzzy sorting order of the data to be processed.
[0105] In an optional embodiment, the ranking expansion module 620 can be configured as follows: if the data range of the ranking list is the initialization data range, the initialization data range is iteratively expanded by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches a preset data space capacity, where the first number is the number of first data spaces included in the initialization data range.
[0106] In an optional embodiment, after iteratively expanding the initialized data range by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches a preset data space capacity, the ranking list processing device 600 further includes: a first expansion module, which is used to determine the second data space of the ranking list if the data to be processed exceeds the data range of the ranking list, and expand the data range of the ranking list by a second number of first data spaces, the second number being 1 less than the first number, and the second data space of the ranking list containing the first number of first data spaces.
[0107] In an optional embodiment, after completing at least one round of iterative expansion of the second data space, the second data space for determining the ranking list in the first expansion module can be configured as follows: based on the second data space of the previous round, the second data space of this round is determined, and the second data space of this round is adjacent to the second data space of the previous round and contains the first number of first data spaces.
[0108] In an optional embodiment, when the first round of iterative expansion of the second data space is not completed, the second data space of the ranking list determined in the first expansion module can also be configured to: use the entire data space corresponding to the initialization data range of the ranking list as the first second data space of the ranking list, and the second data space contains the first number of first data spaces.
[0109] In an optional embodiment, after determining the second data space of the ranking list and expanding the data range of the ranking list by the second number of first data spaces, the ranking list processing device 600 further includes: a second expansion module, which is used to iteratively expand the second data space by the first number of first data spaces if the data to be processed exceeds the data range of the ranking list, and expand the data range of the ranking list by the first number of first data spaces after each iterative expansion of the second data space, until the number of first data spaces contained in the second data space reaches the preset data space capacity.
[0110] In an optional embodiment, after iteratively expanding the second data space by the first number of first data spaces, and expanding the data range of the ranking list by the first number of first data spaces after each iterative expansion of the second data space, until the number of first data spaces contained in the second data space reaches the preset data space capacity, the ranking list processing device 600 further includes: a third expansion module, which is used to determine the next round of second data spaces if the data to be processed exceeds the data range of the ranking list, perform the next round of iterative expansion of the second data space, and expand the data range of the ranking list by the first number of first data spaces after each iterative expansion, until the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity.
[0111] In an optional embodiment, if the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity, the ranking processing device 600 also includes: a fourth expansion module, which is used to merge the second data spaces of the preset data space capacity in the ranking into a new second data space if the data to be processed exceeds the data range of the ranking, and iteratively expand the data range of the ranking based on the new second data space.
[0112] In an optional embodiment, the data sorting module 630 can be configured to: determine one or more target data spaces to which the data to be processed belongs in the ranking list; determine the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space in turn according to the data space depth of each target data space; determine the fuzzy sorting order of the data to be processed based on the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space.
[0113] In an optional embodiment, the ranking processing device 600 further includes: a data update module for determining the data space to be updated in the ranking list in response to a data update request of the data to be processed, and updating the sorted data volume corresponding to the data space to be updated.
[0114] In an optional embodiment, the ranking processing device 600 further includes: a batch update module, which is used to obtain one or more pieces of pending data update information sent by the slave node device, and determine the data space to be updated in the ranking list based on the one or more pieces of pending data update information; update the sorted data volume corresponding to the data space to be updated, and return the update result to the slave node device.
[0115] The specific details of each part of the ranking processing device 600 have been described in detail in the implementation of the method part. The undisclosed details can be found in the implementation of the method part, and will not be repeated here.
[0116] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium storing a program product capable of implementing the ranking processing method described above in this specification. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code that, when executed on an electronic device, causes the electronic device to execute the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of the present disclosure.
[0117] Specifically, the program product stored on the computer-readable storage medium can enable the electronic device to perform the following steps:
[0118] In response to a ranking request for data to be processed, determining whether the data to be processed is within a data range of a ranking list, the ranking list comprising one or more first data spaces;
[0119] If the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is iteratively expanded based on the first data space until the data to be processed is within the data range of the ranking list;
[0120] If the data to be processed is within the data range of the ranking list, the data to be processed will be fuzzy sorted in the ranking list to determine the fuzzy sorting order of the data to be processed.
[0121] In an optional embodiment, if the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is iteratively expanded based on the first data space, which can be achieved by the following steps: if the data range of the ranking list is the initialization data range, the initialization data range is iteratively expanded by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, and the first number is the number of first data spaces included in the initialization data range.
[0122] In an optional embodiment, after iteratively expanding the initialized data range by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, determine the second data space of the ranking list, and expand the data range of the ranking list by a second number of first data spaces, the second number is 1 less than the first number, and the second data space of the ranking list contains the first number of first data spaces.
[0123] In an optional embodiment, after completing at least one round of iterative expansion of the second data space, the above-mentioned determination of the second data space of the ranking list can be achieved through the following steps: based on the second data space of the previous round, determine the second data space of this round, and the second data space of this round is adjacent to the second data space of the previous round and contains the first number of first data spaces.
[0124] In an optional embodiment, when the first round of iterative expansion of the second data space is not completed, the above-mentioned determination of the second data space of the ranking list can be achieved by the following steps: the entire data space corresponding to the initialization data range of the ranking list is used as the first second data space of the ranking list, and the second data space contains a first number of first data spaces.
[0125] In an optional embodiment, after determining the second data space of the ranking list and expanding the data range of the ranking list by the second number of first data spaces, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, the second data space is iteratively expanded by the first number of first data spaces, and after each iterative expansion of the second data space, the data range of the ranking list is expanded by the first number of first data spaces until the number of first data spaces contained in the second data space reaches the preset data space capacity.
[0126] In an optional embodiment, after iteratively expanding the second data space by the first number of first data spaces, and expanding the data range of the ranking list by the first number of first data spaces after each iterative expansion of the second data space, until the number of first data spaces contained in the second data space reaches the preset data space capacity, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, determine the next round of second data space, perform the next round of iterative expansion of the second data space, and expand the data range of the ranking list by the first number of first data spaces after each iterative expansion, until the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity.
[0127] In an optional embodiment, if the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, the second data spaces of the preset data space capacity in the ranking list are merged into a new second data space, and based on the new second data space, the data range of the ranking list is iteratively expanded.
[0128] In an optional embodiment, the above-mentioned fuzzy sorting of the data to be processed in the ranking list and determination of the fuzzy sorting order of the data to be processed can be achieved through the following steps: determining one or more target data spaces to which the data to be processed belongs in the ranking list; determining in sequence the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space according to the data space depth of each target data space; determining the fuzzy sorting order of the data to be processed according to the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space.
[0129] In an optional implementation, the following steps may also be performed: in response to a data update request for the data to be processed, determining the data space to be updated in the ranking list, and updating the sorted data volume corresponding to the data space to be updated.
[0130] In an optional embodiment, the following steps may also be performed: obtaining one or more pieces of pending data update information sent by the slave node device, and determining the pending data space in the ranking list based on the one or more pieces of pending data update information; updating the sorted data volume corresponding to the pending data space, and returning the updated result to the slave node device.
[0131] During the above ranking processing, the adaptive increase of ranking capacity is achieved through dynamic expansion, making the ranking more flexible and compatible. This not only ensures the accuracy of sorting, but also reduces the performance loss caused by the sorting operation to a certain extent.
[0132] The program product may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0133] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0134] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0135] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0136] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0137] The exemplary embodiment of the present disclosure also provides an electronic device capable of implementing the above-mentioned ranking processing method. Figure 7 700 according to this exemplary embodiment of the present disclosure will be described. Figure 7 The electronic device 700 shown is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.
[0138] like Figure 7 As shown, electronic device 700 may be implemented as a general-purpose computing device. Components of electronic device 700 may include, but are not limited to, at least one processing unit 710, at least one storage unit 720, a bus 730 connecting various system components (including storage unit 720 and processing unit 710), and a display unit 740.
[0139] The storage unit 720 stores program codes, which can be executed by the processing unit 710 to enable the processing unit 710 to perform the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0140] Specifically, the processing unit 710 may perform the following steps:
[0141] In response to a ranking request for data to be processed, determining whether the data to be processed is within a data range of a ranking list, the ranking list comprising one or more first data spaces;
[0142] If the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is iteratively expanded based on the first data space until the data to be processed is within the data range of the ranking list;
[0143] If the data to be processed is within the data range of the ranking list, the data to be processed will be fuzzy sorted in the ranking list to determine the fuzzy sorting order of the data to be processed.
[0144] In an optional embodiment, if the data to be processed exceeds the data range of the ranking list, the data range of the ranking list is iteratively expanded based on the first data space, which can be achieved by the following steps: if the data range of the ranking list is the initialization data range, the initialization data range is iteratively expanded by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, and the first number is the number of first data spaces included in the initialization data range.
[0145] In an optional embodiment, after iteratively expanding the initialized data range by a first number of first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, determine the second data space of the ranking list, and expand the data range of the ranking list by a second number of first data spaces, the second number is 1 less than the first number, and the second data space of the ranking list contains the first number of first data spaces.
[0146] In an optional embodiment, after completing at least one round of iterative expansion of the second data space, the above-mentioned determination of the second data space of the ranking list can be achieved through the following steps: based on the second data space of the previous round, determine the second data space of this round, and the second data space of this round is adjacent to the second data space of the previous round and contains the first number of first data spaces.
[0147] In an optional embodiment, when the first round of iterative expansion of the second data space is not completed, the above-mentioned determination of the second data space of the ranking list can be achieved by the following steps: the entire data space corresponding to the initialization data range of the ranking list is used as the first second data space of the ranking list, and the second data space contains a first number of first data spaces.
[0148] In an optional embodiment, after determining the second data space of the ranking list and expanding the data range of the ranking list by the second number of first data spaces, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, the second data space is iteratively expanded by the first number of first data spaces, and after each iterative expansion of the second data space, the data range of the ranking list is expanded by the first number of first data spaces until the number of first data spaces contained in the second data space reaches the preset data space capacity.
[0149] In an optional embodiment, after iteratively expanding the second data space by the first number of first data spaces, and expanding the data range of the ranking list by the first number of first data spaces after each iterative expansion of the second data space, until the number of first data spaces contained in the second data space reaches the preset data space capacity, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, determine the next round of second data space, perform the next round of iterative expansion of the second data space, and expand the data range of the ranking list by the first number of first data spaces after each iterative expansion, until the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity.
[0150] In an optional embodiment, if the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity, the following steps can also be performed: if the data to be processed exceeds the data range of the ranking list, the second data spaces of the preset data space capacity in the ranking list are merged into a new second data space, and based on the new second data space, the data range of the ranking list is iteratively expanded.
[0151] In an optional embodiment, the above-mentioned fuzzy sorting of the data to be processed in the ranking list and determination of the fuzzy sorting order of the data to be processed can be achieved through the following steps: determining one or more target data spaces to which the data to be processed belongs in the ranking list; determining in sequence the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space according to the data space depth of each target data space; determining the fuzzy sorting order of the data to be processed according to the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space.
[0152] In an optional implementation, the following steps may also be performed: in response to a data update request for the data to be processed, determining the data space to be updated in the ranking list, and updating the sorted data volume corresponding to the data space to be updated.
[0153] In an optional embodiment, the following steps may also be performed: obtaining one or more pieces of pending data update information sent by the slave node device, and determining the pending data space in the ranking list based on the one or more pieces of pending data update information; updating the sorted data volume corresponding to the pending data space, and returning the updated result to the slave node device.
[0154] During the above ranking processing, the adaptive increase of ranking capacity is achieved through dynamic expansion, making the ranking more flexible and compatible. This not only ensures the accuracy of sorting, but also reduces the performance loss caused by the sorting operation to a certain extent.
[0155] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 721 and / or a cache memory unit 722 , and may further include a read-only memory unit (ROM) 723 .
[0156] The storage unit 720 may also include a program / utility 724 having a set (at least one) of program modules 725, such program modules 725 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0157] Bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0158] The electronic device 700 may also communicate with one or more external devices 800 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 700, and / or any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 750. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 760. Figure 7 As shown, the network adapter 760 communicates with other modules of the electronic device 700 via the bus 730. Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 700, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0159] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiment of the present disclosure.
[0160] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0161] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0162] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented as the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system". Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A ranking list processing method, characterized in that: The method comprises: In response to a ranking request for data to be processed, determining whether the data to be processed is within a data range of a ranking list, the ranking list comprising one or more first data spaces; If the data to be processed exceeds the data range of the ranking list, iteratively expanding the data range of the ranking list based on the first data space until the data to be processed is within the data range of the ranking list; If the data to be processed is within the data range of the ranking list, fuzzy sorting is performed on the data to be processed in the ranking list to determine the fuzzy sorting order of the data to be processed; The iterative expansion of the data range of the ranking list based on the first data space includes: If the data range of the ranking list is an initialized data range, iteratively expanding the initialized data range by a first number of the first data spaces until the number of the first data spaces included in the data range of the ranking list reaches a preset data space capacity, where the first number is the number of the first data spaces included in the initialized data range; After iteratively expanding the initialized data range by the first number of the first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, if the data to be processed exceeds the data range of the ranking list, the second data space of the ranking list is determined, and the data range of the ranking list is expanded by the second number of the first data spaces, the second number is 1 less than the first number, and the second data space of the ranking list contains the first number of first data spaces.
2. The method according to claim 1, characterized in that After completing at least one round of iterative expansion of the second data space, determining the second data space of the ranking list includes: The second data space of this round is determined according to the second data space of the previous round, where the second data space of this round is adjacent to the second data space of the previous round and includes the first number of first data spaces.
3. The method according to claim 1, characterized in that When the first round of iterative expansion of the second data space is not completed, determining the second data space of the ranking list includes: The entire data space corresponding to the initialization data range of the ranking list is used as the first second data space of the ranking list, and the second data space includes the first number of first data spaces.
4. The method according to claim 1, wherein After determining the second data space of the ranking list and expanding the data range of the ranking list by a second amount of the first data space, the method further includes: If the data to be processed exceeds the data range of the ranking list, the second data space is iteratively expanded by the first number of the first data spaces, and after each iterative expansion of the second data space, the data range of the ranking list is expanded by the first number of the first data spaces until the number of the first data spaces contained in the second data space reaches the number accommodated by the preset data space.
5. The method according to claim 4, characterized in that After iteratively expanding the second data space by the first number of the first data spaces, and expanding the data range of the ranking list by the first number of the first data spaces after each iterative expansion of the second data space, until the number of the first data spaces contained in the second data space reaches the preset data space capacity, the method further includes: If the data to be processed exceeds the data range of the ranking list, the next round of second data space is determined, and the next round of iterative expansion of the second data space is performed, and after each iterative expansion, the data range of the ranking list is expanded by the first number of first data spaces until the number of second data spaces reaches the preset data space capacity, and the number of first data spaces contained in each second data space reaches the preset data space capacity.
6. The method according to claim 5, characterized in that If the number of the second data spaces reaches the preset data space capacity, and the number of the first data spaces contained in each of the second data spaces reaches the preset data space capacity, the method further includes: If the data to be processed exceeds the data range of the ranking list, the second data spaces of the ranking list that are preset to accommodate the number of data spaces are merged into a new second data space, and the data range of the ranking list is iteratively expanded based on the new second data space.
7. The method according to claim 1, characterized in that The fuzzy sorting of the data to be processed in the ranking list to determine the fuzzy sorting order of the data to be processed includes: Determining one or more target data spaces to which the data to be processed belongs in the ranking list; Determining, in sequence according to the data space depth of each target data space, the amount of sorted data corresponding to the preceding data space or the amount of sorted data corresponding to the succeeding data space of each target data space; The fuzzy sorting order of the data to be processed is determined according to the sorted data amount corresponding to the preceding data space or the sorted data amount corresponding to the succeeding data space of each target data space.
8. The method according to claim 1, characterized in that The method further comprises: In response to a data update request for the data to be processed, a data space to be updated in the ranking list is determined, and the amount of sorted data corresponding to the data space to be updated is updated.
9. The method according to claim 1, characterized in that The method further comprises: Obtain one or more pieces of to-be-processed data update information sent by the slave node device, and determine the to-be-updated data space in the ranking list based on the one or more pieces of to-be-processed data update information; The sorted data amount corresponding to the data space to be updated is updated, and the update result is returned to the slave node device.
10. A ranking list processing device, characterized in that: The device comprises: a ranking request response module, configured to respond to a ranking request for data to be processed and determine whether the data to be processed is within a data range of a ranking list, the ranking list comprising one or more first data spaces; a ranking list expansion module, configured to iteratively expand the data range of the ranking list based on the first data space if the data to be processed exceeds the data range of the ranking list, until the data to be processed is within the data range of the ranking list; a data sorting module, configured to, if the data to be processed is within the data range of the ranking list, fuzzy sort the data to be processed in the ranking list to determine the fuzzy sorting order of the data to be processed; The iterative expansion of the data range of the ranking list based on the first data space includes: If the data range of the ranking list is an initialized data range, iteratively expanding the initialized data range by a first number of the first data spaces until the number of the first data spaces included in the data range of the ranking list reaches a preset data space capacity, where the first number is the number of the first data spaces included in the initialized data range; After iteratively expanding the initialized data range by the first number of the first data spaces until the number of first data spaces included in the data range of the ranking list reaches the preset data space capacity, if the data to be processed exceeds the data range of the ranking list, the second data space of the ranking list is determined, and the data range of the ranking list is expanded by the second number of the first data spaces, the second number is 1 less than the first number, and the second data space of the ranking list contains the first number of first data spaces.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
12. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 9 by executing the executable instructions.
Citation Information
Patent Citations
Maintenance method, device and equipment for ranking list in game and storage medium
CN110975296A