A method, device, equipment and storage medium for generating a big data ranking list

By comparing the first extreme value data of the initial ranking list with the second set of data elements in the big data, updating the extreme value data, and generating the target ranking list, the problems of large memory consumption and low efficiency in the existing technology are solved, and the effect of quickly generating the ranking list is achieved.

CN115344670BActive Publication Date: 2025-12-30WUHAN SIPU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210987195.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2025-12-30
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

Existing technologies consume large amounts of memory and are inefficient when generating big data ranking lists, with slow sorting speeds.

Method used

By selecting the first set of data elements in the big data that has the same number of ranking elements as the initial ranking list, the first extreme value data is determined and compared with the second set of data elements. The extreme value data is updated according to the comparison results to generate the target ranking list, thus avoiding the need to allocate additional storage space.

Benefits of technology

It enables the rapid generation of leaderboards from massive amounts of data, saving memory, improving generation efficiency, and has wide applicability, without being limited by devices or platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344670B_ABST
    Figure CN115344670B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, in particular to a method for generating a big data ranking list. The method comprises the following steps: selecting a first data element set with the same number of rankings as big data as an initial ranking list, wherein the number of rankings is the number of data contained in a target ranking list; establishing a storage space corresponding to the first data element set to store the first data element set; determining a first extreme value data in the initial ranking list based on the initial ranking list, wherein the first extreme value data represents a data element with the minimum value in the first data element set; comparing data elements in a second data element set with the first extreme value data, determining a comparison result based on a preset comparison rule, wherein the second data element set represents data elements in the big data except the first data element set; and generating the target ranking list according to the comparison result. The method has the advantages of small memory occupation, fast convergence speed and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and storage medium for generating big data ranking lists. Background Technology

[0002] With the development of mobile internet application technology, various business scenarios have emerged. These business scenarios are constantly generating corresponding information flows, which in turn accumulate and aggregate to generate new information value: ranking lists.

[0003] Rankings are objective reflections of the strength of related or similar things, and they involve comparison between different categories. Examples include topic rankings, post rankings, game performance rankings, popularity rankings, popular song rankings, and team strength rankings.

[0004] Currently, leaderboards often require massive amounts of data. For example, to find the top 200 sessions with the highest traffic peaks from 10 million sessions, the relevant algorithm sorts the 10 million sessions according to their traffic peaks, and then takes the top 200 sessions for further analysis. Obviously, this algorithm requires at least 10 million additional sessions of storage space. The time complexity of the quicksort algorithm is O(n). After sorting the 10 million sessions, only 0.002% of the data is needed, and 99.998% of the sorting is unnecessary. This not only consumes memory resources and time, but also involves a lot of useless work.

[0005] Therefore, there is an urgent need for a method that can generate leaderboards efficiently and quickly while saving memory, even with massive amounts of data. Summary of the Invention

[0006] This application provides a method, apparatus, device, and storage medium for generating big data ranking lists, in order to solve the problems of existing big data ranking lists having large memory consumption, low efficiency, and slow speed.

[0007] The first aspect of this invention provides a method for generating a big data ranking list, comprising the following steps:

[0008] Select the first set of data elements in the big data that is the same as the number of rankings, as the initial ranking list, where the number of rankings is the number of data that the target ranking list can accommodate;

[0009] Establish a storage space corresponding to the first data element set to store the first data element set;

[0010] Based on the initial leaderboard, the first extreme value data in the initial leaderboard is determined, where the first extreme value data is the data element representing the minimum value in the first data element set;

[0011] The data elements in the second data element set are compared with the first extreme value data, and the comparison result is determined based on the preset comparison rules. The second data element set represents the data elements in the big data other than the first data element set.

[0012] Based on the comparison results, a target ranking list is generated.

[0013] In one possible implementation, the step of selecting a first set of data elements from the big data that is the same number as the ranking elements as the initial ranking list further includes:

[0014] Initialize the first set of data elements.

[0015] In one possible implementation, the step of determining the first extreme value data in the initial leaderboard based on the initial leaderboard further includes:

[0016] The first extreme value in the initial ranking is indexed so that it can be found by indexing.

