Ranking list processing method and device, electronic equipment and computer readable storage medium

By allocating shared memory blocks to multiple service processes and generating rankings, the problem of low efficiency of global rankings is solved, and the effect of quickly and accurately obtaining ranking information is achieved.

CN119806854APending Publication Date: 2025-04-11SHENZHEN TENCENT TIANYOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311306975.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, due to the large number of accounts in the global ranking list, it is difficult for users to quickly find effective information that meets their own needs, and the efficiency of obtaining ranking list information is inefficient.

Method used

By allocating shared memory blocks to multiple service processes separately and generating and storing rankings based on object partition information, quickly read and write are realized, and responding to user's target object partition information request.

Benefits of technology

Improve the efficiency of obtaining ranking information, and users can quickly find information that meets their needs, improving the speed and accuracy of information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806854A_ABST
    Figure CN119806854A_ABST
Patent Text Reader

Abstract

The invention provides a ranking list processing method and device, electronic equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: respectively distributing shared memory blocks for a plurality of service processes; wherein each service process corresponds to object partition information; obtaining object data of a plurality of objects conforming to the object partition information corresponding to the service process through each service process, generating a ranking list according to the object data of the plurality of objects, and writing the generated ranking list into a shared memory block distributed for the service process; receiving a ranking list request comprising target object partition information; in response to the ranking list request, reading a target ranking list from a shared memory block allocated for a target service process through the target service process corresponding to the target object partition information; and sending the target ranking list to an initiator of the ranking list request. By means of the method and device, the ranking list meeting the user requirements can be determined based on the object partition information, and the efficiency of obtaining the information in the ranking list can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, and in particular to a ranking processing method, device, electronic device, computer-readable storage medium and computer program product. Background Art

[0002] Rankings refer to lists that reflect the objective strength of similar things and are comparative in nature. Rankings have been widely used in the computer field, such as score rankings in games and song popularity rankings on song platforms.

[0003] In the solution provided by the related technology, taking the account ranking scenario of a certain platform as an example, the account data of all accounts on the platform are ranked to generate a ranking list, that is, the ranking list is a global ranking list. However, since the number of accounts involved in the global ranking list is usually large, it is difficult for users to quickly find effective information that meets their needs, that is, the efficiency of obtaining information in the ranking list is low. Summary of the invention

[0004] The embodiments of the present application provide a ranking processing method, device, electronic device, computer-readable storage medium and computer program product, which can determine a ranking that meets user needs based on object partition information, and help improve the efficiency of obtaining information in the ranking.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application embodiment provides a ranking list processing method, including:

[0007] Allocate shared memory blocks to multiple service processes respectively; each service process has object partition information corresponding to it;

[0008] Obtaining object data of multiple objects that match the object partition information corresponding to the service process through each service process, generating a ranking list according to the object data of the multiple objects, and writing the generated ranking list to a shared memory block allocated for the service process;

[0009] receiving a ranking request including target object partition information;

[0010] In response to the ranking list request, reading a target ranking list from a shared memory block allocated to the target service process through the target service process corresponding to the target object partition information;

[0011] The target ranking list is sent to the initiator of the ranking list request.

[0012] The present application provides a ranking list processing device, including:

[0013] An allocation module is used to allocate shared memory blocks to multiple service processes respectively; wherein each service process corresponds to object partition information;

[0014] A writing module, used to obtain object data of multiple objects that match the object partition information corresponding to the service process through each service process, generate a ranking list according to the object data of the multiple objects, and write the generated ranking list to the shared memory block allocated for the service process;

[0015] A receiving module, configured to receive a ranking request including target object partition information;

[0016] A reading module, configured to respond to the ranking list request and read the target ranking list from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information;

[0017] The sending module is used to send the target ranking list to the initiator of the ranking list request.

[0018] In the above solution, each service process corresponds to a cross-machine backup service process; the ranking processing device also includes a backup module for:

[0019] Sending the generated ranking list to the corresponding backup service process through each service process, so that the backup service process performs backup processing in the shared memory block allocated to the backup service process according to the received ranking list;

[0020] When reading the target ranking list through the target service process fails, the target ranking list is read from the shared memory block allocated to the backup service process through the backup service process corresponding to the target service process.

[0021] In the above solution, the ranking list processing device further includes a merging module, which is used to:

[0022] The first ranking list is read from a shared memory block allocated to the first service process by a first service process, and the second ranking list is read from a shared memory block allocated to the second service process by a second service process; wherein the first service process is any one of the multiple service processes, and the second service process is a backup service process of the first service process;

[0023] Merging the first ranking list and the second ranking list to obtain a merged ranking list;

[0024] When the first ranking list is different from the merged ranking list, writing the merged ranking list to the shared memory block allocated to the first service process through the first service process to replace the first ranking list in the shared memory block allocated to the first service process;

[0025] When the second ranking list is different from the merged ranking list, the merged ranking list is written into the shared memory block allocated to the second service process by the second service process to replace the second ranking list in the shared memory block allocated to the second service process.

[0026] In the above solution, the ranking processing device also includes a persistence module, which is used to:

[0027] Writing the generated ranking list to a non-volatile storage medium through each service process;

[0028] When reading the target ranking list through the target service process fails, reading the target ranking list from the non-volatile storage medium.

[0029] In the above scheme, each service process has a corresponding ranking capacity; the writing module is also used to:

[0030] Sorting the object data of the plurality of objects to obtain an object data sequence;

[0031] When the capacity of the object data sequence is less than or equal to the capacity of the ranking list, determining the object data sequence as the ranking list;

[0032] When the capacity of the object data sequence is greater than the capacity of the ranking list, the object data sequence is intercepted to obtain a ranking list that is less than or equal to the capacity of the ranking list.

[0033] In the above scheme, the allocation module is also used to:

[0034] Create a shared memory block for each service process according to the corresponding leaderboard capacity of each service process and allocate it to the corresponding service process;

[0035] In response to an update operation on the ranking capacity corresponding to the third service process, creating a shared memory block for the third service process according to the updated ranking capacity and allocating it to the third service process, and releasing the shared memory block allocated to the third service process before the ranking capacity is updated;

[0036] The third service process is any one of the multiple service processes.

[0037] In the above scheme, each service process also corresponds to an object attribute type; the ranking request also includes a target object attribute type; the writing module is also used to determine multiple objects that conform to the object partition information corresponding to the service process through each service process, and obtain the object data of each object in the multiple objects under the object attribute type corresponding to the service process; the reading module is also used to read the target ranking list from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information and the target object attribute type.

[0038] In the above solution, the fourth service process corresponds to a mirror condition, and the fourth service process is any one of the multiple service processes; the ranking processing device further includes a mirror module for:

[0039] When the mirroring condition corresponding to the fourth service process is met, the fourth service process reads the ranking list from the shared memory block allocated for the fourth service process and performs mirroring, and writes the ranking list copy obtained by the mirroring to the shared memory block allocated for the fourth service process.

[0040] In the above solution, the ranking processing device further includes a reward module, which is used to:

[0041] Reading a copy of the leaderboard from a shared memory block allocated to the fourth service process through the fourth service process;

[0042] Determine the reward objects that meet the ranking conditions in the read copy of the ranking list;

[0043] Perform reward processing on the object to be rewarded.

[0044] In the above solution, the fifth service process corresponds to an update condition, and the fifth service process is any one of the multiple service processes; the ranking processing device further includes an update module for:

[0045] When the update condition corresponding to the fifth service process is met, the ranking list is read from the shared memory block allocated to the fifth service process by the fifth service process, and the object data in the read ranking list is updated, and

[0046] The updated ranking list is written into the shared memory block allocated for the fifth service process to replace the ranking list before the update in the shared memory block allocated for the fifth service process.

[0047] An embodiment of the present application provides an electronic device, including:

[0048] A memory for storing executable instructions;

[0049] The processor is used to implement the ranking list processing method provided in the embodiment of the present application when executing the executable instructions stored in the memory.

[0050] The embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the ranking list processing method provided in the embodiment of the present application.

[0051] An embodiment of the present application provides a computer program product, which includes executable instructions for causing a processor to execute and implement the ranking list processing method provided in the embodiment of the present application.

[0052] The embodiments of the present application have the following beneficial effects:

[0053] The embodiment of the present application generates rankings that conform to the corresponding object partition information through multiple service processes. In this way, when a ranking request including the target object partition information is received, the target ranking corresponding to the target object partition information can be determined for response; at the same time, shared memory blocks are allocated to multiple service processes respectively, and the corresponding rankings are written and read through the shared memory blocks, which can ensure that the target ranking is obtained quickly and accurately. In summary, the embodiment of the present application can quickly and accurately determine the ranking that meets the user's needs, which is convenient for the user to quickly obtain effective information, that is, it can improve the efficiency of obtaining information in the ranking. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0055] Figure 1 It is a schematic diagram of the architecture of the ranking processing system provided in the embodiment of the present application;

[0056] Figure 2 It is a structural diagram of a server provided in an embodiment of the present application;

[0057] Figure 3A It is a flowchart of a ranking list processing method provided in an embodiment of the present application;

[0058] Figure 3B is another flowchart of the ranking list processing method provided in an embodiment of the present application;

