CN109766497B - Ranking list generation method and device, storage medium and electronic equipment - Google Patents

Ranking list generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109766497B
CN109766497B CN201910058655.7A CN201910058655A CN109766497B CN 109766497 B CN109766497 B CN 109766497B CN 201910058655 A CN201910058655 A CN 201910058655A CN 109766497 B CN109766497 B CN 109766497B
Authority
CN
China
Prior art keywords
target
ranking list
target record
ordered set
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910058655.7A
Other languages
Chinese (zh)
Other versions
CN109766497A (en
Inventor
高金菊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910058655.7A priority Critical patent/CN109766497B/en
Publication of CN109766497A publication Critical patent/CN109766497A/en
Application granted granted Critical
Publication of CN109766497B publication Critical patent/CN109766497B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a ranking list generation method, a ranking list generation device, a storage medium and electronic equipment, and belongs to the technical field of computers, wherein the method comprises the following steps: determining an ordered set in a cache, and acquiring a plurality of attribute parameters of a target record corresponding to an object to be ordered; processing the plurality of attribute parameters of the target record, and determining an object element which comprises at least one attribute parameter and each attribute parameter is a preset bit; and storing the object elements and the weight values of the target records into the ordered set to obtain a ranking list corresponding to the target records. The method can avoid the limitation of the weight value digits on the ranking list, can expand the multidimensional ranking list, and improves the accuracy of the ranking list.

Description

Ranking list generation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a ranking list generation method, a ranking list generation apparatus, a computer-readable storage medium, and an electronic device.
Background
In the live broadcast process, various real-time ranking lists need to be constructed for the hotspot data so as to improve the user experience. Redis is generally used as a cache of hotspot data, and meanwhile, the quick ranking of the ranking list is realized by utilizing a data structure of sorted set ordered set in the Redis.
In the related art, the multidimensional data can be sorted by means of database sorting, and when the data set is taken out from the database, the sort command of the database is used for sorting the multidimensional data. The ordered data obtained from the database is then placed in a cache. Or to achieve a real-time leader board requirement that can be sorted quickly, leaders are typically implemented with a sorted set ordered set of redis. In the sorted set ordered set, each element is provided with a weight, and partial or all data can be taken out in a forward sequence or a reverse sequence by using a corresponding command only by putting the element and the weight corresponding to the element into the structure of the ordered set, so that the sorting effect is achieved.
However, in the above method, when the sort command is used, a large amount of sorting operation of the hot spot data with large data volume and high real-time performance affects the performance of the database, so that the real-time performance is poor and the operation efficiency is low. For the multidimensional real-time ranking list in the sorted set ordered set, a plurality of numerical values need to be combined through a certain rule, so that the weight is constructed, the number of the ranking dimensions and the numerical value range of the ranking dimensions are limited by the precision limit of the weight score, and the problem that the ranking cannot be performed if the weight limit is exceeded is caused.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a ranking list generation method, a ranking list generation apparatus, a computer-readable storage medium, and an electronic device, which overcome, at least to some extent, a problem that a ranking list is limited by a weight digit number due to limitations and disadvantages of the related art.
According to an aspect of the disclosure, a ranking list generating method is provided, including: determining an ordered set in a cache, and acquiring a plurality of attribute parameters of a target record corresponding to an object to be ordered; processing the plurality of attribute parameters of the target record, and determining an object element which comprises at least one attribute parameter and each attribute parameter is a preset bit; and storing the object elements and the weight values of the target records into the ordered set to obtain a ranking list corresponding to the target records.
In an exemplary embodiment of the present disclosure, the plurality of attribute parameters include a user identifier, a user point, a gift number, and a guard level, and the user point, the gift number, and the guard level are arranged in a first preset order.
In an exemplary embodiment of the present disclosure, processing the plurality of attribute parameters of the target record, and determining an object element that includes at least one attribute parameter and each attribute parameter is a preset bit includes: and combining the residual attribute parameters except the attribute parameters in the first sequence and the user identification which are arranged according to the first preset sequence to form the object element.
In an exemplary embodiment of the present disclosure, combining the remaining attribute parameters except for the first-order attribute parameters arranged in the first preset order and the user identifier to constitute the object element includes: if the actual digit of the attribute parameter in the object element is smaller than the preset digit, preprocessing the attribute parameter in an alignment and bit-complementing mode; and combining the preprocessed residual attribute parameters and the user identifications according to a second preset sequence to form the object elements.
In an exemplary embodiment of the present disclosure, storing the object element and the weight value of the target record in the ordered set, and obtaining the leaderboard corresponding to the target record includes: determining a first-ordered attribute parameter in the target record as a weight value of the target record; storing the object elements and the weight values to the ordered set through a preset command, and constructing the numerical value of the target record in a ranking list to obtain the ranking list corresponding to the target record.
In an exemplary embodiment of the present disclosure, the method further comprises: and analyzing the object element according to an element rule, and obtaining the value of each attribute parameter from the object element.
In an exemplary embodiment of the present disclosure, the method further comprises: receiving a list inquiry request, and judging whether a variable of a target ranking list in the list inquiry request exists in the cache or not; if the variable exists, directly reading the target ranking list from the cache; and if the variable does not exist, acquiring a target record of a target data set corresponding to the list inquiry request from a database, and reading the target ranking list from the ranking list constructed according to the target record.
According to an aspect of the present disclosure, there is provided a ranking list generating apparatus including: the parameter acquisition module is used for determining an ordered set in the cache and acquiring a plurality of attribute parameters of the target record corresponding to the object to be ordered; an object element determination module, configured to process the multiple attribute parameters of the target record, and determine an object element that includes at least one attribute parameter and each attribute parameter is a preset bit; a ranking list construction module, configured to store the object elements and the weight values of the target records in the ordered set, so as to obtain a ranking list corresponding to the target records.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the leaderboard generation method of any of the above.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the leaderboard generation methods described above via execution of the executable instructions.
According to the ranking list generation method and device provided by the disclosure, on one hand, the attribute parameters of the target record are processed to generate the object element which comprises at least one attribute parameter and each attribute parameter is a preset bit, and the occupation of each attribute parameter in the object element is the preset bit, so that the limitation of weight bits in the related technology is avoided, the ranking dimensions of the multidimensional ranking list and the value range of each dimension value can be expanded at will, the expandability and the application range are increased, and the generated ranking list is more accurate. On the other hand, the object elements and the weighted values are stored in the ordered set to generate the ranking list, the ranking result of the ranking list can be obtained in real time, the real-time performance is improved, the database is not relied on for ranking, and the efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 schematically illustrates a flowchart of a ranking board generation method in the present exemplary embodiment.
Fig. 2 schematically shows a flowchart of the query list in the present exemplary embodiment.
Fig. 3 schematically illustrates a block diagram of a ranking board generating apparatus in the present exemplary embodiment.
Fig. 4 schematically illustrates an electronic device for implementing the ranking board generation method described above.
FIG. 5 schematically illustrates a computer-readable storage medium for implementing the leaderboard generation method described above.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In an actual business application scenario, there are various ranking lists, such as a user score ranking list. The ranking lists are divided into a real-time list and a history list according to timeliness of the ranking lists. The ranking list is divided from the display dimension of the ranking list and can be divided into a single-dimensional ranking list and a multi-dimensional ranking list. The single-dimensional ranking list is based on ranking in one dimension, and if the user score ranking list is used, only ranking according to the user score is displayed. The multidimensional ranking list refers to a ranking list which is obtained by integrating multiple dimensions, for example, a contribution list of a user needs to be combined with three dimensions, such as the number of gifts of the user and the guard rating of the user, except for points of the user, and the ranking is performed according to the number of gifts of the user under the condition that the points are the same and the ranking is performed according to the guard rating under the condition that the number of the gifts is the same.
When sorting by means of a database, multidimensional data can be easily sorted using the sort command of the database when a data set is taken out of the database. The ordered data obtained from the database is then placed in a cache. The real-time performance of the method is poor, high real-time performance means that the cache time is shorter, the database is frequently sorted, and the performance of the database is reduced due to a large number of sorting operations.
To achieve real-time leaderboard requirements that can be quickly ranked, leaderboards are typically implemented with a sorted set ordered set of redis. Updating (adding or deleting) a member in a sorted set is very fast, with the time complexity being the logarithm of the number of members of the set. In the sorted set ordered set, each element is provided with a score (called weight or associated score), and partial or all data can be taken out in a quick forward sequence or a reverse sequence by using a corresponding command only by putting the element and the weight corresponding to the element into the structure of the ordered set, so that the sorting effect is achieved. For example, an ordered set key defining a user score leaderboard: user _ score _ zset, insert a piece of data into the ordered set, insert user 20031245 into 20. Specific example commands are as follows: ZADD user _ score _ zset 2020031245.
The weight score is of the double type in redis, in double64 bits, 1 sign bit, 11 index bits, 52 mantissa bits, so the significances of double64 expressed as integers are 15 bits (decimal bits). For a multidimensional real-time ranking list, a plurality of numerical values need to be combined through a certain rule, so that a weight score is constructed, and the number of ranking dimensions and the numerical value range of the ranking dimensions are limited by the accuracy limit of the weight score. For example, for a user contribution list, the first order of the rankings is the user's points, the second order is the number of user's gifts, and the third order is the guard rating. Then from high to low, 1-5 bits of score store the integral value, 6-10 bits store the gift count, and 11-15 bits store the guard level. In practical use, if the value of a certain sorted dimension is too large, then the 15-bit valid bit of score is insufficient, and the occupation occurrence of more than 15 bits cannot be sorted multidimensional using this method.
In order to solve the above problem, the present exemplary embodiment first provides a ranking list generation method, which can be applied to processing a ranking list in a game live broadcast or other types of live broadcast scenes. Next, a ranking board generation method in the present exemplary embodiment is described in detail with reference to fig. 1.
In step S110, an ordered set is determined in the cache, and a plurality of attribute parameters of the target record corresponding to the object to be sorted are obtained.
In this exemplary embodiment, the cache may be a redis cache, for example, or a cache with other structures. In the exemplary embodiment, the main process of generating the leaderboard includes: naming the ordered set, determining an object to be ordered, determining an object element number and calculating a weight value. Determining an ordered set refers to the key naming of the ordered set, and the ordered set refers to a data structure of an ordered set type and can be named according to the specific content of the service and the naming specification of the ordered set. For example, the ordered collection may be named user _ con _ board. It should be noted that, what is defined herein is only a variable key of the sorted set structure, which may not include data, and the data is stored into the variable after the data is subsequently calculated.
Generally, an object to be ranked refers to an object needing to be ranked, for example, in a user contribution list, the object needing to be ranked is a user, and then the number corresponding to the ranking list can be represented by the user identification uid. The target record refers to data in a database, which may be, for example, a mongo database or other type of database, and may be used to describe the specific value of each user in the user contribution list. The target record may include a plurality of attribute parameters, wherein the plurality of attribute parameters may include, but are not limited to: the user id, the user score, the gift amount, the guard level, and other parameters may be included, which are not limited in particular. The user identification is used for uniquely representing the object for ranking in the ranking list and recording the object as uid. The user score user _ score, the gift number gift _ num, and the daemon level may be arranged in a first preset order. The first preset order may be, for example: the user points are arranged at the first position, the gift numbers are arranged at the second position, the guard levels are arranged at the third position, and the like, but the user points user _ score, the gift numbers gift _ num, and the guard levels may be sorted in other orders, which is not limited herein. By way of example, the target record may be represented in the form: { "uid" 20071234, "user _ score": 100, "gift _ num": 10000, "level": 20 }.
Each user may correspond to one target record, and for the same leader board, the types of the attribute parameters of the target records corresponding to all users are the same, but the corresponding numerical values may be different.
In step S120, the attribute parameters of the target record are processed to generate an object element that includes at least one attribute parameter and each attribute parameter is a preset bit.
In the exemplary embodiment, the problem that only weights can be processed in the related art and the leader board cannot be expanded due to the problem of limitation of the number of bits of the weights is avoided. In this exemplary embodiment, the object elements corresponding to the objects to be sorted may be processed. Specifically, the remaining attribute parameters except for the first-order attribute parameters arranged according to the first preset order and the user identifier are combined to form the object element. Referring to the above target record, the remaining attribute parameters except the first-ordered attribute parameters include the second-ordered attribute parameters and the third-ordered attribute parameters, so that the second-ordered attribute parameters, the third-ordered attribute parameters, and the user identifier in the target record are combined to form the object element. That is, among the attribute elements of the target record, except for the user identifier, the attribute element arranged at the second position and the attribute element arranged at the third position are extracted and combined with the user identifier according to the second preset order. The second preset order here may be understood as shifting the first preset order one bit to the left, i.e. shifting the second ordered attribute element and the third ordered attribute element one bit to the left, and arranging the user identifier in the last bit. Of course, the arrangement may be made in other sequences, and is not particularly limited. For example, in the target record, except for the user identifier uid, the attribute parameter of the first rank is user _ score, the attribute parameter of the second rank is gift _ num, and the attribute parameter of the third rank is level. According to the method in step S120, the object elements obtained by combining the attribute parameters in the target record are mem, gift _ num, level, and uid, where mem is an identifier character without special meaning, and the rest gift _ num, level, and uid are specific numerical values.
It should be noted that, in order to avoid the limitation of the number of weighted bits, in the present exemplary embodiment, each attribute parameter in the object element may be a numerical value of a preset bit, where the preset bit is used to indicate the number of bits occupied by each attribute parameter and may also be used to describe the length of each attribute parameter. For example, the preset bit may be 10 bits, or may also be 15 bits, or other values, and the example embodiment is described with the preset bit being 10 bits.
When actually combining a plurality of attribute parameters in a target record, each attribute parameter may be preprocessed first, where preprocessing refers to converting the number of bits of each attribute parameter into preset bits. Specifically, if the actual number of bits of the attribute parameter in the object element is smaller than the preset number of bits, the attribute parameter is preprocessed in a manner of aligning complementary bits. The alignment padding means padding the number of bits of the numerical value to a predetermined number of bits, and the specific mode may be, for example, a mode of padding 0 for the upper bits. That is, if the actual number of bits of the attribute parameter is less than 10 bits, the number of bits of the attribute parameter may be padded up to 10 bits by high-order 0 padding. For example, if the actual value of gift _ num is 100, then the value of gift _ num constructed by the method of padding 0 in high order when constructing the member object element is 0000000100. On this basis, assume that the target record is:
{“uid”:20071234,“user_score”:100,”gift_num”:10000,”level”:20},
after each attribute parameter is processed to 10 bits by means of high-order 0 complement, the generated object element can be represented as mem:0000010000:0000000020: 0020071234.
Because the number element key in the cache redis is a character string type and the maximum limit is 512M, the way of expanding and constructing the number object element is not limited by the number of sequencing dimensions any more, and the expanding and sequencing of any more dimensions can be carried out, thereby avoiding the limitation of weight.
After the object elements are generated, an element rule can be further specified, the constructed object elements are analyzed through the element rule, and the specific values of the member object elements can be accurately analyzed, so that not only is a ranking result obtained, but also the values of the attribute parameters, such as the value of the integral, the value of the gift number and the value of the guard grade, can be quickly located.
In step S130, the object elements and the weight values of the target records are stored in the ordered set, so as to obtain a ranking list corresponding to the target records.
In the present exemplary embodiment, after the object element is obtained, the weight value of the target record may be determined. In the related art, in multidimensional ranking, a weight value is obtained by linearly combining a plurality of attribute parameters. In this example, the attribute parameter of the first rank in the target record is set as the weight value. For example, in the target record { "uid": 20071234, "user _ score": 100, "gift _ num": 10000, "level": 20}, the attribute parameter of the first rank is user _ score, and the value of user _ score may be used as the weight value. If the attribute parameters of the first sequence change, the weight values may also change accordingly. Note that, the weight values herein may not need to be processed in such a manner as to align the complementary bits.
After the object elements and weight values are obtained, they may be stored into the ordered set defined in step S110. In particular, it may be stored in accordance with a preset command, which may be a ZADD command. The ZADD command deposits all assigned member-assigned scores in an ordered set of keys. It may specify a plurality of minute/member pairs. If the specified member is already a member of the ordered set, the score is updated and the element is inserted at the appropriate location to ensure the correct order. If the key does not exist, a designated member of a new ordered set is created as the only member as if the ordered set is empty. If the key exists, but does not hold an ordered set, an error is returned.
For example, the number of the target record constructed in step S120 is represented as:
mem:0000010000:0000000020:0020071234, score 100, the value of this target recorded on the leader board was constructed using the following ZADD command, as an example:
ZADD user_contri_board 100mem:0000010000:0000000020:0020071234
and storing the object attribute corresponding to the target record and the weight value of the target record into an ordered set variable defined in a cache through a ZADD command, so as to generate the ranking list corresponding to the target record. Because the target record comprises a plurality of attribute parameters and the object elements comprise multidimensional attribute parameters, the generated multidimensional ranking list is the target record. Because the object elements can include attribute parameters of multiple dimensions, and the bit number of each attribute parameter is 10 bits, the problem that the dimensions cannot be expanded and the numerical value of each dimension cannot be expanded due to the fact that the multidimensional ranking list is limited by the bit number of 15 bits of the weight value score in the related technology is solved. The dimensionality of the ranking list can be expanded at will, and the value of each dimensionality can be expanded at will, so that the method has good expandability. In addition, for any target record, that is, the target record including any attribute parameter, the multidimensional ranking list of the target record may be generated by using the method provided in the present exemplary embodiment, so that the step of generating the multidimensional ranking list may be simplified, convenience may be provided for developers, and operation efficiency may be further improved.
The multidimensional ranking list constructed by the method in the exemplary embodiment does not depend on other memories or database methods except the ordered set sorted set of redis for ranking, so that the influence on the performance of the database is avoided, and the efficiency is improved. Due to the fact that the ranking is conducted through the ordered set in the cache, ranking results of the list can be obtained in real time, and instantaneity is improved. In addition, the ranking list generation method in the exemplary embodiment is a general method, and can be applied to various scenes, so that all operations of the multidimensional real-time ranking list can be obtained by using the general method in the development process of different services, development cost is reduced, and development efficiency is improved.
After generating the multidimensional leaderboard, the leaderboard can be queried. The specific method comprises the following steps: receiving a list inquiry request, and judging whether a variable of a target ranking list in the list inquiry request exists in the cache or not; if the variable exists, directly reading the target ranking list from the cache; and if the variable does not exist, acquiring a target data set corresponding to the list inquiry request from a database, and reading the target ranking list from the ranking list constructed according to the target data set. The specific steps are explained with reference to fig. 2.
In step S210, if a list query request including a target ranking list is received, first, the list query request is read from the redis cache. The target leaderboard may include one or more, e.g., top 10, leaderboard content.
In step S220, it is determined whether the target ranking list included in the list inquiry request exists in the ordered set key in the cache. If yes, go to step S230; if not, go to step S240. Specifically, it may be determined whether a variable value of the target leaderboard exists in the ordered set key in the cache.
In step S230, the target chart is directly obtained from the multidimensional charts in the cache according to the zrevrange command according to the variable value of the target chart.
In step S240, a required target data set is determined from the database according to the target leaderboard in the leaderboard query request, and then the target records of the target data set are constructed as a corresponding redis leaderboard. And then storing the constructed ranking list in a redis cache, namely generating a data structure key of an ordered set sorted set type, and naming the key as a user _ contri _ board. Next, the target leaderboard is read from the just loaded redis leaderboard sorted set using the zrevrange command.
For example, when there is no target ranking list in the list query request in the redis, the target data set in the database that needs to be loaded as follows:
{“uid”:20071234,“user_score”:100,”gift_num”:10000,”level”:20}
{“uid”:20071235,“user_score”:100,”gift_num”:20000,”level”:23}
{“uid”:20071236,“user_score”:100,”gift_num”:30000,”level”:25}
{“uid”:20071237,“user_score”:2000,”gift_num”:40000,”level”:30}
for each record in the target data set, the leaderboard stored in the cache by the method of steps S110 to S130 may be, for example:
Figure BDA0001953407600000101
it should be noted that, the numerical values of the ranking lists may be ranked in the order of decreasing the weight values, and when the weight values are the same, the numerical values of the object elements may be ranked in the order of decreasing the object element values, so as to obtain the target ranking list meeting the list query request. Through the steps in fig. 2, the target ranking list conforming to the list query request is first read and queried from the cache, so that the query efficiency can be improved, the convenience is improved, and the resource consumption is reduced.
The disclosure also provides a ranking list generating device. Referring to fig. 3, the leaderboard generating apparatus 300 can include:
the parameter obtaining module 301 may be configured to determine an ordered set in the cache, and obtain a plurality of attribute parameters of the target record corresponding to the object to be ordered;
an object element determining module 302, configured to process the attribute parameters of the target record, and determine an object element that includes at least one attribute parameter and each attribute parameter is a preset bit;
the leaderboard constructing module 303 may be configured to store the object element and the weight value of the target record in the ordered set, so as to obtain a leaderboard corresponding to the target record.
The specific details of each module in the ranking list generating device have been described in detail in the corresponding ranking list generating method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 400 according to this embodiment of the invention is described below with reference to fig. 4. The electronic device 400 shown in fig. 4 is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 4, electronic device 400 is embodied in the form of a general purpose computing device. The components of electronic device 400 may include, but are not limited to: the at least one processing unit 410, the at least one memory unit 420, and a bus 430 that couples various system components including the memory unit 420 and the processing unit 410.
Wherein the storage unit stores program code that is executable by the processing unit 410 to cause the processing unit 410 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 410 may perform the steps as shown in fig. 1.
The storage unit 420 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)4201 and/or a cache memory unit 4202, and may further include a read only memory unit (ROM) 4203.
The storage unit 420 may also include a program/utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 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 thereof, may comprise an implementation of a network environment.
Bus 430 may be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The display unit 440 may be a display having a display function to show a processing result by the processing unit 410 performing the method in the present exemplary embodiment through the display. The display includes, but is not limited to, a liquid crystal display or other display.
The electronic device 400 may also communicate with one or more external devices 600 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 400, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 400 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 450. Also, the electronic device 400 may 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) via the network adapter 460. As shown, the network adapter 460 communicates with the other modules of the electronic device 400 over the bus 430. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 5, a program product 500 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
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. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a 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.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind 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., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (8)

