Method and system for batch management of background menus through templates

Through the template batch management method, the menu template is processed recursively and the game information is replaced with @ symbols, which solves the problem of low backend menu management efficiency in the existing technology, and simplified menu and permission management is realized, improving management efficiency and flexibility.

CN119292595AActive Publication Date: 2025-01-10FUJIAN TQ ONLINE INTERACTIVE INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411312563.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-10
Estimated Expiration
2044-09-20

AI Technical Summary

Technical Problem

The management of backend menus in the existing technology is inefficient, and adding or updating menus needs to be manually added under each game, resulting in cumbersome and repetitive work, affecting independent functions and permission management.

Method used

Using template batch management methods, we use the template batch management method to define menu templates and character template configuration rules, recursively process menu templates, and use @ symbols to replace game names and numbers to simplify the process of adding and updating menus and permissions.

Benefits of technology

It improves the efficiency of backend menu management, simplifies tedious and repetitive work, and retains the flexibility of independent functional menus and permission management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292595A_ABST
    Figure CN119292595A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer management, in particular to a method and system for managing background menus in batches through templates, and the method comprises the steps that 1, menu template configuration rules are defined, the menu template configuration rules comprise a hierarchical structure for configuring menus and attributes for configuring menu items, the hierarchical structure of the menus comprises menu template root nodes, and the attributes of the menu items are configured; the menu template root node comprises all menu items; 2, defining role template configuration rules, including role configuration and role permission; 3, when a game is newly added, recursively processing the menu template according to the menu template root node and the attribute of the menu item; and 4, when the template is updated, circularly traversing the game list, and recursively processing the menu template according to the root node of the menu template and the attribute of the menu item. According to the method and system for managing the background menu in batches through the template, provided by the invention, the management efficiency of the background menu can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer management, and in particular to a method and system for batch management of background menus through templates. Background Art

[0002] The company's current game configuration background includes management systems for multiple game businesses. Each game business has many common function menus and many independent function menus. If a new menu is added that all games need to use, this menu needs to be added separately under each game, and the only difference is that the game category parameters in the menu address are different. In addition, it is necessary to add permissions for the new menu for the corresponding role. This work is tedious, repetitive, and the workload is quite large. If all menus are dynamically rendered according to the current game list, there will be no specific menus. Not only will it be impossible to manage menus with independent functions, but it will also affect permission management. Summary of the invention

[0003] In order to overcome the problem of low efficiency in background menu management in the prior art, the purpose of the present invention is to provide a method and system for batch management of background menus through templates, which can improve the management efficiency of the background menus.

[0004] The present invention is implemented by the following scheme:

[0005] A method for batch management of background menus through templates, the method steps are as follows:

[0006] Step 1: define menu template configuration rules, including configuring the hierarchy of menus and configuring the attributes of menu items, wherein the hierarchy of menus includes a menu template root node, and the menu template root node includes all menu items;

[0007] Step 2: Define the role template configuration rules, including configuring roles and role permissions;

[0008] Step 3: When adding a new game, recursively process the menu template according to the attributes of the menu template root node and menu items;

[0009] Step 4: When updating the template, loop through the game list and recursively process the menu template according to the properties of the menu template root node and menu items.

[0010] Furthermore, the attributes of the menu item include menu name, menu type, template item number, sort index, menu path, and submenu list;

[0011] If the current menu is a first-level menu, the @gamename placeholder is used to replace the menu name. The sorting index is used to determine the menu display order. The menu path is the menu URL path. In the menu path, @gameid is used as a replacement symbol for the game parameters.

[0012] Furthermore, the role described in step 2 is a role template root node, which contains all role items. Each role item has attributes, including a role name and role permissions. The role permissions are an array of template item numbers owned by the role.

[0013] Furthermore, step 3 is as follows: when adding a new game, recursively process the menu template root node and submenu list, if the name menu name contains @gamename, replace the menu name with the current game name; if the menu path contains @gameid, replace @gameid in the current menu path with the game number;

[0014] In other cases, a new menu record is added to the database according to the configuration of the menu item, and an actual database menu number is generated. The menu record saved in the database needs to be associated with the template item number;