[0017] In one possible implementation, the step of comparing data elements in the second data element set with the first extreme value data and determining the comparison result based on a preset comparison rule further includes:

[0018] Determine the size of the data element relative to the first extreme value;

[0019] Based on the preset comparison rules, choose whether to update the first extreme value data.

[0020] In one possible implementation, the step of generating the target ranking list based on the comparison results further includes:

[0021] Based on the comparison results, determine whether the first extreme value data needs to be updated;

[0022] If the first extreme value data is updated, the extreme value data of the updated initial ranking is calculated to obtain the second extreme value data, and the second extreme value data is indexed and marked.

[0023] If the first extreme value data is not updated, the compared data elements are discarded, and the second data element set is traversed.

[0024] In one possible implementation, if the first extreme value data is updated, the extreme value data of the updated initial ranking list is calculated to obtain the second extreme value data, and the second extreme value data is indexed and marked, the step further includes:

[0025] Based on the updated result of the first extreme value data, discard the first extreme value data;

[0026] Update the first data element set, and store the data elements that are compared with the first extreme value data in the storage space.

[0027] In one possible implementation, after the step of generating the target ranking list based on the comparison results, the method further includes:

[0028] Sort the data elements in the target leaderboard sequentially;

[0029] Based on the sorting results, update the target leaderboard.

[0030] A second aspect of the present invention provides an apparatus for generating a big data ranking list, comprising:

[0031] A unit is established to select the first set of data elements in the big data that is the same as the number of ranking elements, as the initial ranking list, where the number of ranking elements is the number of data elements that the target ranking list can accommodate.

[0032] A storage unit is used to establish a storage space corresponding to the first data element set, for storing the first data element set;

[0033] The determining unit is used to determine the first extreme value data in the initial ranking list based on the initial ranking list, wherein the first extreme value data is the data element representing the minimum value in the first data element set;

[0034] The comparison unit is used to compare the data elements in the second data element set with the first extreme value data, and determine the comparison result based on the preset comparison rules. The second data element set represents the data elements in the big data other than the first data element set.

[0035] Generate leaderboard unit, used to generate target leaderboards based on comparison results.

[0036] A third aspect of the present invention provides a computer-readable storage medium storing executable instructions that, when executed by a processor, cause the execution of the method for generating a big data ranking as described above.

[0037] A fourth aspect of the present invention provides an electronic device, the electronic device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement the method for generating a big data ranking as described above.

[0038] As can be seen from the above scheme, this application provides a method, apparatus, device, and storage medium for generating big data ranking lists. It selects a first set of data elements corresponding to the number of rankings from the big data to form an initial ranking list; calculates the first extreme value data in the initial ranking list; iterates through the second set of data elements and compares it sequentially with the first extreme value data; updates the first extreme value data according to preset comparison rules; and finally generates the target ranking list. The solution of this application achieves this by continuously comparing data elements with the first extreme value data, resulting in more and more data elements being discarded in the second set of data elements, leading to faster convergence. Furthermore, it does not require additional session storage space, and has the advantages of low memory consumption, high result accuracy, no limitations on devices and platforms, and wide applicability. Attached Figure Description

[0039] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 A flowchart illustrating a method for generating a big data ranking list provided in this application;

[0041] Figure 2 A flowchart illustrating the comparison of data elements in the second data element set with the first extreme value data in a method for generating a big data ranking provided in this application;

[0042] Figure 3 A flowchart illustrating the process of generating a target ranking list, as provided in this application, for a method of generating a big data ranking list.

[0043] Figure 4 This application provides a schematic diagram of the target ranking process for a method of generating big data ranking lists.

[0044] Figure 5 A schematic diagram illustrating the storage space update process for a method of generating a big data ranking provided in this application;

[0045] Figure 6 This is a flowchart illustrating an embodiment of a method for generating a big data ranking list provided in this application. Detailed Implementation

[0046] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only some embodiments of this application, and not all embodiments.

[0047] It should be understood that the terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate, for example, to allow implementation in orders other than those given in the embodiments illustrated or described in this application.