1. A ranking list generation method is characterized by comprising the following steps:
determining an ordered set in a cache, and acquiring a plurality of attribute parameters of a target record corresponding to an object to be ordered, wherein the determination of the ordered set refers to the naming of an ordered set key;
combining the preprocessed residual attribute parameters except the first-order attribute parameters and the user identifications which are arranged according to a first preset order in the plurality of attribute parameters of the target record according to a second preset order, and determining an object element which comprises at least one attribute parameter and each attribute parameter is a preset bit;
storing the object element and the weight value of the target record into the ordered set to obtain a ranking list corresponding to the target record, wherein the weight value is an attribute parameter of a first order in the target record;
receiving a list inquiry request, and judging whether a variable of a target ranking list in the list inquiry request exists in the cache ordered set key;
if the variable exists, directly reading the target ranking list from the cache;
and if the variable does not exist, acquiring a target record of a target data set corresponding to the list inquiry request from a database, and reading the target ranking list from the ranking list constructed according to the target record.
2. The leaderboard generation method of claim 1, wherein the plurality of attribute parameters comprise a user identification, a user score, a number of gifts, and a daemon grade, and wherein the user score, the number of gifts, and the daemon grade are arranged in a first preset order.
3. The leaderboard generation method of claim 1, wherein combining remaining attribute parameters, other than the first-ranked attribute parameters, ranked in a first preset order and a user identification to form the object element comprises:
and if the actual digit of the attribute parameter in the object element is smaller than the preset digit, preprocessing the attribute parameter in an alignment and bit-filling mode.
4. The leader board generating method according to claim 2, wherein storing the object elements and the weight values of the target records in the ordered set, and obtaining the leader board corresponding to the target records comprises:
determining a first-ordered attribute parameter in the target record as a weight value of the target record;
storing the object elements and the weight values to the ordered set through a preset command, and constructing the numerical value of the target record in a ranking list to obtain the ranking list corresponding to the target record.
5. The leaderboard generation method of claim 1, further comprising:
and analyzing the object element according to an element rule, and obtaining the value of each attribute parameter from the object element.
6. A leaderboard generation apparatus, comprising:
the parameter acquisition module is used for determining an ordered set in the cache and acquiring a plurality of attribute parameters of the target record corresponding to the object to be ordered, wherein the determination of the ordered set refers to the naming of the ordered set key;
an object element determining module, configured to combine remaining attribute parameters, which are arranged according to a first preset order and are other than the first order attribute parameters, in the plurality of attribute parameters of the target record and the user identifier, and determine an object element that includes at least one attribute parameter and each attribute parameter is a preset bit;
the ranking list construction module is used for storing the object elements and the weight values of the target records into an ordered set to obtain a multi-dimensional ranking list corresponding to the target records;
receiving a list inquiry request, and judging whether a variable of a target ranking list in the list inquiry request exists in the cache ordered set key;
if the variable exists, directly reading the target ranking list from the cache;
and if the variable does not exist, acquiring a target record of a target data set corresponding to the list inquiry request from a database, and reading the target ranking list from the ranking list constructed according to the target record.
7. A computer-readable storage medium having stored thereon a computer program, the computer program when executed by a processor implementing the leaderboard generation method of any of claims 1-5.
8. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the leaderboard generation method of any of claims 1-5 via execution of the executable instructions.
CN201910058655.7A 2019-01-22 2019-01-22 Ranking list generation method and device, storage medium and electronic equipment Active CN109766497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910058655.7A CN109766497B (en) 2019-01-22 2019-01-22 Ranking list generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910058655.7A CN109766497B (en) 2019-01-22 2019-01-22 Ranking list generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109766497A CN109766497A (en) 2019-05-17
CN109766497B true CN109766497B (en) 2022-03-22