[0059] Figure 3C is another flowchart of the ranking list processing method provided in an embodiment of the present application;

[0060] Figure 3D is another flowchart of the ranking list processing method provided in an embodiment of the present application;

[0061] Figure 3E is another flowchart of the ranking list processing method provided in an embodiment of the present application;

[0062] Figure 3F is another flowchart of the ranking list processing method provided in an embodiment of the present application;

[0063] Figure 4 This is a schematic diagram of the architecture of the ranking service provided by the embodiment of the present application;

[0064] Figure 5 It is a schematic diagram of multi-dimensional disaster recovery provided by an embodiment of the present application;

[0065] Figure 6 This is a schematic diagram of ranking decay provided by an embodiment of the present application;

[0066] Figure 7 It is a schematic diagram of a multi-level dynamically generated ranking list provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0068] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0069] In the following description, the term "plurality" referred to means at least two.

[0070] In the following description, the terms "first\second\third\fourth\fifth" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third\fourth\fifth" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0072] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0073] 1) Service process: A process is a program in a computer that runs on a certain data set. It is the basic unit for resource allocation in the system and the basis of the operating system structure. In the embodiment of the present application, a service process refers to a process used to implement activities such as generating, writing, and reading rankings. Multiple service processes can provide ranking services in a clustered manner, where different service processes can be located in the same physical machine or in different physical machines.

[0074] 2) Shared Memory: It is a memory structure in which the memory is divided into independent blocks that can be shared by different applications. Any process can easily read and rewrite the data therein. When a process is restarted, the data written to the shared memory before the restart still survives and will not be lost. In the embodiment of the present application, shared memory blocks are allocated to multiple service processes respectively, and each service process implements the writing and reading of the ranking list according to the shared memory blocks allocated to the service process.

[0075] 3) Ranking: refers to a ranking that reflects the objective strength of a certain similar thing, with a comparative nature. In the embodiments of the present application, "ranking" and "list" have the same meaning and can be used interchangeably.

[0076] 4) Object: In the embodiments of the present application, it generally refers to the object to be ranked, such as accounts, news, songs, etc. An object has at least one object attribute type, and the data of an object under a specific object attribute type is called object data. For example, for an account in a multiplayer online tactical competitive (MOBA) game, the object attribute type includes the ranking score of the account (the corresponding object data is a specific score value) and the combat power of each character used by the account (the corresponding object data is a specific combat power value), etc.

[0077] 5) Object partition information: used to limit the objects participating in the ranking. Taking the case where the object is an account as an example, the object partition information can refer to the region where the account is located, such as a city or a province; it can refer to the game zone where the account is located, such as Shenzhen Zone 1 or Shenzhen Zone 2; it can refer to the camp of the character used by the account in the game.

[0078] 6) Non-Volatile Memory (NVM): refers to computer memory that can retain stored data after power failure. Non-volatile storage media include but are not limited to silicon chip storage media, disk storage media and optical storage media. Data persistence can be achieved based on non-volatile storage media. Data persistence means saving the data during program execution in non-volatile storage media so that the data can be restored when the program is restarted.

[0079] 7) Copy: also known as snapshot, refers to the record of data at a specified time.

[0080] 8) In response to: used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.

[0081] 9) Application Programming Interface (API): A set of predefined functions or agreements that connect different components of a software system. The purpose is to provide application developers with the ability to access a set of routines based on certain software or hardware, so that developers do not need to access the source code or understand the details of the internal working mechanism.

[0082] The embodiments of the present application provide a ranking processing method, device, electronic device, computer-readable storage medium, and computer program product, which can quickly and accurately determine a ranking that meets user needs, improve the efficiency of obtaining information in the ranking, and facilitate users to quickly obtain valid information. The following describes an exemplary application of the electronic device provided by the embodiments of the present application. The electronic device provided by the embodiments of the present application can be implemented as various types of terminal devices or as a server.

[0083] See also Figure 1 , Figure 1 It is an architectural diagram of the ranking processing system 100 provided in an embodiment of the present application. The terminal device 400 is connected to the server 200 through the network 300. The server 200 has service processes 210-1, 210-2 and 210-3 created inside. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0084] In some embodiments, taking the electronic device as a server as an example, the ranking processing method provided in the embodiment of the present application can be implemented by the server. For example, the server 200 has service processes 210-1, 210-2, and 210-3 inside, each service process has object partition information, and the server 200 can allocate shared memory blocks for multiple service processes respectively, such as Figure 1 As shown, shared memory block 220-1 is allocated to service process 210-1, shared memory block 220-2 is allocated to service process 210-2, and shared memory block 220-3 is allocated to service process 210-3. Then, object data of multiple objects that match the object partition information corresponding to the service process is obtained through each service process (the object data can be stored in a database or other storage medium), a ranking list is generated based on the object data of the multiple objects, and the generated ranking list is written to the shared memory block allocated to the service process. It is worth noting that the generated ranking list can include an object identifier (such as an object name) and at least one of the object data, such as Figure 1 As shown, the ranking list written by service process 210-1 to shared memory block 220-1 includes object 1, object 2, and object 3, etc., the ranking list written by service process 210-2 to shared memory block 220-2 includes object 11, object 12, and object 13, etc., and the ranking list written by service process 210-3 to shared memory block 220-3 includes object 21, object 22, and object 23, etc. The server 200 receives a ranking list request initiated by terminal device 400 through client 410, and the ranking list request includes target object partition information; in response to the ranking list request, the server 200 determines the target service process corresponding to the target object partition information, Figure 1 In the example, the target service process is service process 210-2; server 200 reads the target ranking list (i.e., the ranking list including objects 11, 12, and 13, etc.) from the shared memory block 220-2 allocated to service process 210-2 through service process 210-2 (i.e., calling service process 210-2), and sends the target ranking list to client 410.

[0085] The embodiment of the present application does not limit the type of client 410. For example, client 410 may be a game client, and the object to be ranked may be a game account, wherein the game types include but are not limited to MOBA games, first-person shooting (FPS) games, role-playing games (RPG), strategy games (SLG), simulation games (SIMulation, SIM) games, etc.; client 410 may be a song platform client, and the object to be ranked may be a song; client 410 may be a video platform client, and the object to be ranked may be a video on the video platform.

[0086] In some embodiments, taking the electronic device as a terminal device as an example, the ranking list processing method provided in the embodiment of the present application can be implemented by the terminal device. For example, multiple service processes are created inside the terminal device 400, and each service process corresponds to object partition information. The terminal device 400 allocates shared memory blocks to multiple internal service processes respectively; obtains object data of multiple objects that conform to the object partition information corresponding to the service process through each service process, generates a ranking list based on the object data of the multiple objects, and writes the generated ranking list to the shared memory block allocated to the service process, wherein the object data can be stored locally in the terminal device 400 or in other storage locations. The terminal device 400 receives a ranking list request including the target object partition information through the client 410; in response to the ranking list request, reads the target ranking list from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information; and displays the target ranking list. This implementation method is suitable for stand-alone or offline scenarios.

[0087] In some embodiments, the terminal device 400 or the server 200 can implement the ranking list processing method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run (corresponding to the client 410 above); it can also be a small program, that is, a program that can be run only after being downloaded to a browser environment; it can also be a small program that can be embedded in any APP, wherein the small program can be controlled to run or closed by the user. In short, the above-mentioned computer program can be any form of application, module or plug-in.

[0088] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, a smart watch, etc., but is not limited thereto. The terminal device and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0089] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the server 200 provided in an embodiment of the present application, Figure 2 The server 200 shown includes: at least one processor 210, a memory 250 and at least one network interface 220. The various components in the server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 240 is not described in detail. Figure 2 Various buses are labeled as bus system 240 .

[0090] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0091] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 210.

[0092] The memory 250 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiment of the present application is intended to include any suitable type of memory.

[0093] In some embodiments, memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0094] Operating system 251, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0095] A network communication module 252, used to reach other computing devices via one or more (wired or wireless) network interfaces 220, exemplary network interfaces 220 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB);

[0096] In some embodiments, the ranking list processing device provided in the embodiments of the present application can be implemented in software. Figure 2 The ranking processing device 255 stored in the memory 250 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an allocation module 2551, a writing module 2552, a receiving module 2553, a reading module 2554 and a sending module 2555. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.

[0097] The ranking list processing method provided in the embodiment of the present application will be described in conjunction with the exemplary application and implementation of the electronic device provided in the embodiment of the present application.

[0098] See also Figure 3A , Figure 3A This is a flowchart of a ranking list processing method provided in an embodiment of the present application. Figure 3A The steps shown are explained.

[0099] In step 101, shared memory blocks are allocated to multiple service processes respectively; wherein each service process corresponds to object partition information.

[0100] Here, a plurality of service processes are created inside the electronic device, and each service process corresponds to object partition information, wherein the object partition information corresponding to each service process is used to limit objects participating in the ranking process of the ranking list that the service process is responsible for.

