HashMap-based multi-way tree generation method

A multi-fork tree and menu technology, applied in database indexing, special data processing applications, structured data retrieval, etc., can solve problems such as low query speed and affect work efficiency, so as to speed up query speed, improve work efficiency, and save system resource effect

Pending Publication Date: 2021-04-02
四川汇安融信息技术股份有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, there are still many interactions with the database, and the query speed is still low, which affects work efficiency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • HashMap-based multi-way tree generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] see figure 1 , a method for generating a multi-fork tree based on HashMap, comprising the following steps:

[0039] a. According to the classification of menus, obtain the total number of all menus in the application software, the number of first-level menus, the number of second-level menus, and the number of n-level menus, and then create a menu according to the maximum number of submenus of all menus The Map tree;

[0040] b. Classify all roles in the application software, and store the classified roles in the linear table L;

[0041] c. Traversing the linear table L, for each role in it, read the Map tree menu and assign menu items corresponding to the role, and finally generate a menu list corresponding to each role.

[0042] "a. According to the classification of menus, obtain the total number of all menus in the application software, the number of first-level menus, the number of second-level menus, and the number of nth-level menus, and then create Map tree o...

Embodiment 2

[0044] see figure 1 , a method for generating a multi-fork tree based on HashMap, comprising the following steps:

[0045] a. According to the classification of menus, obtain the total number of all menus in the application software, the number of first-level menus, the number of second-level menus, and the number of n-level menus, and then create a menu according to the maximum number of submenus of all menus The Map tree;

[0046]b. Classify all roles in the application software, and store the classified roles in the linear table L;

[0047] c. Traversing the linear table L, for each role in it, read the Map tree menu and assign menu items corresponding to the role, and finally generate a menu list corresponding to each role.

[0048] In the step a, creating a Map tree of the menu includes:

[0049] S1. First query the data of the menu;

[0050] S2. Put the data of the menu into the Map, the key is the menu ID, and the value is the reference of the menu data;

[0051] S...

Embodiment 3

[0057] see figure 1 , a method for generating a multi-fork tree based on HashMap, comprising the following steps:

[0058] a. According to the classification of menus, obtain the total number of all menus in the application software, the number of first-level menus, the number of second-level menus, and the number of n-level menus, and then create a menu according to the maximum number of submenus of all menus The Map tree;

[0059] b. Classify all roles in the application software, and store the classified roles in the linear table L;

[0060] c. Traversing the linear table L, for each role in it, read the Map tree menu and assign menu items corresponding to the role, and finally generate a menu list corresponding to each role.

[0061] In the step a, creating a Map tree of the menu includes:

[0062] S1. First query the data of the menu;

[0063] S2. Put the data of the menu into the Map, the key is the menu ID, and the value is the reference of the menu data;

[0064] ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a HashMap-based multi-way tree generation method, which belongs to the technical field of software development, and is characterized by comprising the following steps of a, obtaining the total number of all menus, the number of first-level menus, the number of second-level menus and the number of nth-level menus in application software according to the classification of themenus, and according to the maximum number of sub-menus, creating a Map tree of the menu, b, classifying according to all roles in the application software, and storing the classified roles in a linear table L, and c, traversing the linear table L, reading a Map tree menu for each role in the linear table L, endowing the roles with corresponding menu items, and finally generating a menu list corresponding to each role. According to the method, the query speed can be increased, meanwhile, the data is stored in the local memory, interaction with the database is reduced, IO time is shortened, system resources can be saved, and the working efficiency is improved.

Description

technical field [0001] The invention relates to the technical field of software development, in particular to a method for generating a multi-fork tree based on HashMap. Background technique [0002] For a piece of software, ordinary users need to perform basic operations, but do not have the authority to set other users, while for system administrators, they can operate all functions. The views are different, that is, the function menus seen are different. [0003] In order to provide different functional menus for user groups with different roles, that is, different users operate different views, the menu tree needs to be assembled. There are usually two ways to assemble the menu tree: one is to use recursive algorithm; the other is to use nested for algorithm. [0004] Recursive algorithm: You must call yourself; there must be a jump out logic, otherwise the program will have a risk of jamming; when calling, the parameters should be regular. Using recursion will make d...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/22
CPCG06F16/2246G06F16/2255
Inventor 张燎毛勇徐乐李祥平李晨
Owner 四川汇安融信息技术股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products