Ranking list management method, device and equipment, storage medium and product

By copying the real-time ranking list at the snapshot time point and updating the incremental ranking list, the problem of frequent use of operation and maintenance commands and displaying lag in the traditional snapshot ranking management method is solved, and efficient and secure ranking management is achieved.

CN119624554APending Publication Date: 2025-03-14BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411550348.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The traditional snapshot ranking management method frequently uses operation and maintenance commands in the business, which poses security risks, and the display of snapshot rankings is lagging, affecting the management effect.

Method used

When the snapshot time is reached, the first real-time ranking is determined as the snapshot ranking of the snapshot time point, and the copying is initiated to obtain the second real-time ranking. Obtain activity data from the message middleware, determine the incremental data of the list, update the incremental rankings, and update the second real-time rankings according to the incremental rankings after the copy is completed.

Benefits of technology

It realizes the rapid and accurate construction and update of snapshot rankings and real-time rankings, avoids the frequent use of operation and maintenance commands, and improves the security and efficiency of ranking management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119624554A_ABST
    Figure CN119624554A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a ranking list management method and device, equipment, a storage medium and a product. According to the technical scheme provided by the embodiment of the invention, when the snapshot time point is reached, the first real-time ranking list is determined as the snapshot ranking list of the snapshot time point, copying of the first real-time ranking list is started to obtain the second real-time ranking list, and when copying of the first real-time ranking list is started, the second real-time ranking list is obtained. The method comprises the following steps: acquiring first activity data from a message middleware, determining first list incremental data according to the first activity data, updating an incremental ranking list according to the first list incremental data, and updating a second real-time ranking list according to the incremental ranking list when copying of a first real-time ranking list is completed. The snapshot ranking list and the real-time ranking list can be quickly and accurately constructed and updated, the cache master and slave do not need to be controlled through an operation and maintenance command to execute disconnection and reconnection operations, and the ranking list management effect is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a ranking management method, apparatus, device, storage medium and product. Background Art

[0002] With the development of computer technology and Internet technology, the application of social platforms is becoming more and more widespread. In order to improve the enthusiasm of users, various social platforms have also launched different rankings, such as user gift rankings, user fan number rankings, post popularity rankings, etc. Among them, rankings generally include real-time rankings and snapshot rankings. Real-time rankings can be used to display real-time updated data, and snapshot rankings can be used to display snapshot data solidified at the last snapshot time point. These two types of rankings have high timeliness and accuracy for data.

[0003] The main implementation method of the traditional snapshot ranking is to consume the message of the message middleware, calculate the ranking data and store it in the cache, and the user accesses the server to obtain and display the snapshot data solidified at the last snapshot time point. For the ranking management method of the multi-point server combined with the cache master-slave disconnection processing, the master server is selected from the multi-point server to build the snapshot ranking and store it in the cache. When the time reaches the snapshot time point, the cache master-slave disconnection operation needs to be operated. The cache master point continues to receive data from the multi-point server and stores the real-time ranking. The cache slave point does not synchronize the cache master point data. The master server reads the cache slave point data, solidifies it into a snapshot ranking for display to the user and stores it in the cache master point. After the master server operation is completed, the cache master and slave need to be operated to reconnect, and the cache slave point continues to synchronize the cache master point data. Since the command to control the cache master-slave disconnection and reconnection is an operation and maintenance command, it is unsafe to frequently use operation and maintenance commands in the business. If any of the cache commands fails to execute, it will directly cause the ranking abnormality and the ranking management effect is poor. Summary of the invention

[0004] The embodiments of the present application provide a ranking management method, device, equipment, storage medium and product to solve the technical problem of poor ranking management effect in related technologies, and can effectively improve the ranking management effect.

[0005] In a first aspect, an embodiment of the present application provides a ranking management method applied to a server, including:

[0006] When the snapshot time point is reached, the first real-time ranking list is determined as the snapshot ranking list at the snapshot time point, and the replication of the first real-time ranking list is started to obtain a second real-time ranking list;

[0007] Acquire first activity data from the message middleware, and determine first list incremental data according to the first activity data;

[0008] Update the incremental ranking list according to the incremental data of the first list;

[0009] When the copying of the first real-time ranking list is completed, the second real-time ranking list is updated according to the incremental ranking list.

[0010] In a second aspect, an embodiment of the present application provides a ranking management device applied to a server, including a replication startup module, an increment determination module, an increment recording module and a ranking update module, wherein:

[0011] The replication start module is configured to, when a snapshot time point is reached, determine the first real-time ranking list as the snapshot ranking list at the snapshot time point, and initiate replication of the first real-time ranking list to obtain a second real-time ranking list;

[0012] The incremental determination module is configured to obtain the first activity data from the message middleware, and determine the first list incremental data according to the first activity data;

[0013] The incremental recording module is configured to update the incremental ranking list according to the incremental data of the first list;

[0014] The list updating module is configured to update the second real-time list according to the incremental list when the copying of the first real-time list is completed.

