A game event prompt method

By building a red dot tree structure and binding it to game events, the problems of complex and missed addition of red dot prompt systems in the existing technology are solved, and efficient prompt point management and real-time optimization are achieved.

CN118454231BActive Publication Date: 2025-02-18GUANGZHOU AIYOU INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410628772.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2025-02-18
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

The red dot prompt system in the existing game interface is complex to implement, the management prompt points are inefficient and easy to miss the addition of prompt points.

Method used

By building a red dot tree structure, the display components of the game interface are used as tree nodes, the tree structure is built according to the hierarchical relationship of the UI interface, and the tree nodes are bound to game events. Use red dot prompts or adjust the tree structure according to the display mode to improve prompt efficiency and prevent missed additions.

Benefits of technology

Improve the efficiency of adding prompt points to interface elements in the game interface, preventing the missed addition of prompt points, and optimizing the real-time nature of the red dot tree structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118454231B_ABST
    Figure CN118454231B_ABST
Patent Text Reader

Abstract

The present invention provides a game event prompt method, wherein the method includes reading a UI interface, the UI interface includes a display component; constructing a red dot tree structure according to the display component and the UI interface; binding a tree node in the red dot tree structure to a game event; obtaining a display mode, and if the display mode is a prompt mode, performing a red dot prompt on the interface element associated with the tree node where the event occurs. Organizing different display components in the UI interface by a red dot tree structure can reflect the association relationship between different display components. Since the tree node has a root node, when an event occurs in the tree node, an event also occurs in the root node of the tree node. Based on the association relationship between the tree node and the root node, a prompt point is added to the interface element corresponding to the tree node where the event occurs, and the interface element corresponding to the root node of the tree node, thereby improving the efficiency of adding prompt points to the interface elements in the game interface and preventing the missing of prompt points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of game development, and in particular to a game event prompting method. Background Art

[0002] In the UI (User Interface) system of game software, there is often a red dot prompt system. The red dot prompt system is to add a prompt point to the interface and / or button where an event occurs in the game interface, prompting the player that the button can be clicked.

[0003] However, due to the large number of interfaces and game events in the game, the implementation of the red dot prompt system is relatively complex. The game interface is nested multiple times, which makes it difficult to manage prompt points. The efficiency of adding prompt points to interface elements of the game interface, such as buttons and labels, is low, and it is easy to miss adding prompt points.

[0004] Therefore, a method is needed that is efficient in adding prompt points to interface elements in a game interface and can prevent missing prompt points from being added. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the purpose of the present invention is to provide a game event prompt method, which is more efficient in adding prompt points to interface elements in the game interface and can prevent missing prompt points.

[0006] A game event prompting method, comprising:

[0007] Reading a UI interface, wherein the UI interface includes a display component;

[0008] Construct a red dot tree structure according to the display component and the UI interface;

[0009] Binding the tree nodes in the red dot tree structure to the game events;

[0010] Obtaining a display mode, and if the display mode is a prompt mode, providing a red dot prompt to the interface element associated with the tree node where the event occurs;

[0011] If the display mode is a structure adjustment mode, weights are assigned to the connecting edges in the red dot tree structure; the weights are used to represent the degree of association between different tree nodes; a node to be adjusted is selected, and the minimum weight and average weight within the neighborhood of the node to be adjusted are screened out; the ratio of the minimum weight to the average weight is calculated to obtain a weight ratio, and if the weight ratio is less than a weight ratio threshold, the red dot tree structure is adjusted.

[0012] In a preferred technical solution of the present invention, the step of constructing a red dot tree structure according to the display component and the UI interface includes:

[0013] Generate a root node;

[0014] Extracting the display component in the UI interface;

[0015] According to the hierarchical relationship of the UI interface, the display components are used as tree nodes to construct a red dot tree structure; wherein each of the tree nodes corresponds to one of the display components.

[0016] In a preferred technical solution of the present invention, the step of binding the tree nodes in the red dot tree structure with the game events comprises:

[0017] Classifying the tree nodes in the red dot tree structure to obtain node labels;

[0018] The tree node is bound to the corresponding game event according to the node label.

[0019] In a preferred technical solution of the present invention, providing a red dot prompt to the interface element associated with the tree node where the event occurs includes:

[0020] Taking the tree node where the event occurs as the first target node;

[0021] Traverse upward from the first target node to the root node;

[0022] Add 1 to the node count of the traversed tree node;

[0023] The interface elements associated with the tree nodes whose node counts are greater than 0 are given red dot prompts.

[0024] In a preferred technical solution of the present invention, after acquiring the display mode, the method further includes:

[0025] If the display mode is the counting mode, the tree node where the event occurs is used as the first target node;

[0026] Traverse upward from the first target node to the root node;

[0027] Add 1 to the node count of the traversed tree node;

[0028] The node count is displayed for each of the tree nodes.

[0029] In a preferred technical solution of the present invention, after displaying the node count of each of the tree nodes, the method further includes:

[0030] The tree node of the release event is used as the second target node;

[0031] Traverse upward from the second target node to the root node;

[0032] Subtract 1 from the node count of the traversed tree node;

[0033] The node count is displayed for each of the tree nodes.

[0034] In a preferred technical solution of the present invention, after reducing the node count of the traversed tree node by 1, the method further includes:

[0035] Detect whether there is a tree node whose node count is less than 0;

[0036] If present, the node count that is less than 0 is set to 0.

[0037] In a preferred technical solution of the present invention, the step of binding the tree node with the corresponding game event according to the node label includes:

[0038] Allocating interface elements to corresponding tree nodes according to the node labels;

[0039] Establish an association relationship between the tree node and the corresponding interface element; wherein the interface element includes an interface button and an interface label.

[0040] In a preferred technical solution of the present invention, the step of providing a red dot prompt to the interface element associated with the tree node whose node count is greater than 0 includes:

[0041] Find the interface element associated with the tree node whose node count is greater than 0;

[0042] A prompt symbol is displayed at a position corresponding to the interface element; wherein the prompt symbol is a red prompt dot.

[0043] In a preferred technical solution of the present invention, adjusting the red dot tree structure includes:

[0044] Calculating the sum of node counts of all the tree nodes in the neighborhood of the node to be adjusted to obtain a local count sum;

[0045] Calculating the ratio of the node count of each of the tree nodes in the neighborhood of the node to be adjusted to the sum of the local counts to obtain a count ratio;

[0046] The weight of the corresponding connecting edge is increased or decreased according to the counting ratio.

[0047] The beneficial effects of the present invention are:

[0048] A game event prompt method provided by the present invention includes reading a UI interface, and the UI interface includes a display component. A red dot tree structure is constructed according to the display component and the UI interface, and a plurality of display components can be orderly arranged and displayed using the red dot tree structure. The tree node in the red dot tree structure is bound to the game event, and the display mode is obtained. If the display mode is a prompt mode, when a game event occurs, a red dot prompt is performed on the interface element associated with the tree node where the event occurs. By organizing different display components in the UI interface through the red dot tree structure, the association relationship between different display components can be reflected. Since the tree node has a root node, when an event occurs in the tree node, an event also occurs in the root node of the tree node. Based on the association relationship between the tree node and the root node, a prompt point is added to the interface element corresponding to the tree node where the event occurs, and the interface element corresponding to the root node of the tree node, thereby improving the efficiency of adding prompt points to the interface elements in the game interface and preventing the missing of adding prompt points. If the display mode is the structure adjustment mode, weights are assigned to the connecting edges in the red dot tree structure; weights are used to represent the degree of association between different tree nodes; the node to be adjusted is selected, and the minimum weight and average weight in the neighborhood of the node to be adjusted are calculated; the ratio of the minimum weight and the average weight is calculated to obtain the weight ratio. If the weight ratio is less than the weight ratio threshold, the red dot tree structure is adjusted, and the tree nodes with large weights can be counted first, thereby reducing the delay in the node counting of the tree nodes with large weights and the parent nodes of the tree nodes, thereby ensuring the real-time nature of the node counting of the tree nodes of the red dot tree structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a flowchart of the game event prompting method provided by the present invention;