[0048] Finding the top-ranked sessions with peak traffic from massive amounts of data often involves allocating storage space to store the vast amount of data and then calculating the top-ranked sessions through statistical analysis. For example, processing 10 million data entries to select the top 200 sessions requires allocating storage space for 10 million sessions. The quicksort algorithm has a time complexity of O(nlogn), and only 0.002% of the data is actually processed, meaning 99.998% of the sorting is unnecessary. This consumes a significant amount of memory resources. Furthermore, calculating the top 200 from 10 million data entries requires sorting all 10 million data entries before computation, resulting in slow convergence and a long processing time.

[0049] This application aims to provide a method for generating big data ranking lists. The method of this application is described in detail below:

[0050] See Figures 1 to 6 This invention provides a method for generating big data ranking lists, comprising the following steps:

[0051] like Figure 1 As shown, S101: Select the first set of data elements in the big data that has the same number of ranking elements as the initial ranking list.

[0052] The number of rankings refers to the number of data items contained in the target leaderboard.

[0053] The number of rankings can be preset according to the target leaderboard, so that the preset number in the target leaderboard has the same number of data as the number of rankings.

[0054] It should be noted that if the big data is already stored in some form, it can be used directly without changing the storage format. In the subsequent big data filtering process, the data can be illustrated by presenting it as a one-dimensional array or a singly linked list.

[0055] It should also be noted that the first set of data elements represents the set of all data in the ranking quantity.

[0056] The first set of data elements serves as the initial leaderboard. In subsequent execution steps, the first set of data elements is updated multiple times so that the initial leaderboard eventually forms the target leaderboard.

[0057] Understandably, in order to facilitate the comparison between data elements in the big data set and data elements in the first data element set, the data elements in the first data element set can be optionally initialized to 0, so as to reduce comparison errors.

[0058] In this embodiment, a first set of data elements, which is the same as the number of ranking elements, is selected from the big data as the initial ranking list for data element comparison in subsequent steps. Furthermore, initializing the data elements in the first set of data elements not only facilitates the comparison of subsequent data elements but also reduces errors in the comparison and improves accuracy.

[0059] S102: Establish a storage space corresponding to the first data element set to store the first data element set.

[0060] The storage space refers to the space that can store data, such as memory or disk, and this technical solution does not limit it.

[0061] Storing the first set of data elements in the storage space facilitates the storage of updated data elements in the first set of data elements in subsequent steps.

[0062] In this embodiment, by establishing a storage space to store the first set of data elements, it is convenient to update the storage of data elements. In addition, there is no need to establish additional storage space to store data elements in big data, thus saving storage space.

[0063] S103: Based on the initial leaderboard, determine the first extreme value data in the initial leaderboard.

[0064] Among them, the first extreme value data represents the data element with the minimum value in the first data element set.

[0065] It is understandable that by comparing the data elements included in the first data element set, the data element with the minimum value is determined and set as the first extreme value data. By setting this first extreme value data, it can be known that all other data elements in the first data element set are greater than this first extreme value data. When the first data element set needs to be updated in subsequent steps, the data elements that need to be updated can be determined in the above way.

[0066] It should be noted that, for ease of retrieval, the first extreme value is indexed to facilitate its location. For example, in a large dataset, when retrieving the top 200 largest data points, the first data element set includes 200 data elements. First, these 200 data elements are initialized. Then, the minimum value among these 200 data elements is identified as the first extreme value (assuming it is 2000). This first extreme value is then indexed (assuming the index is 50). In subsequent steps, data element values ​​from the large dataset are compared to 2000. If a value is greater than 2000, the corresponding data element can be found using the index 50.

[0067] In this embodiment, by setting the minimum value data element in the first data element set as the first extreme value data, and by indexing and marking the first extreme value data, it is convenient to compare the data elements in the big data with the first extreme value data. When it is necessary to update the first extreme value data, the first extreme value data is found through the index mark and updated. This has the advantages of fast positioning and simple algorithm.

[0068] S104: Compare the data elements in the second data element set with the first extreme value data, and determine the comparison result based on the preset comparison rules.

[0069] The second data element set represents data elements in the big data other than the first data element set.

[0070] Understandably, data elements in big data other than the first set of data elements are defined as the second set of data elements. When additional data elements are added to the big data, they should also be assigned to the second set of data elements, and data elements from the second set of data elements should be compared with the first extreme value data.