[0015] In a third aspect, an embodiment of the present application provides a ranking management device, including: a memory and one or more processors;

[0016] The memory is used to store one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the ranking list management method as described in the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the ranking management method as described in the first aspect when executed by a computer processor.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of a device reads and executes the computer program from the computer-readable storage medium, so that the device executes the ranking management method as described in the first aspect.

[0020] The embodiment of the present application determines the first real-time ranking list as the snapshot ranking list at the snapshot time point when the snapshot time point is reached, starts the replication of the first real-time ranking list to obtain the second real-time ranking list, and obtains the first activity data from the message middleware when the replication of the first real-time ranking list has been started, determines the first list incremental data according to the first activity data, and updates the incremental ranking list according to the first list incremental data. When the replication of the first real-time ranking list has been completed, the second real-time ranking list can be updated according to the incremental ranking list. When the snapshot time point is reached, the latest first real-time ranking list is solidified as the snapshot ranking list corresponding to the snapshot time point. When the first list incremental data is obtained according to the first activity data obtained from the message middleware, the incremental ranking list is first updated according to the first list incremental data. After the replication of the first real-time ranking list is completed, the second real-time ranking list is updated according to the incremental ranking list, thereby realizing fast and accurate construction and updating of the snapshot ranking list and the real-time ranking list, without the need to control the cache master and slave to perform disconnection and reconnection operations through operation and maintenance commands, and effectively improving the ranking management effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flowchart of a ranking management method provided by an embodiment of the present application;

[0022] Figure 2 This is a schematic diagram of a distributed node network provided by an embodiment of the present application;

[0023] Figure 3 is a flowchart of another ranking management method provided by an embodiment of the present application;

[0024] Figure 4 This is a schematic diagram of a snapshot ranking process provided by an embodiment of the present application;

[0025] Figure 5 It is a structural diagram of a ranking management device provided in an embodiment of the present application;

[0026] Figure 6 It is a structural diagram of a ranking management device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The above process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The above process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0028] The ranking management method provided in the present application can be applied to the construction and management of rankings (such as rankings in live broadcast scenarios), and aims to solidify the latest first real-time ranking as the snapshot ranking corresponding to the snapshot time point when the snapshot time point is reached. When the incremental data of the first ranking is obtained according to the first activity data obtained from the message middleware, the incremental ranking is first updated according to the incremental data of the first ranking. After the copying of the first real-time ranking is completed, the second real-time ranking is updated according to the incremental ranking, so as to realize the fast and accurate construction and update of the snapshot ranking and the real-time ranking.

[0029] Existing rankings generally include real-time rankings and snapshot rankings. Traditional snapshot rankings mainly consume messages from the message middleware, calculate ranking data and store them in the cache. The user end can request the snapshot ranking from the server and display the snapshot data solidified at the last snapshot time point. The generation of snapshot rankings generally includes single-point processing and multi-point processing. For the single-point processing method, a single-point server generally generates a snapshot ranking and interacts with the local cache. However, when a single-point server fails, the background cannot provide ranking services. The data of each user must be returned to the server for processing. Cross-region requests will result in more serious processing delays and a higher risk of failure.

[0030] For the multi-point combined with cache master-slave disconnection processing method, the multi-point server consumes the messages generated by the message middleware, accurately calculates the real-time ranking list and stores it in the cache master point, and the cache slave point synchronizes the cache master point data. The master server is selected from the multi-point server to build the snapshot ranking list and store it in the cache. When the time reaches the snapshot time point, the cache master-slave is controlled to disconnect, the cache master point continues to receive the data of the multi-point server, stores the real-time ranking list, the cache slave point does not synchronize the cache master point data, the master server reads the cache slave point data, solidifies it into a snapshot ranking list displayed to the user and stores it in the cache master point; after the master server completes the operation, the cache master-slave is operated to reconnect, and the cache slave point continues to synchronize the cache master point data (real-time, snapshot ranking list). Since the cache master-slave disconnection and reconnection are operation and maintenance commands, the frequent use of operation and maintenance commands in the business is likely to cause data security issues. For example, when any of the cache commands fails to execute, it will directly cause the ranking list to be abnormal, and under this snapshot ranking generation method, the display of the snapshot ranking list has a lag. It is necessary to wait until the master-slave disconnection and the construction of the snapshot ranking list are completed before the user end can display the newly constructed snapshot ranking list. As for the method of multi-point combined consumption suspension processing: similar to the method of multi-point combined cache master-slave disconnection processing, the multi-point server accurately calculates the real-time ranking list, and the master server builds a snapshot ranking list and stores it in the cache. The difference is that when the time reaches the snapshot time point, the multi-point server consumption is suspended, the thread enters a busy waiting state, and the cache data is solidified; the master server reads the cache data, builds a snapshot ranking list, and stores the snapshot ranking list in the cache; when the master server completes the construction of the snapshot ranking list, the multi-point server continues to consume messages and calculate the real-time ranking list. However, the display of the snapshot ranking list under this snapshot ranking generation method still has a lag. It is necessary to wait until the snapshot ranking list is built before the user end can display the newly built snapshot ranking list. During the construction of the snapshot ranking list, the message middleware message cannot be consumed, which will cause the message to pile up. At the same time, the thread enters a busy waiting state, which will lead to resource waste and a decrease in system performance, and the ranking management effect is poor. Based on this, a ranking management method of an embodiment of the present application is provided to solve the technical problem that the existing ranking management effect is poor.