[0015] At the same time, according to the role template configuration, add new permissions for the corresponding roles in the database, and the menu number of the newly added permissions should correspond to the template item number.

[0016] Furthermore, step 4 is further specified as follows: when updating the template, loop through the game list and recursively process the menu template root node and submenu list. If a new or updated menu is added, first query the database to see whether there is menu data with the same game number and the same template menu item number. If so, update the menu data according to the rules for adding a new game; if not, add new menu data according to the rules for adding a new game; if the menu is deleted, delete all menu data with the same template item number in the configuration template menu.

[0017] A system for batch management of backstage menus through templates, the system comprising: a menu template configuration module, a role template configuration module, a game addition management module and a template update management module;

[0018] The menu template configuration module is used to define menu template configuration rules, including configuring the hierarchy of menus and configuring the attributes of menu items. The hierarchy of menus includes a menu template root node, and the menu template root node contains all menu items.

[0019] The role template configuration module is used to define role template configuration rules, including configuring roles and role permissions;

[0020] The game addition management module is used to recursively process the menu template according to the attributes of the menu template root node and menu items when adding a new game;

[0021] The template update management module is used to loop through the game list when updating the template, and recursively process the menu template according to the attributes of the menu template root node and the menu items.

[0022] Furthermore, the attributes of the menu item include menu name, menu type, template item number, sort index, menu path, and submenu list;

[0023] If the current menu is a first-level menu, the @gamename placeholder is used to replace the menu name. The sorting index is used to determine the menu display order. The menu path is the menu URL path. In the menu path, @gameid is used as a replacement symbol for the game parameters.

[0024] Furthermore, the role described in the role configuration module is a role template root node, which contains all role items. Each role item has attributes, including a role name and role permissions. The role permissions are an array of template item numbers owned by the role.

[0025] Furthermore, when adding a new game, the menu template root node and submenu list are recursively processed. If the name menu name contains @gamename, the menu name is replaced with the current game name; if the menu path contains @gameid, the @gameid in the current menu path is replaced with the game number;

[0026] In other cases, a new menu record is added to the database according to the configuration of the menu item, and an actual database menu number is generated. The menu record saved in the database needs to be associated with the template item number;

[0027] At the same time, according to the role template configuration, add new permissions for the corresponding roles in the database, and the menu number of the newly added permissions should correspond to the template item number.

[0028] Furthermore, the template update management module is specifically as follows: when updating the template, loop through the game list and recursively process the menu template root node and submenu list. If a new or updated menu is added, first query the database to see whether there is menu data with the same game number and the same template menu item number. If so, update the menu data according to the rules for adding a new game; if not, add new menu data according to the rules for adding a new game; if the menu is deleted, delete all menu data with the same template item number in the configuration template menu.

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

[0030] The present invention provides a method and system for batch management of background menus through templates, which simplifies tedious and repetitive work and improves management efficiency through template management, while retaining the flexibility of independent function menus and authority management. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a flow chart of the method of the present invention;

[0032] Figure 2 It is a structural block diagram of the system of the present invention. DETAILED DESCRIPTION

[0033] The present invention will be further described below in conjunction with the accompanying drawings.

[0034] See also Figure 1 , a method for batch management of background menus through templates, the method steps are as follows:

[0035] Step 1: define menu template configuration rules, including configuring the hierarchy of menus and configuring the attributes of menu items, wherein the hierarchy of menus includes a menu template root node, and the menu template root node includes all menu items;

[0036] Step 2: Define the role template configuration rules, including configuring roles and role permissions;

[0037] Step 3: When adding a new game, recursively process the menu template according to the attributes of the menu template root node and menu items;

[0038] Step 4: When updating the template, loop through the game list and recursively process the menu template according to the properties of the menu template root node and menu items.

[0039] The present invention will be further described below in conjunction with a specific embodiment:

[0040] A method for batch management of background menus through templates, the method comprising the following steps:

[0041] Step 1: define menu template configuration rules, including the menu hierarchy and related attributes. The menu hierarchy includes a menu template root node, and the menu template root node contains all menu items;

[0042] resources is the root node of the menu template, which contains all the template menu items. Each menu item must have the following attributes: name (menu name, if the current menu is a first-level menu, use @gamename placeholder instead), type (menu type), tid (template item number), sortIndex (sort index, used to determine the menu display order), path (menu URL path, where @gameid is used as a replacement symbol for game parameters) and children (submenu list)