[0071] Step S104, which compares the data elements in the second data element set with the first extreme value data, also includes steps S1041 and S1042.

[0072] like Figure 2 As shown, S1041: Determine the size of the data element and the first extreme value data.

[0073] Specifically, the data elements selected from the second data element set are compared with the first extreme value data. Once the size of the two data elements being compared is determined, the smaller data element can be discarded, and the larger data element can be retained.

[0074] S1042: Based on the preset comparison rules, choose whether to update the first extreme value data.

[0075] The preset comparison rules can be understood as how to proceed with subsequent processing after comparing the size of two data points.

[0076] Since this application requires obtaining a ranking list based on large amounts of data, the preferred comparison rule is:

[0077] 1. When comparing two data points, keep the larger data and discard the smaller data.

[0078] 2. If two data points are equal, the data is not updated.

[0079] For example, in the aforementioned case, if the first extreme value is 2000, and the corresponding data element in the second data element set is 2300, the data element corresponding to the first extreme value is found using the index marker and updated. Similarly, if the corresponding data element in the second data element set is 1800, there is no need to update the first extreme value; the data element in the second data element set is discarded. If the corresponding data element in the second data element set is 2000, since the first extreme value is also 2000, there is no need to update the first extreme value; the data element in the second data element set is discarded.

[0080] Understandably, it is necessary to iterate through the data in the second data element set and compare it with the first extreme value data in turn to obtain an accurate target ranking list.

[0081] In this embodiment, data elements in the second data element set are compared with the first extreme value data, and the comparison result is determined based on a preset comparison rule, deciding whether the first extreme value data needs to be updated. In this way, the initial leaderboard is continuously updated to ensure that the first data element set in the initial leaderboard always remains at its maximum.

[0082] S105: Generate a target ranking list based on the comparison results.

[0083] Specifically, by continuously comparing the data elements in the second data element set with the first extreme value data, the first data element set is updated, and the target ranking list is finally generated.

[0084] In step S105, the process of generating the target ranking list also includes steps S1051 to S1053.

[0085] like Figure 3 As shown, S1051: Based on the comparison results, determine whether the first extreme value data needs to be updated.

[0086] Specifically, if a data element in the second data element set is greater than the first extreme value data, it can be determined that the first extreme value data needs to be updated.

[0087] S1052: If the first extreme value data is updated, calculate the extreme value data of the updated initial ranking list to obtain the second extreme value data, and index and mark the second extreme value data.

[0088] If the first extreme value data is to be updated, that is, to find the data element in the first data element set that is larger than the first extreme value data in the second data element set through the index mark and update it accordingly, it can be understood that the updated data element in the first data element set is not certain whether it is the minimum value in the first data element set. Therefore, it is also necessary to calculate the second extreme value data among all data elements in the first data element set.

[0089] The second extreme value represents the minimum value recalculated after updating the data elements in the first data element set. This second extreme value is then compared sequentially with the data elements in the second data element set. For example, in the previous case, if the first extreme value was 2000, the updated second extreme value would be 2500, and this element would be indexed as 50. The process continues, comparing each element in the second data element set with the second extreme value, discarding any values ​​less than 2500.

[0090] S1053: If the first extreme value data is not updated, discard the compared data elements and continue traversing the second data element set.

[0091] In this embodiment, if the first extreme value data is updated, the data element represented by the first extreme value data is discarded, and the corresponding update is performed; if the first extreme value data is not updated, the second data element set is traversed again. After traversing the second data element set for a certain period of time, the extreme value data in the first data element set becomes relatively large. That is to say, when traversing the second data element set again, more and more data elements will be discarded. Compared with large data sets, the data convergence speed will become faster and faster, thus enabling the rapid generation of a leaderboard.

[0092] Furthermore, compared to heap sort, this scheme does not require building a min-heap. It directly finds the minimum value in the first set of data elements. When an element in the second set of data elements is greater than the data in the min-heap, the min-heap is updated. However, the heap structure at this point may no longer satisfy the min-heap's requirements, necessitating adjustments to the heap structure and rebuilding the min-heap to maintain the minimum value of the root node. Therefore, this scheme has the advantages of simpler and faster computation compared to heap sort.

[0093] In one embodiment, step S105 is followed by a step of sorting the target leaderboard and generating a leaderboard, which further includes steps S106 and S107.

[0094] like Figure 4As shown, S106: Sort the data elements in the target leaderboard in sequence.

[0095] The initial leaderboard formed by traversing the data elements in the second data element set is the target leaderboard. However, because the data in the first data element set was only updated accordingly without being sorted during the formation of the target leaderboard, the data elements in the generated target leaderboard are not arranged in sequence. Therefore, it is necessary to sort the data elements in the target leaderboard to ensure that the data elements in the target leaderboard are sorted in descending or ascending order.

[0096] S107: Based on the sorting results, update the target leaderboard.

[0097] Since the target leaderboard contains relatively little data, the choice of sorting method will not have a significant impact on the final target leaderboard. For example, sorting methods such as selection sort and quick sort can be used to sort the data elements in the target leaderboard sequentially. This scheme does not limit the choice of sorting method.

[0098] It should be noted that, in order to standardize and / or sort the generated target ranking list, its data elements may be aligned and then sorted sequentially.

[0099] In one embodiment, step S1052 updates the storage space while updating the first extreme value data, specifically including S10521 to S10522.

[0100] like Figure 5 As shown, S10521: Discard the first extreme value data based on the updated result of the first extreme value data.

[0101] S10522: Update the first data element set, and store the data elements that are compared with the first extreme value data in the storage space.

[0102] In the case of discarding the first extreme value data, the storage space occupied by the data element represented by the first extreme value data is released. This storage space is used to store the data element compared with the first extreme value data.

[0103] In this embodiment, the storage space occupied by the data element represented by the first extreme value data is released to store the data element compared with the first extreme value data. Furthermore, this solution only needs to store the storage space of the first data element set, without needing to allocate storage space for storing the data elements contained in the big data, which can save a lot of storage space.

[0104] like Figure 6 As shown, the above method can be illustrated in practical applications through the following specific embodiments:

[0105] Ten million data entries are stored in a linked list, where each data entry is represented by an element. The following steps are used to select the top 200 values ​​from this list to create a ranking.

[0106] S201: Select 200 data points from the big data to form the first set of data elements and establish an initial ranking list.

[0107] S202: Select the data element with the minimum value min from the first data element set and index the data element.

[0108] S203: Traverse the list excluding the selected 200 data items, comparing the element with the min; if element > min, execute S204; if element ≤ min, execute S205. The update ends when the traversal is complete.

[0109] S204: If element > min, then update the minimum value of the first data element set according to the index. After updating the minimum min, recalculate the values ​​of min and index. Continue to execute step S203.

[0110] S205: If element ≤ min, it means that the data is less than all values ​​in the Top array, so discard the data element directly. Continue to execute step S203.

[0111] S206: After the list is traversed, all the data elements stored in the first data element group meet the requirement of being among the top 200 in the list. Aligning the data elements stored in the first data element group and sorting them once will give us the Top 200 leaderboard.

[0112] In summary, the foregoing content is used to calculate the largest Top ranking in big data. When calculating the smallest Top ranking, the calculation method is the same as the algorithm steps for calculating the largest Top ranking, but the algorithm is reversed, and it is calculated based on the maximum value (max). This will not be elaborated here.

[0113] The present invention also provides an apparatus for generating a big data ranking list, which, by applying the aforementioned method for generating a big data ranking list, specifically includes:

[0114] A unit is established to select the first set of data elements in the big data that is the same as the number of ranking elements, as the initial ranking list, where the number of ranking elements is the number of data elements that the target ranking list can accommodate.

[0115] A storage unit is used to establish a storage space corresponding to the first data element set, for storing the first data element set;

[0116] The determining unit is used to determine the first extreme value data in the initial ranking list based on the initial ranking list, wherein the first extreme value data is the data element representing the minimum value in the first data element set;

[0117] The comparison unit is used to compare the data elements in the second data element set with the first extreme value data, and determine the comparison result based on the preset comparison rules. The second data element set represents the data elements in the big data other than the first data element set.