[0031] Figure 1 A flowchart of a ranking management method provided in an embodiment of the present application is given. The ranking management method can be applied to the server. The ranking management method provided in the embodiment of the present application can be executed by a ranking management device. The ranking management device can be implemented by hardware and / or software and integrated in a ranking management device (such as a server).

[0032] The following description is made by taking the ranking management device executing the ranking management method as an example. Figure 1 , the ranking management method includes:

[0033] S110: When the snapshot time point is reached, the first real-time ranking list is determined as the snapshot ranking list at the snapshot time point, and the replication of the first real-time ranking list is started to obtain a second real-time ranking list.

[0034] The server provided by this solution can be configured in a distributed node network, which is also configured with multiple other service nodes. The server provided by this solution can be used as the main service node in the distributed network node. Other service nodes and the server can be configured in the same computer room or in different computer rooms.

[0035] like Figure 2 As shown in a schematic diagram of a distributed node network provided, the distributed node network includes computer rooms distributed in different areas (area A and area B are shown in the figure), wherein each area may include one or more computer rooms (area A in the figure is configured with computer rooms 11 and 12, and area B is configured with computer rooms 21 and 22) and one or more message middlewares, each computer room is configured with a proxy server (proxy, which can be used to provide ranking forwarding services, and the user end can send data acquisition requests through the proxy server and the proxy server forwards them to the service node), a computer room cache (cache) and one or more service nodes (serve), wherein a service node in area A is configured as a main service node (main serv, i.e., the server of this solution).

[0036] Among them, for the interaction between the user end and the service node, when the user end needs to obtain the ranking list (such as the snapshot ranking list), it can send a ranking list acquisition request to the nearest proxy server, and the proxy server service sends it to the corresponding service node for processing according to the rr routing strategy. After receiving the ranking list acquisition request, the corresponding service node reads the corresponding ranking list from the computer room cache in the same computer room and returns it to the user end.

[0037] For the interaction between the service node and the message middleware, each service node can consume the messages produced by the message middleware (such as the activity data generated by the platform users), and then send them to the corresponding service node for processing according to the consistent routing strategy (such as the consistent hash routing strategy). Optionally, the consistent hash routing strategy can be to first obtain the region to which the message belongs, determine the corresponding region to which it needs to be sent, select the only computer room in the corresponding region through the consistent hash, and select a service node in the selected computer room through the consistent hash to forward the request. After receiving the request, the corresponding service node calculates the real-time ranking data and stores it in the computer room cache of this computer room, and returns it to the caller after success. Among them, the data cached in each computer room will be asynchronously synchronized to all computer room caches in each region through the middleware. Multiple service nodes will select a master service node (i.e., the server of this solution) in the global service, pre-copy and incrementally supplement the rankings at regular intervals, and store them in the computer room cache of this computer room.

[0038] The snapshot ranking list provided by this solution is updated according to the preset snapshot time point, where the snapshot time point can be one or more preset time points, or multiple time points determined according to the set time interval. For example, every half an hour is determined as a snapshot time point. If 13:00 is a snapshot time point, the next snapshot time point will be 13:30.

[0039] Exemplarily, when the snapshot time point is reached, the first real-time ranking list (the latest real-time ranking list) is determined as the snapshot ranking list at the snapshot time point, and the copying of the first real-time ranking list is started to obtain the second real-time ranking list (copying the snapshot ranking list at the current snapshot time point as the second real-time ranking list). In the process of copying the first real-time ranking list to obtain the second real-time ranking list, when consuming activity data from the message middleware, the real-time ranking list is not updated, but the corresponding incremental data is recorded according to the activity data. After completing the pre-copying of the second real-time ranking list, the second real-time ranking list is updated according to the incremental data, and the consumption of activity data does not need to be stopped during this period. Since each copy of the snapshot ranking list at the current snapshot time point becomes the snapshot ranking list at the next snapshot time point after a series of calculations and processing, this copying method is the pre-copying method. The use of the pre-copying method can make the snapshot ranking list solidify on time at the snapshot time point, which can effectively solve the problem of lag in the display of the snapshot ranking list of the traditional method.

[0040] S120: Obtain first activity data from the message middleware, and determine first list incremental data according to the first activity data.