Family

ID=66455001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910058655.7A Active CN109766497B (en) 2019-01-22 2019-01-22 Ranking list generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109766497B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334104B (en) * 2019-06-28 2022-12-20 卓米私人有限公司 List updating method and device, electronic equipment and storage medium
CN110278283A (en) * 2019-07-10 2019-09-24 广州虎牙科技有限公司 Ranking list processing method, device, computer readable storage medium and electronic equipment
CN110833696A (en) * 2019-11-06 2020-02-25 网易(杭州)网络有限公司 Player ranking method and device, storage medium and electronic equipment
CN110975296B (en) * 2019-11-25 2023-04-07 网易(杭州)网络有限公司 Method, device, equipment and storage medium for maintaining ranking list in game
CN111372089B (en) * 2020-02-14 2021-08-24 广州方硅信息技术有限公司 Method, device and storage medium for updating activity list
CN111475224B (en) * 2020-03-31 2023-06-09 百度在线网络技术(北京)有限公司 Object ranking method, device, equipment and computer storage medium
CN113656385A (en) * 2020-05-12 2021-11-16 北京沃东天骏信息技术有限公司 Data cleaning method, data cleaning device, storage medium and electronic equipment
CN111708954B (en) * 2020-05-22 2023-10-27 微梦创科网络科技(中国)有限公司 Ranking method and system of ranking list
CN111651693B (en) * 2020-06-29 2023-03-28 腾讯科技(深圳)有限公司 Data display method, data sorting method, device, equipment and medium
CN112015732A (en) * 2020-07-31 2020-12-01 北京奇艺世纪科技有限公司 Sorting method, sorting device, electronic equipment and storage medium
CN112434182A (en) * 2020-10-29 2021-03-02 北京奇艺世纪科技有限公司 Data storage and acquisition method, device, server and storage medium
CN112486983A (en) * 2020-11-23 2021-03-12 广州经传多赢投资咨询有限公司 Ranking list generation method, system, device and storage medium
CN112732722A (en) * 2021-01-19 2021-04-30 深圳市欢太科技有限公司 Data processing method, data processing apparatus, storage medium, and electronic device
CN112988848B (en) * 2021-04-22 2021-08-03 北京沃东天骏信息技术有限公司 Data processing method, device, equipment and storage medium
CN113158096B (en) * 2021-05-14 2022-05-31 网易(杭州)网络有限公司 Data processing method, device, medium and electronic equipment
CN113239084A (en) * 2021-05-17 2021-08-10 广州市百果园信息技术有限公司 Ranking list generation method and device, server and storage medium
CN113332732A (en) * 2021-05-31 2021-09-03 多益网络有限公司 Multi-field Redis ranking list generation method, device, equipment and storage medium
CN114548060B (en) * 2022-02-28 2024-06-07 上海恒为智能科技有限公司 Optimization form generation method and device, storage medium and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136035A (en) * 2007-10-15 2008-03-05 金蝶软件(中国)有限公司 Ordering method and system for different attribute haracter
CN108200070A (en) * 2018-01-10 2018-06-22 武汉斗鱼网络科技有限公司 A kind of method and device for generating list

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587396B2 (en) * 2004-11-24 2009-09-08 Oracle International Corporation Encoding data to be sorted
GB2492317A (en) * 2011-06-16 2013-01-02 Sony Comp Entertainment Europe Leaderboard system
CN102880676A (en) * 2012-09-10 2013-01-16 新浪网技术(中国)有限公司 Statistical method for user behavior data and user behavior data statistical system
CN102902775B (en) * 2012-09-27 2015-12-16 新浪网技术(中国)有限公司 The method and system that internet calculates in real time
CN102982112A (en) * 2012-11-08 2013-03-20 北京小米科技有限责任公司 Ranking list generation method and journal generation method and server
CN105323594B (en) * 2015-10-26 2019-05-07 广州华多网络科技有限公司 Online live streaming list generation method and device
CN105426433A (en) * 2015-11-02 2016-03-23 广州华多网络科技有限公司 Ranking list data response method and request method as well as ranking list data display system
CN105760504A (en) * 2016-02-23 2016-07-13 中国银联股份有限公司 Resource retrieval method based on browser
CN105808736B (en) * 2016-03-10 2019-09-03 微梦创科网络科技(中国)有限公司 A kind of list data-updating method, apparatus and system
CN106095923A (en) * 2016-06-12 2016-11-09 微梦创科网络科技(中国)有限公司 A kind of method and system adding data of being on the list in orderly list
CN106339493B (en) * 2016-08-31 2018-09-07 腾讯科技(深圳)有限公司 A kind of data processing method and relevant apparatus
CN108495195B (en) * 2018-03-13 2021-06-15 武汉斗鱼网络科技有限公司 Network live broadcast ranking list generation method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136035A (en) * 2007-10-15 2008-03-05 金蝶软件(中国)有限公司 Ordering method and system for different attribute haracter
CN108200070A (en) * 2018-01-10 2018-06-22 武汉斗鱼网络科技有限公司 A kind of method and device for generating list