[0101] Taking the object to be ranked as a game account as an example, the object partition information can be the region where the game account is located, such as a city, a province, etc.; it can be the game server where the game account is located, such as Shenzhen District 1, Shenzhen District 2, etc.; it can be the camp of the character used by the game account in the game. Taking the object to be ranked as a song as an example, the object partition information can be the song type, such as pop, classical, jazz, etc. Taking the object to be ranked as a video on a video platform as an example, the object partition information can be the video type, such as TV series, movies, variety shows, animation, etc.

[0102] The relationship between the service process and the object partition information can be one-to-one or one-to-many. Taking the object partition information as regional information, for example, a service process can correspond to a certain city-level region, such as Shenzhen, or can correspond to all city-level regions at the same time.

[0103] The embodiments of the present application do not limit the relationship between the object partition information corresponding to different service processes. For example, they may be the same or different, or they may exist in a containment relationship. Taking the regional information as an example, service process A corresponds to Shenzhen, service process B corresponds to Beijing, and service process C corresponds to Guangdong. There is no containment relationship between the object partition information corresponding to service process A and the object partition information corresponding to service process B, but there is a containment relationship between the object partition information corresponding to service process A and the object partition information corresponding to service process C (i.e., Guangdong Province contains Shenzhen).

[0104] Each service process is used to generate a ranking list according to the corresponding object partition information. The generated ranking list needs to be written to a specific storage location for preservation. Therefore, in an embodiment of the present application, shared memory blocks are allocated to multiple service processes respectively. For example, a shared memory block is created for each service process, and the shared memory block is mapped to the address space of the corresponding service process (the mapping process is the allocation process). In this way, the service process can read and write the mapped shared memory block. Among them, the capacity of each shared memory block can be the same, or it can be determined according to the situation of the service process.

[0105] In step 102, object data of multiple objects that match the object partition information corresponding to the service process is obtained through each service process, a ranking list is generated according to the object data of the multiple objects, and the generated ranking list is written to the shared memory block allocated for the service process.

[0106] Taking a service process such as service process A as an example, here it means obtaining the object data of multiple objects that conform to the object partition information corresponding to service process A through service process A, generating a ranking list based on the object data of multiple objects, and writing the generated ranking list to the shared memory block allocated to service process A, that is, service process A executes the operations of determining the objects involved in the ranking list, obtaining the object data, generating the ranking list, and writing the ranking list, which are explained separately below.

[0107] Regarding determining multiple objects that meet the object partition information (i.e., objects involved in the ranking list), taking the object to be ranked as a game account as an example, if the object partition information is a certain region (such as Shenzhen City), then the multiple objects that meet the object partition information refer to all game accounts belonging to the region (such as all game accounts whose login location is Shenzhen City); if the object partition information is a certain game area (such as Shenzhen District 1), then the multiple objects that meet the object partition information refer to all game accounts belonging to the game area (such as all game accounts logged in through Shenzhen District 1); if the object partition information is a certain character camp, then the multiple objects that meet the object partition information refer to all game accounts whose created characters belong to that camp.

[0108] On the basis of the multiple objects that have been determined to conform to the object partition information, the object data of each object is obtained. In the embodiment of the present application, the object has at least one object attribute type, and the data (i.e., attribute value) of the object under a specific object attribute type is called object data. For example, for a game account, the object attribute type includes the ranking score and the combat effectiveness (or proficiency) of each character used; for a song or video, the object attribute type includes the amount of playback, the amount of likes, the amount of comments, the amount of forwarding, etc. If the object has only one object attribute type, the data of the object under the object attribute type is used as the object data; if the object has multiple object attribute types, one object attribute type can be selected from them, and the data of the object under the selected object attribute type is used as the object data, wherein the selection method is not limited, for example, it can be a default selection (i.e., all service processes correspond to the same object attribute type), or it can be selected according to the actual situation. It is worth noting that the storage location of the object data in the embodiment of the present application is not limited, for example, it can be stored in a specific database, and the service process accesses the database and obtains the object data.

[0109] Based on the object data of multiple objects that have been obtained, a ranking list is generated according to the object data of the multiple objects, wherein the object data of the multiple objects need to be sorted. The embodiment of the present application does not limit the sorting strategy that the sorting process relies on, for example, it can be in order from small to large or from large to small; all service processes can correspond to the same sorting strategy, and different service processes can also correspond to different sorting strategies, which can be set according to the actual application scenario.

[0110] The generated ranking list may include object identifiers (such as object names) arranged in sequence and at least one of the object data. For example, if you only care about the ranking of each object and not the specific object data, the ranking list may only include multiple object identifiers arranged in sequence; if you only care about the specific object data and not which object the object data belongs to, the ranking list may only include multiple object data arranged in sequence; if both objects and object data need to be paid attention to, the ranking list includes multiple object identifiers arranged in sequence and the object data corresponding to each object identifier.

[0111] For each service process, after generating the ranking list, the generated ranking list is written to the shared memory block allocated for the service process. In this way, on the one hand, the ranking lists generated by different service processes can be effectively distinguished. On the other hand, based on the characteristics of shared memory, after a service process writes the generated ranking list to the shared memory block allocated for the service process, if the service process is restarted, the ranking list in the shared memory block allocated for the service process will not be lost, and the restarted service process can still read the ranking list.

[0112] In some embodiments, the above-mentioned method of obtaining, by each service process, object data of multiple objects that conform to the object partition information corresponding to the service process, generating a ranking list based on the object data of the multiple objects, and writing the generated ranking list to the shared memory block allocated to the service process can be implemented in the following manner: each service process periodically obtains object data of multiple objects that conform to the object partition information corresponding to the service process, generates a ranking list based on the object data of the multiple objects, and writes the generated ranking list to the shared memory block allocated to the service process to replace the ranking list last written to the shared memory block allocated to the service process.

[0113] As time goes by, multiple objects that conform to the object partition information may change accordingly, such as some new game accounts are registered or some game accounts are cancelled, some new songs are put on the shelves or some songs are removed from the shelves, etc. At the same time, the object data may also change accordingly, such as the ranking score of the game account will increase or decrease after the user plays a ranking game through the game account, and the number of plays, likes, comments, and reposts of objects such as songs and videos will continue to increase over time. Therefore, each service process can periodically perform operations such as determining the objects involved in the ranking list, obtaining object data, generating the ranking list, and writing the ranking list, thereby ensuring the real-time and validity of the ranking list in the shared memory block, wherein the specific period is not limited, for example, it can be every Monday at 10 am.

[0114] When writing the ranking list to the shared memory block, if the shared memory block is empty (that is, this is the first write), the newly generated ranking list can be directly written to the shared memory block; if the shared memory block stores the ranking list written last time, the ranking list written last time is replaced according to the newly generated ranking list to achieve periodic updating of the ranking list, and at the same time, it can also save the storage space of the shared memory block.

[0115] In step 103, a ranking request including target object partition information is received.

[0116] Here, the target object partition information in the ranking request may be automatically generated or manually specified by the user. It is worth noting that the target object partition information in the ranking request may be one or more types.

[0117] Regarding the automatic generation of target object partition information, taking the object to be ranked as a game account as an example, if the object partition information is the region where the game account is located, then the region where the game account logged in by the user is located can be determined as the target object partition information; if the object partition information is the game server where the game account is located, then the game server where the game account logged in by the user is located can be determined as the target object partition information; if the object partition information is the camp of the character used by the game account in the game, then the camp of the character under the game account logged in by the user can be determined as the target object partition information. Taking the object to be ranked as a song as an example, the song type that the user is interested in can be analyzed based on the multiple songs that the user has listened to or collected in the past, and the song type that the user is interested in can be used as the target object partition information. The same is true for the case where the object to be ranked is a video.

[0118] Regarding the user manually specifying the target object partition information, for example, all object partition information (i.e., object partition information corresponding to multiple service processes) can be displayed on the terminal device, and in response to the user's selection operation on the object partition information, the object partition information selected by the user is used as the target object partition information.

[0119] The automatic generation of the target object partition information does not require user operation and is more intelligent; the manual specification of the target object partition information gives users the opportunity to choose independently and is more flexible. According to the needs of the actual application scenario, the target object partition information can be obtained by using at least one of the automatic generation and manual specification methods.

[0120] In step 104, in response to the ranking list request, the target ranking list is read from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information.

[0121] Here, the service process corresponding to the target object partition information in the ranking request is called the target service process. After the target service process is determined, the ranking is read from the shared memory block allocated to the target service process by the target service process, and the ranking read here is called the target ranking.

[0122] It is worth noting that if the ranking list request includes multiple target object partition information, the target service process corresponding to each target object partition information is determined here.

[0123] In some embodiments, after generating a ranking list based on the object data of the plurality of objects, the ranking list processing method further comprises: writing the generated ranking list to a non-volatile storage medium through each service process;

[0124] After step 104, the ranking list processing method further includes: when reading the target ranking list through the target service process fails, reading the target ranking list from a non-volatile storage medium.

[0125] In addition to shared memory, the embodiments of the present application can further improve the disaster recovery capability through non-volatile storage media. For example, for each service process, after the ranking list is generated, the ranking list is written to the non-volatile storage medium to achieve data persistence of the ranking list. Among them, it is necessary to establish a correspondence between the ranking list and the object partition information in the non-volatile storage medium, so that it is convenient to query the corresponding ranking list according to the object partition information. On this basis, if the service process corresponds to an object attribute type, it is necessary to establish a correspondence between the ranking list, object partition information and object attribute type in the non-volatile storage medium, so as to accurately query the ranking list.