[0043] If multiple games need to have functions such as server query, server disabling, group announcement and single announcement, these menu information can be configured on the menu template. The steps are as follows: In the configuration file, define resources as the root node of the menu template, which contains all template menu items. Each menu item has the following attributes: `name` (menu name, if it is a first-level menu, use `@gamename` as a placeholder), `type` (menu type, 1 represents a directory, 2 represents a page), `tid` (template item number), `sortIndex` (sort index, used to determine the order of menu display), `path` (menu URL path, where `@gameid` is used as a replacement symbol for game parameters), and `children` (submenu list, for items with submenus). The result after configuration is as follows:

[0044]

[0045]

[0046] Step 2: define the role template configuration rules, including the relationship between the role and the menu permissions the role has. The role is the role template root node, which contains all role items. Each role item has attributes, including the role name and role permissions. The role permissions are an array of template item numbers owned by the role.

[0047] For example, there are two roles, operation and planning. Operation needs to use server management related functions, while planning needs to use announcement management related functions. You need to specify the template item number in the corresponding menu permissions for these two roles. The operation steps are as follows: In the configuration file, define roles as the role template root node, which contains all role template items. Each role item requires the following attributes: name (role name) and powers (role permissions). The result after configuration is as follows:

[0048]

[0049] Step 3. When adding a new game, recursively process the menu template root node and submenu list. If the menu name contains @gamename, replace the menu name with the current game name; if the menu path contains @gameid, replace @gameid in the current menu path with the game number;

[0050] In other cases, a new menu record is added to the database according to the configuration of the menu item, and an actual database menu number is generated. The menu record saved in the database needs to be associated with the template item number;

[0051] At the same time, according to the role template configuration, add new permissions for the corresponding roles in the database, and the menu number of the newly added permissions should correspond to the template item number.

[0052] For example, let's add a new game, the game name is "Game A", and the game number is 58. First, create a menu number mapping relationship map to store the mapping relationship between the configuration template item number and the database menu number.

[0053] Then recursively query the menu template root node resource and the submenu list children, and first instantiate a database menu object. The database menu object contains the following attributes: id (number), name (menu name), type (type), sort (sort), tid (template item number), pid (parent number), path (menu path), gameid (game number). When the configured menu name is @gamename, replace @gamename with the game name "Game A", then the menu name name = Game A, the menu type is set to type = 1 to indicate a directory, the template item number association is set to tid = 1, and the game number gameid = 58. Since redource is a top-level menu without a parent, all menu parent numbers pid = 0. Insert this menu into the database to obtain a menu number of 501, and use tid = 1 as the key and 501 as the value to store them in the mapping relationship map.

[0054] Then traverse the submenu list children and re-instantiate a database menu object. If the menu name does not contain @gamename, the menu name = server management, the menu type type = 1, the menu template item number tid = 11, the game number gameid = 58, and the parent menu is set to the parent menu number, that is, pid = 501. Insert this menu into the database to obtain a menu number 502, and store tid = 11 as the key and 502 as the value in the mapping relationship map.

[0055] Then traverse the children submenu list of "Server Management" and re-instantiate a database menu object. The menu configuration name name = server query, the menu type type = 2 represents the page, and the configured menu URL path contains @gameid, which is replaced with the game number 58 to obtain the menu path path = https: / / manage.xxx.com / server / 58, the template item number tid = 111, the game number gameid = 58, and the parent menu is set to the parent template item number, i.e. pid = 502. Insert this menu into the database to obtain the menu number 503, and store tid = 111 as the key and 503 as the value in the mapping relationship map.

[0056] Similarly, after looping and inserting all template configuration menus, start adding menu permissions. Loop through the root node roles of the role template, and find out the database menu numbers corresponding to the template menu items 1, 11, 111, 112 in powers from the mapping relationship to get 501, 502, 503, 504. Add these four menu number permissions to the operation role. Similarly, loop and insert all template configuration permissions.