[0041] Exemplarily, when the current time has reached the snapshot time point and the replication of the first real-time ranking list has been started, if the message middleware generates new first activity data at this time, the first activity data can be obtained and consumed from the message middleware to determine the first ranking list incremental data according to the first activity data. The list incremental data can be understood as data used to update the real-time ranking list. For example, for the ranking list of personal points, the list incremental data can be the points that need to be added to the real-time personal points ranking list.

[0042] S130: Update the incremental ranking list according to the incremental data of the first list.

[0043] Exemplarily, after determining the incremental data of the first list, if there is no incremental ranking list corresponding to the current snapshot time point, an incremental ranking list can be generated based on the preset incremental ranking list format according to the incremental data of the first list. Later, in the process of copying the first real-time ranking list, the first activity data is obtained from the message middleware, and when the incremental data of the first list is determined according to the first activity data, at this time, the incremental ranking list corresponding to the current snapshot time point already exists, and the incremental ranking list can be updated according to the incremental data of the first list.

[0044] S140: When the copying of the first real-time ranking list is completed, the second real-time ranking list is updated according to the incremental ranking list.

[0045] Exemplarily, after completing the copying of the first real-time ranking list, the second real-time ranking list can be updated according to the latest incremental ranking list determined above. At this time, the second real-time ranking list is based on the first real-time ranking list, and the incremental data in the pre-copying process of the first real-time ranking list is added to obtain a complete and accurate real-time ranking list at the current moment.

[0046] In one embodiment, the data generated by this solution (such as the first real-time ranking list, the second real-time ranking list, the snapshot ranking list, the incremental ranking list, the first activity data, the first list incremental data, etc.) can be stored in the computer room cache corresponding to the computer room.

[0047] This solution adopts the method of pre-copying real-time rankings to solve the problem of lag in the display of snapshot rankings. In addition, the service adopts the coexistence of snapshot rankings and real-time rankings, which can effectively solve the problems of unsafe cache master-slave disconnection and thread busy waiting for waste of resources. The snapshot ranking background can effectively ensure that multiple write operations on a single data are executed serially through specific forwarding rules and storage methods, avoiding data errors caused by multi-point processing of distributed services. In addition, high-frequency user-side operations can be routed to the nearest service node for polling processing, which improves response speed, reduces network latency and failure rate, and evenly distributes the pressure of machines in the computer room. The snapshot ranking background can reduce single point failure problems and the probability of service unavailability due to failures by providing multi-point high-availability services. Snapshot and real-time ranking data can be stored globally and backed up at multiple points to improve disaster recovery capabilities. When the snapshot and real-time ranking data gradually increase or when the number of user-side access increases, resulting in excessive service pressure in some computer rooms or large regions, it can be smoothly expanded by adding service deployment in the computer room or adding a new computer room in the region.

[0048] In the above, when the snapshot time point is reached, the first real-time ranking is determined as the snapshot ranking at the snapshot time point, the replication of the first real-time ranking is started to obtain the second real-time ranking, and when the replication of the first real-time ranking has been started, the first activity data is obtained from the message middleware, the first list incremental data is determined according to the first activity data, and the incremental ranking is updated according to the first list incremental data. When the replication of the first real-time ranking is completed, the second real-time ranking can be updated according to the incremental ranking. When the snapshot time point is reached, the latest first real-time ranking is solidified as the snapshot ranking corresponding to the snapshot time point. When the incremental data of the first list is obtained according to the first activity data obtained from the message middleware, the incremental ranking is first updated according to the incremental data of the first list. After the replication of the first real-time ranking is completed, the second real-time ranking is updated according to the incremental ranking, so as to realize the fast and accurate construction and update of the snapshot ranking and the real-time ranking, and there is no need to control the cache master and slave to perform disconnection and reconnection operations through operation and maintenance commands, which effectively improves the ranking management effect.

[0049] Based on the above embodiments, Figure 3 A flowchart of another ranking management method provided in an embodiment of the present application is given, which is a specific implementation of the above ranking management method. Figure 3 , the ranking management method includes:

[0050] S210: When the snapshot time point is reached, the first real-time ranking list is determined as the snapshot ranking list at the snapshot time point, and the replication of the first real-time ranking list is started to obtain a second real-time ranking list.

[0051] S220: Obtain first activity data from the message middleware, and determine first list incremental data according to the first activity data.

[0052] In a possible embodiment, the ranking list management method provided by the present solution determines the first ranking list incremental data according to the first activity data, including:

[0053] S221: Determine a target service node in a distributed node network according to a preset routing strategy, where the distributed node network includes a server and other service nodes.

[0054] S222: When the target service node is another service node, the first activity data is sent to the target service node, so that the target service node generates list incremental information according to the first activity data, receives the list incremental information fed back by the target service node, and determines the first list incremental data according to the list incremental information.

[0055] S223: When the target service node is a server, determine a point value added for the user according to the first activity data, and generate first list increment data according to the point value.