Also Published As

Publication number Publication date
CN109766497A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN109766497B (en) Ranking list generation method and device, storage medium and electronic equipment
CN111382255B (en) Method, apparatus, device and medium for question-answering processing
US10032448B1 (en) Domain terminology expansion by sensitivity
CN110728313B (en) Classification model training method and device for intention classification recognition
CN113177154A (en) Search term recommendation method and device, electronic equipment and storage medium
CN113110843B (en) Contract generation model training method, contract generation method and electronic equipment
US20220207087A1 (en) Optimistic facet set selection for dynamic faceted search
CN111611289B (en) Method and device for searching and sorting article information, storage medium and electronic equipment
CN111666302A (en) User ranking query method, device, equipment and storage medium
CN114218259B (en) Multi-dimensional scientific information search method and system based on big data SaaS
CN116383340A (en) Information searching method, device, electronic equipment and storage medium
US20110270874A1 (en) Apparatus and method for searching information
CN115033456A (en) Method and device for monitoring performance of front end of intranet, computer equipment and storage medium
US10891324B2 (en) Weighting of unobserved terms in a language model for information retrieval using lexical resources
CN113934894A (en) Data display method based on index tree and terminal equipment
JP6221593B2 (en) Data management method, data management program, and data management apparatus
CN110750569A (en) Data extraction method, device, equipment and storage medium
KR102449831B1 (en) Electronic device for providing information regarding new text, server for identifying new text and operation method thereof
CN114356965B (en) Method, system, server and storage medium for generating dynamic form
US20240378381A1 (en) Automated calculation predictions with explanations
US20230259701A1 (en) Automated calculation predictions with explanations
JP5932262B2 (en) Information processing apparatus, information processing method, and program
US11030209B2 (en) Unsupervised learning to fuse for information retrieval
CN117668242A (en) Data analysis method, system and related equipment
CN118981475A (en) SQL sentence generation method and device based on large model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant