A method, apparatus, device, storage medium, and program product for object processing

Through the N-layer cascade search nodes in the target tree data structure, the problems of complex sorting algorithm calculation and high gas consumption in the blockchain network are solved, and fast and efficient object ranking calculation is achieved, which improves user experience and business efficiency.

CN119474471BActive Publication Date: 2025-10-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411632415.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-10-10
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Existing technologies are highly complex and consume a large amount of gas resources when calculating object rankings in blockchain networks, resulting in ranking request response failures or inaccurate calculations.

Method used

A target tree data structure is adopted to store the number of objects and the index value sequence through N-layer cascaded search nodes. The target tree data structure is traversed to determine the target search node, and the first and second object numbers are calculated based on the index value and the number of objects, thereby determining the ranking of the target object.

Benefits of technology

It reduces computational complexity and gas consumption, can quickly and efficiently calculate object rankings, and improve user experience and business decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474471B_ABST
    Figure CN119474471B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a kind of object processing method, device, equipment, storage medium and program product, at least involve blockchain technology, for reducing the complexity of calculation and gas consumption, quickly and efficiently calculate object ranking.The method comprises: obtaining the target index value of target object and the first identification of the request to be processed, target tree data structure, target tree data structure includes N level first search node of cascade, the first search node of each level includes index value sequence and object quantity;Target tree data structure is traversed, and target index value is determined from N level first search node of cascade based on target index value Target search node;First object quantity is determined based on target index value, the index value sequence of target search node and object quantity, and second object quantity is determined based on target index value, the first identification, the index value sequence of target search node and object quantity;First object quantity and second object quantity are determined based on target index value, and the target ranking of target object is determined.
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 blockchain technology, and specifically to a method, apparatus, device, storage medium, and program product for object processing. Background Art

[0002] Various rankings are frequently used in internet applications. For example, rankings are performed for popular content, active users, popular topics, advertisements, and virtual game players. Ranking objects across different businesses can further facilitate the implementation of subsequent business logic, such as rewards, object matching, and rankings.

[0003] In related solutions, sorting algorithms such as quick sort, merge sort, bubble sort, or insertion sort are usually used in blockchain networks to determine the ranking of objects. Each time a ranking request is received, it is necessary to re-traverse the list based on the object's index value (such as the object's score, etc.) to count the total number of other objects ranked before the object in order to calculate the ranking of the object. Moreover, current sorting algorithms are basically implemented based on Turing-complete programming languages, and do not take into account the consumption of gas resources under the gas mechanism in blockchain networks. In other words, using related solutions to determine the ranking of objects is not only computationally complex and consumes more gas resources, but also makes it easy for ranking requests to not be responded to or fail to respond, which in turn leads to the inability to accurately calculate the ranking of the object. Summary of the Invention

[0004] The embodiments of the present application provide a method, apparatus, device, storage medium, and program product for object processing, which are used to reduce the complexity of calculations and the gas consumption required for ranking business logic, and can quickly and efficiently calculate the ranking of objects, thereby improving the user experience in decision-making and expansion under the target business.

[0005] In view of this, the present application provides a method for object processing. The method is applied to an object processing node in a blockchain network. The method includes:

[0006] Obtaining a pending request, where the pending request includes a target indicator value and a first identifier, where the target indicator value is used to evaluate the ranking of the target object in the target business, and the first identifier is used to identify the target object;

[0007] Obtain a target tree data structure, which includes N levels of cascaded search nodes. The search nodes at each level include an index value sequence and a number of objects. The index value sequence is used to represent the ranking of the index values ​​of multiple candidate objects, and the number of objects is used to represent the number of multiple candidate objects. N is a positive integer.

[0008] Traverse the target tree data structure and determine the target search node from the N-level cascade search nodes based on the target index value;

[0009] Determining a first number of objects based on the target index value, the index value sequence of the target search node, and the number of objects of the target search node; determining a second number of objects based on the target index value, the first identifier, the index value sequence of the target search node, and the number of objects of the target search node, wherein the index value of each candidate object corresponding to the first number of objects is greater than the target index value, and the index value of each candidate object corresponding to the second number of objects is greater than the target index value;

[0010] A target ranking of the target object is determined based on the first object quantity and the second object quantity.

[0011] On the other hand, the present application provides an object processing node, which may include an acquisition unit and a determination unit. Optionally, it may also include a search unit and an execution unit.

[0012] an acquiring unit, configured to acquire a pending request, the pending request including a target indicator value and a first identifier, the target indicator value being used to evaluate a ranking of a target object in a target business, and the first identifier being used to identify the target object;

[0013] An acquisition unit is used to acquire a target tree data structure, the target tree data structure includes N layers of cascaded search nodes, and the search nodes at each layer include an index value sequence and a number of objects. The index value sequence is used to represent the ranking of the index values ​​of multiple candidate objects, and the number of objects is used to represent the number of multiple candidate objects. N is a positive integer;

[0014] a determination unit, configured to traverse the target tree data structure and determine a target search node from N levels of cascaded search nodes based on a target index value;

[0015] a determining unit, configured to determine a first number of objects based on a target index value, an index value sequence of a target search node, and the number of objects of the target search node, and to determine a second number of objects based on the target index value, a first identifier, an index value sequence of a target search node, and the number of objects of the target search node, wherein the index value of each candidate object corresponding to the first number of objects is greater than the target index value, and the index value of each candidate object corresponding to the second number of objects is greater than the target index value;

[0016] A determining unit is configured to determine a target ranking of the target object based on the first object quantity and the second object quantity.

[0017] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0018] The N-level cascaded search nodes include a first search node of the first N-1 levels of cascade, and one or more second search nodes cascaded with the first search node of the N-1 level; the target tree data structure further includes: one or more third search nodes cascaded with the second search nodes, and a fourth search node cascaded with each third search node;

[0019] The number of objects in the first search node of the i-th level is the same as the number of objects in all the first search nodes of the cascaded i+1-th level. The index value sequence of the first search node of the i-th level includes multiple first index values. The numerical interval between each two adjacent first index values ​​corresponds to the index value sequence of the first search node of the cascaded i+1-th level. 1≤i<N, where i is an integer.

[0020] Each value interval in the first search node of the N-1th level includes an index value sequence of a second search node, each index value sequence of the second search node includes one or more second index values, and the sum of the number of objects in all the second search nodes is the same as the number of objects in the cascaded first search node of the N-1th level;

[0021] Each third search node includes an index value and the number of objects. The index values ​​of all third search nodes constitute the index value sequence of the second search node. The fourth search node includes an object identifier list. Each object identifier in the object identifier list is used to identify a candidate object.

[0022] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit is specifically configured to:

[0023] Step 1: Traverse the first search node of the i-th level. When the target index value is included in the first numerical interval in the index value sequence of the first search node of the i-th level, determine the first search node of the i+1-th level associated with the first numerical interval as the first child node, and the minimum value of the first numerical interval is less than or equal to the target index value, and the maximum value is greater than the target index value;

[0024] Step 2: Repeat step 1 until the first search node of the N-1th layer is traversed, and when the target index value matches the second index value in the index value sequence of the cascaded second search node, determine that the second search node corresponding to the index value match is the target search node.

[0025] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit is specifically configured to:

[0026] determining a second sub-node at the same level as the target search node, each index value in the index value sequence of the second sub-node being greater than the index value in the index value sequence of the target search node; determining a fourth sub-node at the same level as a third sub-node, the third sub-node including each first search node in each of the first N-1 levels concatenated with the target search node, each index value in the index value sequence of the fourth sub-node being greater than the index value in the index value sequence of the third sub-node at the same level;

[0027] extracting the number of objects of the second sub-node and the number of objects of each fourth sub-node at each level;

[0028] calculating the sum of the number of objects of the second sub-node and the number of objects of all fourth sub-nodes at all levels to obtain the first number of objects.

[0029] In a possible design, in another implementation manner of another aspect of the embodiment of the present application, the index value sequence of each search node at each of the N levels of concatenated search nodes is arranged in descending order; the determining unit is specifically configured to:

[0030] determining the sibling node arranged on the left side of the target search node as the second sub-node at the same level as the target search node.

[0031] In a possible design, in another implementation manner of another aspect of the embodiment of the present application, the index value sequence of each search node at each of the N levels of concatenated search nodes is arranged in ascending order; the determining unit is specifically configured to:

[0032] determining the sibling node arranged on the right side of the target search node as the second sub-node at the same level as the target search node.

[0033] In a possible design, in another implementation manner of another aspect of the embodiment of the present application, the determining unit is specifically configured to:

[0034] when the target index value matches the index value of any third search node associated with the target search node, matching the first identifier with the object identifier list in the fourth search node associated with the corresponding third search node;

[0035] when the first identifier matches any object identifier in the object identifier list in the fourth search node associated with the corresponding third search node, then counting the number of objects in the target search node with the index value greater than the target index value;

[0036] taking the number of objects in the target search node with the index value greater than the target index value as the second number of objects.

[0037] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0038] The acquisition unit may also be configured to, after traversing the target tree data structure and determining a target search node from the first search nodes in the N-layer cascade based on the target index value, acquire a first value, the first value being used to indicate the number of M target candidate objects, each target candidate object being used to interact with the target object, where M is a positive integer;

[0039] a determining unit, specifically configured to determine an object identifier of each target candidate object based on the target index value, the first numerical value, and a list of object identifiers of a fourth search node associated with the target search node;

[0040] a searching unit, specifically configured to search for M target candidate objects based on the object identifiers of the M target candidate objects;

[0041] The execution unit is specifically configured to perform interactive operations on the M target candidate objects and the target object.

[0042] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit is specifically configured to:

[0043] When there is a third index value greater than the target index value in the target search node, the object identifier corresponding to the first value is selected from the object identifier list of the fourth search node associated with the third search node corresponding to the third index value to determine the object identifier of each target candidate object.

[0044] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit is specifically configured to:

[0045] When the target search node does not have a third index value greater than the target index value, determining a fourth index value greater than the target index value from other second search nodes at the same level as the target search node;

[0046] An object identifier corresponding to the first value is selected from an object list of a fourth search node associated with the third search node corresponding to the fourth index value to determine an object identifier of each target candidate object.

[0047] In one possible design, in another implementation of another aspect of the embodiment of the present application, the other second search nodes at the same level include a fifth child node and a sixth child node, and the index value in the index value sequence of the fifth child node is greater than the index value in the index value sequence of the sixth child node; the determining unit is specifically configured to:

[0048] determine a fourth index value greater than the target index value from the sequence of index values of the fifth sub-node and the sequence of index values of the sixth sub-node;

[0049] when the number of objects of the sixth sub-node is less than the first value, extract a first object identifier corresponding to the number of objects of the sixth sub-node from an object identifier list of the fourth search node associated with each fourth index value of the sixth sub-node;

[0050] calculate a difference between the first value and the number of objects of the sixth sub-node to obtain a second value;

[0051] extract a second object identifier corresponding to the second value from an object identifier list of the fourth search node associated with each fourth index value of the fifth sub-node;

[0052] obtain an object identifier corresponding to the first value based on the first object identifier and the second object identifier.

[0053] In a possible design, in another implementation manner of the another aspect of the embodiment of the present application, the determining unit is specifically configured to:

[0054] determine a first local ranking of the target object based on the first number of objects, and determine a second local ranking of the target object based on the second number of objects;

[0055] obtain a target ranking of the target object based on the first local ranking and the second local ranking.

[0056] In a possible design, in another implementation manner of the another aspect of the embodiment of the present application, the determining unit is specifically configured to:

[0057] calculate a sum of the first local ranking and the second local ranking to obtain a first ranking position;

[0058] take a next ranking position of the first ranking position as the target ranking of the target object.

[0059] In a possible design, in another implementation manner of the another aspect of the embodiment of the present application, the target object includes a virtual player in a virtual game.

[0060] In a possible design, in another implementation manner of the another aspect of the embodiment of the present application, the virtual game includes a full-link game.

[0061] Another aspect of the present application provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the method of the above aspects when executing the computer program.

[0062] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned methods when the computer program is executed by a processor.

[0063] Another aspect of the present application provides a computer program product, including a computer program, which implements the above-mentioned methods when executed by a processor.

[0064] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0065] In an embodiment of the present application, an object processing node in a blockchain network obtains a pending request and a target tree data structure. The pending request includes a target index value and a first identifier. The target index value is used to evaluate the ranking of the target object in the target business, and the first identifier is used to identify the target object. Furthermore, the target tree data structure of the present application includes N layers of cascaded search nodes, each of which includes an index value sequence and a number of objects. The index value sequence is used to represent the ranking of the index values ​​of multiple candidate objects, and the number of objects is used to represent the number of multiple candidate objects, where N is a positive integer. After obtaining the target tree data structure and the pending request, the object processing node traverses the target tree data structure and determines the target search node from the N layers of cascaded search nodes based on the target index value. In this way, the object processing node then determines the first number of objects based on the target index value, the index value sequence of the target search node, and the number of objects in the target search node. Furthermore, the object processing node also needs to determine the second number of objects based on the target index value, the first identifier, the index value sequence of the target search node, and the number of objects in the target search node. The index value of each candidate object corresponding to the first number of objects is greater than the target index value, and the index value of each candidate object corresponding to the second number of objects is greater than the target index value. Thus, after determining the first number of objects and the second number of objects, the object processing node determines a target ranking for the target object based on the first number of objects and the second number of objects.

[0066] That is to say, the present application stores the number of objects and the sequence of index values ​​in the search nodes of each level of the N-layer cascade in the target tree data structure. In this way, the present application only needs to obtain the target index value and the first identifier of the target object, and then determine the target search node where the target index value of the target object is located in the N-layer cascade search nodes by traversing and searching, and then extract the first number of objects from other search nodes whose index values ​​are greater than the target index value, and extract the second number of objects greater than the target index value from the target search node. Thus, the present application can determine the total number of objects arranged before the target object through the extracted number of first objects and the number of second objects, thereby clarifying the target ranking of the target object. Through the above method, the present application can, within the gas resources limited by the gas mechanism, avoid the need to re-count the number of other objects ranked in front according to the index value of the object each time. Instead, it matches the target index value of the target object with the index value sequence of the search nodes at different levels in the target tree data structure, and then directly extracts the number of objects from the corresponding search nodes to determine the total number of objects ranked before the target object, and then obtains the final ranking of the target object, which greatly reduces the complexity of the calculation and the gas consumption required for ranking, and can quickly and efficiently calculate the ranking of the object, thereby improving the user's decision-making and expansion experience under the target business. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0068] Figure 1A A schematic diagram showing the ranking of the present application scheme in a virtual game scene is shown;

[0069] Figure 1B A schematic diagram showing the ranking of the present application scheme in an advertising delivery scenario is shown;

[0070] Figure 1C A schematic diagram showing the ranking of the present application scheme in a shopping scenario is shown;

[0071] Figure 2 A schematic diagram of an implementation environment of the object processing method according to an embodiment of the present application is shown;

[0072] Figure 3 A schematic diagram showing an application scenario of a virtual game in a blockchain network according to an embodiment of the present application is shown;

[0073] Figure 4A schematic diagram showing a flow chart of a method for object processing provided in an embodiment of the present application is shown;

[0074] Figure 5 A schematic diagram of the target tree data structure provided by this application is shown;

[0075] Figure 6 A schematic diagram of a process for determining a target search node in an embodiment of the present application is shown;

[0076] Figure 7 A schematic diagram of a process for determining the number of first images in an embodiment of the present application is shown;

[0077] Figure 8 Another schematic diagram of the target tree data structure provided by this application is shown;

[0078] Figure 9 A schematic diagram of a process for determining the number of second objects in an embodiment of the present application is shown;

[0079] Figure 10 Another schematic diagram of the process of processing an object provided by an embodiment of the present application is shown;

[0080] Figure 11 Shows an embodiment of the present application Figure 5 A schematic diagram of the structure of the leaf nodes cascaded by the search node A6 in FIG;

[0081] Figure 12 A functional structure diagram of an object processing node in an embodiment of the present application is shown;

[0082] Figure 13 A hardware structure diagram of the object processing device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0083] The embodiments of the present application provide a method, apparatus, device, storage medium, and program product for object processing, which are used to reduce the complexity of calculations and the gas consumption required for ranking business logic, and can quickly and efficiently calculate the ranking of objects, thereby improving the user experience in decision-making and expansion under the target business.

[0084] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0085] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0086] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of the present application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the implementation of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to such processes, methods, products, or apparatus.

[0087] Ranking systems in businesses primarily sort entities based on their metrics. These metrics can be based on their performance, achievements, points earned from completing tasks, or rewards. For example, in virtual gaming, players earn metrics by participating in the game and are then ranked accordingly. This ranking mechanism not only helps entities like gamers understand their current ranking within the business but also motivates them to strive for higher performance in the business.

[0088] Related solutions for ranking objects typically use conventional sorting algorithms within blockchain networks, traversing the list to count the number of objects that precede a given object to determine the ranking. However, these solutions fail to consider the gas resource consumption inherent in the blockchain network's gas mechanism. In other words, using these solutions to determine object rankings is not only computationally complex and consumes more gas resources, but can also easily result in ranking requests being unresponsive or failing to respond, leading to inaccurate object rankings.

[0089] To solve the technical problems in the above related solutions, the object processing method provided by the present application is provided. The object processing method can be applied in the application scenario of determining the ranking of objects. More specifically, it can be applied in the application scenario of ranking based on a blockchain network. For example, the ranking scenarios include but are not limited to ranking game players in a virtual game scenario, ranking advertisements in an advertisement placement scenario, etc., which are not limited in the present application. In the object processing method of the present application, by storing the number of objects and the sequence of index values in each layer of the N-layer cascade of the search nodes in the target tree data structure, the number of other objects ranked in front of the target object is not re-counted each time under the gas resources defined by the gas mechanism. Instead, the target index value of the target object is matched with the sequence of index values of the search nodes at different levels in the target tree data structure, and then the number of objects is extracted from the corresponding search nodes to determine the total number of objects ranked before the target object, and then the final ranking of the target object is obtained, which greatly reduces the complexity of calculation and the gas consumption required for ranking, and quickly and efficiently calculates the ranking of the object, improves the user's decision-making and expansion experience in the target business, etc.

[0090] Exemplarily, the object processing method provided by the present application can be applied to one or more of the following application scenarios, as follows:

[0091] (I) Ranking of game players in a virtual game scenario

[0092] Exemplarily, virtual game is a game activity carried out in a virtual environment, which simulates various scenes, characters and rules through computer technology to provide an immersive game experience for game players. In the virtual game scenario, the ranking of game players is an important and attractive function, which can intuitively show the strength and achievements of game players, and enable game players to continuously pay attention to their game progress and performance. For example, Figure 1A shows a ranking schematic diagram of the present application applied in a virtual game scenario. As Figure 1A shown, in a certain XXX game, game players such as player 1, player 2, player 3, player 4, player 5, etc. can be included. Among them, it can be assumed that the target object to be searched is player 1, and its index value can be represented by the game score of player 1 in the game, for example, 80 points. By matching the index value (i.e. 80 points) of the player 1 with the sequence of index values of the search nodes at different levels in the target tree data structure of the present application, the number of objects (e.g. playercount = 2) can be extracted from the corresponding search nodes, for example, it can be determined that the number of objects ranked before the player 1 is 2 (e.g. player 2 and player 4), and thus the ranking of the player 1 can be determined as the third.

[0093] Compared with the related scheme, the ranking of the player 1 is determined by the number of objects, without the need to compare the index value of the player 2 with the index value of the player 4, which greatly reduces the complexity of calculation and gas consumption, and quickly and efficiently calculates the ranking of the game player 1. Not only stimulates the competitive desire of the player, increases the dependence and loyalty of the virtual game, but also promotes the social interaction between players.

[0094] (II) Ranking of advertisements in an advertising scenario

[0095] Exemplarily, the advertising scenario refers to the specific environment and situation in which the advertisement is displayed and conveyed to the target audience, and the types include online advertising scenario and offline advertising scenario. In the advertising scenario, the exposure rate of the advertisement can be improved by ranking the advertisement, and a higher click-through rate and conversion rate can be achieved. For example, Figure 1B The ranking in the advertising scenario to which the scheme of the present application is applied is shown. As Figure 1B shown, in the advertising scenario, advertisements 1, 2, 3, 4, and 5 can be included. Assuming that the target object to be searched is the advertisement 1, the index value of the advertisement 1 can be represented by the bid of the advertisement 1, for example, 108 yuan. By matching the index value (i.e., 108 yuan) of the advertisement 1 with the index value sequence of the search nodes at different levels in the target tree data structure of the present application, the number of objects (e.g., playercount = 3) can be extracted from the corresponding search nodes, for example, it can be determined that the number of objects arranged before the advertisement 1 is 3 (e.g., advertisements 2, 4, and 5), and thus the ranking of the advertisement 1 is determined to be the fourth.

[0096] Compared with the related scheme, the ranking of the player 1 is determined by the number of objects, without the need to compare the index value of the player 2 with the index value of the player 4, which greatly reduces the complexity of calculation and gas consumption, and quickly and efficiently calculates the ranking of the game player 1. Not only stimulates the competitive desire of the player, increases the dependence and loyalty of the virtual game, but also promotes the social interaction between players.

[0097] (III) Ranking of commodities in a shopping scenario

[0098] For example, shopping scenarios refer to the specific environments and situations in which consumers conduct purchase and consumption activities, including online shopping scenarios and offline shopping scenarios. In shopping scenarios, by ranking products, merchants can increase product exposure, achieve higher click-through rates and conversion rates, and also promote shopping platforms to improve user experience. For example, Figure 1C The following is a ranking diagram of the present application scheme applied to a shopping scenario. Figure 1C As shown, in the shopping scene, there may be products such as product 1, product 2, product 3, product 4, and product 5. Assuming that the target object to be searched is product 2, its index value can be represented by the price of product 2, for example, 98 yuan. By matching the index value of product 2 (i.e., 98 yuan) with the index value sequence of search nodes at different levels in the target tree data structure of this application, the number of objects can be extracted from the corresponding search node (e.g., playercount=1). For example, it can be determined that the number of objects arranged before product 2 is 1 (e.g., product 3), thereby determining that product 2 is ranked second.

[0099] Compared with the related solutions that require calculating the index values ​​of Product 2 in sequence with the remaining products (i.e., Product 1, Product 3 to Product 5), this application does not need to care about the index values ​​of Product 1, Product 3, and Product 5. The ranking of Product 2 can be clarified by extracting the number of objects, which greatly reduces the complexity of the calculation and gas consumption. It can also quickly and efficiently calculate the ranking of Product 2, and then expose Product 2 in order according to its ranking, which can enable consumers to quickly find high-quality products that meet their needs and improve consumers' shopping experience and satisfaction.

[0100] It should be noted that the object processing method of this application can be applied to other ranking scenarios in addition to the aforementioned scenarios such as ranking game players in virtual game scenarios, ranking advertisements in advertising scenarios, and ranking products in shopping scenarios. For example, it can also be applied to ranking content in social media scenarios, ranking search results in search scenarios, and ranking film and television works or music works in entertainment scenarios, etc., which are not specifically limited in this application.

[0101] For example, the method provided in this application can be applied to Figure 2 The object processing device 100 is used to perform operations in the implementation environment shown. Figure 2 The illustrated implementation environment includes an object processing device 100 and also includes, for example, a user terminal 200 .

[0102] from Figure 2As can be seen, in step S1, when the user needs to know the ranking of the target object in the target business, he can input a pending request into the user terminal 200. The pending request includes the target index value and the first identifier of the target object. In step S2, after receiving the pending request, the user terminal 200 sends the pending request to the object processing device 100. Therefore, the object processing device 100 can execute the following steps S3 to S7 to determine the final ranking of the target object, as follows:

[0103] In step S3, the object processing device 100 first obtains the request to be processed and the target tree data structure. Through the target tree data structure, the N-layer cascade search nodes can be understood. In the search nodes of each level, there are corresponding index value sequences and object quantities. The index value sequence can reflect the ranking of the index values ​​of multiple candidate objects, and the object quantity reflects the quantity of multiple candidate objects. In step S4, the object processing device 100 traverses the target tree data structure and determines the target search node from the N-layer cascade search nodes based on the target index value. In this way, in step S5, the object processing device 100 determines the first object quantity based on the target index value, the index value sequence of the target search node and the object quantity of the target search node, and determines the second object quantity based on the target index value, the first identifier, the index value sequence of the target search node and the object quantity of the target search node. In step S6, the object processing device 100 can determine the target ranking of the target object based on the first object quantity and the second object quantity.

[0104] Optionally, in Figure 2 The illustrated implementation environment may further include step S7. Specifically, in step S7, the object processing device 100 may transmit the target ranking of the target object to the user terminal 200. The user terminal 200 may then display the target ranking of the target object via a client, engine, or other visual interface in step S8 for the user to view, thereby facilitating timely understanding of the ranking of the target object and implementing subsequent business logic such as a ranking list.

[0105] It should be noted that the above Figure 2 The target tree data structure described in the above may include but is not limited to a B+ tree structure, a red-black tree structure, a B-tree structure, etc., which is not specifically limited in this application. Figure 5 The solution of this application is illustrated using only the B+ tree structure as an example.

[0106] Optionally, the object processing device 100 and user terminal 200 mentioned above may be block nodes in a blockchain network. By applying the object processing method of the present application to a blockchain network scenario, the logic of various operations can be executed in a smart contract in the blockchain network, allowing both the user terminal 200 and the object processing device 100 to invoke the smart contract and participate in the business.

[0107] For example, taking the scenario of achieving ranking in virtual games through the blockchain network, Figure 3 Shown is a schematic diagram of another implementation environment provided by this application. Figure 3 The blockchain network shown includes block nodes such as block node 1, block node 2, and block node 3, as well as different blocks for storing data, such as block 1, block 2, and block 3. Game player 1 calls the smart contract through block node 1 and uploads the corresponding indicator value 1 and identifier 1 to block 1 in the blockchain network. Game player 2 calls the smart contract through block node 2 and uploads the corresponding indicator value 2 and identifier 2 to block 2 in the blockchain network. Subsequently, block node 3 can extract the indicator value 1 and identifier 1 of game player 1 from block 1 and the indicator value 2 and identifier 2 of game player 2 from block 2 by calling the smart contract, and execute the above Figure 4 Steps S3 to S6 are performed to obtain the ranking of game player 1 and the ranking of game player 2. Optionally, block node 3 stores the ranking of game player 1, the ranking of game player 2, etc. in block 3.

[0108] Need to explain, Figure 3 The block node 3 in can be understood as Figure 2 The object processing device 100, block node 1, and block node 2 can also be understood as Figure 2 The user terminal 200 in the example is not described here. In addition, the virtual game mentioned in this application can be a full-chain game or a non-full-chain game. The full-chain game described here refers to a game in which all game logic is run in the form of smart contracts.

[0109] In addition, the object processing device 100 includes but is not limited to terminal devices, servers, etc. For example, the terminal devices and user terminals 200 include but are not limited to mobile phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, wearable devices, etc. Among them, the client is deployed on the terminal device, and the client can run on the terminal device in the form of a browser, or can run on the terminal device in the form of an independent application (APP), etc. For example, the server can 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 (CDNs), and big data and artificial intelligence (AI) platforms.

[0110] In combination with the above introduction, the following will introduce the method of object processing in this application. Figure 4 The object processing method in the embodiment of the present application can be implemented by the above Figure 2 The object processing device 100 shown in FIG. 1 is used as an execution subject to complete the object processing method provided by the present application, which includes at least the following steps 401 to 405, namely:

[0111] 401. Obtain a pending request, where the pending request includes a target indicator value and a first identifier.

[0112] In one or more embodiments, when a user needs to know the ranking of a target object in a target business, the user can map the target index value and first identifier of the target object to a pending request and then upload the pending request to the user terminal. After obtaining the pending request, the user terminal transmits the pending request to the object processing device via a communication network. In this way, the object processing device can obtain the pending request and then obtain the target index value and first identifier of the corresponding target object from the pending request.

[0113] It should be noted that the target indicator value can be used to evaluate the ranking of the target object in the target business.

[0114] For example, the aforementioned Figure 1ATaking the virtual game business shown in the example, the target objects can be virtual players, game props, etc. in the virtual game business. Target indicators corresponding to game players include, but are not limited to, game scores, game coins, game experience points, number of game props, game reward points, etc. Target indicators corresponding to game props include, but are not limited to, item click-through rate, item quantity, and item attack performance value.

[0115] Or, with the aforementioned Figure 1B Taking the advertising delivery business shown in as an example, the target object may be an advertisement in the advertising delivery business, and its corresponding target indicator value may include but is not limited to: an advertisement bid, an advertisement quality score, an advertisement budget value, etc.

[0116] Or, with the aforementioned Figure 1C Taking the shopping business shown in Figure 2 as an example, target objects can include products and shopping platforms within the shopping business. Target indicators for products include, but are not limited to, price, sales volume, page views, average dwell time, click-through rate, number of product reviews, and number of favorites. Target indicators for shopping platforms include, but are not limited to, the number of product categories and user ratings of the platform.

[0117] In addition, the first identifier mentioned in this application can be used to identify the target object. Optionally, the first identifier includes but is not limited to an identifier of the target object, such as a public key address or other identity identifier.

[0118] 402. Obtain a target tree data structure. The target tree data structure includes N levels of cascaded search nodes. The search nodes at each level include an index value sequence and a number of objects. The index value sequence is used to represent the order of the index values ​​of multiple candidate objects. The number of objects is used to represent the number of multiple candidate objects. N is a positive integer.

[0119] In one or more embodiments, the target tree data structure includes, but is not limited to, a B+ tree, a red-black tree, or a B-tree. Unlike conventional tree data structures, the target tree data structure in the present application includes N levels of cascaded search nodes, and each level of the search node includes not only a sequence of index values ​​but also the number of objects.

[0120] In addition, in the target tree data structure of the present application, the N-level cascaded search nodes include the first search nodes of the first N-1 levels and one or more second search nodes cascaded with the first search nodes of the N-1th level. For the first N-1 levels of the cascaded first search nodes, the object quantity of the i-th level first search node is the same as that of all the first search nodes of the i+1-th level cascaded therewith, and the index value sequence of the i-th level first search node includes a plurality of first index values, and the numerical interval between each two adjacent first index values corresponds to the index value sequence of the first search nodes of the i+1-th level cascaded therewith. Wherein, 1≤i

[0121] In addition, for each numerical interval in the first search nodes of the N-1th level, it contains the index value sequence of one second search node. Moreover, in the index value sequence of each second search node, one or more second index values are included. That is, in the first search nodes of the last level (i.e. the first search nodes of the N-1th level), one or more second search nodes are also associated. If the one or more second search nodes are cascaded with the same first search node in the N-1th level, the index value sequence of the one or more second search nodes collectively constitutes the index value sequence of the same first search node cascaded therewith, and the index value sequence of each second search node is contained in a numerical interval in the index value sequence of the same first search node cascaded therewith. In addition, the sum of the object quantities of all the second search nodes is the same as the object quantity of the first search nodes of the N-1th level cascaded therewith.

[0122] In addition, in the target tree data structure, the target tree data structure further includes one or more third search nodes cascaded with the second search nodes, and a fourth search node cascaded with each third search node. In each third search node, one index value and an object quantity are included. Moreover, the index values of all the third search nodes constitute the index value sequence of the second search node. In the fourth search node, an object identifier list is included. The object identifier list includes one or more object identifiers, and each object identifier is used to identify a candidate object.

[0123] For example, Figure 5 A structural schematic diagram of the target tree data structure provided by the present application is shown. As shown in Figure 5As shown, taking N=4 as an example, the target tree data structure includes 4 levels of cascaded search nodes. Specifically, it includes the first search node of the first 3 levels of cascade, and the second search node of the 4th level. For the first search node of the first 3 levels of cascade, it includes the first search node of the 1st level, the first search node of the 2nd level, and the first search node of the 3rd level. The first search node of the 1st level is cascaded with the first search node of the 2nd level, the first search node of the 2nd level is cascaded with the first search node of the 3rd level, and the first search node of the 3rd level is cascaded with the second search node. In other words, the first search node of the 1st level, the first search node of the 2nd level, the first search node of the 3rd level and the second search node are cascaded in sequence.

[0124] The first search node at the first level is usually called the root node, and is also referred to as search node A1 in this application. In this search node A1, the number of objects (playercount) A1 is recorded, such as (playercount: 60). In addition, an index value sequence A1 is recorded, such as {...., 80,..., 40....}. This index value sequence A1 includes at least three value intervals, namely (0, 40), [40, 80), and [80, ∞).

[0125] The first search node of the second level cascaded with the first search node of the first level may include three search nodes, such as search node A2, search node A3, and search node A4. In search node A2, the number of objects A2 (such as playercount: 50) is recorded, and an index value sequence A2 is also recorded, such as {....110,...,85....}. The index value sequence A2 corresponds to the numerical interval when the index value in the index value sequence A1 is greater than or equal to 80 (i.e., [80,∞)). In addition, the index value sequence A2 also includes at least three numerical intervals, namely [80,85), [85,110), and [110,∞). In addition, search node A3 records the number of objects A3 (e.g., playercount: 8) and also records the index value sequence A3, such as {....75,...,60....}. This index value sequence A3 corresponds to the numerical interval in index value sequence A1 when the index value is less than 80 and greater than or equal to 40 (i.e., [40,80)). Similarly, search node A4 records the number of objects A4 (e.g., playercount: 2) and also records the index value sequence A4, such as {....30,...,20....}. This index value sequence A4 corresponds to the numerical interval in index value sequence A1 when the index value is less than 40 (i.e., (0,40)).

[0126] In the third level first search node cascaded with the second level first search node, for example, taking search node A2 as an example, the search node A2 can be cascaded with three third level first search nodes, i.e., search node A5, search node A6 and search node A7 respectively. In the search node A5, the object quantity A5 (such as playercount: 5) is recorded, and the index value sequence A5, such as {....130,...,120....}, is also recorded, which corresponds to the numerical interval when the index value in the index value sequence A2 is greater than or equal to 110 (i.e., [110,∞)). In the search node A6, the object quantity A6 (such as playercount: 40) is recorded, and the index value sequence A6, such as {....100,...,90,....}, is also recorded, which corresponds to the numerical interval when the index value in the index value sequence A2 is less than 110 and greater than or equal to 85 (i.e., [85,110)). In addition, in the index value sequence A6, at least three numerical intervals are also included, i.e., [85,90), [90,100), [100,110). Similarly, in the search node A7, the object quantity A7 (such as playercount: 5) is recorded, and the index value sequence A7, such as {....70,...,60....}, is also recorded, which corresponds to the numerical interval when the index value in the index value sequence A2 is less than 85 (i.e., [80,85)).

[0127] In the second search node cascaded with the first search node of the third level, for example, search node A6, the search node A6 can be cascaded with three second search nodes, namely, search node A11, search node A8, search node A9, and search node A10. In search node A11, the number of objects A11 (such as playercount: 6) is recorded, and the index value sequence A11 is also recorded, such as {105, 104}. The index value sequence A11 is included in the numerical interval when the index value in the index value sequence A6 is greater than or equal to 100. In search node A8, the number of objects A8 (such as playercount: 4) is recorded, and the index value sequence A8 is also recorded, such as {103, 102, 101}. The index value sequence A8 is also included in the numerical interval when the index value in the index value sequence A6 is greater than 100. In search node A9, the number of objects A9 (e.g., playercount: 20) is recorded, and also the index value sequence A9 is recorded, such as {99, 95, 92}. This index value sequence A9 is included in the numerical interval of index value sequence A6 when the index value is less than 100 and greater than or equal to 90. Similarly, in search node A10, the number of objects A10 (e.g., playercount: 10) is recorded, and also the index value sequence A10 is recorded, such as {89, 84, 81}. This index value sequence A10 is included in the numerical interval of index value sequence A6 when the index value is less than 90.

[0128] In addition, in this application, each second search node can also be cascaded with one or more third search nodes. For example, taking search node A9 as an example, it can be associated with three third search nodes, such as search node B1, search node B2, and search node B3. Taking search node B1 as an example, the search node B1 includes an index value (such as: 99) and the number of objects B1 (such as playercount: 12). The number of objects B1 can indicate that the total number of objects when the index value is 99 is 12.

[0129] In addition, each third search node can also be cascaded with a fourth search node. The fourth search node records the same number of object identifiers as the objects in the associated third search node. Optionally, these object identifiers can be recorded in the same fourth search node, or in multiple different fourth search nodes, which is not specifically limited in this application. For example, taking the search node B1 as an example, the search node B1 can be associated with multiple fourth search nodes, such as search node C1, search node C2, and search node C3. In addition, 4 object identifiers are recorded in the search node C1, such as id1 to id4; 4 object identifiers are also recorded in the search node C2, such as id5 to id8; and 4 object identifiers are also recorded in the search node C3, such as id9 to id12.

[0130] It should be noted that each object identifier in this application can identify a candidate object. For example, id1 can identify candidate object 1. It should be noted that the id described here can also be understood as the aforementioned public key address.

[0131] It should be noted that for the search nodes in other search branches, their respective recorded contents can also be understood by referring to the branches: search node A1-->search node A2-->search node A6-->search node A9-->search node B1-->search node C1 to search node C3, which will not be repeated here.

[0132] In addition, the above Figure 5 The target tree data structure shown in FIG, the index value sequence recorded in each search node, the sorting of the index values ​​is only illustrated in descending order, and in actual application, it can also be arranged in ascending order (such as the subsequent Figure 8 The structure shown in FIG2 is used for sorting, or other customized arrangement methods are used for sorting, which is not specifically limited in this application.

[0133] In addition, the above Figure 5 The target tree data structure shown in the figure is only illustrated by taking the first search node including 4 levels as an example. In actual applications, the value of N can be a positive integer, that is, the value of N can also be 1, 5, 8, etc., which is not specifically limited in this application.

[0134] 403. Traverse the target tree data structure and determine the target search node from the N-level cascade search nodes based on the target index value.

[0135] In one or more embodiments, after obtaining the target tree data structure, it is necessary to traverse from the first search node to the second search node in the first level according to the target index value to determine the target search node from the N-level cascade search nodes. It is understandable that the target search node is one of the second search nodes.

[0136] Through the target search node, we can understand the leaf node where the target index value is located in the entire target tree data structure, and then through the cascade relationship between the nodes, we can locate the corresponding third search node and fourth search node, thereby knowing the number of objects in the third search node and the object identification list in the fourth search node.

[0137] It should be noted that the target tree data structure mentioned here can refer to the aforementioned Figure 5 The structure shown or the subsequent Figure 8 to understand the structure shown in .

[0138] 404、determine a first object quantity based on the target indicator value, the indicator value sequence of the target search node and the object quantity of the target search node, and determine a second object quantity based on the target indicator value, the first identifier, the indicator value sequence of the target search node and the object quantity of the target search node, wherein each candidate object corresponding to the first object quantity has an indicator value greater than the target indicator value, and each candidate object corresponding to the second object quantity has an indicator value greater than the target indicator value.

[0139] In one or more embodiments, after the target search node is determined, the indicator value sequence and the object quantity in the target search node can be extracted, and then the first object quantity can be determined in combination with the target indicator value. For example, the target indicator value is compared with each indicator value in the indicator value sequence of the target search node, if the target indicator value is greater than or equal to the minimum indicator value in the indicator value sequence of the target search node and less than the maximum indicator value in the indicator value sequence, the corresponding object quantity can be extracted from other sibling nodes or parent nodes of the target search node. That is, the object quantity is obtained from other sibling nodes or parent nodes corresponding to the indicator value sequence of the target search node, and then the first object quantity is obtained. It should be noted that each candidate object corresponding to the first object quantity has an indicator value greater than the target indicator value.

[0140] In addition, the second object quantity needs to be determined based on the target indicator value, the first identifier, the indicator value sequence of the target search node and the object quantity of the target search node. For example, the target indicator value is compared with each indicator value in the indicator value sequence of the target search node, if the target indicator value is less than the maximum indicator value in the indicator value sequence of the target search node and greater than or equal to the minimum indicator value in the indicator value sequence, it is further determined whether the target object exists in the object identifier list of the fourth search node associated with the target search node according to the first identifier. If the first identifier matches any object identifier of the object identifier list of the fourth search node, the object quantity greater than the target indicator value in the target search node can be counted, and then the second object quantity is obtained. It should be noted that each candidate object corresponding to the second object quantity has an indicator value greater than the target indicator value.

[0141] 405、determine a target ranking of the target object based on the first object quantity and the second object quantity.

[0142] In one or more embodiments, the first object number can be used to determine the number of objects that are locally arranged before the target object in other search nodes. The second object number can also reflect the number of objects that are locally arranged before the target object in the same target search node. Based on this, after calculating the first object number and the second object number, the first object number and the second object number can be used to determine the target ranking of the target object.

[0143] In some optional examples, in the process of determining the target ranking of the target object based on the number of first objects and the number of second objects, the first local ranking of the target object can be determined based on the number of first objects, and the second local ranking of the target object can be determined based on the number of second objects. It should be noted that the first local ranking can represent the number of objects that are arranged before the target object in other search nodes. The second local ranking can represent the number of objects that are arranged before the target object in the target search node. In this way, after obtaining the first local ranking and the second local ranking, the target ranking of the target object is calculated based on the first local ranking and the second local ranking.

[0144] As an illustrative example, the first ranking position is calculated by summing the first local ranking and the second local ranking. It should be noted that the first ranking position reflects the total number of objects ranked before the target object. After obtaining the first ranking position, the next ranking position after the first ranking position is used as the target ranking for the target object.

[0145] For example, if the number of first objects is calculated to be 15 and the number of second objects is 0, the first ranking position can be calculated to be 15+0=15. Therefore, the target ranking is 15+1=16, that is, the target object is ranked 16th.

[0146] In an embodiment of the present application, within the gas resources limited by the gas mechanism, there is no need to re-count the number of other objects ranked in front according to the index value of the object each time. Instead, the target index value of the target object is matched with the index value sequence of the first search node at different levels in the target tree data structure, and the number of objects is directly extracted from the corresponding search node to determine the total number of objects ranked before the target object, and then the final ranking of the target object is obtained, which greatly reduces the complexity of the calculation and the gas consumption required for ranking, and can quickly and efficiently calculate the ranking of the object, thereby improving the user's decision-making and expansion experience under the target business.

[0147] In addition, when the objects in the target tree data structure change, the target ranking of the target object can be quickly re-determined by simply updating the number of objects recorded in each node. The implementation method is more flexible and easy to adapt to different object changes.

[0148] In some other optional embodiments, the specific process of determining the target search node in step 403 can refer to the following: Figure 6 The flowchart shown is as follows:

[0149] S4031. Traverse the first search node of the i-th level. When the target index value is included in the first numerical interval in the index value sequence of the first search node of the i-th level, the first search node of the i+1-th level associated with the first numerical interval is determined as the first child node, and the minimum value of the first numerical interval is less than or equal to the target index value, and the maximum value is greater than the target index value.

[0150] S4032. Repeat step S4031 until traversing to the first search node of the N-1th layer, and when the target index value matches the second index value in the index value sequence of the cascaded second search node, determine that the second search node corresponding to the index value match is the target search node.

[0151] In one or more embodiments, since there is a cascade relationship between the first search nodes of each two adjacent levels, and from the aforementioned Figure 5 It can be seen from the shown content that the number of objects in the first search node of the i-th level is the same as the number of objects in all the first search nodes of the i+1-th level in the cascade, and the index value sequence of the first search node of the i-th level includes multiple index values, and the numerical interval between each two adjacent index values ​​corresponds to the index value sequence of the first search node of the i+1-th level in the cascade.

[0152] Then, in the process of determining the target search node where the target object is located, the first search node of the i-th level can be traversed first, and the target index value can be compared with multiple first index values ​​in the index value sequence of the first search node of the i-th level. Through comparison, if the target index value is included in the first numerical interval in the index value sequence of the first search node of the i-th level, that is, when the target index value is less than the maximum value of the first numerical interval in the first search node of the i-th level and greater than or equal to the minimum value of the first numerical interval, the first search node of the i+1th level associated with the first numerical interval can be determined as the first child node.

[0153] Thus, the first child node is further traversed by comparing the target index value with a plurality of first index values ​​in the index value sequence of the first search node of the i+1th level. Through the comparison, if the target index value is included in a first numerical interval in the index value sequence of the first search node of the i+1th level, that is, if the target index value is less than the maximum value of any numerical interval in the first search node of the i+1th level and greater than or equal to the minimum value of any numerical interval, the first search node of the i+2th level associated with any numerical interval is further traversed.

[0154] And so on until the first search node of the N-1th level is traversed. For the first search node of the N-1th level, since the first search node of the N-1th level is cascaded with one or more second search nodes, at this time, through index value matching, if the target index value matches the second index value in the index value sequence of any second search node cascaded with the first search node of the N-1th level, then the second search node corresponding to the index value matching can be used as the target search node.

[0155] For example, the aforementioned Figure 5 The target tree data structure and the target index value "99" are taken as an example to describe how to determine the target search node.

[0156] First, traverse the search node A1, and by comparing the target index value (i.e. "99") with the index value sequence A1 {....,80,...,40....}, it can be seen that 99>80, thus jumping to the first search node of the second level corresponding to the numerical interval [80,∞) in the search node A1, that is, jumping to the search node A2.

[0157] Further, traverse the search node A2, and by comparing the target index value (i.e. "99") with the index value sequence A2 {....110,...,85....}, it can be seen that 99>85 and 99<110, thus jumping to the first search node of the third level corresponding to the numerical interval [85,110) in the search node A2, that is, jumping to the search node A6.

[0158] Further, traverse the search node A6, and by comparing the target index value (i.e. "99") with the index value sequence A6 {....100,...,90,....}, it can be seen that 99>90 and 99<100, thus jumping to the second search node corresponding to the numerical interval [90,100) in the search node A6, that is, jumping to the search node A9.

[0159] Similarly, traversing search node A9, by matching the target index value (i.e., "99") with the index value sequence A9 {99, 95, 92}, we know that the target index value "99" matches the index value "99" in the index value sequence A9. Therefore, the second search node (i.e., search node A9) where the index value "99" is located is used as the target search node corresponding to the target index value "99".

[0160] By using the above-mentioned traversal method to determine the target search node, it is only necessary to judge whether the target index value is included in the numerical range of the first search node and whether it matches the index value of the second search node. There is no need to use the index value for one-to-one comparison. This can improve the efficiency of searching and locating the target search node, and provide conditions for the subsequent process of extracting the number of objects, thereby promoting the accuracy of subsequent object number extraction.

[0161] In some other optional embodiments, in the above Figure 4 and Figure 6 Based on the described embodiment, the specific process of determining the number of the first objects in step 404 can be referred to as follows: Figure 7 The flowchart shown is as follows:

[0162] S4041: Determine a second child node at the same level as the target search node, wherein each index value in the index value sequence of the second child node is greater than an index value in the index value sequence of the target search node;

[0163] In one or more embodiments, the second child node at the same level as the target search node can be understood as a sibling node at the same level as the target search node and that satisfies the conditions. It should be noted that the sibling node that satisfies the conditions mentioned herein can be understood as: each index value in the index value sequence of the sibling node is greater than the index value in the index value sequence of the target search node.

[0164] For example, the aforementioned Figure 5 The target tree data structure shown above Figure 6Taking the determined target search node as search node A9 as an example, at this time, it can be determined that the brother nodes at the same level as search node A9 include: search node A8, search node A10 and search node A11. Furthermore, by comparing the index value sequence A9 of search node A9 with the index value sequence A11 of search node A11, the index value sequence A8 of search node A8, and the index value sequence A10 of search node A10, it can be seen that only each index value in the index value sequence of search node A11 and search node A8 is greater than the index value in the index value sequence of search node A9. Therefore, it can be determined that the brother nodes at the same level as the search node A9 and that meet the conditions are: search node A8 and search node A11. That is, the second child nodes at the same level as search node A9 are search node A8 and search node A11.

[0165] It should be noted that the index value sequence A8, index value sequence A9, index value sequence A10, index value sequence A11 and other contents mentioned here can refer to the aforementioned Figure 5 The contents of the target tree data structure in are understood and will not be elaborated here.

[0166] S4042. Determine the fourth child node that is at the same level as the third child node, the third child node includes the first search node of each level in the first N-1 levels cascaded with the target search node, and each index value in the index value sequence of the fourth child node is greater than the index value in the index value sequence of the third child node at the same level.

[0167] In one or more embodiments, the third child node includes the first search node of each level in the first N-1 levels cascaded with the target search node. Specifically, it can be understood that the third child node includes: the parent node of the target search node, and the parent nodes of other levels corresponding to the parent node. Thus, the fourth child node at the same level as the third child node can be understood as a sibling node at the same level as the parent node and that meets the conditions. More specifically, each index value in the index value sequence of the fourth child node is greater than the index value in the index value sequence of the third child node at the same level.

[0168] For example, the aforementioned Figure 5Taking the target tree data structure shown and the target search node as search node A9 as an example, at this time, through the cascade relationship between the nodes, it can be determined that the parent node of search node A9 is search node A6 (i.e., the third child node). Subsequently, through the cascade relationship between the nodes, the brother nodes at the same level as the parent node (i.e., search node A6) can also be determined, including: search node A5 and search node A7. Furthermore, by comparing the index value sequence A6 of search node A6 with the index value sequence A5 of search node A5 and the index value sequence A7 of search node A7, it can be seen that only each index value in the index value sequence A5 of search node A5 is greater than the index value in the index value sequence A6 of search node A6.

[0169] Similarly, through the cascade relationship between nodes, it is also possible to determine that the parent node of the parent node of search node A9 (i.e., search node A6) is search node A2. Furthermore, through the cascade relationship between nodes, it is possible to determine that the brother nodes at the same level as the parent node search node A2 include: search node A3 and search node A4. Subsequently, the index value sequence A2 of search node A2 is compared with the index value sequence A3 of search node A3 and the index value sequence A4 of search node A4, respectively. It can be seen that no index value sequence of the search node meets the conditions, that is, the index value sequences of search node A3 and search node A4 are not greater than the index value in the index value sequence A2 of search node A2.

[0170] Thus, it can be determined that the search node that is at the same level as the search node A6 and meets the conditions is the search node A5. That is, the fourth child node at the same level as the search node A6 (ie, the third child node) is the search node A5.

[0171] It should be noted that the index value sequence A5, index value sequence A6, index value sequence A7 and other contents mentioned here can refer to the aforementioned Figure 5 The contents of the target tree data structure in are understood and will not be elaborated here.

[0172] S4043: Extract the number of objects in the second child node and the number of objects in the fourth child node of each level.

[0173] In one or more embodiments, after determining the second child node, the number of objects recorded in the second child node can be extracted from the second child node. For example, taking the target search node as search node A9, the determined second child nodes are search node A8 and search node A11. By summing the number of objects A8 (i.e., "4") recorded in search node A8 and the number of objects A11 (i.e., "6") recorded in search node A11, the number of objects in all second child nodes can be obtained as 10.

[0174] Similarly, after determining the fourth child node at each level, the number of objects recorded in the fourth child node at each level can be extracted from the fourth child node at that level. For example, if the target search node is search node A9, the fourth child node determined is search node A5, and the corresponding object number A5 is 5.

[0175] S4044: Calculate the number of objects in the second child node and the sum of the number of objects in the fourth child nodes of all levels to obtain the first number of objects.

[0176] In one or more embodiments, after extracting the number of objects of the second child node and the number of objects of the fourth child nodes of all levels, the first number of objects can be obtained by calculating the sum of the number of objects of the second child node and the number of objects of the fourth child nodes of all levels.

[0177] For example, taking the target search node as search node A9, its second child nodes are search node A8 and search node A11, and its fourth child node is search node A5. After calculation, the number of first objects is 10+5=15.

[0178] In other optional embodiments, in the target tree data structure provided by the present application, in the first search node of the N-layer cascade, the index value sequence of the first search node of each level can be arranged in descending order or in ascending order.

[0179] For example, the aforementioned Figure 5 Taking the target tree data structure shown as an example, the index value sequence of the search nodes at each level is arranged in descending order. Figure 5 For example, for the first search node in the second level, it includes search node A2, search node A3, and search node A4. Among them, the index values ​​in the index value sequence A2 of search node A2 are all greater than the index values ​​in the index value sequence A3 of search node A3. In addition, the index values ​​in the index value sequence A3 of search node A3 are all greater than the index values ​​in the index value sequence A4 of search node A4.

[0180] Similarly, for the first search node in the third level, it includes search node A5, search node A6, and search node A7. The index values ​​in index value sequence A5 of search node A5 are all greater than the index values ​​in index value sequence A6 of search node A6. Furthermore, the index values ​​in index value sequence A6 of search node A6 are all greater than the index values ​​in index value sequence A7 of search node A7.

[0181] Similarly, for the second search node, it includes search node A11, search node A8, search node A9, and search node A10. Among them, the index values ​​in the index value sequence A11 of the search node A11 are all greater than the index values ​​in the index value sequence A8 of the search node A8. The index values ​​in the index value sequence A8 of the search node A8 are all greater than the index values ​​in the index value sequence A9 of the search node A9. In addition, the index values ​​in the index value sequence A9 of the search node A9 are all greater than the index values ​​in the index value sequence A10 of the search node A10.

[0182] It should be noted that for the case of arranging in ascending order, it can also be understood accordingly with reference to the index value sequence in descending order, and this application does not go into details.

[0183] Optionally, in combination with the above description, in the above Figure 7 Based on the described embodiment, in an N-layer cascade of search nodes, when the index value sequence of the search nodes at each level is arranged in descending order, the sibling node arranged to the left of the target search node can be directly determined as the second child node at the same level as the target search node. Through the above-mentioned descending order arrangement, the second child node at the same level as the target search node can be quickly and accurately located, which not only improves processing efficiency, but also reduces the number of unnecessary traversals and reduces the possibility of positioning errors.

[0184] For example, the aforementioned Figure 5 For example, if the target search node is search node A9, search node A8 and search node A11 can be directly determined as the second child nodes at the same level as the target search node.

[0185] Optionally, in combination with the above description, in the above Figure 7 Based on the described embodiment, in an N-layer cascade of search nodes, when the index value sequence of the search nodes at each level is arranged in ascending order, the sibling node arranged to the right of the target search node can be directly determined as the second child node at the same level as the target search node. Through the above-mentioned ascending arrangement method, the second child node at the same level as the target search node can be quickly and accurately located, which not only improves processing efficiency, but also reduces the number of unnecessary traversals and reduces the possibility of positioning errors.

[0186] For example, Figure 8 Another structural diagram of the target tree data structure provided by this application is shown. Figure 8As shown, taking N=2 as an example, the target tree data structure includes the first search nodes of the first two cascades and the second search nodes of the third cascade. The first search nodes of the first two cascades include, for example, the first search node of the first level and the first search node of the second level.

[0187] Among them, for Figure 8 The first search node at level 1 in the search results is sometimes called the root node and is also referred to herein as search node D1. In search node D1, the number of objects (playercount) D1 is recorded, such as (playercount: 32). Furthermore, a sequence of index values ​​D1 is recorded, such as {..., 40,..., 80...}. This sequence of index values ​​D1 also includes at least three value intervals, such as (0, 40), [40, 80), and [80, ∞).

[0188] The first search node of the second level cascaded with the first search node of the first level may include three search nodes, such as search node D2, search node D3, and search node D4. In search node D2, the number of objects D2 (such as playercount: 10) is recorded, and an index value sequence D2 is also recorded, such as {....20,...,30....}. The index value sequence D2 is included in the numerical interval when the index value in the index value sequence D1 is less than 40. In search node D3, the number of objects D3 (such as playercount: 12) is recorded, and an index value sequence D3 is also recorded, such as {....60,...,75....}. The index value sequence D3 is included in the numerical interval when the index value in the index value sequence D1 is less than 80 and greater than or equal to 40. Similarly, in search node D4, the number of objects D4 (e.g., playercount: 10) is recorded, as well as an index value sequence D4, such as {....85,...,110....}. This index value sequence D4 is included in the numerical range when the index value in index value sequence D1 is greater than or equal to 80. In addition, the index values ​​in index value sequence D4 of search node D4 are all greater than the index values ​​in index value sequence D3 of search node D3. In addition, the index values ​​in index value sequence D3 of search node D3 are all greater than the index values ​​in index value sequence D2 of search node D2.

[0189] In the second search node cascaded with the first search node of the second level, for example, search node D3, the search node D3 can be cascaded with 3 second search nodes, i.e., search node D5, search node D6 and search node D7 respectively. In the search node D5, the object quantity D5 (e.g., playercount: 4) is recorded, and the index value sequence D5, e.g., {53, 54, 55}, is recorded, which is included in the numerical interval when the index value in the index value sequence D3 is less than 60. In the search node D6, the object quantity D6 (e.g., playercount: 4) is recorded, and the index value sequence D6, e.g., {72, 73, 74}, is recorded, which is included in the numerical interval when the index value in the index value sequence D3 is less than 75 and greater than or equal to 60. Similarly, in the search node D7, the object quantity D7 (e.g., playercount: 4) is recorded, and the index value sequence D7, e.g., {76, 77, 80}, is recorded, which is included in the numerical interval when the index value in the index value sequence D3 is greater than or equal to 75. In addition, the index values in the index value sequence D7 of the search node D7 are all greater than the index values in the index value sequence D6 of the search node D6. In addition, the index values in the index value sequence D6 of the search node D6 are all greater than the index values in the index value sequence D5 of the search node D5.

[0190] In addition, Figure 8 In the target tree data structure described, each second search node can also be cascaded with one or more third search nodes. For example, taking the search node D6 as an example, it can be associated with third search nodes corresponding to the index values "72" to "74" respectively. In addition, each third search node can also be cascaded with a fourth search node. The fourth search node records the same object identifiers as the object quantity in the associated third search node, for example, the fourth search node associated with the third search node corresponding to the index value "72" includes id 1 and id2, where id1 identifies the candidate object 1. For a detailed understanding, reference can be made to the content shown in the foregoing Figure 5

[0191] Therefore, taking the structure shown in Figure 8 For example, if the target index value is 74, and assuming that the target search node determined after step 403 is the search node D6, at this time, the search node D7 can be directly determined as the second child node at the same level as the target search node.

[0192] ​Through the above method, by querying the number of objects in the parent node of the target search node or the parent node of the parent node, whether there are other objects arranged before the target object, the local ranking of the level where the target object is located can be determined. This not only can more accurately locate the precise relative position of the target object in the level to which it belongs, but also only needs to pay attention to the number of objects recorded in the sibling nodes in a specific level, without the need for complex sorting and calculation of the entire data structure, making the determination of the local ranking easier to implement and maintain.

[0193] In some other optional embodiments, in the above Figure 4 and Figure 6 Based on the described embodiment, the specific process of determining the number of second objects in step 404 can be referred to the following: Figure 9 The flowchart shown is as follows:

[0194] S901. When the target index value matches the index value of any third search node associated with the target search node, match the first identifier with the object identifier list in the fourth search node associated with the corresponding third search node.

[0195] In one or more embodiments, from the aforementioned Figure 5 and Figure 8 As can be seen from the description, the target tree data structure also includes one or more third search nodes cascaded with the second search node, and a fourth search node cascaded with each third search node. Furthermore, each third search node includes an index value and a number of objects. The index values ​​of all third search nodes constitute the index value sequence of the first search node at the Nth level. The fourth search node includes an object identifier list, where each object identifier in the object identifier list is used to identify a candidate object.

[0196] Then, in the process of determining the number of second objects, the target index value can first be matched with the index value sequence of each third search node associated with the target search node. Subsequently, when determining that the target index value matches any index value, it is also necessary to confirm whether the target object exists in the fourth search node associated with the third search node corresponding to the index value match, so as to clarify whether the target tree data structure stores the target object. Therefore, the first identifier of the target object can be specifically used to match the object identifier list in the fourth search node associated with the third search node corresponding to the same index value.

[0197] For example, Figure 5Taking the target tree data structure shown, the target index value of the target object as "99", and the first identifier as "id3" as an example, it can be seen from the above content that the target search node where the target object is located is the search node A9. Through the above analysis, it can be seen that the third search node associated with the search node A9 includes: search node B1, search node B2, and search node B3. Among them, after matching the index values, it can be determined that the target index value (i.e., "99") matches the index value of the search node B1. At this time, it is necessary to match the first identifier (i.e., "id3") with the fourth search node cascaded by the search node B1, for example, with the object identifier list in the search node C1, the search node C2, and the search node C3. That is, the first identifier "id3" is matched with id1 to id4 of the search node C1, id5 to id8 of the search node C2, and id9 to id12 of the search node C3, respectively, to determine that the "id3" matches the "id3" in the search node C1.

[0198] S902. When the first identifier matches any object identifier in the object identifier list in the fourth search node associated with the corresponding third search node, the number of objects in the target search node whose index value is greater than the target index value is counted.

[0199] In one or more examples, when the first identifier matches any object identifier in the object identifier list of the associated fourth search node, it indicates that the target object exists in the target tree data structure. Thus, a magnitude analysis is further performed on the index value in the target search node and the target index value, thereby counting the number of objects for which the index value is greater than the target index value.

[0200] For example, using the example shown in step S901 above, the first identifier "id3" matches "id3" in search node C1. At this point, the index values ​​(i.e., 99, 95, and 92) in target search node A9 are compared with the target index value. It is found that the number of objects with a value greater than the target index value of 99 is zero.

[0201] S903: The number of objects in the target search node when the index value is greater than the target index value is used as the second object number.

[0202] In one or more examples, the number of objects whose index values ​​are greater than the target index value in the target search node can be used as the second number of objects. For example, if the target index value is "99," the number of objects greater than the target index value "99" is 0, and the second number of objects can be determined to be 0. In other words, there are no objects in the target search node that are ranked before the target object.

[0203] Through the above method, by determining whether there are other objects arranged before the target object in the target search node, the local ranking of the target object in the target search node can be determined, thereby achieving an in-depth understanding of the ranking of the target object in the target search node from a fine-grained perspective without considering the entire data structure, which can significantly reduce the consumption of computing resources and time.

[0204] Alternatively, the contents described in steps 401 to 405 above can also be understood with reference to the following pseudocode. Specifically, in this application, it is assumed that the target object is p, the function Data represents the set of data attributes of the target object, Data(p) describes all data attributes of target object p, the function Rank represents a ranking function, and Rank(p) is the target rank of target object p. The function Range(p) represents a list of objects in the same segment as the target player p.

[0205] In this application, it is agreed that Data(p) = (id, score), where id represents the identifier of the target object p (i.e., the first identifier in the aforementioned step 401), score represents the target indicator value of the target object p (such as the game score, etc.), and score is a positive integer.

[0206] In this application, Rank(p) = Find(Search(p)). The Search function finds the leaf node (i.e., the target search node mentioned in step 403) where the target object p is located based on the index generated by the target tree data structure (e.g., a B+ tree). Additionally, the Find function finds the target object in the set of objects associated with the target search node, and in the process of searching for and finding leaf nodes within the leaf nodes, obtains the number of objects ranked before the target object.

[0207] Moreover, from the aforementioned Figure 5 As can be seen from the described target tree data structure, the index values ​​are recorded in the search nodes at each level. In this application, by using the index values ​​as score pointers (scores), the target search node where the target index value is located can be accessed with O(l) complexity. Moreover, each search node records the number of objects in all leaf nodes under the search node. In this application, the target tree data structure has three types of nodes (Node), namely Root, Branch, and Leaf.

[0208] Among them, the Root node can be understood as Figure 5 The first search node at the first level in the game has the following attributes: node type (type), number of objects (playercount), score index (indexs), and child node pointer set (pointers).

[0209] Similarly, the Branch node can be understood as Figure 5 The first search node of the second and third levels in the game has the following attributes: node type (type), number of objects (playercount), score index (index), and child node pointer set (pointers).

[0210] In addition, Leaf node, sometimes also called scoreList node, can be understood as the aforementioned Figure 5 The second search node in the , its attributes include: node type (type), number of objects (playercount), score pointer (scores) / pointer to the previous scoreList (prevScoreList), pointer to the next scoreList (nextScoreList), where scores are arranged from large to small according to the index value score.

[0211] In this application, the following conventions will be used: 1) The * prefix represents a pointer to computer memory. A data object can be obtained through a pointer, and vice versa. 2) An English string starting with a capital letter represents a function or a data object type, for example, Search represents a query function, and Branch represents the data type of a branch node in a tree. 3) The English period (.) represents access to a data attribute under a data object, for example, branch.type represents the type attribute of an object of the Branch type. 4) The remaining symbols follow the conventions of general pseudocode, for example, <- represents assignment, and [] represents obtaining the data object under a specific index of a list.

[0212] Based on this, the pseudo code for the logic implementation of the above-mentioned function Search is as follows:

[0213]

[0214] In this case, *Node is a pointer to a search node, and Node is the search node pointed to by *Node. Score is a specific indicator value. The Length function is used to return the size of a list or array.

[0215] Furthermore, as can be seen from the pseudocode of the Search function above, its input parameter is the target score, and it returns two parameters: *Leaf and count. *Leaf is a pointer to the Leaf node (i.e., the scoreList node), and count is used to indicate the total number of objects whose score is greater than the maximum score in that Leaf node.

[0216] In addition, SearchInNode is a recursive function that traverses from the root node of the tree to the search nodes at each level, and in each recursive function, counts the number of all objects in the sibling nodes to the left of the target search node, thereby calculating the total number of objects whose index values ​​are greater than the maximum index value in the target search node, that is, the first object number mentioned in the aforementioned step 404.

[0217] In addition, the score pointer (i.e., the indicator value) itself is a specific and unique pointer that points to a score node (Score). This score node is associated with an object list node (PlayerList). Each object list node has a set of object pointers, each of which points to an object node (Player). This object node records the object's data (such as the object's identifier, which is the public key address, referred to as Address). The data formats of the score node (Score), player list node (PlayerList), and player node (Player) are defined as follows:

[0218] Score node: can be understood as the aforementioned Figure 5 The third search node in the . Its properties include: index value (value), number of objects (playerCount), object list node pointer (playerList), parent node (scoreList), PlayerList node, which can be understood as the aforementioned Figure 5 The fourth search node in the . Its properties include: object identifier list (playerList), next object identifier list pointer (nextPlayerList), previous object identifier list pointer (prevPlayerList)

[0219] The Player node includes: the object's unique identifier (address), the object's index value (score), and the object identifier list (playerList).

[0220] Based on this, for the Find function mentioned above, its logical implementation pseudo code is as follows:

[0221]

[0222] Wherein, the Length function represents the size of a list or array. The logic of the Find function is to traverse all the scores in the ScoreList node to query the object (Player) corresponding to the first identifier, and count how many objects in the target search node have an index value greater than the target object corresponding to the first identifier, so as to calculate the total number of objects in the target search node whose index value is greater than the target index value, that is, the second object quantity mentioned in the aforementioned step 404, so as to determine the local ranking (i.e., the second local ranking mentioned above) of the target object corresponding to the first identifier in the target search node.

[0223] Based on this, the logic of the Rank function of the Search function and the Find function mentioned above is implemented as follows:

[0224]

[0225] Wherein, the Player function represents finding the corresponding Player node according to the first identifier (address), and the leaf represents a pointer to the leaf node. That is, for the Rank function, the target index value (score) can be obtained, and the scoreList node (i.e., the target search node) in which the target index value is located can be found through the target tree data structure, and the number of objects whose index value is greater than the maximum index value in the scoreList node can be counted; and it is further determined whether the target object exists in the corresponding object identifier list, and then the local ranking of the target object is determined by searching the scoreList node.

[0226] In the above manner, compared with the scheme of directly re-counting and calculating the ranking of each object in the traditional scheme, the number of objects in the node in the target tree data structure is recorded in the present application, and the number of objects under a certain node can be quickly queried through the index, which can greatly reduce the number of objects that need to be directly compared, thereby improving the calculation efficiency of the ranking and the accuracy of the object ranking.

[0227] In some other optional embodiments, based on the embodiments described above Figure 4 、 Figure 6 、 Figure 7 or Figure 9 the object processing method provided by the present application can further execute step 403 to determine the target search node, and then judge the index interval matched by the target object based on the target index value. For example, in a virtual game scenario, the score segment of a game player can be determined by combining the target tree data structure with the target index value of the game player, so as to match other game players in the same score segment for interaction. Alternatively, Figure 10Another flow chart of the object processing method provided by this application is shown. Figure 10 As shown, the method may include the following steps:

[0228] 1001. Obtain a pending request, where the pending request includes a target indicator value and a first identifier. The target indicator value is used to evaluate the ranking of a target object in a target business, and the first identifier is used to identify the target object.

[0229] 1002. Obtain a target tree data structure. The target tree data structure includes N levels of cascaded search nodes. The search nodes at each level include an index value sequence and the number of objects. The index value sequence is used to represent the order of the index values ​​of multiple candidate objects, and the number of objects is used to represent the number of multiple candidate objects. N is a positive integer.

[0230] 1003. Traverse the target tree data structure and determine the target search node from N layers of cascaded search nodes based on the target index value.

[0231] It should be noted that the contents of the above steps 1001 to 1003 can be specifically referred to the above Figure 4 The contents of step 401 to step 403 described in the above are understood and will not be described in detail here. In addition, the target tree data structure here can also refer to the aforementioned Figure 5 or Figure 8 The content described above is understood and will not be elaborated here.

[0232] 1004. Obtain a first value, where the first value is used to indicate the number of M target candidate objects, each target candidate object is used to interact with the target object, and M is a positive integer.

[0233] In one or more embodiments, the first value can be customized by the user based on ranking requirements, or can be randomly generated. The specific method for obtaining the first value is not limited in this application. Through the first value, the number of M target candidate objects can be clearly determined, that is, the number of objects required for subsequent interactive operations with the target object.

[0234] For example, the first value can be represented by num, such as num = 6. It should be noted that the specific value of the first value is not limited to 6, and can also be other values, such as 8, 10, etc.

[0235] 1005. Determine the object identifier of each target candidate object based on the target index value, the first numerical value, and the object identifier list of the fourth search node associated with the target search node.

[0236] In one or more embodiments, from the aforementioned Figure 5As can be seen from the target tree data structure shown, since each object identifier in the object identifier list of the fourth search node is associated with a candidate object, to find target candidate objects that meet the first numerical value, after obtaining the first numerical value, the object identifier of each target candidate object can be determined based on the target index value, the first numerical value, and the object identifier list of the fourth search node associated with the target search node.

[0237] In other optional examples, the target index value can be compared with other index values ​​in the target search node, and based on the comparison result, a corresponding object identifier can be selected from the associated fourth search node to determine the object identifier of the target candidate object. This can be understood by referring to the following two cases, namely:

[0238] Case (1): There are other index values ​​in the target search node that are greater than the target index value

[0239] For example, when a target search node has a third index value greater than the target index value, the object identifier corresponding to the first value is selected from the object identifier list of the fourth search node associated with the third search node corresponding to the third index value. This approach provides multiple object identifier selection methods, expands the scope of application, and improves the flexibility and scalability of object identifier selection.

[0240] For example, taking the target index value of "95" as an example, by executing the aforementioned steps 401 to 403, it can be determined that the corresponding target search node is search node A9. In the search node A9, by comparing the target index value "95" with the other index values ​​(i.e., "99" and "92"), it can be known that 99>95, and the third index value can be determined to be "99". Furthermore, based on the third index value (i.e., "99"), it can be determined that the corresponding third search node is search node B1. In this way, the object identifier corresponding to the first value (e.g., "6") is selected from the object identifier list of the fourth search node (i.e., search nodes C1 to C3) associated with the search node B1.

[0241] For example, six object identifiers can be selected from id1 to id4 of search node C1, id5 to id8 of search node C2, and id9 to id12 of search node C3. For example, id12, id11, id10, id9, id8, and id7 can be selected in ascending order of index value. Alternatively, six object identifiers can be randomly selected from these 12 object identifiers, and this is not specifically limited in this application.

[0242] Case (2): There is no other index value greater than the target index value in the target search node

[0243] In one or more embodiments, when a target search node does not have a third index value greater than the target index value, a fourth index value greater than the target index value is determined from other second search nodes at the same level as the target search node; and an object identifier corresponding to the first value is selected from the object list of the fourth search node associated with the third search node corresponding to the fourth index value. This method provides multiple object identifier selection methods, expands the scope of application, and improves the flexibility and scalability of object identifier selection.

[0244] For example, for Figure 5 Based on the target tree data structure described, Figure 11 Shown Figure 5 Schematic diagram of the structure of the leaf nodes cascaded by the search node A6 in FIG. Figure 11 As shown, for the search node A6, in addition to cascading the aforementioned search nodes A8 to A10, it also cascades the search node A11.

[0245] For search node A8, the number of objects A8 recorded is 4 (i.e., playercount: 4), and the index value sequence A8 is {103, 102, 101}. The third search node corresponding to the index value "103" is search node B4, and the object identifier list C4 of the fourth search node associated with search node B4 (e.g., search node C4) includes id13. The third search node corresponding to the index value "102" is search node B5, and the object identifier list C5 of the fourth search node associated with search node B5 (e.g., search node C5) includes id14 to id16.

[0246] In addition, for Figure 11 For search node A11 in the example, the number of objects recorded is 6 (playercount: 6), and the index value sequence A11 is {105, 104}. The third search node corresponding to the index value "105" is search node B6, and the object identifier list C6 of the fourth search node associated with search node B6 (e.g., search node C6) includes ids 17 to 22.

[0247] For example, if the target index value is "99" and its corresponding target search node is search node A9, in search node A9, by comparing the target index value "99" with other index values ​​(i.e., "99" and "92"), it can be determined that 95 < 99 and 92 < 99. At this point, it is necessary to determine a fourth index value greater than the target index value "99" from other second search nodes at the same level, such as search nodes A8 and A10.

[0248] By comparing the index values ​​"105" and "104" in search node A11, the index values ​​"103", "102", and "101" in search node A8, and the index values ​​"89", "84", and "81" in search node A10 with the target index value "99", it can be seen that only the index values ​​"105" and "104" in search node A11 and the index values ​​"103", "102", and "101" in search node A8 are greater than the target index value "99". At this time, the index values ​​"105", "104", "103", "102", and "101" can be determined as the fourth index value.

[0249] At this time, when the fourth indicator value is determined to be "105", "104", "103", "102", and "101", it is necessary to further select the object identifier corresponding to the first value (i.e., 6) from the object list of the fourth search node associated with the corresponding third search node, that is, from id13 in search node C5, id14 to id16 in search node C4, and id17 to id22 in search node C6.

[0250] In other optional embodiments, for the above situation 2, if there are multiple other second search nodes at the same level as the target search node, then the target object identifier can also be selected from the corresponding object identifier list in order based on the size of the index values ​​in the other second search nodes. This not only simplifies the implementation of the processing logic, but also can use the correlation between nodes to accurately and efficiently select object identifiers, thereby improving processing performance. Specifically, other first search nodes at the same level can include a fifth child node and a sixth child node, and the index values ​​in the index value sequence of the fifth child node are all greater than the index values ​​in the index value sequence of the sixth child node. Then, how to determine the object identifier corresponding to the first numerical value in the above situation 2 can also be understood by referring to the following calculation process, namely:

[0251] Determine a fourth index value greater than the target index value from the index value sequence of the fifth child node and the index value sequence of the sixth child node;

[0252] When the number of objects in the sixth child node is less than the first value, extracting the first object identifier corresponding to the number of objects in the sixth child node from the object identifier list of the fourth search node associated with each fourth index value of the sixth child node;

[0253] Calculate the difference between the first value and the number of objects in the sixth child node to obtain a second value;

[0254] Extracting a second object identifier corresponding to the second value from the object identifier list of the fourth search node associated with each fourth index value of the fifth child node;

[0255] Based on the first object identifier and the second object identifier, an object identifier corresponding to the first value is obtained.

[0256] For example, taking the target index value as "99" and its corresponding target search node as search node A9, from the above Figure 11 As can be seen from the described structure, for search node A9, the nodes that meet the conditions among the other second search nodes at the same level include: search node A11 and search node A8. In other words, search node A8 here can be regarded as the sixth child node mentioned above, and search node A11 can be regarded as the fifth child node mentioned above.

[0257] By comparing the number of objects recorded by search node A8 (i.e., "4") with the first value (i.e., "6"), we know that 4 < 6. Therefore, we can extract the first object IDs, i.e., ids 13 to 16, from the object ID lists of the fourth search nodes associated with the index values ​​"103" and "102" of search node A8, i.e., from the object ID lists of search nodes C4 and C5.

[0258] In addition, it is necessary to further calculate the difference between the number of objects recorded by search node A8 (i.e., "4") and the first value (i.e., "6"), that is, the second value = 6-4 = 2. In other words, it is necessary to further select two more object identifiers from the object identifier list associated with the previous search node A11. In other words, it is necessary to select the object identifier corresponding to the second value (i.e., "2") from the object list of the fourth search node associated with the third search node corresponding to the index values ​​"105" and "104", that is, from "id17 to id22" in search node C6, as the second object identifier, for example, id17 and id18.

[0259] Therefore, by combining the first object identifiers id13, id14, id15, id16 and the second object identifiers id17, id18, an object identifier that satisfies the first value can be obtained.

[0260] 1006. Search for M target candidate objects based on the object identifiers of the M target candidate objects.

[0261] In one or more embodiments, after executing step 1005, the object identifiers of M candidate objects can be obtained, and thus, based on the object identifiers of the M target candidate objects, the M target candidate objects can be located and searched from the corresponding object nodes (players).

[0262] 1007. Perform an interactive operation on the M target candidate objects and the target object.

[0263] In one or more embodiments, after finding M target candidate objects, these M target candidate objects can be used to interact with the target object to obtain corresponding interaction results. The interaction results can be used to timely understand the interaction between objects. It should be noted that the interaction operation may include but is not limited to content sharing operations, object matching operations, personalized recommendation operations, or other operations.

[0264] Alternatively, in another embodiment, as mentioned above Figure 5 As shown, since all the second search nodes cascaded to the same first search node at level N-1 are constructed into a bidirectional list through bidirectional pointers. Therefore, combined with the definition of the relevant parameters in the above pseudo code, for the above Figure 10 How to find other objects in the same segment as the target object can be achieved through the Range function. Specifically, the pseudo code of the Range function's logic implementation is as follows:

[0265]

[0266]

[0267] []Address represents an array of unique identifiers (Address), and []Address{} represents an empty Address array. The Append(addrs, playerListNode.players) function appends the addresses of all Player nodes in the Player node list (playerListNode.players) linked to playerListNode to the addrs array (the aforementioned object identifier list). The Score function finds the corresponding Score node (scoreNode) based on the target indicator value (score).

[0268] The RangeScore function takes two parameters: the Score node associated with the target value and a first value (num). This function can be used to retrieve the object identifier (e.g., address) of the object from the playerList associated with the Score node.

[0269] The PrevScore function is used to find the previous scoreNode of the scoreNode, that is, the first node on the left of the same level. There are two possibilities for this function. One is that when there is a score with a larger index value than the current input parameter in the same scoreListNode of the input scoreNode, the scoreNode corresponding to the previous score in the scoreListNode.scores is directly returned. Otherwise, the other is to find the previous scoreListNode by traversing the scoreListNode.prevScoreList, and thus find the previous score. The specific implementation process can be referred to the above. Figure 10 The contents described in cases (1) and (2) above should be understood and will not be repeated here.

[0270] In other words, the Range function in this application mainly performs the first step, first finding the score node where the object is located by address. Then, the second step is executed, that is, the addresses of num objects are obtained as much as possible through the RangeScore function. If not enough, the third step is continued. The third step is to obtain the previous Score node through the PrevScore function. If there is no other node with an index value greater than the target index value in the previous score node, the function exits, indicating that there are no more objects in other nodes that can be queried. If so, the function jumps to the second step.

[0271] In the above manner, by using the target index value of the target object and the number of other objects to be searched (i.e., the first value), and combining the target tree data structure to select other candidate objects in the same segment, not only can the complexity of the segment matching process be reduced, but also the interaction between objects can be promoted to enhance the social connection between the target candidate object and the target object, as well as to realize personalized recommendations such as preferences between objects, improve the interactive experience of the objects, and help to explore the potential points of interest of the objects.

[0272] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It can be understood that in order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. The object processing node in this application is described in detail below, please refer to Figure 12 , Figure 12This is a schematic diagram of an embodiment of an object processing node in an embodiment of the present application. The object processing node includes: an acquisition unit 1201, a determination unit 1202. Optionally, it may also include a search unit 1203 and an execution unit 1204.

[0273] An acquiring unit 1201 is configured to acquire a pending request, where the pending request includes a target indicator value and a first identifier, where the target indicator value is used to evaluate a ranking of a target object in a target business, and the first identifier is used to identify the target object;

[0274] An acquisition unit 1201 is configured to acquire a target tree data structure, the target tree data structure comprising N layers of cascaded search nodes, each layer of search nodes comprising an index value sequence and a number of objects, the index value sequence representing the ranking of index values ​​of multiple candidate objects, and the number of objects representing the number of multiple candidate objects, where N is a positive integer.

[0275] A determination unit 1202 is configured to traverse the target tree data structure and determine a target search node from N levels of cascaded search nodes based on a target index value;

[0276] a determining unit 1202, configured to determine a first number of objects based on a target index value, an index value sequence of a target search node, and the number of objects of the target search node, and to determine a second number of objects based on the target index value, a first identifier, an index value sequence of a target search node, and the number of objects of the target search node, wherein the index value of each candidate object corresponding to the first number of objects is greater than the target index value, and the index value of each candidate object corresponding to the second number of objects is greater than the target index value;

[0277] The determining unit 1202 is configured to determine a target ranking of the target object based on the first object quantity and the second object quantity.

[0278] In one possible design, in another implementation of another aspect of the embodiment of the present application, the N-level cascaded search nodes include a first search node of the first N-1 levels of cascade, and one or more second search nodes cascaded with the first search node of the N-1th level; the target tree data structure further includes: one or more third search nodes cascaded with the second search node, and a fourth search node cascaded with each third search node;

[0279] The number of objects in the first search node of the i-th level is the same as the number of objects in all the first search nodes of the cascaded i+1-th level. The index value sequence of the first search node of the i-th level includes multiple first index values. The numerical interval between each two adjacent first index values ​​corresponds to the index value sequence of the first search node of the cascaded i+1-th level. 1≤i<N, where i is an integer.

[0280] Each value interval in the first search node of the N-1th level includes an index value sequence of a second search node, each index value sequence of the second search node includes one or more second index values, and the sum of the number of objects in all the second search nodes is the same as the number of objects in the cascaded first search node of the N-1th level;

[0281] Each third search node includes an index value and the number of objects. The index values ​​of all third search nodes constitute the index value sequence of the second search node. The fourth search node includes an object identifier list. Each object identifier in the object identifier list is used to identify a candidate object.

[0282] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit 1202 is specifically configured to:

[0283] Step 1: Traverse the first search node of the i-th level. When the target index value is included in the first numerical interval in the index value sequence of the first search node of the i-th level, determine the first search node of the i+1-th level associated with the first numerical interval as the first child node, and the minimum value of the first numerical interval is less than or equal to the target index value, and the maximum value is greater than the target index value;

[0284] Step 2: Repeat step 1 until the first search node of the N-1th layer is traversed, and when the target index value matches the second index value in the index value sequence of the cascaded second search node, determine that the second search node corresponding to the index value match is the target search node.

[0285] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0286] The determining unit 1202 is specifically configured to: determine a second child node located at the same level as the target search node, wherein each index value in the index value sequence of the second child node is greater than the index value in the index value sequence of the target search node; determine a fourth child node located at the same level as the third child node, wherein the third child node includes the first search node in each level in the first N-1 levels cascaded with the target search node, and each index value in the index value sequence of the fourth child node is greater than the index value in the index value sequence of the third child node at the same level;

[0287] Extract the number of objects in the second child node and the number of objects in the fourth child node of each level;

[0288] The number of objects of the second child node and the sum of the number of objects of the fourth child nodes of all levels are calculated to obtain a first number of objects.

[0289] In one possible design, in another implementation of another aspect of the embodiment of the present application, the index value sequence of the search nodes at each level in the N-level cascade search nodes is arranged in descending order; the determining unit 1202 is specifically configured to:

[0290] The sibling node arranged on the left side of the target search node is determined as the second child node at the same level as the target search node.

[0291] In one possible design, in another implementation of another aspect of the embodiment of the present application, the index value sequence of the search nodes at each level in the N-level cascade search nodes is arranged in ascending order; the determining unit 1202 is specifically configured to:

[0292] The sibling node arranged on the right side of the target search node is determined as the second child node at the same level as the target search node.

[0293] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit 1202 is specifically configured to:

[0294] When the target index value matches the index value of any third search node associated with the target search node, matching the first identifier with a list of object identifiers in a fourth search node associated with the corresponding third search node;

[0295] When the first identifier matches any object identifier in the object identifier list of the fourth search node associated with the corresponding third search node, the number of objects in the target search node whose index value is greater than the target index value is counted;

[0296] The number of objects in the target search node when the index value is greater than the target index value is used as the second object number.

[0297] In one possible design, in another implementation of another aspect of the embodiment of the present application,

[0298] The acquisition unit 1201 may also be configured to, after traversing the target tree data structure and determining a target search node from the first search nodes in the N-layer cascade based on the target index value, acquire a first value, the first value being used to indicate the number of M target candidate objects, each target candidate object being used to interact with the target object, where M is a positive integer;

[0299] The determining unit 1202 is specifically configured to determine the object identifier of each target candidate object based on the target index value, the first value, and the object identifier list of the fourth search node associated with the target search node;

[0300] A searching unit 1203 is specifically configured to search for M target candidate objects based on the object identifiers of the M target candidate objects;

[0301] The execution unit 1204 is specifically configured to perform an interactive operation on the M target candidate objects and the target object.

[0302] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit 1202 is specifically configured to:

[0303] When there is a third index value greater than the target index value in the target search node, the object identifier corresponding to the first value is selected from the object identifier list of the fourth search node associated with the third search node corresponding to the third index value to determine the object identifier of each target candidate object.

[0304] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit 1202 is specifically configured to:

[0305] When the target search node does not have a third index value greater than the target index value, determining a fourth index value greater than the target index value from other second search nodes at the same level as the target search node;

[0306] An object identifier corresponding to the first value is selected from an object list of a fourth search node associated with the third search node corresponding to the fourth index value to determine an object identifier of each target candidate object.

[0307] In one possible design, in another implementation of another aspect of the embodiment of the present application, the other second search nodes at the same level include a fifth child node and a sixth child node, and the index value in the index value sequence of the fifth child node is greater than the index value in the index value sequence of the sixth child node; the determining unit 1202 is specifically configured to:

[0308] Determine a fourth index value greater than the target index value from the index value sequence of the fifth child node and the index value sequence of the sixth child node;

[0309] When the number of objects in the sixth child node is less than the first value, extracting the first object identifier corresponding to the number of objects in the sixth child node from the object identifier list of the fourth search node associated with each fourth index value of the sixth child node;

[0310] Calculate the difference between the first value and the number of objects in the sixth child node to obtain a second value;

[0311] Extracting a second object identifier corresponding to the second value from the object identifier list of the fourth search node associated with each fourth index value of the fifth child node;

[0312] Based on the first object identifier and the second object identifier, an object identifier corresponding to the first value is obtained.

[0313] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit 1202 is specifically configured to:

[0314] determining a first local ranking of the target object based on the first number of objects, and determining a second local ranking of the target object based on the second number of objects;

[0315] Based on the first local ranking and the second local ranking, a target ranking of the target object is obtained.

[0316] In one possible design, in another implementation of another aspect of the embodiment of the present application, the determining unit 1202 is specifically configured to:

[0317] Calculate the sum of the first local ranking and the second local ranking to obtain the first ranking position;

[0318] The next ranking position after the first ranking position is used as the target ranking of the target object.

[0319] In one possible design, in another implementation of another aspect of the embodiment of the present application, the target object includes a virtual player in a virtual game.

[0320] In one possible design, in another implementation of another aspect of the embodiment of the present application, the virtual game includes a full-chain game.

[0321] The sampling processing apparatus in the embodiment of the present application is described above from the perspective of modular functional entities. The object processing device in the embodiment of the present application is described below from the perspective of hardware processing.

[0322] Figure 13 This is a schematic diagram of the hardware structure of the object processing device provided in the embodiment of the present application. The object processing device may have relatively large differences due to different configurations or performances, for example, it may include but is not limited to the aforementioned Figure 12 The object processing nodes described are as follows. Figure 13As shown, the object processing device 100 may include one or more central processing units (CPUs) 1322 (e.g., one or more processors) and a memory 1332, and one or more storage media 1330 (e.g., one or more mass storage devices) for storing applications 1342 or data 1344. The memory 1332 and the storage medium 1330 may be either short-term storage or persistent storage. The program stored in the storage medium 1330 may include one or more modules (not shown), each of which may include a series of instruction operations on the object processing device 100. Furthermore, the CPU 1322 may be configured to communicate with the storage medium 1330 and execute the series of instruction operations in the storage medium 1330 on the object processing device 100. Exemplarily, the CPU 1322 is configured to execute the application 1342 stored in the storage medium 1330, thereby implementing the object processing method provided in the above-mentioned embodiments of the present application.

[0323] The object processing device 100 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1358, and / or one or more operating systems 1341, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0324] For example, Figure 13 The CPU 1322 in the object processing device 100 can execute the following instructions by calling the computer execution instructions stored in the memory 1332: Figures 4 to 11 The method in the corresponding method embodiment.

[0325] Specifically, Figure 12 The functions / implementation processes of the determination unit 1202, the search unit 1203, and the execution unit 1204 can be realized by Figure 13 The central processing unit 1322 in the memory 1332 calls the computer execution instructions stored in the memory 1332 to achieve this. Figure 12 The function / implementation process of the acquisition unit 1201 can be achieved by Figure 13 It is implemented by the input and output interface 1358 in.

[0326] The steps performed by the object processing device 100 in the above embodiment can be based on the Figure 13 The object shown handles the device structure.

[0327] A computer-readable storage medium is also provided in an embodiment of the present application, on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the steps of the method described in the above embodiments are implemented.

[0328] A computer program product is also provided in an embodiment of the present application, including a computer program or instructions, which, when executed by a processor, implements the steps of the methods described in the above embodiments.

[0329] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0330] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0331] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0332] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0333] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a server or terminal device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store computer programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0334] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for object processing, characterized in that: Applied to an object processing node in a blockchain network, the method comprises: Obtaining a pending request, where the pending request includes a target indicator value and a first identifier, where the target indicator value is used to evaluate a ranking of a target object in a target business, and the first identifier is used to identify the target object, where the target object includes a virtual player in a virtual game, an advertisement in an advertising scenario, a product in a shopping scenario, content in a social media scenario, search results in a search scenario, or a work in an entertainment scenario; Obtain a target tree data structure, the target tree data structure including N layers of cascaded search nodes, the search nodes including an index value sequence and a number of objects, the index value sequence being used to represent the ranking of index values ​​of multiple candidate objects, the number of objects being used to represent the number of the multiple candidate objects, and N being a positive integer; Traversing the target tree data structure, and determining a target search node from the N-level cascaded search nodes based on the target index value; Determine a first number of objects based on the target index value, the index value sequence of the target search node, and the number of objects of the target search node; determine a second number of objects based on the target index value, the first identifier, the index value sequence of the target search node, and the number of objects of the target search node, wherein the index value of each candidate object corresponding to the first number of objects is greater than the target index value, and the index value of each candidate object corresponding to the second number of objects is greater than the target index value; A target ranking of the target object is determined based on the first object quantity and the second object quantity.

2. The method according to claim 1, characterized in that The N-layer cascade search nodes include a first search node of the first N-1 layers of cascade, and one or more second search nodes cascaded with the first search node of the N-1th layer; the target tree data structure further includes: one or more third search nodes cascaded with the second search nodes, and a fourth search node cascaded with each of the third search nodes; The number of objects in the first search node of the i-th level is the same as the number of objects in all the first search nodes of the cascaded i+1-th level. The index value sequence of the first search node of the i-th level includes multiple first index values. The numerical interval between each two adjacent first index values ​​corresponds to the index value sequence of the cascaded i+1-th level first search nodes. 1≤i<N, where i is an integer. Each of the numerical intervals in the first search node of the N-1th level comprises an index value sequence of the second search node, each index value sequence of the second search node comprises one or more second index values, and the sum of the number of objects of all the second search nodes is the same as the number of objects of the cascaded first search node of the N-1th level; Each of the third search nodes includes an index value and the number of objects, the index values ​​of all the third search nodes constitute the index value sequence of the second search node, and the fourth search node includes an object identifier list, and each object identifier in the object identifier list is used to identify one of the candidate objects.

3. The method according to claim 2, characterized in that Traversing the target tree data structure and determining a target search node from the N-layer cascaded search nodes based on the target index value, comprising: Step 1: Traversing the first search node of the i-th level, when the target index value is included in the first numerical interval in the index value sequence of the first search node of the i-th level, determining the first search node of the i+1-th level associated with the first numerical interval as the first child node, and the minimum value of the first numerical interval is less than or equal to the target index value, and the maximum value is greater than the target index value; Step 2: Repeat step 1 until traversing to the first search node of the N-1th layer, and when the target index value matches the second index value in the index value sequence of the cascaded second search node, determine that the second search node corresponding to the index value match is the target search node.

4. The method according to any one of claims 2 to 3, characterized in that Determining a first number of objects based on the target index value, the index value sequence of the target search node, and the number of objects of the target search node includes: Determine a second child node at the same level as the target search node, wherein each index value in the index value sequence of the second child node is greater than an index value in the index value sequence of the target search node; Determine a fourth child node at the same level as the third child node, wherein the third child node includes the first search node of each level in the first N-1 levels cascaded with the target search node, and each index value in the index value sequence of the fourth child node is greater than the index value in the index value sequence of the third child node at the same level; Extracting the number of objects of the second sub-node and the number of objects of the fourth sub-node at each level; The number of objects of the second sub-node and the sum of the number of objects of the fourth sub-nodes of all levels are calculated to obtain a first number of objects.

5. The method according to claim 4, characterized in that The index value sequence of the search nodes at each level in the N-level cascade search nodes is arranged in descending order; Determining a second child node at the same level as the target search node includes: The sibling node arranged on the left side of the target search node is determined as the second child node located at the same level as the target search node.

6. The method according to claim 4, characterized in that The index value sequence of the search nodes at each level in the N-level cascade search nodes is arranged in ascending order; Determining a second child node at the same level as the target search node includes: The sibling node arranged on the right side of the target search node is determined as the second child node located at the same level as the target search node.

7. The method according to claim 2, characterized in that Determining the second number of objects based on the target index value, the first identifier, the index value sequence of the target search node, and the number of objects of the target search node includes: When the target index value matches the index value of any third search node associated with the target search node, matching the first identifier with a list of object identifiers in a fourth search node associated with the third search node; When the first identifier matches any of the object identifiers in the object identifier list in the fourth search node associated with the third search node, counting the number of objects in the target search node whose index value is greater than the target index value; The number of objects in the target search node when the index value is greater than the target index value is used as the second object number.

8. The method according to claim 2, characterized in that After traversing the target tree data structure and determining a target search node from the N-layer cascade search nodes based on the target index value, the method further includes: Obtaining a first value, where the first value is used to indicate the number of M target candidate objects, each of the target candidate objects being used to interact with the target object, where M is a positive integer; Determining an object identifier of each of the target candidate objects based on the target index value, the first value, and a list of object identifiers of fourth search nodes associated with the target search node; searching for M target candidate objects based on the object identifiers of the M target candidate objects; An interactive operation is performed on the M target candidate objects and the target object.

9. The method according to claim 8, characterized in that Determining the object identifier of each target candidate object based on the target index value, the first value, and a list of object identifiers of fourth search nodes associated with the target search node includes: When there is a third index value greater than the target index value in the target search node, the object identifier corresponding to the first value is selected from the object identifier list of the fourth search node associated with the third search node corresponding to the third index value to determine the object identifier of each target candidate object.

10. The method according to claim 9, characterized in that Determining the object identifier of each target candidate object based on the target index value, the first value, and a list of object identifiers of fourth search nodes associated with the target search node includes: When there is no third index value greater than the target index value in the target search node, determining a fourth index value greater than the target index value from other second search nodes at the same level as the target search node; From the object list of the fourth search node associated with the third search node corresponding to the fourth index value, select the object identifier corresponding to the first value to determine the object identifier of each of the target candidate objects.

11. The method according to claim 10, characterized in that The other second search nodes at the same level include a fifth child node and a sixth child node, and the index value in the index value sequence of the fifth child node is greater than the index value in the index value sequence of the sixth child node; Determining a fourth index value greater than the target index value from other second search nodes at the same level as the target search node includes: Determining a fourth index value greater than the target index value from the index value sequence of the fifth child node and the index value sequence of the sixth child node; Selecting an object identifier corresponding to the first value from an object list of a fourth search node associated with the third search node corresponding to the fourth index value includes: When the number of objects of the sixth child node is less than the first value, extracting the first object identifier corresponding to the number of objects of the sixth child node from the object identifier list of the fourth search node associated with each fourth index value of the sixth child node; Calculate the difference between the first value and the number of objects of the sixth child node to obtain a second value; Extracting a second object identifier corresponding to the second value from the object identifier list of the fourth search node associated with each fourth index value of the fifth child node; An object identifier corresponding to the first value is obtained based on the first object identifier and the second object identifier.

12. The method according to any one of claims 1 to 3 and 7 to 11, characterized in that Determining a target ranking of the target object based on the first object quantity and the second object quantity includes: determining a first local ranking of the target object based on the first number of objects, and determining a second local ranking of the target object based on the second number of objects; A target ranking of the target object is obtained based on the first local ranking and the second local ranking.

13. The method according to claim 12, characterized in that Obtaining a target ranking of the target object based on the first local ranking and the second local ranking includes: Calculate the sum of the first local ranking and the second local ranking to obtain a first ranking position; The ranking position after the first ranking position is used as the target ranking of the target object.

14. The method according to claim 1, wherein The virtual game includes a full-chain game.

15. An object processing node, characterized in that: include: an acquisition unit, configured to acquire a pending request, the pending request including a target indicator value and a first identifier, the target indicator value being used to evaluate a ranking of a target object in a target business, the first identifier being used to identify the target object, the target object including a virtual player in a virtual game, an advertisement in an advertising delivery scenario, a product in a shopping scenario, content in a social media scenario, a search result in a search scenario, or a work in an entertainment scenario; The acquisition unit is configured to acquire a target tree data structure, the target tree data structure comprising N layers of cascaded search nodes, the search nodes at each layer comprising an index value sequence and a number of objects, the index value sequence being used to represent the ranking of index values ​​of a plurality of candidate objects, the number of objects being used to represent the number of the plurality of candidate objects, and N being a positive integer; a determining unit, configured to traverse the target tree data structure and determine a target search node from the N-layer cascaded search nodes based on the target index value; The determining unit is configured to determine a first number of objects based on the target index value, the index value sequence of the target search node, and the number of objects of the target search node, and to determine a second number of objects based on the target index value, the first identifier, the index value sequence of the target search node, and the number of objects of the target search node, wherein the index value of each candidate object corresponding to the first number of objects is greater than the target index value, and the index value of each candidate object corresponding to the second number of objects is greater than the target index value; The determining unit is configured to determine a target ranking of the target object based on the first object quantity and the second object quantity.

16. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the object processing method according to any one of claims 1 to 14 are implemented.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the object processing method according to any one of claims 1 to 14 are implemented.

18. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the object processing method according to any one of claims 1 to 14 are implemented.

Citation Information

Patent Citations

  • Node determination method and device, electronic equipment and storage medium

    CN112115030A

  • Code snippet recommendation method and system based on abstract syntax tree

    CN113312904A