[0050] Figure 2 It is a schematic diagram of a process of constructing a red dot tree structure according to a display component and a UI interface provided by the present invention;

[0051] Figure 3 It is a schematic diagram of a process of providing a red dot prompt for an interface element where an event occurs, provided by the present invention;

[0052] Figure 4 is a schematic diagram of a red dot tree structure in a counting mode provided by the present invention;

[0053] Figure 5 It is a schematic diagram of the interface system provided by the present invention. DETAILED DESCRIPTION

[0054] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0055] Example 1

[0056] like Figure 1 As shown, this embodiment provides a game event prompt method, including:

[0057] S1: Reading a UI interface, wherein the UI interface includes a display component.

[0058] The UI interface of a computer system is an interface for users to interact with the computer system. The UI interface has interface elements such as windows, buttons, and labels. This embodiment takes the UI interface as a computer game interface as an example.

[0059] The display component is a submodule of the interface system. In object-oriented programming, all interface components in the interface system have a common base class. The display component is a subclass of the base class. The display component is associated with other interface components, i.e., interface elements, in the UI interface.

[0060] A UI interface includes one or more display components, each of which is identified by a unique ID or name. The display component is used to display a prompt point at the location of the interface element associated with it. This embodiment takes a red prompt point as an example.

[0061] S2: Constructing a red dot tree structure according to the display component and the UI interface.

[0062] The display components are used as tree nodes in the tree structure, and all tree nodes are arranged according to the hierarchical relationship of the UI interface to obtain a red dot tree structure.

[0063] The red dot tree structure contains a root node and multiple child nodes. Each child node has a parent node. A parent node can have one child node or multiple child nodes.

[0064] S3: Bind the tree nodes in the red dot tree structure to the game events.

[0065] The red dot tree structure contains multiple types of tree nodes, and each tree node corresponds to a type of game event. For example, the upgrade node in the red dot tree structure is bound to the upgrade event; the mosaic node in the red dot tree structure is bound to the mosaic event. The binding in this embodiment means that when a related event occurs in the game, the corresponding node will receive a signal.

[0066] S4: Obtaining a display mode, and if the display mode is a prompt mode, providing a red dot prompt to the interface element associated with the tree node where the event occurs.

[0067] The display mode includes prompt mode and counting mode. When an event occurs in the interface element associated with the tree node, a red prompt point is displayed at the location of the interface element to prompt the user that an event has occurred.

[0068] The counting mode displays the number of events corresponding to the tree nodes in the red dot tree structure, and the number of events is greater than or equal to 0. If the number of events is equal to 0, it means that no event has occurred in the interface element associated with the tree node.

[0069] S5: If the display mode is the structure adjustment mode, weights are assigned to the connecting edges in the red dot tree structure; the weights are used to represent the degree of association between different tree nodes; a node to be adjusted is selected, and the minimum weight and average weight in the neighborhood of the node to be adjusted are screened out; the ratio of the minimum weight to the average weight is calculated to obtain a weight ratio, and if the weight ratio is less than a weight ratio threshold, the red dot tree structure is adjusted.

[0070] Step S5 includes the following steps S51-S53:

[0071] S51: Calculate the sum of node counts of all the tree nodes in the neighborhood of the node to be adjusted to obtain a local count sum.

[0072] S52: Calculate the ratio of the node count of each of the tree nodes in the neighborhood of the node to be adjusted to the total local count to obtain a count ratio.

[0073] S53: Increase or decrease the weight of the corresponding connecting edge according to the counting ratio.

[0074] The greater the correlation between two tree nodes, the longer the connection edge connecting the two tree nodes. Select the node to be adjusted and the search radius, and you can adjust the size of the search radius according to the situation. With the node to be adjusted as the center, filter out all the complete connection edges within the search radius.

[0075] Each connection edge corresponds to a weight. If 5 complete connection edges are searched, there are 5 weights. Use descending or ascending sorting to filter out the minimum weight from all weights in the neighborhood of the node to be adjusted, and calculate the average weight of all weights in the neighborhood of the node to be adjusted.

[0076] Preferably, the sum of the weights of all tree nodes in the neighborhood of the node to be adjusted is 1, and the weight ratio threshold is set to 0.6. If the weight ratio is less than the weight ratio threshold, the red dot tree structure is adjusted; if the weight ratio is greater than or equal to the weight ratio threshold, the red dot tree structure is not adjusted.

[0077] When an event is triggered or released, the node count of the relevant tree node will change. Calculate the sum of the node counts of all the tree nodes in the neighborhood of the node to be adjusted to obtain the local count sum. Calculate the ratio of the node count of each tree node in the neighborhood of the node to be adjusted to the local count sum to obtain the count ratio. If the count ratio is greater than the count ratio threshold, increase the weight of the connection edge between the tree node corresponding to the count ratio and the node to be adjusted. If the count ratio is less than the count ratio threshold, reduce the weight of the connection edge between the tree node corresponding to the count ratio and the node to be adjusted. If the count ratio is equal to the count ratio threshold, no processing is performed. Preferably, the count ratio threshold is set to 0.5.

[0078] When the weight ratio is less than the weight ratio threshold, the weight of the corresponding connecting edge is increased or decreased according to the count ratio, so that the weight distribution between the tree nodes in the adjusted red dot tree structure is more uniform. The larger the count ratio, the higher the frequency of events of the corresponding tree node. The weight between the tree node and the corresponding node to be adjusted is increased to make the connection between the tree node and the node to be adjusted closer. The tree nodes with large weights can be counted first, and the delay of the node counting of the tree nodes with large weights and the parent nodes of the tree nodes is reduced, thereby ensuring the real-time node counting of the tree nodes of the red dot tree structure.

[0079] A game event prompt method provided in this embodiment includes reading a UI interface, and the UI interface includes a display component. A red dot tree structure is constructed according to the display component and the UI interface, and multiple display components can be arranged and displayed in an orderly manner using the red dot tree structure. The tree node in the red dot tree structure is bound to the game event, and the display mode is obtained. If the display mode is a prompt mode, when a game event occurs, a red dot prompt is performed on the interface element associated with the tree node where the event occurs. By organizing different display components in the UI interface through the red dot tree structure, the association relationship between different display components can be reflected. Since the tree node has a root node, when an event occurs in the tree node, an event also occurs in the root node of the tree node. Based on the association relationship between the tree node and the root node, a prompt point is added to the interface element corresponding to the tree node where the event occurs, and the interface element corresponding to the root node of the tree node, thereby improving the efficiency of adding prompt points to the interface elements in the game interface and preventing the missing of prompt points. If the display mode is the structure adjustment mode, weights are assigned to the connecting edges in the red dot tree structure; weights are used to represent the degree of association between different tree nodes; the node to be adjusted is selected, and the minimum weight and average weight in the neighborhood of the node to be adjusted are calculated; the ratio of the minimum weight and the average weight is calculated to obtain the weight ratio. If the weight ratio is less than the weight ratio threshold, the red dot tree structure is adjusted, and the tree nodes with large weights can be counted first, thereby reducing the delay in the node counting of the tree nodes with large weights and the parent nodes of the tree nodes, thereby ensuring the real-time nature of the node counting of the tree nodes of the red dot tree structure.

[0080] Example 2

[0081] This embodiment only describes the differences from Embodiment 1, such as Figure 2 As shown, the red dot tree structure is constructed according to the display component and the UI interface, including:

[0082] S21: Generate a root node.

[0083] S22: Extracting the display component in the UI interface.

[0084] S23: According to the hierarchical relationship of the UI interface, the display components are used as tree nodes to construct a red dot tree structure; wherein each of the tree nodes corresponds to one of the display components.

[0085] After the root node is generated, all display components in the UI interface are extracted, and the display components are used as tree nodes according to the UI hierarchy to generate a red dot tree structure.

[0086] There are multiple UI interfaces in the interface system. The UI interfaces have a hierarchy. There is a nested relationship between different UI interfaces. You can enter a lower-level UI interface from a higher-level UI interface. Each UI interface has one or more interface elements, including buttons and labels.

[0087] like Figure 5 As shown, the interface system includes the main interface, equipment interface, copy interface, weapon interface, armor interface and accessories interface. After opening the main interface, you can enter the equipment interface and copy interface. After opening the equipment interface, you can enter the weapon interface, armor interface and accessories interface. The main interface is provided with an equipment button and a copy button, the equipment interface is provided with a weapon button, an armor button and an accessories button, and the weapon interface is provided with an upgrade button and an inlay button.

[0088] After entering the UI interface, click an interface element such as a button to generate a corresponding event. Each interface element is associated with a display component. After an event occurs, the node count of the tree node in the red dot tree structure corresponding to the event is increased by 1.

[0089] The red dot tree structure is established according to the UI level. The red dot tree structure is stored in the disk using a description file such as a json file. The description file is read when the software system is started to build the red dot tree structure.

[0090] The step of binding the tree nodes in the red dot tree structure with the game events comprises:

[0091] S31: Classify the tree nodes in the red dot tree structure to obtain node labels.

[0092] S32: Binding the tree node to the corresponding game event according to the node label.

[0093] Step S32 includes the following steps S321-S322:

[0094] S321: Allocate an interface element to the corresponding tree node according to the node label.

[0095] S322: Establishing an association relationship between the tree node and the corresponding interface element; wherein the interface element includes an interface button and an interface label.

[0096] Node tags include equipment tags, copy tags, weapon tags, armor tags, accessories tags, weapon upgrade tags, and weapon inlay tags. Just like the parent node and child node in the red dot tree structure, there is also an inclusion relationship between node tags. For example, the equipment tag has 3 child tags, namely weapon tag, armor tag, and accessories tag. The weapon tag has 2 child tags, namely weapon upgrade tag and weapon inlay tag.

[0097] An association relationship between a tree node and a corresponding interface element is established so that the position of the tree node corresponding to the display component in the red dot tree structure is the same as the position of the interface element corresponding to the display component in the UI interface hierarchy.

[0098] This embodiment takes the Unity engine based on C# programming as an example, and uses delegation to realize the association relationship between tree nodes and game events. Delegation can split a complex method logic into multiple methods and form a chain, and can also realize callback injection.

[0099] Unity engine is a cross-platform game engine that supports multiple scripting languages. The commonly used scripting language of Unity engine is C#. Unity engine provides powerful scripting support and IDE (Integrated Development Environment). Write C# code in IDE, edit it with Unity engine editor, and debug it with Unity engine debugging tool.

[0100] The Unity engine has the following advantages:

[0101] (1) Easy to use: The Unity engine's operating interface is intuitive and easy to learn and use.

[0102] (2) Cross-platform: The Unity engine can run on multiple platforms, such as Windows, Mac OS X, iOS, and Android.

[0103] (3) High efficiency: The Unity engine has an efficient rendering engine that can run large games smoothly.

[0104] (4) Adequate plug-ins and tools: The Unity engine has a large number of plug-ins and tools that can help developers complete game development more conveniently.

[0105] like Figure 4 As shown, there are two child nodes under the root node, namely tree node 1 and tree node 2. The node label of tree node 1 is the equipment label, which corresponds to the equipment button on the main interface; the node label of tree node 2 is the copy label, which corresponds to the copy button on the main interface. There are three child nodes under tree node 1, namely tree node 3, tree node 4 and tree node 5. The node label of tree node 3 is the weapon label, which corresponds to the weapon button on the equipment interface; the node label of tree node 4 is the armor label, which corresponds to the armor button on the equipment interface; the node label of tree node 5 is the accessories label, which corresponds to the accessories button on the equipment interface. There are two child nodes under tree node 3, namely tree node 6 and tree node 7. The node label of tree node 6 is the weapon upgrade label, which corresponds to the upgrade button on the weapon interface; the node label of tree node 7 is the weapon inlay label, which corresponds to the inlay button in the weapon interface.

[0106] like Figure 3 As shown, the red dot prompt for the interface element associated with the tree node where the event occurs includes:

[0107] S42: taking the tree node where the event occurs as the first target node.

[0108] S43: Traverse upward from the first target node to the root node.

[0109] S44: adding 1 to the node count of the traversed tree node.

[0110] S45: Prompt the interface element associated with the tree node whose node count is greater than 0 with a red dot.

[0111] Before step S42, step S41 is also included: obtaining the display mode, if the display mode is the prompt mode.

[0112] When an event occurs on a tree node, the tree node is used as the first target node. The parent node of the first target node and the parent node of the parent node are recursively traversed upward until the root node is reached. The node count of the traversed tree node is increased by 1, and the root node is not counted.

[0113] Start traversing upward from the first target node, and after traversing to the root node, update the node counts of all tree nodes on the traversal path except the root node. After the weapon upgrade event occurs, the node counts of all tree nodes are as follows Figure 4 shown.

[0114] Step S45 includes the following steps S451-S452:

[0115] S451: Searching for the interface element associated with the tree node whose node count is greater than 0.

[0116] S452: Displaying a prompt symbol at a position corresponding to the interface element; wherein the prompt symbol is a red prompt dot.

[0117] If the node count of a tree node is less than 0, the node count of the tree node is set to 0. The node count of each tree node is counted, and tree nodes with node counts greater than 0 are filtered out, and red prompt points are displayed at the positions corresponding to the interface elements associated with the tree nodes that meet the conditions.

[0118] In the game event prompt method of this embodiment, a red dot tree structure is constructed according to the display component and the UI interface, including generating a root node and extracting the display component in the UI interface. According to the hierarchical relationship of the UI interface, the display component is used as a tree node to construct a red dot tree structure. The tree node where the event occurs is used as the first target node, and traverses upward from the first target node until the root node. The node count of the traversed tree node is increased by 1, and the interface elements associated with the tree nodes whose node count is greater than 0 are prompted with a red dot. No other calculations are required, and it has good real-time performance. In addition, there is an association relationship between the parent node and the child node in the red dot tree structure. After the event is triggered, the node count is updated by traversing upward to prevent the missing of prompt points.

[0119] Example 3

[0120] This embodiment only describes the differences from Embodiment 1. After acquiring the display mode, the following steps are further included:

[0121] S51: If the display mode is the counting mode, the tree node where the event occurs is used as the first target node.

[0122] S52: Traverse upward from the first target node to the root node.

[0123] S53: adding 1 to the node count of the traversed tree node.

[0124] S54: Display the node count of each of the tree nodes.

[0125] In counting mode, the number of events corresponding to each tree node is displayed. After the user opens the red dot structure tree, the user can observe the number of events corresponding to different tree nodes. The node count is used to remind user interface elements such as buttons how many things need to be processed.

[0126] As an example, there is an equipment button in the main interface. Click it to open the equipment interface, which contains a weapon button, an armor button, and an accessories button. Click the weapon button to enter the weapon interface, where an upgrade button and an inlay button will appear. If the user meets the conditions for upgrading the weapon, and the node count of the tree node corresponding to the upgrade button in the weapon interface is 0, the node count of the tree node corresponding to the upgrade button becomes 1. The node count of the tree node corresponding to the weapon button in the equipment interface changes from 0 to 1, and the node count of the tree node corresponding to the equipment button in the main interface changes from 0 to 1. If the user triggers an event related to armor, the armor button in the equipment interface changes from 0 to 1, and the equipment button in the main interface changes from 0 to 1.

[0127] After displaying the node count of each of the tree nodes, the method further includes:

[0128] S61: taking the tree node of the release event as the second target node.

[0129] S62: Traverse upward from the second target node to the root node.

[0130] S63: Subtract 1 from the node count of the traversed tree node.

[0131] S64: Display the node count of each of the tree nodes.

[0132] As an example, there are two child nodes under the root node of the red dot tree structure, namely, tree node 1 and tree node 2. There are three child nodes under tree node 1, namely, tree node 3, tree node 4 and tree node 5. There are two child nodes under tree node 3, namely, tree node 6 and tree node 7. Tree node 1 corresponds to the equipment button in the main interface, and tree node 2 corresponds to the copy button in the main interface. Tree node 3 corresponds to the weapon button in the equipment interface, tree node 4 corresponds to the armor button in the equipment interface, and tree node 5 corresponds to the accessories button in the equipment interface. Tree node 6 corresponds to the upgrade button in the weapon interface, and tree node 7 corresponds to the inlay button in the weapon interface. If the user changes from satisfying the inlay conditions of the weapon to not satisfying the inlay conditions of the weapon, the node counts of tree node 7, tree node 3 and tree node 1 are all reduced by 1, so that the node count of tree node 7 changes from 1 to 0, the node count of tree node 3 changes from 2 to 1, and the node count of tree node 1 changes from 3 to 2.

[0133] After step S63, steps S64'-S65' are also included:

[0134] S64': Detect whether there is a tree node whose node count is less than 0.

[0135] S65′: If it exists, set the node count that is less than 0 to 0.

[0136] When the event is released, traverse upward from the second target node, and reduce the node count of each tree node traversed by 1. On the basis that the node count of one or several tree nodes is wrong, performing the node count reduction operation may cause tree nodes with node counts less than 0 in the red dot tree structure. Setting the node counts less than 0 to 0 can correct the tree nodes with node count errors.

[0137] The game event prompt method of this embodiment uses the tree node where the event occurs as the first target node in the counting mode, and traverses upward from the first target node until the root node. The node count of the traversed tree node is increased by 1, and the node count of each tree node is displayed. The tree node that releases the event is used as the second target node, and traverses upward from the second target node until the root node. The node count of the traversed tree node is reduced by 1, and the node count of each tree node is displayed. Detect whether there are tree nodes with node counts less than 0. If so, set the node counts less than 0 to 0. The user opens the red dot tree structure and can observe the node count of each tree node. There is an association between the parent node and the child node, which can improve the accuracy of counting the node count of each tree node when triggering and releasing events, and avoid the situation of incorrectly counting node counts.

[0138] Example 5

[0139] This embodiment provides an electronic device, which includes a memory and a processor.

[0140] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0141] Memory may include various types of storage units such as system memory, read-only memory (ROM), and permanent storage.

[0142] The memory stores executable codes, and when the executable codes are processed by the processor, the processor can execute part or all of the game event prompt method mentioned above.

[0143] Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values ​​of the parts and steps set forth in these embodiments do not limit the scope of the application. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a restriction. Therefore, other examples of exemplary embodiments can have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, and therefore, once a certain item is defined in an accompanying drawing, it does not need to be further discussed in the subsequent accompanying drawings.

[0144] It should be understood that spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is inverted, a device described as "above" or "above" other devices or structures would then be positioned "below" or "below" the other devices or structures. Thus, the exemplary term "above" can include both the orientations of "above" and "below." The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used herein should be interpreted accordingly.

[0145] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of this application.