[0126] The embodiment of the present application does not limit the type of non-volatile storage medium, for example, it can be a disk. All service processes can correspond to the same non-volatile storage medium, and different service processes can correspond to different non-volatile storage media. The non-volatile storage medium can be deployed on the machine where the service process is located, or it can be unrelated to the machine where the service process is located, that is, deployed across machines. In this way, when the machine where the service process is located cannot run, the ranking list can still be read from the non-volatile storage medium.

[0127] In the process of reading the target ranking list from the shared memory block allocated for the target service process through the target service process, a reading failure may occur. The reason may be that the target service process fails (such as being in the process of restarting and unable to be called, or the machine where the target service process is located fails), or the shared memory block allocated for the target service process may cause data loss due to unexpected circumstances. In this case, the target ranking list corresponding to the target object partition information can be read from the non-volatile storage medium. In this way, the ability to respond to unexpected situations can be enhanced, and the target ranking list can be successfully read as much as possible.

[0128] It is worth noting that, in the case where a copy of the ranking list corresponding to the ranking list needs to be generated, the copy of the ranking list can also be stored in a non-volatile storage medium.

[0129] In step 105, the target ranking list is sent to the initiator of the ranking list request.

[0130] After the target ranking list is read through the target service process, the target ranking list can be sent to the initiator of the ranking list request (such as a terminal device). In this way, the sent target ranking list can meet user needs and ensure that the user can quickly extract valid information from the target ranking list.

[0131] like Figure 3A As shown, the embodiment of the present application generates rankings that conform to the corresponding object partition information through multiple service processes respectively. In this way, when a ranking request including the target object partition information is received, the target ranking corresponding to the target object partition information can be determined for response; at the same time, shared memory blocks are allocated to multiple service processes respectively, and the corresponding rankings are written and read through the shared memory blocks, which can ensure that the target ranking is obtained quickly and accurately. In summary, the embodiment of the present application can quickly and accurately determine the ranking that meets the user's needs, improve the efficiency of obtaining information in the ranking, facilitate users to quickly obtain valid information, and avoid the waste of resources caused by users viewing the ranking for a long time or manually ranking.

[0132] In some embodiments, see Figure 3B , Figure 3B is a flowchart of a ranking list processing method provided in an embodiment of the present application. Figure 3B middle, Figure 3A Step 102 shown can be updated to step 201. In step 201, object data of multiple objects that match the object partition information corresponding to the service process is obtained through each service process, a ranking list is generated based on the object data of the multiple objects, the generated ranking list is written to the shared memory block allocated to the service process, and the generated ranking list is sent to the corresponding backup service process, so that the backup service process performs backup processing in the shared memory block allocated to the backup service process according to the received ranking list.

[0133] Here, for each service process, there is also a corresponding cross-machine backup service process, that is, the service process and the corresponding backup service process are located on different machines. The "machine" here can be a physical machine or a virtual machine. It is worth noting that a service process can correspond to one or more backup service processes. For each backup service process, a corresponding shared memory block is allocated separately on the machine where it is located.

[0134] The object data of multiple objects that match the object partition information corresponding to the service process are obtained through each service process, and a ranking list is generated based on the object data of the multiple objects. The generated ranking list is written to the shared memory block allocated for the service process, and the generated ranking list is sent to the corresponding backup service process, so that the backup service process performs backup processing in the shared memory block allocated for the backup service process according to the received ranking list. That is, data synchronization about the ranking list is performed between each service process and the corresponding backup service process. It is worth noting that in the case where a ranking list copy corresponding to the ranking list needs to be generated, data synchronization of the ranking list copy can also be performed.

[0135] In some embodiments, the backup service process described above can be implemented by performing backup processing in a shared memory block allocated to the backup service process based on the received ranking list in the following manner: when the service process and the corresponding backup service process are in a master-slave relationship, the received ranking list is written to the shared memory block allocated to the backup service process by the backup service process; when the service process and the corresponding backup service process are in a hot standby relationship with each other, the ranking list is read from the shared memory block allocated to the backup service process by the backup service process, and the read ranking list and the received ranking list are merged to obtain a merged ranking list, and the merged ranking list is written to the shared memory block allocated to the backup service process.

[0136] The service process and the corresponding backup service process may be in a master-slave relationship, that is, the backup service process is only used to perform operations of writing and reading the ranking list, and does not perform operations such as determining the objects involved in the ranking list, obtaining object data, and generating the ranking list. In this case, when the backup service process receives the ranking list, it directly writes the ranking list to the shared memory block allocated to the backup service process to implement backup processing.

[0137] The service process and the corresponding backup service process can also be in a hot standby relationship with each other, that is, the backup service process itself is also a service process, which needs to perform operations such as determining the objects involved in the ranking list, obtaining object data, generating the ranking list, and writing the ranking list, wherein multiple hot standby service processes correspond to the same object partition information. In this case, when the backup service process receives the ranking list, it reads the ranking list from the shared memory block allocated to the backup service process, and merges the read ranking list and the received ranking list to obtain a merged ranking list, and writes the merged ranking list to the shared memory block allocated to the backup service process to replace the original ranking list in the shared memory block, so as to realize the backup processing. Of course, if the ranking list received by the backup service process is the same as the read ranking list, no processing is required. Compared with the master-slave relationship, the hot standby relationship has higher performance requirements for the machine, but the backup effect is also better, and any of the above relationships can be applied according to the actual application scenario.

[0138] The merging process refers to finding the union of two rankings based on the object dimension, so as to ensure the data integrity in the merged ranking. If the same object corresponds to different object data in the two rankings, the extreme value (such as the maximum value) or the object data with the latest generation time (if the ranking is accompanied by the generation time) can be used as the object data corresponding to the object in the merged ranking. Taking the maximum value as an example, ranking A is "object 1: 1000 points; object 2: 900 points; object 3: 800 points; object 4: 700 points", and ranking B is "object 1: 1100 points; object 2: 900 points; object 3: 800 points", then the merged ranking obtained by the merging process is "object 1: 1100 points; object 2: 900 points; object 3: 800 points; object 4: 700 points".

[0139] In some embodiments, after each service process sends the generated ranking list to the corresponding backup service process, the ranking list processing method also includes: reading the first ranking list from the shared memory block allocated to the first service process by the first service process, and reading the second ranking list from the shared memory block allocated to the second service process by the second service process; wherein the first service process is any one of the multiple service processes, and the second service process is a backup service process of the first service process; merging the first ranking list and the second ranking list to obtain a merged ranking list; when the first ranking list is different from the merged ranking list, writing the merged ranking list to the shared memory block allocated to the first service process by the first service process to replace the first ranking list in the shared memory block allocated to the first service process; when the second ranking list is different from the merged ranking list, writing the merged ranking list to the shared memory block allocated to the second service process by the second service process to replace the second ranking list in the shared memory block allocated to the second service process.

[0140] In the process of each service process sending the generated ranking list to the corresponding backup service process, it may fail to send due to unexpected circumstances (such as the backup service process is restarting), which may lead to the failure of the backup service process to be successfully backed up. Therefore, the data stored in the service process and the data stored in the corresponding backup service process can be checked to achieve data consistency.

[0141] For the sake of convenience, the first service process and the second service process are used as examples, wherein the first service process is any one of the multiple service processes, and the second service process is a backup service process of the first service process. For example, the first service process reads the first ranking list from the shared memory block allocated to the first service process, and the second service process reads the second ranking list from the shared memory block allocated to the second service process, and then the first ranking list and the second ranking list are merged to obtain a merged ranking list. The merge processing method is as described above. It is worth noting that when the first ranking list is the same as the second ranking list, it proves that the data consistency between the first service process and the second service process is maintained, and no processing is required at this time. When the first ranking list is the same as the merged ranking list, no processing is required at this time through the first service process; when the first ranking list is different from the merged ranking list, the merged ranking list is written to the shared memory block allocated to the first service process through the first service process to replace the first ranking list in the shared memory block allocated to the first service process. When the second ranking list is the same as the merged ranking list, no processing is required through the second service process; when the second ranking list is different from the merged ranking list, the merged ranking list is written to the shared memory block allocated to the second service process through the second service process to replace the second ranking list in the shared memory block allocated to the second service process. In this way, the data consistency of the first service process and the second service process is guaranteed, avoiding sending an erroneous or untimely updated target ranking list to the initiator. It is worth noting that the above-mentioned check can be performed periodically in a manner to achieve data consistency.

[0142] exist Figure 3B middle, Figure 3A After step 104 shown, in step 202, when reading the target ranking list through the target service process fails, the target ranking list may be read from the shared memory block allocated to the backup service process through the backup service process corresponding to the target service process.

[0143] When the target ranking list fails to be read through the target service process, since the backup service process corresponding to the target service process has been backed up in advance, the backup service process corresponding to the target service process reads the target ranking list from the shared memory block allocated to the backup service process.

[0144] In some embodiments, after generating a ranking list based on the object data of the plurality of objects, the ranking list processing method further comprises: writing the generated ranking list to a non-volatile storage medium through each service process;

[0145] After step 202, the ranking list processing method further includes: when reading the target ranking list through the backup service process fails, reading the target ranking list from the non-volatile storage medium.

[0146] While performing backup processing through the backup service process, the ranking list can also be stored through non-volatile storage media. In this way, when the backup service process fails to read the target ranking list due to unexpected circumstances, the target ranking list can be read from the non-volatile storage medium. The above method uses the shared memory block allocated to the service process, the shared memory block allocated to the backup service process, and the non-volatile storage medium to store the ranking list, which can further improve the overall disaster recovery capability and try to ensure that the target ranking list is successfully read.

[0147] like Figure 3B As shown, the embodiment of the present application performs backup processing through a backup service process, so that when reading the target ranking list through the target service process fails, the target ranking list can be read through the backup service process corresponding to the target service process, thereby improving the success rate of reading the target ranking list and improving disaster recovery capabilities.

[0148] In some embodiments, see Figure 3C , Figure 3C is a flowchart of a ranking list processing method provided in an embodiment of the present application. Figure 3A The illustrated step 102 can be implemented through steps 301 to 305 , which will be described in conjunction with each step.

[0149] In step 301, object data of multiple objects that conform to object partition information corresponding to the service process is obtained through each service process.

[0150] In step 302, each service process sorts the acquired object data of the multiple objects to obtain an object data sequence.

[0151] Here, after obtaining the object data of multiple objects that match the object partition information corresponding to the service process through each service process, the object data of the multiple objects are sorted to obtain an object data sequence. The sorting strategy relied on by the sorting process can be a default one, or the object data of the multiple objects corresponding to the service process can be sorted according to the sorting strategy corresponding to the service process, and the sorting strategy corresponding to the service process can be preset.

[0152] It is worth noting that the object data sequence only refers to a sequence obtained by sorting the object data of multiple objects, and the object data sequence itself may include at least one of the object identifier and the object data.

[0153] In step 303, when the capacity of the object data sequence is less than or equal to the capacity of the ranking list, the object data sequence is determined as the ranking list.

[0154] Here, each service process has a corresponding ranking capacity. When the capacity of the object data sequence corresponding to a service process is less than or equal to the ranking capacity corresponding to the service process, the object data sequence is directly determined as the ranking corresponding to the service process.

[0155] In step 304, when the capacity of the object data sequence is greater than the capacity of the ranking list, the object data sequence is truncated to obtain a ranking list that is less than or equal to the capacity of the ranking list.

[0156] When the capacity of the object data sequence corresponding to a service process is larger than the capacity of the ranking list corresponding to the service process, the object data sequence is intercepted, that is, a part of the object data sequence is intercepted so that the capacity of the intercepted part is less than or equal to the capacity of the ranking list, and the intercepted part is used as the generated ranking list. In general, users pay more attention to the top parts of the ranking list, so the interception can be performed in the order from the first to the last in the object data sequence. In addition, in order to ensure that the information in the ranking list is as comprehensive as possible, the stop condition of the interception process can be set as follows: the capacity of the currently intercepted part does not exceed the capacity of the ranking list, but if the interception continues, the capacity of the intercepted part will exceed the capacity of the ranking list.

[0157] For example, the object data sequence includes 1000 data (each data represents an object), the capacity of the first 500 data does not exceed the capacity of the ranking list, but the capacity of the first 501 data exceeds the capacity of the ranking list, so the first 500 data are intercepted as the generated ranking list.

[0158] In step 305 , each service process writes the generated ranking list into a shared memory block allocated to the service process.

[0159] For each service process, after the leaderboard is generated, the leaderboard is written to the shared memory block allocated for the service process.

[0160] In some embodiments, the above-mentioned allocation of shared memory blocks to multiple service processes can be achieved in the following manner: creating a shared memory block for each service process according to the ranking capacity corresponding to each service process, and allocating it to the corresponding service process;

[0161] After allocating shared memory blocks to multiple service processes respectively, the ranking processing method also includes: in response to an update operation of a ranking capacity corresponding to a third service process, creating a shared memory block for the third service process according to the updated ranking capacity and allocating it to the third service process, and releasing the shared memory block allocated to the third service process before the ranking capacity is updated; wherein the third service process is any one of the multiple service processes.

[0162] Since the ranking capacity corresponding to each service process is preset, a shared memory block can be created for each service process according to the ranking capacity corresponding to each service process, and allocated to the corresponding service process, wherein the capacity of the shared memory block created for a certain service process is greater than or equal to the ranking capacity corresponding to the service process, so as to ensure that the ranking generated by the service process can be accommodated. Wherein, in the case where the shared memory block needs to store a copy of the ranking, the capacity required for storing the copy of the ranking can be reserved when creating the shared memory block. In the above manner, a shared memory block of reasonable capacity can be created, so that the shared memory block can successfully accommodate the ranking, and at the same time, the storage space can be effectively utilized to avoid waste of storage space.

[0163] During the operation of a service process, the ranking capacity corresponding to the service process may be updated due to changes in business conditions. Taking any one of the multiple service processes, i.e., the third service process, as an example, when an update operation for the ranking capacity corresponding to the third service process is received, a shared memory block is created for the third service process according to the updated ranking capacity and allocated to the third service process, and the shared memory block allocated to the third service process before the ranking capacity is updated is released. In this way, in response to the expansion or reduction of the ranking capacity, the shared memory block is recreated and allocated, which can ensure the real-time matching between the shared memory block and the ranking capacity.

[0164] like Figure 3C As shown, the embodiment of the present application generates a ranking list according to the ranking list capacity corresponding to the service process, ensuring that the ranking list generated by the service process will not be too large and result in low information efficiency.

[0165] In some embodiments, see Figure 3D , Figure 3D is a flowchart of a ranking list processing method provided in an embodiment of the present application. Figure 3D middle, Figure 3A Step 102 shown can be updated to step 401. In step 401, multiple objects that meet the object partition information corresponding to the service process are determined through each service process, and object data of each of the multiple objects under the object attribute type corresponding to the service process is obtained. A ranking list is generated based on the object data of the multiple objects, and the generated ranking list is written to the shared memory block allocated for the service process.

[0166] In addition to the corresponding object partition information, each service process may also correspond to an object attribute type. In this case, each service process determines multiple objects that conform to the object partition information corresponding to the service process, obtains the object data of each of the multiple objects under the object attribute type corresponding to the service process, generates a ranking list based on the object data of the multiple objects, and writes the generated ranking list to the shared memory block allocated to the service process. For example, if the object to be ranked is a game account, the object partition information corresponding to a service process is Shenzhen City, and the object attribute type corresponding to the service process is a ranking score. Then the ranking list generated by the service process is a ranking score ranking list of multiple game accounts belonging to Shenzhen City.

[0167] It is worth noting that each service process may correspond to one or more object attribute types. When a service process corresponds to multiple object attribute types, a ranking list is generated based on each object attribute type corresponding to the service process. For example, if the object attribute type corresponding to a service process includes the combat power of character A and the combat power of character B, the service process will generate a combat power ranking list of character A and a combat power ranking list of character B. When a service process corresponds to multiple object partition information and multiple object attribute types, the multiple object partition information and multiple object attribute types corresponding to the service process are exhaustively combined to obtain multiple information combinations, each of which includes one object partition information and one object attribute type. The service process will generate a corresponding ranking list based on each information combination.

[0168] exist Figure 3D middle, Figure 3A Step 104 shown may be updated to step 402 , in response to the ranking list request, reading the target ranking list from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information and the target object attribute type.

[0169] Here, the ranking request includes not only the target object partition information but also the target object attribute type. A service process corresponding to the target object partition information and the target object attribute type in the ranking request is determined from multiple service processes as a target service process, and then the target ranking is read from the shared memory block allocated to the target service process through the target service process.

[0170] Taking the object to be ranked as a game account as an example, the object partition information corresponding to service process A is Shenzhen City, and the object attribute type corresponding to service process A is the ranking score. The object partition information corresponding to service process B is Shenzhen City, and the object attribute type corresponding to service process B is the combat effectiveness of a certain character (called the target character). The target object partition information in the ranking request is Shenzhen City, and the target object attribute type is the combat effectiveness of the target character, so service process B is determined as the target service process.

[0171] like Figure 3D As shown, the embodiment of the present application introduces object attribute types based on object partition information, refines the granularity of the ranking list, and can then determine the target ranking list by combining the target object partition information and the target object attribute type, thereby meeting user needs more accurately.

[0172] In some embodiments, see Figure 3E , Figure 3E is a flowchart of a ranking list processing method provided in an embodiment of the present application. Figure 3E middle, Figure 3A After step 102 shown ( Figure 3E In step 501, when the mirroring condition corresponding to the fourth service process is met, the ranking list is read from the shared memory block allocated to the fourth service process by the fourth service process and mirrored, and a copy of the ranking list obtained by the mirroring is written to the shared memory block allocated to the fourth service process.

[0173] Here, considering that the ranking list written in the shared memory block may change over time, the mirroring condition can be set in advance, and the ranking list is mirrored when the mirroring condition is met. The embodiment of the present application does not limit the mirroring condition, for example, it can be a time condition, that is, a copy of the ranking list is generated and stored at a preset mirroring time.

[0174] Taking any service process, i.e., the fourth service process, as an example, a mirroring condition can be pre-set for the fourth service process. On the basis that the fourth service process has written the generated ranking list to the shared memory block allocated for the fourth service process, when the mirroring condition corresponding to the fourth service process is met, the ranking list is read from the shared memory block allocated for the fourth service process by the fourth service process and mirrored to obtain a ranking list copy, wherein the ranking list copy is a record of the read ranking list at the time of the mirroring process. Then, the ranking list copy is written to the shared memory block allocated for the fourth service process by the fourth service process, wherein the ranking list copy written to the shared memory block coexists with the original ranking list in the shared memory block.

[0175] It is worth noting that if the ranking copies are generated and stored periodically, the latest generated ranking copy (referring to the ranking copies generated for the second time and thereafter) can replace the ranking copy written to the shared memory block last time to achieve the update of the ranking copy; of course, it is also possible not to replace, that is, to store ranking copies of multiple time points in the shared memory block at the same time, depending on the actual situation.

[0176] The embodiments of the present application do not limit the use of the copy of the ranking list. For example, it can meet the viewing needs of users. For example, in a game scenario, the ranking scores of each game account will be reset on the rank settlement day, so it is necessary to save a copy of the ranking list one day before the rank settlement day for relevant users to view; or, rewards can also be distributed based on the copy of the ranking list.

[0177] In some embodiments, after step 501, the ranking list processing method further includes: receiving a ranking list copy request including target object partition information; in response to the ranking list copy request, reading a target ranking list copy from a shared memory block allocated to the target service process through a target service process corresponding to the target object partition information; and sending the target ranking list copy to the initiator of the ranking list copy request.

[0178] On the basis that the copy of the ranking list has been written to the shared memory block, it is natural to respond to the request for the copy of the ranking list. Similar to the ranking list, a request for a copy of the ranking list including the partition information of the target object can be received; in response to the request for the copy of the ranking list, the target service process corresponding to the partition information of the target object reads the copy of the target ranking list from the shared memory block allocated to the target service process; and the copy of the target ranking list is sent to the initiator of the request for the copy of the ranking list. In this way, the user's need to view a copy of the target ranking list at a specific point in time can be met.

[0179] In some embodiments, after step 501, the ranking list processing method further includes: reading a ranking list copy from a shared memory block allocated to the fourth service process through a fourth service process; determining objects to be rewarded that meet the ranking conditions in the read ranking list copy; and performing reward processing on the objects to be rewarded.

[0180] Here, rewards can be issued based on the copy of the ranking list. For example, the fourth service process reads the copy of the ranking list from the shared memory block allocated to the fourth service process, and determines the object that meets the ranking condition in the read copy of the ranking list as the object to be rewarded, wherein the ranking condition is not limited, for example, it can be the first N digits, and N is an integer greater than zero. Then, the object to be rewarded is rewarded, and the embodiment of the present application does not limit the way of reward processing. For example, in the case where the object is a game account, virtual resources or titles can be issued to the object to be rewarded. The higher the position of the object to be rewarded in the copy of the ranking list, the more virtual resources issued, or the rarer the title; for example, in the case where the object is a song or video, the exposure of the object to be rewarded can be increased, for example, the object to be rewarded is displayed on the homepage of the corresponding platform for recommendation, and the higher the position of the object to be rewarded in the copy of the ranking list, the more conspicuous the position displayed in the corresponding platform. The above method issues rewards according to the copy of the ranking list at a specific time point, which can improve the accuracy of issuing rewards and avoid the process of issuing rewards from being affected by the ever-changing ranking list.

[0181] like Figure 3E As shown, the embodiment of the present application stores the records of the ranking list at a specific time point in a shared memory block by means of mirror processing, thereby supporting further applications such as user viewing and award distribution, thereby improving the diversity and flexibility of ranking list processing.

[0182] In some embodiments, see Figure 3F , Figure 3F is a flowchart of a ranking list processing method provided in an embodiment of the present application. Figure 3F middle, Figure 3A After step 102 shown ( Figure 3F (taking step 105 as an example), in step 601, when the update condition corresponding to the fifth service process is met, the ranking list is read from the shared memory block allocated to the fifth service process by the fifth service process, the object data in the read ranking list is updated, and the updated ranking list is written to the shared memory block allocated to the fifth service process to replace the ranking list before the update in the shared memory block allocated to the fifth service process.

[0183] Here, after the ranking list is generated, the ranking list can be fixed, but in some scenarios, the ranking list needs to be automatically updated. For example, if the object is a game account and the object data is a ranking score, the ranking score in the ranking list needs to be decayed regularly. Therefore, corresponding update conditions can be set for the service process to update the object data in the ranking list when the update conditions are met.

[0184] For ease of explanation, an arbitrary service process, namely the fifth service process, is taken as an example. When the update condition corresponding to the fifth service process is met, the fifth service process reads the ranking list from the shared memory block allocated to the fifth service process, updates the object data in the read ranking list, and writes the updated ranking list to the shared memory block allocated to the fifth service process to replace the ranking list before the update in the shared memory block allocated to the fifth service process. Among them, the update condition can be a time-related condition, such as updating at a preset update time; the update process can refer to updating all object data in the ranking list, or it can refer to updating part of the object data in the ranking list; the update process can be implemented according to a preset update strategy, such as increasing the object data according to a preset percentage or attenuating the object data according to a preset percentage.

[0185] In some embodiments, the above-mentioned method can be implemented in the following manner: when the update condition corresponding to the fifth service process is met, the ranking list is read from the shared memory block allocated to the fifth service process by the fifth service process, the object data in the read ranking list is updated, and the updated ranking list is written to the shared memory block allocated to the fifth service process to replace the ranking list before the update in the shared memory block allocated to the fifth service process: when the object in the ranking list generated by the fifth service process meets the update condition corresponding to the fifth service process, the ranking list is read from the shared memory block allocated to the fifth service process by the fifth service process, the object data in the read ranking list that meets the update condition is updated, and the updated ranking list is written to the shared memory block allocated to the fifth service process to replace the ranking list before the update in the shared memory block allocated to the fifth service process.

[0186] Here, the update condition can be used to constrain the objects in the ranking list generated by the fifth service process. Taking the case where the object is a game account and the object data is a ranking score as an example, the update condition can be that the game account has not played a ranking match in the past week, and the update process can refer to reducing the ranking score of the game account that has not played a ranking match in the past week in the ranking list by a specific amount, such as reducing one star. In the above manner, the object data of a specific object in the ranking list can be updated, which improves the pertinence and refinement of the update process.

[0187] like Figure 3F As shown, the embodiment of the present application realizes automatic updating (automatic increase or automatic decay) of the object data in the ranking list by setting update conditions, which can effectively support the update requirements in certain scenarios.

[0188] Below, an exemplary application of the embodiment of the present application in a practical application scenario will be described. For ease of understanding, an example is given in which the object to be ranked is a game account and the object partition information is the region where the game account is located.

[0189] In social games such as MOBA games, the simplest and most common way for players to interact is usually through rankings. The types of games vary, and the types and needs of ranking services are also diverse. For example, it is necessary to generate rankings for various regions, such as Shenzhen rankings, Guangzhou rankings, etc.; for another example, it is necessary to generate national rankings to issue national titles every week. Here, it is necessary to support the generation of ranking copies at 24:00 on Sunday, use the ranking copies to issue national titles, and clear the rankings to start a new week of national rankings; for another example, a game account needs to play at least one ranked match every week to maintain its rank, otherwise the rank will automatically drop one star (equivalent to the automatic attenuation of the ranking score); for another example, as the business develops and needs change, it may be necessary to adjust the relevant configuration of the rankings, such as expanding or shrinking the rankings.

[0190] In view of this, the embodiments of the present application provide Figure 4 The architecture diagram of the ranking service is shown in Figure 4 In the figure, the ranking service includes service interface, routing information control center, proxy service, ranking service cluster, service process, inspection service and transfer service, which will be explained separately.

[0191] 1) Service interface: a functional interface for providing rankings, i.e., for receiving ranking requests and sending target rankings to the initiator of ranking requests. When receiving a ranking request, the service interface pulls the address list of the proxy service from the routing information control center, obtains the target ranking list through interaction with the proxy service, and completes the response to the ranking request. The address list may include the addresses of multiple proxy services for accessing the same ranking service cluster. The service interface may select one of the addresses for access through load balancing (such as polling), thereby reducing the processing pressure of a single proxy service.

[0192] 2) Routing Information Control Center: Maintain and issue the address list of the proxy service.

[0193] 3) Proxy service: The access layer of the ranking service, used to forward the ranking request sent by the service interface to the ranking service cluster. Figure 4In the figure, two ranking service clusters are shown. One is the global ranking service cluster, which is used to generate the global ranking, that is, the ranking of all game accounts, corresponding to the global proxy service; the other is the dynamic ranking service cluster, which is used to generate the dynamic ranking of game accounts in a specific region, such as the Shenzhen ranking, corresponding to the dynamic proxy service. A ranking service cluster can correspond to one or more object partition information. Figure 4 The ranking service clusters shown are only examples. Depending on the actual situation, the number of ranking service clusters can be more or less. For the service interface, the proxy service corresponding to which ranking service cluster the ranking request is forwarded to can be determined based on the ranking type specified in the ranking request (corresponding to the target object partition information above). For example, if the ranking request specifies the Shenzhen ranking, the proxy service forwards the ranking request to the dynamic proxy service, and the dynamic proxy service forwards the ranking request to the service process in the dynamic ranking service cluster. Of course, if the ranking request specifies to obtain the global ranking and the dynamic ranking at the same time, the service interface can forward the ranking request to the global proxy service and the dynamic proxy service at the same time.

[0194] 4) Ranking service cluster: includes several service processes, which are used to perform operations such as determining the game accounts involved in the ranking, obtaining the account data of the game accounts (corresponding to the object data above), generating the ranking, writing the ranking, and reading the ranking. Figure 4 In the global ranking service cluster, global service process A and global service process B are shown as hot standby for each other, where global service process A and global service process B are located on different machines respectively, and ranking data synchronization is performed regularly between global service process A and global service process B. The same is true for dynamic service process A and dynamic service process B in the dynamic ranking service cluster.

[0195] 5) Inspection service: The two service processes that are hot standby for each other need to synchronize the ranking data regularly. However, during the data synchronization process, the synchronization may fail due to various factors (such as one of the processes is restarting), which may lead to inconsistency of the rankings stored by the two service processes. Therefore, the inspection service obtains the rankings stored in the corresponding shared memory blocks of the two service processes that are hot standby for each other. If the two rankings are inconsistent, the two rankings are merged to obtain a merged ranking, and the two service processes store the merged rankings in their corresponding shared memory blocks, respectively. The merge process refers to taking the union of the two rankings according to the game account. If the same game account corresponds to different account data in the two rankings, the latest value or the maximum value is taken as the account data corresponding to the game account in the merged ranking. It is worth noting that the frequency of the inspection service obtaining the rankings from the service process needs to be limited to no more than the frequency threshold to avoid affecting the normal business processing throughput of the service process.

[0196] 6) Transfer service: used to periodically obtain the ranking list from the service process and perform data persistence processing on the ranking list, such as storing it on a disk or other non-volatile storage media.

[0197] Based on Figure 4 The ranking service shown in the present application embodiment can achieve the following three functions.

[0198] 1) Multi-dimensional disaster recovery.

[0199] The present application embodiment provides Figure 5 The schematic diagram of multi-dimensional disaster recovery shown in the figure shows that the overall disaster recovery capability can be improved by storing the rankings in multiple dimensions.

[0200] First, use shared memory to store the rankings. That is, for each service process, the generated rankings are stored in the form of shared memory files in the shared memory block allocated to the service process. In this way, if the service process crashes or the system restarts without exception, the rankings will not be lost. At the same time, the reading and writing efficiency of the rankings can be guaranteed.

[0201] Secondly, multi-machine multi-process hot standby is performed. That is, two or more service processes are deployed as hot standby for each other. These service processes are located on different machines. In this way, even if a service process fails, the backup service process (backup service process) can continue to provide services; at the same time, it also helps to quickly recover after the service process fails.

[0202] Third, the rankings are persisted to disk. This means that the rankings stored by all service processes are stored on disk across machines, that is, the machine where the disk is located is different from the machine where each service process is located, or the disk itself is independent and does not need to be attached to the machine. In this way, when all machines where the service processes are located have irrecoverable failures that lead to serious problems such as data loss, the rankings can still be obtained from the disk.

[0203] 2) Automatic mirroring and attenuation at regular intervals.

[0204] Here, the mirror function means that when the current time reaches the specified mirror time, a copy of the ranking list is generated for the ranking list. For example, you can specify to generate a copy of the ranking list at 24:00 every Sunday. It is worth noting that the ranking list copy can also be applied to the multi-dimensional disaster recovery mentioned above. In this way, the ranking list copy can be used to issue rewards to the game accounts that rank high (i.e. meet the ranking conditions).

[0205] The decay function means that when the current time reaches the specified decay time (corresponding to the update time above), the account data in the ranking list will be decayed according to a certain decay strategy (or update strategy). Taking the account data as the ranking score as an example, you can specify that all ranking scores in the ranking list will be automatically decayed by 10% according to a fixed percentage at 24:00 every Sunday, such as Figure 6 shown.

[0206] The mirroring time and decay time can be configured through cron expressions, but are not limited to this configuration method.

[0207] 3) Multi-level dynamically generated rankings.

[0208] The present application embodiment provides Figure 7 The schematic diagram of the multi-level dynamically generated ranking list is shown in the figure. Figure 7 The static part on the left refers to the process of manual configuration on the configuration page, which requires configuring the list type and list instance; the dynamic part on the right refers to the process of the service process generating a ranking list based on the configured list type and list instance.

[0209] The list type is equivalent to a template, which is configured with sorting strategy, ranking capacity, mirror time, decay time, decay strategy, etc. The list instance is equivalent to functional classification of the ranking list. For example, in the list instance, the object partition information can be configured as a specific region, such as Nanshan District, Shenzhen. In this way, a sub-list instance can be generated according to the list type and list instance. The sub-list instance represents the final generated ranking list, for example, the ranking of account data of multiple game accounts in Nanshan District, Shenzhen; on this basis, the object attribute type can also be configured in the list instance as the combat power of a hero used by the game account, that is, the account data to be ranked is configured. In this way, a sub-list instance can be generated according to the list type and list instance, for example, the ranking of the combat power of multiple game accounts in Nanshan District, Shenzhen on the hero.

[0210] For some configurations in the list type (such as sorting strategy, mirror time, decay time, decay strategy), if there is an update, the service process can be restarted so that the restarted service process can generate a new list according to the updated configuration; for other configurations such as the list capacity, if there is an update (expansion or reduction), it is necessary to create a new shared memory block according to the updated list capacity to store the list, and release the old shared memory block.

[0211] Through the embodiments of the present application, at least the following technical effects can be achieved:

[0212] 1) Use shared memory to store the ranking list. When the service process exits abnormally, the system restarts non-abnormally, or is restarted manually, the ranking list service can be quickly restored to ensure that the ranking list is not lost. Furthermore, it supports multi-machine and multi-process hot standby. If the ranking list cannot be obtained through a certain service process, the ranking list can be obtained through the corresponding backup service process. Furthermore, it supports the ranking list to be stored on disk. Once all service processes cannot be called, the ranking list can also be obtained from the disk.

[0213] 2) When creating a ranking list, you can enable the mirroring function and configure the mirroring time. In this way, you can generate a copy of the ranking list regularly to distribute rewards based on the copy of the ranking list. When creating a ranking list, you can also enable the decay function and configure the decay time. In this way, you can decay the account data in the ranking list regularly to meet the decay requirements in specific game scenarios.

[0214] 3) Support multi-level dynamic generation of rankings. In addition to the global rankings, rankings can be generated for some game accounts. The type and number of rankings are configurable, so that the ranking requirements of different games can be met. For example, a casual game, in addition to ranking nationwide, also needs to read the city attributes (regional attributes) to which the game account belongs, so as to generate a ranking based on the account data of multiple game accounts in a city.

[0215] Next, the exemplary structure of the ranking processing device 255 provided in the embodiment of the present application implemented as a software module is described. In some embodiments, for example, Figure 2 As shown, the software modules stored in the ranking processing device 255 of the memory 250 may include: an allocation module 2551, which is used to allocate shared memory blocks to multiple service processes respectively; wherein each service process corresponds to object partition information; a writing module 2552, which is used to obtain object data of multiple objects that conform to the object partition information corresponding to the service process through each service process, generate a ranking list based on the object data of the multiple objects, and write the generated ranking list to the shared memory block allocated to the service process; a receiving module 2553, which is used to receive a ranking list request including target object partition information; a reading module 2554, which is used to respond to the ranking list request, and read the target ranking list from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information; a sending module 2555, which is used to send the target ranking list to the initiator of the ranking list request.

[0216] In some embodiments, each service process corresponds to a cross-machine backup service process; the ranking processing device 255 also includes a backup module, which is used to: send the generated ranking list to the corresponding backup service process through each service process, so that the backup service process performs backup processing in the shared memory block allocated to the backup service process according to the received ranking list; when the target ranking list fails to be read through the target service process, the target ranking list is read from the shared memory block allocated to the backup service process through the backup service process corresponding to the target service process.

[0217] In some embodiments, the ranking processing device 255 also includes a merging module, which is used to: read the first ranking list from the shared memory block allocated to the first service process through the first service process, and read the second ranking list from the shared memory block allocated to the second service process through the second service process; wherein the first service process is any one of the multiple service processes, and the second service process is a backup service process of the first service process; merge the first ranking list and the second ranking list to obtain a merged ranking list; when the first ranking list is different from the merged ranking list, write the merged ranking list to the shared memory block allocated to the first service process through the first service process to replace the first ranking list in the shared memory block allocated to the first service process; when the second ranking list is different from the merged ranking list, write the merged ranking list to the shared memory block allocated to the second service process through the second service process to replace the second ranking list in the shared memory block allocated to the second service process.