[0118] Generate leaderboard unit, used to generate target leaderboards based on comparison results.

[0119] The present invention also provides a computer-readable storage medium storing executable instructions that, when executed by a processor, cause the execution of the method for generating a big data ranking as described above.

[0120] The present invention also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the method for generating a big data ranking as described above.

[0121] It should be understood that each step of the above method embodiments can be completed by hardware logic circuits or software instructions in a processor.

[0122] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. In addition, in some possible implementations, each step in the above embodiments may be selectively executed according to the actual situation, and may be partially or fully executed, which is not limited here.

[0123] It is understood that the processor in the embodiments of this application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.

[0124] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art.

[0125] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method of generating a big data leaderboard, the method comprising: The method comprises the following steps: selecting a first data element set with the same number of rankings in big data as an initial ranking list, wherein the number of rankings is the number of data contained in a target ranking list; establishing a storage space corresponding to the first data element set to store the first data element set; determining a first extreme value data in the initial ranking list based on the initial ranking list, wherein the first extreme value data represents a data element with the minimum value in the first data element set; comparing a data element in a second data element set with the first extreme value data, determining a comparison result based on a preset comparison rule, wherein the second data element set represents data elements in the big data other than the first data element set; generating a target ranking list according to the comparison result; and determining whether the first extreme value data needs to be updated; if the first extreme value data is updated, calculating an extreme value data of the initial ranking list after the update to obtain a second extreme value data, and indexing the second extreme value data; if the first extreme value data is not updated, discarding the compared data element and continuing to traverse the second data element set.

2. The method of claim 1, wherein, The step of selecting a first data element set with the same number of rankings in big data as an initial ranking list further comprises: initializing the first data element set.

3. The method of claim 1, wherein, The step of determining a first extreme value data in the initial ranking list based on the initial ranking list further comprises: indexing the first extreme value data in the initial ranking list so as to find the first extreme value data through the index.

4. The method of claim 1, wherein, The step of comparing a data element in a second data element set with the first extreme value data, determining a comparison result based on a preset comparison rule further comprises: determining the size of the data element and the first extreme value data; selecting whether to update the first extreme value data based on the preset comparison rule.

5. The method of claim 1, wherein, The step of calculating an extreme value data of the initial ranking list after the update to obtain a second extreme value data, and indexing the second extreme value data if the first extreme value data is updated further comprises: discarding the first extreme value data according to the update result of the first extreme value data; updating the first data element set, and storing the data element compared with the first extreme value data in the storage space.

6. The method of claim 1, wherein, The step of generating a target ranking list according to the comparison result further comprises: sequentially sorting data elements in the target ranking list; updating the target ranking list based on the sequential sorting result.

7. An apparatus for generating a method of big data leaderboard, characterized in that, The method comprises the following steps: an establishing unit is configured to select a first data element set with the same number of rankings in big data as an initial ranking list, wherein the number of rankings is the number of data contained in a target ranking list; a storage unit is configured to establish a storage space corresponding to the first data element set to store the first data element set; a determining unit is configured to determine a first extreme value data in the initial ranking list based on the initial ranking list, wherein the first extreme value data represents a data element with the minimum value in the first data element set; The comparison unit is configured to compare data elements in a second data element set with the first extreme data, determine a comparison result based on a preset comparison rule, wherein the second data element set represents data elements in the big data except the first data element set; The generation ranking list unit is configured to generate a target ranking list according to the comparison result, and determine whether the first extreme data needs to be updated; if the first extreme data needs to be updated, calculate extreme data of the updated initial ranking list to obtain second extreme data, and index mark the second extreme data; if the first extreme data does not need to be updated, discard the compared data elements and continue to traverse the second data element set.

8. A computer-readable storage medium, characterized in that, The storage medium stores executable instructions, which, when executed by a processor, cause the execution of the method for generating a big data ranking list according to any one of claims 1-6.

9. An electronic device, comprising: The electronic device includes a processor and a memory, and the memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the method for generating a big data ranking list according to any one of claims 1-6.

Citation Information

Patent Citations

  • TOP ranking method and equipment for mass data and storage medium

    CN113810392A