[0057] Step 4. When updating the template, loop through the game list and recursively process the menu template root node and submenu list. If a menu is added or updated, first query the database to see if there is menu data with the same game number and the same template menu item number. If so, update the menu data according to the rules for adding a new game; if not, add new menu data according to the rules for adding a new game; if a menu is deleted, delete all menu data with the same template item number in the configuration template menu.

[0058] For example, there are two games, game A is numbered 58 and game B is numbered 59. Now the menu template needs to be updated. In the configuration template, the server query is deleted and the announcement query is added. The modified configuration is as follows:

[0059]

[0060]

[0061]

[0062] Loop through the game list and recursively process the menu template root node and submenu list. First, query the database to see if there is menu data with game number gameid=58 and menu template item number tid=1. If it exists, update the menu type, name, sort, and path data according to the menu configuration. If it does not exist, add a new menu according to step 3. And so on, loop through the root node and submenu list. When deleting the configuration menu, delete all menu data and permission data with the same template item number tid (i.e. tid=111).

[0063] Then loop through the menu permission root node roles to determine whether the operation role has permissions with tid 1, 11, 112, read the menu numbers 1, 11, 112 from the mapping relationship map to get 501, 502, 504, and skip if permissions exist. Then determine whether the planning role has menu permissions with template item numbers tid 1, 12, 121, 122, 123, read the menu numbers 1, 12, 121, 122, 123, 501, 602, 603, 604, 605 from the mapping relationship map. Because menu permission 605 does not exist, add permission for menu number 605 to the planning role.

[0064] See also Figure 2 , a system for batch management of background menus through templates, the system comprising: a menu template configuration module, a role template configuration module, a game addition management module and a template update management module;

[0065] The menu template configuration module is used to define menu template configuration rules, including configuring the hierarchy of menus and configuring the attributes of menu items. The hierarchy of menus includes a menu template root node, and the menu template root node contains all menu items.

[0066] The role template configuration module is used to define role template configuration rules, including configuring roles and role permissions;

[0067] The game addition management module is used to recursively process the menu template according to the attributes of the menu template root node and menu items when adding a new game;

[0068] The template update management module is used to loop through the game list when updating the template, and recursively process the menu template according to the attributes of the menu template root node and the menu item.

[0069] In one embodiment of the present invention, the attributes of the menu item include menu name, menu type, template item number, sort index, menu path, and submenu list;

[0070] If the current menu is a first-level menu, the @gamename placeholder is used to replace the menu name. The sorting index is used to determine the menu display order. The menu path is the menu URL path. In the menu path, @gameid is used as a replacement symbol for the game parameters.

[0071] In one embodiment of the present invention, the role described in the role configuration module is a role template root node, which contains all role items. Each role item has attributes, including a role name and role permissions, which are an array of template item numbers owned by the role.

[0072] In one embodiment of the present invention, when adding a new game, the menu template root node and submenu list are recursively processed. If the name menu name contains @gamename, the menu name is replaced with the current game name; if the menu path contains @gameid, the @gameid in the current menu path is replaced with the game number;

[0073] In other cases, a new menu record is added to the database according to the configuration of the menu item, and an actual database menu number is generated. The menu record saved in the database needs to be associated with the template item number;

[0074] At the same time, according to the role template configuration, add new permissions for the corresponding roles in the database, and the menu number of the newly added permissions should correspond to the template item number.

[0075] In one embodiment of the present invention, step 4 is specifically as follows: when updating the template, loop through the game list and recursively process the menu template root node and submenu list. If a new or updated menu is added, first query the database to see whether there is menu data with the same game number and the same template menu item number. If so, update the menu data according to the rules for adding a new game; if not, add new menu data according to the rules for adding a new game; if the menu is deleted, delete all menu data with the same template item number in the configuration template menu.

[0076] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A method for batch management of background menus through templates, characterized in that: The method steps are as follows: Step 1: define menu template configuration rules, including configuring the hierarchy of menus and configuring the attributes of menu items, wherein the hierarchy of menus includes a menu template root node, and the menu template root node includes all menu items; Step 2: Define the role template configuration rules, including configuring roles and role permissions; Step 3: When adding a new game, recursively process the menu template according to the attributes of the menu template root node and menu items; Step 4: When updating the template, loop through the game list and recursively process the menu template based on the properties of the menu template root node and menu items.