[0056] Exemplarily, each service node (including the server provided by this solution and other service nodes) consumes the message middleware, and after obtaining the first activity data from the message middleware, the target service node can be determined among multiple service nodes in the distributed node network according to a preset routing strategy (such as a consistent hash routing strategy). Among them, the service nodes in the distributed node network include the server and other service nodes. The target service node can be the server provided by this solution (that is, the main service node is selected as the target service node), or it can be other service nodes in the distributed node network.

[0057] In one embodiment, when the target service node is another service node, the server may send the first activity data to the target service node. After receiving the first activity data, the target service node may generate list increment information according to the first activity data (for example, determine the point value that needs to be added for the user according to the first activity data (for example, when the user receives or sends different gifts, different point values ​​can be added, the corresponding point value is determined according to the user's online time, and the corresponding point value is determined according to the number and type of tasks completed by the user, etc.), and generate list increment information according to the point value and the corresponding user), and send the list increment information to the server. After receiving the list increment information fed back by the target service node, the server may determine the first list increment data according to the list increment information (for example, use the list increment information as the first list increment data), and save the first list increment data to the computer room cache.

[0058] In one embodiment, when the target service node is a server, the server can determine the incremental data of the first list based on the first activity data, for example, determine the points value that needs to be added to the user based on the first activity data (for example, determine the corresponding points value based on the type and quantity of gifts received or sent by the user, determine the corresponding points value based on the user's online time, determine the corresponding points value based on the number and type of tasks completed by the user, etc.), and generate the first list incremental data based on the points value and the corresponding user. This solution determines the target service node in the distributed node network according to the preset routing strategy, and the target service node determines the incremental data of the first list based on the first activity data, so that data processing can be more evenly distributed to each service node in the distributed node network, reducing the situation where some service nodes are overloaded due to uneven data distribution, and ensuring efficient management of the ranking list.

[0059] S230: Update the incremental ranking list according to the incremental data of the first list.

[0060] S240: When the copying of the first real-time ranking list is completed, the second real-time ranking list is updated according to the incremental ranking list.

[0061] In a possible embodiment, after initiating the copying of the first real-time ranking list to obtain the second real-time ranking list, the ranking management method provided by the present solution may also set a copy completion flag indicating that the copying of the first real-time ranking list has been completed when the copying of the first real-time ranking list has been completed.

[0062] Exemplarily, after completing the copying of the first real-time ranking list to obtain the second real-time ranking list, the server can set a copy completion flag corresponding to the snapshot time point, and the copy completion flag can be used to indicate that the copying of the first real-time ranking list at the snapshot time point has been completed. This solution uses the copy completion flag to indicate that the copying of the first real-time ranking list has been completed, which can accurately determine the timing of updating the second real-time ranking list according to the incremental ranking list, and ensure that the subsequent second activity data can be correctly updated to the second real-time ranking list, ensuring the correct update of the second real-time ranking list.

[0063] Correspondingly, the ranking list management method provided by the present solution obtains the first activity data from the message middleware, which may be: obtaining the first activity data from the message middleware when there is no copy completion mark corresponding to the snapshot time point.

[0064] Exemplarily, after the current time reaches the snapshot time point, it can be determined whether there is a copy completion mark corresponding to the snapshot time point, and the processing method of the activity data obtained from the message middleware is determined based on whether there is a copy completion mark corresponding to the snapshot time point.

[0065] In one embodiment, when there is no copy completion mark corresponding to the snapshot time point, it can be determined that the copying of the first real-time ranking list is still in progress at this time, the first activity data can be obtained from the message middleware, and the first list incremental data can be determined based on the first activity data, and the incremental ranking list is updated based on the first list incremental data, until it is determined that the copying of the first real-time ranking list is completed and then the second real-time ranking list is updated based on the incremental ranking list.

[0066] In one embodiment, when there is a copy completion flag corresponding to the snapshot time point, it can be determined that the copying of the first real-time ranking list has been completed at this time, and the second real-time ranking list can be updated according to the incremental ranking list. Subsequently, before reaching the next snapshot time point, the second activity data can be obtained from the message middleware, and the second real-time ranking list can be updated according to the second activity data.

[0067] This solution accurately determines whether the replication of the first real-time ranking list has been completed based on whether there is a replication completion mark corresponding to the snapshot time point, and accurately determines whether to update the activity data to the incremental ranking list or the second real-time ranking list, thereby ensuring the accurate update of the second real-time ranking list and improving the quality of ranking list management.

[0068] S250: Obtain second activity data from the message middleware, and determine second list incremental data according to the second activity data.

[0069] S260: Update the second real-time ranking list according to the second ranking list incremental data.

[0070] In the embodiment, after the second real-time ranking list is updated according to the incremental ranking list, the server has set the copy completion flag corresponding to the snapshot time point at this time, and it can be determined that the copy of the first real-time ranking list has been completed at this time, and the second activity data can be obtained from the message middleware, and the second list incremental data can be determined according to the second activity data, for example, the point value that needs to be added to the user is determined according to the second activity data (for example, the corresponding point value is determined according to the type and quantity of gifts received or sent by the user, the corresponding point value is determined according to the user's online time, and the corresponding point value is determined according to the number and type of tasks completed by the user, etc.), and the second list incremental data is generated according to the point value and the corresponding user. After determining the second list incremental data, the second real-time ranking list can be updated according to the second list incremental data, and the activity data does not need to be updated to the incremental ranking list, so as to ensure the accurate update of the second real-time ranking list.

[0071] For example, there are snapshot time points 13:00 and 13:30. When the current time has reached the snapshot time point 13:00, assuming that there is no copy completion mark corresponding to the snapshot time point 13:00, the first activity data can be obtained from the message middleware, and the first list incremental data can be determined based on the first activity data, and the incremental ranking list can be updated based on the first list incremental data. When the copy completion mark corresponding to the snapshot time point 13:00 is detected, the second real-time ranking list can be updated based on the incremental ranking list. Subsequently, before reaching the next snapshot time point 13:30, the second activity data can be obtained from the message middleware, and the second list incremental data can be determined based on the second activity data, and the second real-time ranking list can be updated based on the second list incremental data.

[0072] In a possible embodiment, the ranking management method provided by the present solution further includes: upon receiving a snapshot ranking acquisition request sent by the user end through the proxy server, sending the latest snapshot ranking to the user end, and the snapshot ranking acquisition request is forwarded by the proxy server based on a preset polling strategy.

[0073] Exemplarily, when the user needs to read the snapshot ranking list, it can send a snapshot ranking list acquisition request to the nearest proxy server, and the proxy server determines the service node to be accessed (which can be the server provided by this solution, or other service nodes) based on the preset polling strategy (rr strategy, round robin polling strategy), and forwards the snapshot ranking list acquisition request to the service node. Correspondingly, when the server or other service node provided by this solution receives the snapshot ranking list acquisition request sent by the user through the proxy server, it can obtain the latest snapshot ranking list from the computer room cache of the computer room, and send the latest snapshot ranking list to the user.

[0074] This solution uses a proxy server to forward snapshot ranking requests sent by the client based on a preset polling strategy, and quickly and accurately feedback the snapshot ranking to the server. This solution also uses the coexistence of snapshot and real-time rankings. The snapshot rankings can be displayed by the user, and the real-time rankings can realize real-time data calculation without pausing the calculation of the current real-time data and then building the snapshot rankings, effectively solving the problem of unsafe cache master-slave disconnection and thread busy waiting wasting resources.

[0075] like Figure 4As shown in the provided snapshot ranking process diagram, it is assumed that there are snapshot time points 3:00 and 3:30. Before the time reaches the snapshot time point 3:00, each service node of the distributed node network consumes the activity data of the message middleware, and sends the activity data to the target service node for processing according to the preset routing strategy. The corresponding list increment data can be obtained according to the feedback processing result and the first real-time ranking before 3:00 can be updated according to the list increment data.

[0076] When the time reaches the snapshot time point 3:00, the server determines the first real-time ranking list as the snapshot ranking list at the snapshot time point. At this time, the first real-time ranking list is solidified as the snapshot ranking list at the snapshot time point, and the replication of the first real-time ranking list is started to obtain the second real-time ranking list, and the pre-replication of the real-time ranking list begins. At the same time, each service node of the distributed node network consumes the first activity data of the message middleware, and detects whether there is a replication completion mark corresponding to the snapshot time point 3:00. Since there is no replication completion mark corresponding to the snapshot time point 3:00 at this time, the incremental data of the first list can be determined based on the first activity data, and the incremental ranking list before 3:30 can be updated based on the incremental data of the first list, and the real-time ranking list will no longer be updated.

[0077] After the server completes the pre-copy of the first real-time ranking list, it sets the copy completion flag corresponding to the snapshot time point 3:00. Since there is a copy completion flag corresponding to the snapshot time point 3:00 at this time, the incremental ranking list before 3:30 can be adjusted to the second real-time ranking list to update the second real-time ranking list. At the same time, before the time reaches 3:30, each service node can consume the second activity data of the message middleware, send the second activity data to the target service node for processing according to the preset routing strategy, and obtain the corresponding second list incremental data according to the feedback processing result and update the second real-time ranking list according to the second list incremental data. After the time reaches the next snapshot time point 3:30, repeat the above steps to achieve the construction and update of the snapshot ranking list and the real-time ranking list. The snapshot ranking list provided by this solution is generated by the main service node, and the snapshot ranking list is unique. Before each operation on a piece of data, the information of the data will be forwarded to the service node of a specific computer room through a specific forwarding logic to lock the data, which is equivalent to serializing the operation of the same data at the cache layer, ensuring the processing order and ensuring the accuracy of the data. The snapshot ranking list and the real-time ranking list coexist. The snapshot ranking list can be displayed on the user side, and the real-time ranking list can be used to calculate the current data in real time to prepare for the snapshot ranking list at the next snapshot time point. It can also adopt a deployment method of multiple regions, multiple computer rooms and multiple instances around the world to ensure that any node failure will not affect the backend service and improve disaster recovery capabilities. When the main service node fails, the main service node can be re-selected from other service nodes, and the pre-replication and incremental supplement operations can be re-executed. When the service node that is consuming the middleware message fails, other service nodes can continue to consume the message of the message middleware. When a single point cache failure occurs, the cache of other nodes is still available to ensure the stable management of the ranking list. The ranking management method can be applied to the snapshot ranking function of major products. The product only needs to determine the snapshot time point. Every time a new snapshot time point is reached, the new snapshot ranking list and the user's own ranking in the ranking list can be displayed. For example, in the scenario where the product displays a personal points ranking list, assuming that the snapshot time point is halfway, that is, the snapshot of the personal points ranking list is updated every half hour, and the user's current points and their ranking in the ranking list are displayed. As the number of product users increases, you only need to increase the instance of the service deployment to reduce the pressure on the deployed services without affecting the user experience.

[0078] In the above, when the snapshot time point is reached, the first real-time ranking is determined as the snapshot ranking at the snapshot time point, the replication of the first real-time ranking is started to obtain the second real-time ranking, and when the replication of the first real-time ranking has been started, the first activity data is obtained from the message middleware, the first list incremental data is determined according to the first activity data, and the incremental ranking is updated according to the first list incremental data. When the replication of the first real-time ranking is completed, the second real-time ranking can be updated according to the incremental ranking. When the snapshot time point is reached, the latest first real-time ranking is solidified as the snapshot ranking corresponding to the snapshot time point. When the incremental data of the first list is obtained according to the first activity data obtained from the message middleware, the incremental ranking is first updated according to the incremental data of the first list. After the replication of the first real-time ranking is completed, the second real-time ranking is updated according to the incremental ranking, so as to realize the fast and accurate construction and update of the snapshot ranking and the real-time ranking, and there is no need to control the cache master and slave to perform disconnection and reconnection operations through operation and maintenance commands, which effectively improves the ranking management effect. At the same time, after updating the second real-time ranking list according to the incremental ranking list, the second activity data can be obtained from the message middleware, and the second list incremental data can be determined based on the second activity data, and the second list incremental data can be generated based on the point value and the corresponding user. The activity data does not need to be updated to the incremental ranking list to ensure the accurate update of the second real-time ranking list.

[0079] Figure 5 is a structural diagram of a ranking management device provided in an embodiment of the present application, and the ranking management device can be applied to a server. Figure 5 The ranking management device includes a copy start module 51, an increment determination module 52, an increment recording module 53 and a ranking update module 54.

[0080] Among them, the replication start module 51 is configured to determine the first real-time ranking list as the snapshot ranking list at the snapshot time point when the snapshot time point is reached, and to start the replication of the first real-time ranking list to obtain the second real-time ranking list; the incremental determination module 52 is configured to obtain the first activity data from the message middleware, and determine the incremental data of the first list based on the first activity data; the incremental recording module 53 is configured to update the incremental ranking list based on the incremental data of the first list; the list update module 54 is configured to update the second real-time ranking list based on the incremental ranking list when the replication of the first real-time ranking list has been completed.

[0081] In the above, when the snapshot time point is reached, the first real-time ranking is determined as the snapshot ranking at the snapshot time point, the replication of the first real-time ranking is started to obtain the second real-time ranking, and when the replication of the first real-time ranking has been started, the first activity data is obtained from the message middleware, the first list incremental data is determined according to the first activity data, and the incremental ranking is updated according to the first list incremental data. When the replication of the first real-time ranking is completed, the second real-time ranking can be updated according to the incremental ranking. When the snapshot time point is reached, the latest first real-time ranking is solidified as the snapshot ranking corresponding to the snapshot time point. When the incremental data of the first list is obtained according to the first activity data obtained from the message middleware, the incremental ranking is first updated according to the incremental data of the first list. After the replication of the first real-time ranking is completed, the second real-time ranking is updated according to the incremental ranking, so as to realize the fast and accurate construction and update of the snapshot ranking and the real-time ranking, and there is no need to control the cache master and slave to perform disconnection and reconnection operations through operation and maintenance commands, which effectively improves the ranking management effect.

[0082] In a possible embodiment, the list updating module is further configured to obtain second activity data from the message middleware, and determine second list incremental data according to the second activity data; and update the second real-time ranking list according to the second list incremental data.

[0083] In a possible embodiment, the ranking list management device further includes a flag setting module, and the flag setting module is configured to set a copy completion flag indicating that the copying of the first real-time ranking list has been completed when the copying of the first real-time ranking list has been completed.

[0084] In a possible embodiment, the increment determination module 52 obtains the first activity data from the message middleware, and is configured to obtain the first activity data from the message middleware when there is no replication completion mark corresponding to the snapshot time point.

[0085] In a possible embodiment, the incremental determination module 52 determines the incremental data of the first list according to the first activity data, and is configured as follows:

[0086] Determine a target service node in a distributed node network according to a preset routing strategy, the distributed node network including a server and other service nodes;

[0087] When the target service node is another service node, the first activity data is sent to the target service node, so that the target service node generates list increment information according to the first activity data, receives the list increment information fed back by the target service node, and determines the first list increment data according to the list increment information;

[0088] In the case where the target service node is a server, a point value added for the user is determined according to the first activity data, and first list incremental data is generated according to the point value.

[0089] In a possible embodiment, the ranking management device also includes a request response module, which is configured to send the latest snapshot ranking to the user terminal when receiving a snapshot ranking acquisition request sent by the user terminal through the proxy server. The snapshot ranking acquisition request is forwarded by the proxy server based on a preset polling strategy.

[0090] It is worth noting that in the embodiment of the above-mentioned ranking management device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.

[0091] The embodiment of the present application also provides a ranking management device, which can integrate the ranking management apparatus provided in the embodiment of the present application. Figure 6 Schematic diagram of a ranking management device provided by an embodiment of the present application. Figure 6 The ranking management device includes: an input device 63, an output device 64, a memory 62 and one or more processors 61; the memory 62 is used to store one or more programs; when one or more programs are executed by one or more processors 61, the one or more processors 61 implement the ranking management method provided in the above embodiment. The ranking management device, equipment and computer provided above can be used to execute the ranking management method provided in any of the above embodiments, and have corresponding functions and beneficial effects.

[0092] The embodiments of the present application also provide a non-volatile storage medium storing computer executable instructions, which are used to execute the ranking management method provided in the above embodiments when executed by a computer processor. Of course, the non-volatile storage medium storing computer executable instructions provided in the embodiments of the present application, whose computer executable instructions are not limited to the ranking management method provided above, can also execute the related operations in the ranking management method provided in any embodiment of the present application. The ranking management apparatus, equipment and storage medium provided in the above embodiments can execute the ranking management method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the ranking management method provided in any embodiment of the present application.

[0093] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, including a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the ranking management method provided in each embodiment of the present application.

Claims

1. A ranking management method, characterized in that: Applied to the server, including: When the snapshot time point is reached, the first real-time ranking list is determined as the snapshot ranking list at the snapshot time point, and the replication of the first real-time ranking list is started to obtain a second real-time ranking list; Acquire first activity data from the message middleware, and determine first list incremental data according to the first activity data; Update the incremental ranking list according to the incremental data of the first list; When the copying of the first real-time ranking list is completed, the second real-time ranking list is updated according to the incremental ranking list.

2. The ranking management method according to claim 1, characterized in that: After the second real-time ranking list is updated according to the incremental ranking list, the method further includes: Acquire second activity data from the message middleware, and determine second list incremental data according to the second activity data; The second real-time ranking list is updated according to the incremental data of the second ranking list.

3. The ranking management method according to claim 1, characterized in that: The method further comprises: In a case where copying of the first real-time leaderboard has been completed, a copy completion flag indicating that copying of the first real-time leaderboard has been completed is set.

4. The ranking management method according to claim 1, characterized in that: The obtaining the first activity data from the message middleware includes: In the case that there is no copy completion mark corresponding to the snapshot time point, the first activity data is obtained from the message middleware.

5. The ranking management method according to claim 1, characterized in that: The determining of the first list incremental data according to the first activity data includes: Determine a target service node in a distributed node network according to a preset routing strategy, wherein the distributed node network includes the server and other service nodes; In the case where the target service node is another service node, the first activity data is sent to the target service node, so that the target service node generates list incremental information according to the first activity data, receives the list incremental information fed back by the target service node, and determines the first list incremental data according to the list incremental information; In the case where the target service node is the server, a point value added for the user is determined according to the first activity data, and first list incremental data is generated according to the point value.

6. The ranking management method according to claim 1, characterized in that: The ranking list management method further includes: When receiving a snapshot ranking acquisition request sent by a user terminal through a proxy server, the latest snapshot ranking is sent to the user terminal. The snapshot ranking acquisition request is forwarded by the proxy server based on a preset polling strategy.

7. A ranking management device, characterized in that: Applied to the server, including the replication startup module, incremental determination module, incremental recording module and list update module, among which: The replication start module is configured to, when a snapshot time point is reached, determine the first real-time ranking list as the snapshot ranking list at the snapshot time point, and initiate replication of the first real-time ranking list to obtain a second real-time ranking list; The incremental determination module is configured to obtain the first activity data from the message middleware, and determine the first list incremental data according to the first activity data; The incremental recording module is configured to update the incremental ranking list according to the incremental data of the first list; The list updating module is configured to update the second real-time list according to the incremental list when the copying of the first real-time list is completed.

8. A ranking management device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the ranking list management method according to any one of claims 1 to 6.

9. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to execute the ranking management method according to any one of claims 1 to 6 when executed by a computer processor.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the ranking list management method according to any one of claims 1 to 6 is implemented.