[0146] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A game event prompting method, characterized in that: include: Reading a UI interface, wherein the UI interface includes a display component; Construct a red dot tree structure according to the display component and the UI interface; Binding the tree nodes in the red dot tree structure to the game events; Obtaining a display mode, and if the display mode is a prompt mode, providing a red dot prompt to the interface element associated with the tree node where the event occurs; If the display mode is the structure adjustment mode, weights are assigned to the connection edges in the red dot tree structure; The weight is used to represent the degree of association between different tree nodes; Select a node to be adjusted, calculate the minimum weight and the average weight in the neighborhood of the node to be adjusted; calculate the ratio of the minimum weight to the average weight to obtain a weight ratio, and if the weight ratio is less than a weight ratio threshold, adjust the red dot tree structure; The assigning weights to the connecting edges in the red dot tree structure includes: calculating the sum of node counts of all the tree nodes in the neighborhood of the node to be adjusted to obtain a local count sum; Calculating the ratio of the node count of each of the tree nodes in the neighborhood of the node to be adjusted to the sum of the local counts to obtain a count ratio; Increase or decrease the weight of the corresponding connecting edge according to the counting ratio; Select the node to be adjusted and the search radius, and select all complete connected edges within the search radius with the node to be adjusted as the center; each connected edge corresponds to a weight; Use descending or ascending sorting to filter out the minimum weight from all weights in the neighborhood of the node to be adjusted, and calculate the average weight of all weights in the neighborhood of the node to be adjusted; The sum of the weights of all tree nodes in the neighborhood of the node to be adjusted is 1, and the weight ratio threshold is set to 0.

6. If the weight ratio is less than the weight ratio threshold, the red dot tree structure is adjusted; if the weight ratio is greater than or equal to the weight ratio threshold, the red dot tree structure is not adjusted.

2. The game event prompting method according to claim 1, characterized in that: The step of constructing a red dot tree structure according to the display component and the UI interface includes: Generate a root node; Extracting the display component in the UI interface; According to the hierarchical relationship of the UI interface, the display components are used as tree nodes to construct a red dot tree structure; wherein each of the tree nodes corresponds to one of the display components.

3. The game event prompting method according to claim 1, characterized in that: The step of binding the tree nodes in the red dot tree structure with the game events comprises: Classifying the tree nodes in the red dot tree structure to obtain node labels; The tree node is bound to the corresponding game event according to the node label.

4. The game event prompting method according to claim 2, characterized in that: The providing a red dot prompt to the interface element associated with the tree node where the event occurs includes: Taking the tree node where the event occurs as the first target node; Traverse upward from the first target node to the root node; Add 1 to the node count of the traversed tree node; The interface elements associated with the tree nodes whose node counts are greater than 0 are given red dot prompts.

5. The game event prompting method according to claim 2, characterized in that: After obtaining the display mode, the method further includes: If the display mode is the counting mode, the tree node where the event occurs is used as the first target node; The node count is displayed for each of the tree nodes.

6. The game event prompting method according to claim 5, characterized in that: After displaying the node count of each of the tree nodes, the method further includes: The tree node of the release event is used as the second target node; Traverse upward from the second target node to the root node; The node count of the traversed tree node is reduced by 1.

7. The game event prompting method according to claim 6, characterized in that: After the node count of the traversed tree node is reduced by 1, the method further includes: Detect whether there is a tree node whose node count is less than 0; If present, the node count that is less than 0 is set to 0.

8. The game event prompting method according to claim 3, characterized in that: Binding the tree node with the corresponding game event according to the node label includes: Allocating interface elements to corresponding tree nodes according to the node labels; Establish an association relationship between the tree node and the corresponding interface element; wherein the interface element includes an interface button and an interface label.

9. The game event prompting method according to claim 4, characterized in that: The providing a red dot prompt for the interface element associated with the tree node whose node count is greater than 0 includes: Find the interface element associated with the tree node whose node count is greater than 0; A prompt symbol is displayed at a position corresponding to the interface element; wherein the prompt symbol is a red prompt dot.

10. The game event prompting method according to claim 6, characterized in that: The adjusting the red dot tree structure comprises: Calculating the sum of node counts of all the tree nodes in the neighborhood of the node to be adjusted to obtain a local count sum; Calculating the ratio of the node count of each of the tree nodes in the neighborhood of the node to be adjusted to the sum of the local counts to obtain a count ratio; The weight of the corresponding connecting edge is increased or decreased according to the counting ratio.

Citation Information

Patent Citations

  • A red dot representation method and system based on a tree data structure

    CN109885358A

  • Black production gang identification method and device, electronic equipment and storage medium

    CN114925248A