2. According to claim 1, a method for batch management of background menus through templates is characterized in that: The attributes of the menu item include menu name, menu type, template item number, sort index, menu path, and submenu list; If the current menu is a first-level menu, the @gamename placeholder is used to replace the menu name. The sorting index is used to determine the menu display order. The menu path is the menu URL path. In the menu path, @gameid is used as a replacement symbol for the game parameters.

3. According to claim 1, a method for batch management of background menus through templates is characterized in that: The role described in step 2 is the role template root node, which contains all role items. Each role item has attributes, including role name and role authority. The role authority is an array of template item numbers owned by the role.

4. The method for batch management of background menus through templates according to claim 2 is characterized in that: Step 3 is as follows: when adding a new game, recursively process the menu template root node and submenu list. If the menu name contains @gamename, replace the menu name with the current game name; if the menu path contains @gameid, replace @gameid in the current menu path with the game number; In other cases, a new menu record is added to the database according to the configuration of the menu item, and an actual database menu number is generated. The menu record saved in the database needs to be associated with the template item number; At the same time, according to the role template configuration, add new permissions for the corresponding roles in the database, and the menu number of the newly added permissions should correspond to the template item number.

5. The method for batch management of background menus through templates according to claim 2 is characterized in that: Step 4 is as follows: when updating the template, loop through the game list and recursively process the menu template root node and submenu list. If a menu is added or updated, first query the database to see if there is menu data with the same game number and the same template menu item number. If so, update the menu data according to the rules for adding a new game; if not, add new menu data according to the rules for adding a new game. If the menu is deleted, the menu data with the same template item number in all configuration template menus will be deleted.

6. A system for batch management of backend menus through templates, characterized in that: The system includes: a menu template configuration module, a role template configuration module, a game addition management module and a template update management module; The menu template configuration module is used to define menu template configuration rules, including configuring the hierarchy of menus and configuring the attributes of menu items. The hierarchy of menus includes a menu template root node, and the menu template root node contains all menu items. The role template configuration module is used to define role template configuration rules, including configuring roles and role permissions; The game addition management module is used to recursively process the menu template according to the attributes of the menu template root node and menu items when adding a new game; The template update management module is used to loop through the game list when updating the template, and recursively process the menu template according to the attributes of the menu template root node and the menu item.

7. A system for batch management of background menus through templates according to claim 6, characterized in that: The attributes of the menu item include menu name, menu type, template item number, sort index, menu path, and submenu list; If the current menu is a first-level menu, the @gamename placeholder is used to replace the menu name. The sorting index is used to determine the menu display order. The menu path is the menu URL path. In the menu path, @gameid is used as a replacement symbol for the game parameters.

8. The system for batch management of background menus through templates according to claim 6 is characterized in that: The role described in the role configuration module is the role template root node, which contains all role items. Each role item has attributes, including role name and role authority. The role authority is an array of template item numbers owned by the role.

9. A system for batch management of background menus through templates according to claim 8, characterized in that: When adding a new game, recursively process the menu template root node and submenu list. If the menu name contains @gamename, replace the menu name with the current game name; if the menu path contains @gameid, replace @gameid in the current menu path with the game number; In other cases, a new menu record is added to the database according to the configuration of the menu item, and an actual database menu number is generated. The menu record saved in the database needs to be associated with the template item number; At the same time, according to the role template configuration, add new permissions for the corresponding roles in the database, and the menu number of the newly added permissions should correspond to the template item number.

10. The system for batch management of background menus through templates according to claim 8, characterized in that: The template update management module is specifically as follows: when updating the template, loop through the game list and recursively process the menu template root node and submenu list. If a new or updated menu is added, first query the database to see if there is menu data with the same game number and the same template menu item number. If so, update the menu data according to the rules for adding a new game; if not, add new menu data according to the rules for adding a new game; If the menu is deleted, the menu data with the same template item number in all configuration template menus will be deleted.

Citation Information

Patent Citations

  • Data batch import method and device and related equipment

    CN113127428A

  • Dynamic menu generation method and device, equipment and storage medium

    CN113986217A

  • Page menu permission control method and device, equipment and storage medium

    CN115221447A

  • File management page generation method and device, electronic equipment and storage medium

    CN115756460A