[0218] In some embodiments, the ranking processing device 255 further includes a persistence module, which is used to: write the generated ranking list to a non-volatile storage medium through each service process; and read the target ranking list from the non-volatile storage medium when reading the target ranking list through the target service process fails.

[0219] In some embodiments, each service process corresponds to a ranking capacity; the write module 2552 is also used to: sort the object data of multiple objects to obtain an object data sequence; when the capacity of the object data sequence is less than or equal to the ranking capacity, determine the object data sequence as the ranking; when the capacity of the object data sequence is greater than the ranking capacity, intercept the object data sequence to obtain a ranking that is less than or equal to the ranking capacity.

[0220] In some embodiments, the allocation module 2551 is also used to: create a shared memory block for each service process according to the ranking capacity corresponding to each service process, and allocate it to the corresponding service process; in response to an update operation on the ranking capacity corresponding to a third service process, create a shared memory block for the third service process according to the updated ranking capacity and allocate it to the third service process, and release the shared memory block allocated to the third service process before the ranking capacity is updated; wherein the third service process is any one of the multiple service processes.

[0221] In some embodiments, each service process also corresponds to an object attribute type; the ranking request also includes a target object attribute type; the write module 2552 is also used to determine multiple objects that conform to the object partition information corresponding to the service process through each service process, and obtain the object data of each of the multiple objects under the object attribute type corresponding to the service process; the read module 2554 is also used to read the target ranking list from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information and the target object attribute type.

[0222] In some embodiments, the fourth service process corresponds to a mirroring condition, and the fourth service process is any one of the multiple service processes; the ranking processing device 255 also includes a mirroring module, which is used to: when the mirroring condition corresponding to the fourth service process is met, the ranking list is read from the shared memory block allocated to the fourth service process by the fourth service process and mirror processing is performed, and the copy of the ranking list obtained by the mirroring processing is written to the shared memory block allocated to the fourth service process.

[0223] In some embodiments, the ranking processing device 255 also includes a reward module, which is used to: read a ranking copy from a shared memory block allocated to the fourth service process through a fourth service process; determine the objects to be rewarded that meet the ranking conditions in the read ranking copy; and perform reward processing on the objects to be rewarded.

[0224] In some embodiments, the fifth service process corresponds to an update condition, and the fifth service process is any one of the multiple service processes; the ranking processing device 255 also includes an update module, which is used to: when the update condition corresponding to the fifth service process is met, the ranking list is read from the shared memory block allocated to the fifth service process through the fifth service process, the object data in the read ranking list is updated, and the updated ranking list is written to the shared memory block allocated to the fifth service process to replace the ranking list before the update in the shared memory block allocated to the fifth service process.

[0225] The embodiment of the present application provides a computer program product or a computer program, which includes executable instructions stored in a computer-readable storage medium. The processor of the electronic device reads the executable instructions from the computer-readable storage medium, and the processor executes the executable instructions, so that the electronic device executes the ranking processing method described above in the embodiment of the present application.

[0226] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the ranking list processing method provided by the embodiment of the present application.

[0227] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0228] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0229] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0230] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0231] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A ranking list processing method, characterized in that: include: Allocate shared memory blocks to multiple service processes respectively; each service process has object partition information corresponding to it; Obtaining object data of multiple objects that match the object partition information corresponding to the service process through each service process, generating a ranking list according to the object data of the multiple objects, and writing the generated ranking list to a shared memory block allocated for the service process; receiving a ranking request including target object partition information; In response to the ranking list request, reading a target ranking list from a shared memory block allocated to the target service process through the target service process corresponding to the target object partition information; The target ranking list is sent to the initiator of the ranking list request.

2. The method according to claim 1, characterized in that: Each service process corresponds to a cross-machine backup service process; after generating a ranking list according to the object data of the multiple objects, the method further includes: Sending the generated ranking list to the corresponding backup service process through each service process, so that the backup service process performs backup processing in the shared memory block allocated to the backup service process according to the received ranking list; The method further comprises: When reading the target ranking list through the target service process fails, the target ranking list is read from the shared memory block allocated to the backup service process through the backup service process corresponding to the target service process.

3. The method according to claim 2, characterized in that After each service process sends the generated ranking list to the corresponding backup service process, the method further includes: The first ranking list is read from a shared memory block allocated to the first service process by a first service process, and the second ranking list is read from a shared memory block allocated to the second service process by a second service process; wherein the first service process is any one of the multiple service processes, and the second service process is a backup service process of the first service process; Merging the first ranking list and the second ranking list to obtain a merged ranking list; When the first ranking list is different from the merged ranking list, writing the merged ranking list to the shared memory block allocated to the first service process through the first service process to replace the first ranking list in the shared memory block allocated to the first service process; When the second ranking list is different from the merged ranking list, the merged ranking list is written into the shared memory block allocated to the second service process by the second service process to replace the second ranking list in the shared memory block allocated to the second service process.

4. The method according to claim 1, characterized in that After generating a ranking list according to the object data of the plurality of objects, the method further comprises: Writing the generated ranking list to a non-volatile storage medium through each service process; The method further comprises: When reading the target ranking list through the target service process fails, reading the target ranking list from the non-volatile storage medium.

5. The method according to claim 1, characterized in that Each service process has a corresponding ranking capacity; generating the ranking according to the object data of the plurality of objects includes: Sorting the object data of the plurality of objects to obtain an object data sequence; When the capacity of the object data sequence is less than or equal to the capacity of the ranking list, determining the object data sequence as the ranking list; When the capacity of the object data sequence is greater than the capacity of the ranking list, the object data sequence is intercepted to obtain a ranking list that is less than or equal to the capacity of the ranking list.

6. The method according to claim 5, characterized in that The method of allocating shared memory blocks to multiple service processes respectively includes: Create a shared memory block for each service process according to the corresponding leaderboard capacity of each service process and allocate it to the corresponding service process; The method further comprises: In response to an update operation on the ranking capacity corresponding to the third service process, creating a shared memory block for the third service process according to the updated ranking capacity and allocating it to the third service process, and releasing the shared memory block allocated to the third service process before the ranking capacity is updated; The third service process is any one of the multiple service processes.

7. The method according to claim 1, characterized in that Each service process also corresponds to an object attribute type; the ranking request also includes a target object attribute type; the object data of multiple objects that conform to the object partition information corresponding to the service process are obtained through each service process, including: Determine, through each service process, a plurality of objects that conform to the object partition information corresponding to the service process, and obtain object data of each of the plurality of objects under the object attribute type corresponding to the service process; The target service process corresponding to the target object partition information reads the target ranking list from the shared memory block allocated to the target service process, including: The target ranking list is read from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information and the target object attribute type.

8. The method according to claim 1, characterized in that A fourth service process corresponds to a mirror condition, and the fourth service process is any one of the multiple service processes; The method further comprises: When the mirroring condition corresponding to the fourth service process is met, the fourth service process reads the ranking list from the shared memory block allocated for the fourth service process and performs mirroring, and writes the ranking list copy obtained by the mirroring to the shared memory block allocated for the fourth service process.

9. The method according to claim 8, characterized in that After writing the copy of the ranking list obtained by mirroring into the shared memory block allocated to the fourth service process, the method further includes: Reading a copy of the leaderboard from a shared memory block allocated to the fourth service process through the fourth service process; Determine the reward objects that meet the ranking conditions in the read copy of the ranking list; Perform reward processing on the object to be rewarded.

10. The method according to claim 1, characterized in that The fifth service process corresponds to an update condition, and the fifth service process is any one of the multiple service processes; after writing the generated ranking list to the shared memory block allocated to the service process, the method further includes: When the update condition corresponding to the fifth service process is met, the ranking list is read from the shared memory block allocated to the fifth service process by the fifth service process, and the object data in the read ranking list is updated, and The updated ranking list is written into the shared memory block allocated for the fifth service process to replace the ranking list before the update in the shared memory block allocated for the fifth service process.

11. A ranking list processing device, characterized in that: include: An allocation module is used to allocate shared memory blocks to multiple service processes respectively; wherein each service process corresponds to object partition information; A writing module, used to obtain object data of multiple objects that match the object partition information corresponding to the service process through each service process, generate a ranking list according to the object data of the multiple objects, and write the generated ranking list to the shared memory block allocated for the service process; A receiving module, configured to receive a ranking request including target object partition information; A reading module, configured to respond to the ranking list request and read the target ranking list from the shared memory block allocated to the target service process through the target service process corresponding to the target object partition information; The sending module is used to send the target ranking list to the initiator of the ranking list request.

12. An electronic device, characterized in that: include: A memory for storing executable instructions; A processor, configured to implement the ranking list processing method according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.

13. A computer-readable storage medium, characterized in that: Executable instructions are stored, and when executed by a processor, the ranking list processing method according to any one of claims 1 to 10 is implemented.

14. A computer program product, characterized in that It includes executable instructions, which are used to implement the ranking list processing method described in any one of claims 1 to 10 when executed by a processor.