A hierarchical tag management method and system based on Spring Boot
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]但是,在实际实施过程中,发明人发现,该类技术方案中随着层级标签的数量的增加,标签树的总数、标签树的层级数量和同一级上的并行标签的数量也会变多,这导致了查找特定标签并进行维护的工作相对困难的问题
[0055]针对现有技术中的标签管理系统在标签数量较多时处理效率下降的问题,本方案中针对标签管理系统引入了Redis缓存,在每次生成标签配置、对标签数据进行编辑的过程中,通过构建对应的缓存键值进行保存,则在查询对应的标签时,可依照缓存键值来直接查询到对应的标签信息并进行处理,提高了处理效率。
Smart Images

Figure CN120407559B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of database technology, and specifically to a hierarchical tag management method and system based on Spring Boot. Background Technology
[0002] With the rapid development of internet technology, web applications have been widely used in various fields. In many business scenarios, such as content management systems, product category management on e-commerce platforms, and knowledge management systems, it is necessary to effectively classify and label large amounts of data to facilitate rapid retrieval, filtering, and analysis. Hierarchical tag management, as an important classification and organization method, can clearly present the hierarchical structure of data, improving the efficiency and accuracy of data management. Hierarchical tags are typically a series of tags configured according to a tree structure, and the tags are associated and stored by establishing corresponding hierarchical relationships between them.
[0003] For example, Chinese patent CN202310828504.1 discloses a method, apparatus, device, and medium for constructing and querying hierarchical tags. The hierarchical tag construction method includes: obtaining at least two tag terms from the description data of the object to be processed; constructing at least one candidate multi-level tag that meets hierarchical requirements based on each tag term; wherein the hierarchical requirements include a requirement for the number of levels; determining the degree of tag association between different tag terms under the same candidate multi-level tag in the description data; and selecting a target multi-level tag from the candidate multi-level tags based on the degree of tag association corresponding to each candidate multi-level tag. This solution improves the accuracy of the determined target multi-level tags, ensures a close relationship between the tag terms in the target multi-level tags, facilitates precise focusing on different objects to be processed based on the target multi-level tags, and improves the accuracy of query results based on the target multi-level tags.
[0004] For example, Chinese patent CN202010494685.5 discloses a method and apparatus for generating a tag hierarchy structure, including: filtering tag pairs with related relationships based on the frequency of occurrence of each tag in each file object; generating a tag relationship graph based on each tag pair; wherein the nodes in the relationship graph are tags, and the weight of the edges is the number of times two tags co-occur in the same file object; clustering each node in the tag relationship graph and calculating the membership degree of adjacent nodes, thereby generating a tag hierarchy structure. This embodiment can solve the technical problem of the unique position of a tag in the tag hierarchy structure.
[0005] However, in actual implementation, the inventors found that as the number of hierarchical tags increases in this type of technical solution, the total number of tag trees, the number of levels in the tag trees, and the number of parallel tags at the same level also increase, which makes it relatively difficult to find and maintain specific tags. Summary of the Invention
[0006] To address the aforementioned problems in existing technologies, a hierarchical tag management method based on Spring Boot is provided.
[0007] On the other hand, a hierarchical label management system for implementing this method is also provided.
[0008] The specific technical solution is as follows:
[0009] A hierarchical tag management method based on Spring Boot includes:
[0010] Step S1: Obtain the tag configuration generation information input by the user, and generate the corresponding cache key-value according to the tag configuration generation information;
[0011] Step S2: Parse the tag configuration generation information to add corresponding tag configuration information;
[0012] Step S3: Update the cache key-value pair according to the newly added tag configuration information;
[0013] Step S4: When a user inputs a tag editing instruction, the corresponding level tag is found in the tag configuration information according to the cache key value, and the corresponding tag editing instruction is executed.
[0014] On the other hand, a user editing process is also included before step S1;
[0015] The user editing process includes:
[0016] Step A1: Generate user information according to the user creation instructions entered by the user;
[0017] Step A2: Add permission group information to the user information and configure the corresponding page permissions and tag operation permissions;
[0018] The page permissions are used to provide corresponding interactive pages and interactive controls;
[0019] The label operation permissions are used to control the label editing commands that can be entered.
[0020] On the other hand, in step S4, when the tag editing instruction is obtained, the tag operation permission is first verified to determine whether to respond to the tag editing instruction.
[0021] On the other hand, step S1 includes:
[0022] Step S11: Obtain the tag configuration generation information, and parse the tag identifier code from the tag configuration generation information;
[0023] Step S12: Calculate the current cache key-value parameters based on the tag identifier encoding;
[0024] Step S13: Determine whether a matching cache key already exists for the current cache key-value parameter;
[0025] If so, update the tag configuration information corresponding to the matched cache key value;
[0026] If not, use the current cache key-value parameter as the cache key-value.
[0027] On the other hand, step S2 includes:
[0028] Step S21: Parse the parent node information and top-level node information from the tag generation information respectively;
[0029] Step S22: Create a tag tree based on the top-level node information, and then pre-add the corresponding parent node information according to the tag tree and construct the hierarchical relationship to form the tag configuration information.
[0030] On the other hand, in step S22, the method for creating the tag tree includes:
[0031] A top-level node is created based on the top-level node information contained in the tag generation information, and then an empty set is created as the tag tree based on the tag generation information.
[0032] On the other hand, when the tag editing instruction is to add a new tag, step S4 includes:
[0033] Step A41: Parse the tag content and the associated parent node information from the tag editing instructions;
[0034] Step A42: Add the tag content according to the parent node information, and calculate and store the cache key value corresponding to the tag content;
[0035] Step A43: Update the tag tree according to the tag content.
[0036] On the other hand, when the label editing instruction is to delete a label, step S4 includes:
[0037] Step B41: Parse the identifier of the corresponding hierarchical tag from the tag editing instructions;
[0038] Step B42: Calculate the corresponding cache key value according to the identifier;
[0039] Step B43: Locate the corresponding level tag based on the cache key value and delete it;
[0040] Step B44: Update the tag tree.
[0041] On the other hand, when the label editing instruction is to update the label, step S4 includes:
[0042] Step C41: Parse the identifier of the corresponding hierarchical tag from the tag editing instructions;
[0043] Step C42: Calculate the corresponding cache key value according to the identifier;
[0044] Step C43: Find the corresponding level tag according to the cache key value and update the tag content;
[0045] Step C44: Update the tag tree.
[0046] A Spring Boot-based hierarchical tag management method, used to implement the aforementioned hierarchical tag management method, includes:
[0047] The key-value calculation module obtains the tag configuration generation information input by the user and generates corresponding cached key-values according to the tag configuration generation information.
[0048] A configuration generation module is connected to the key-value calculation module;
[0049] The configuration generation module parses the tag configuration generation information to add corresponding tag configuration information;
[0050] A key-value update module, which is connected to the tag generation module;
[0051] The key-value update module updates the cached key-value according to the newly added hierarchical tag;
[0052] A tag editing module is connected to the key-value update module;
[0053] When the tag editing module receives a tag editing instruction input by the user, it looks up the corresponding level tag according to the cached key value and executes the corresponding tag editing instruction.
[0054] The above technical solution has the following advantages or beneficial effects:
[0055] To address the issue of decreased processing efficiency in existing tag management systems when dealing with a large number of tags, this solution introduces Redis caching into the tag management system. During each generation of tag configurations and editing of tag data, corresponding cache key-value pairs are constructed and saved. When querying a tag, the corresponding tag information can be directly retrieved and processed based on the cache key-value pairs, thus improving processing efficiency. Attached Figure Description
[0056] Embodiments of the invention will be described more fully with reference to the accompanying drawings. However, the drawings are for illustration and explanation only and do not constitute a limitation on the scope of the invention.
[0057] Figure 1 This is an overall schematic diagram of an embodiment of the present invention;
[0058] Figure 2 This is a schematic diagram of the user editing process in an embodiment of the present invention;
[0059] Figure 3 This is a schematic diagram of step S1 in an embodiment of the present invention;
[0060] Figure 4 This is a schematic diagram of step S2 in an embodiment of the present invention;
[0061] Figure 5 This is a schematic diagram of step A4 in an embodiment of the present invention;
[0062] Figure 6 This is a schematic diagram of step B4 in an embodiment of the present invention;
[0063] Figure 7 This is a schematic diagram of step C4 in an embodiment of the present invention;
[0064] Figure 8 This is a schematic diagram of the system in an embodiment of the present invention. Detailed Implementation
[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0067] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0068] This invention includes:
[0069] A hierarchical tag management method based on Spring Boot, such as Figure 1 As shown, it includes:
[0070] Step S1: Obtain the tag configuration generation information input by the user, and generate the corresponding cache key-value pair according to the tag configuration generation information;
[0071] Step S2: Parse the generated tag configuration information to add corresponding tag configuration information;
[0072] Step S3: Update the cache key-value pairs according to the newly added tag configuration information;
[0073] Step S4: When the user inputs a tag editing instruction, the corresponding level tag is found in the tag configuration information according to the cached key value and the corresponding tag editing instruction is executed.
[0074] Specifically, to address the issue of decreased processing efficiency in existing tag management systems when the number of tags is large, this solution introduces Redis caching into the tag management system. During each generation of tag configurations and editing of tag data, corresponding cache key-value pairs are constructed and saved. When querying a tag, the corresponding tag information can be directly retrieved and processed based on the cache key-value pairs, thus improving processing efficiency.
[0075] Specifically, before constructing hierarchical tags, it is necessary to first define the tag configuration information for the corresponding hierarchical tags. This tag configuration information is a configuration data structure for hierarchical tag data. The configuration data type is JSON, where each key represents a unique code identifier for the configuration data item, and the value corresponding to the key represents the specific meaning of the code identifier. The main configuration items are: unique tag identifier field, tag name field, parent tag identifier field, top-level node information, tag description, creation time, update time, and other configuration data structure fields related to the specific business logic.
[0076] Based on the label configuration information constructed above, when creating the corresponding label, the label data can be parsed and stored according to the defined configuration data structure. In the subsequent editing process, the data can be filtered, classified and integrated according to the hierarchical relationship of the label and various configuration attributes, and the label data results in the corresponding format can be directly generated as needed.
[0077] Meanwhile, considering the impact of an increased number of hierarchical tags on retrieval efficiency, a Redis caching middleware was introduced to store tag configuration data and tag data. A corresponding data structure was designed based on the tag configuration data structure, including tag configuration data and tag data. Redis was used to store the tag configuration data and tag data: for tag configuration data, the unique identifier of the tag configuration was used as the hash key, and the corresponding value was the specific configuration content of the list; for tag data, the unique identifier of the tag was used as the hash key, and the corresponding value was a hash table containing information about the corresponding tag configuration items.
[0078] Based on the above settings, when constructing tag configuration information, the generated tag configuration information is first calculated to obtain the corresponding cache key value as an identifier. Subsequent lookup processes are then performed based on this cache key value. The tag configuration information defines the data structure of hierarchical tags, and on this basis, operations such as tag tree construction, adding and editing hierarchical tags are performed.
[0079] In one embodiment, a user editing process is included before step S1;
[0080] like Figure 2 As shown, the user editing process includes:
[0081] Step A1: Generate user information according to the user creation instructions entered by the user;
[0082] Step A2: Add permission group information to the user information and configure the corresponding page permissions and tag operation permissions;
[0083] Page permissions are used to provide corresponding interactive pages and interactive controls;
[0084] Tag operation permissions are used to control the tag editing commands that can be entered.
[0085] In step S4, when a label editing instruction is obtained, the label operation permissions are first verified to determine whether to respond to the label editing instruction.
[0086] Specifically, to achieve better multi-user collaboration, this embodiment introduces the concepts of user roles and permission groups. Different permission groups are configured to address the common business needs of multiple different users using the database. Then, different permission sets are assigned to each permission group and its users. Permission groups include permissions for creating, querying, updating, and deleting tags at various levels.
[0087] Before performing any tag operations, user permissions are verified. This is done by setting up permission verification middleware in the backend code to intercept user operation requests. Based on the type of user operation request, the middleware determines whether the user has the corresponding permissions, and only allows the corresponding operation to be executed after the permission verification is successful.
[0088] In addition to the aforementioned tag operation permissions, the permission group information also includes page permissions. Page permissions are used to verify user accounts when a user logs into the system to determine whether the user can be provided with the corresponding front-end pages and controls for access operations.
[0089] Taking the operation of adding a new tag configuration as an example, this operation may include the following steps in actual application:
[0090] First, initialize the system and set the super administrator account and password. The super administrator has all permissions in this system.
[0091] The super administrator can add, delete, modify, and associate permission groups and users within those groups.
[0092] Before a user enters a specific target page, a check is performed to determine whether the user is logged in.
[0093] If not logged in, redirect to the login page with the target page of the redirect path;
[0094] Determine if the currently logged-in user has permission to access the target page. If they do, redirect them to the target page; otherwise, redirect them to a page where they do not have permission.
[0095] If you are already logged in or have logged in successfully, you will be directed to the target page.
[0096] First, perform a data query operation on the page within the current logged-in user's permission scope. If there is no data, the page will display an empty data page. If the target page is a tag configuration page, then query the tag configuration data within the current user's permission scope. If the target page is a tag page, then query the tag data within the current user's permission scope.
[0097] Secondly, determine whether the user has permission to add a new button; correspondingly, if the target page is a tag configuration page, determine whether the currently logged-in user has permission to add a new tag configuration; correspondingly, if the target page is a tag page, determine whether the currently logged-in user has permission to add a new tag.
[0098] If the user has permission to add a new label configuration, clicking the "Add Label Configuration" button will display a pop-up window for adding a new label configuration. The pop-up window contains, but is not limited to, label_setting_code (unique identifier for label configuration), label_setting_name (label configuration name), label_setting_desc (label configuration description), id (unique identifier field name for label), pid (unique identifier field name for the parent label), root_id (unique identifier field value for the top-level label), and label_field_list (other field configurations for the label).
[0099] After filling out the new tag configuration pop-up form, if the user confirms the addition, they will click the "OK" button. If they cancel the addition, the new tag configuration pop-up will close, and the tag configuration process will be complete.
[0100] If the user clicks the "Confirm Add Tag Configuration" button, the client first performs preliminary form validation, checking if the tag configuration unique identifier, tag configuration name, etc., are all filled in and comply with the filling rules. If the client validation passes, the client sends the "Add Tag Configuration" API request to the backend.
[0101] When the new tag configuration interface receives request data, it first checks whether the currently logged-in user has permission to add tag configuration. If not, it displays an "No permission" error message; otherwise, it executes the subsequent steps.
[0102] In other embodiments, it may be necessary to first configure permission groups for users; in this embodiment, the process includes:
[0103] The super administrator enters the permission group or the permission group user interface to authorize the label configuration of the TESTGROUP group or the TEST user, granting the TEST user permission to access the label configuration page and add new labels. The key for constructing the permission group is ELEMENT_PERMISSION_USERGROUP_TESTGROUP, and the value is...
[0104] ELEMENT_CODE auth label_setting_page 1 add_setting_label 0 label_page 1 add_label 1
[0105] The key constructed by the user in the permission group is ELEMENT_PERMISSION_USER_TEST, and the value is...
[0106] ELEMENT_CODE auth label_setting_page 0 add_setting_label 1 label_page 1 add_label 1
[0107] The authorization for the TESTGROUP permission group and its member user TEST regarding the resources label_setting_page and add_setting_label is explained as follows: TESTGROUP has label_setting_page permission but not add_setting_label permission; TEST user has add_setting_label permission but not label_setting_page permission. Based on the OR operation of the permission group and its member users' authorization for the same resource, TEST user under the TESTGROUP permission group will ultimately have both label_setting_page and add_setting_label permissions.
[0108] In one embodiment, such as Figure 3 As shown, step S1 includes:
[0109] Step S11: Obtain the tag configuration generation information and parse the tag identifier code from the tag configuration generation information;
[0110] Step S12: Calculate the current cache key-value parameters based on the tag identifier encoding;
[0111] Step S13: Determine whether a matching cached key-value pair already exists for the current cached key-value pair;
[0112] If so, update the tag configuration information corresponding to the matched cache key-value pairs;
[0113] If not, use the current cached key-value parameter as the cached key-value.
[0114] Specifically, in order to achieve effective generation of label configurations, in this embodiment, after receiving the label configuration generation information, the label identifier code is first parsed from the label configuration generation information.
[0115] The tag configuration generation information typically includes:
[0116]
[0117] The cache key-value pair can be constructed according to the label identifier encoding. The specific construction method includes: LABEL_SETTING_${label_setting['label_setting_code']}, which is LABEL_SETTING_blog in the example data.
[0118] Then, a search is performed in the caching middleware to determine if a matching cache key-value pair already exists for the current cache key-value parameter. Normally, this data will not exist. If a match is found, it indicates that the user's command may be incorrect and needs to be converted into a command to modify the tag configuration information.
[0119] In one embodiment, such as Figure 4 As shown, step S2 includes:
[0120] Step S21: Parse the parent node information and top-level node information from the tag generation information respectively;
[0121] Step S22: Create a tag tree based on the top-level node information, and then pre-add the corresponding parent node information and build a hierarchical relationship according to the tag tree to form the tag configuration information.
[0122] Methods for creating a tag tree include:
[0123] A top-level node is created based on the top-level node information contained in the tag generation information, and then an empty set is created as a tag tree based on the tag generation information.
[0124] Specifically, to achieve better label creation results, in this embodiment, the parent node information and top-level node information are first parsed from the label generation information. Then, the top-level node data is initialized, including checking whether the key LABEL_CHILD_IDS_${label_setting['label_setting_code']}_${label_setting['root_id']} exists in Redis based on the label_setting_code configured in the label configuration. In the example data, it is LABEL_CHILD_IDS_blog_0. If it does not exist, a set of data with the key LABEL_CHILD_IDS_blog_0 and an empty value is saved to Redis. This indicates that there is no node in the top level of the label configured in the current label configuration.
[0125] Then, a label tree is created based on the top-level node information. This includes checking if the key "LABEL_CHILD_IDS_${label_setting['label_setting_code']}_${label[label_setting['pid']]}" already exists in Reids based on the value of the requested data's `label_setting_code`. If it doesn't exist, the key is constructed with the content of an empty set object, indicating that the current node's child nodes are empty. If the key already exists, the value corresponding to the current requested data ID is added to the child node set collection. This process is used to add the parent node information needed for this new node addition.
[0126] Additionally, the tag configuration information needs to be updated, and new cache key-value pairs need to be added.
[0127] In one embodiment, when the label editing instruction is to add a new label, such as Figure 5 As shown, step S4 includes:
[0128] Step A41: Parse the tag content and associated parent node information from the tag editing instructions;
[0129] Step A42: Add tag content based on the parent node information, and calculate and store the cache key-value pair corresponding to the tag content;
[0130] Step A43: Update the tag tree according to the tag content.
[0131] Specifically, in order to implement the tag update process, in this embodiment, the tag content and associated parent node information are first parsed from the tag editing instructions.
[0132] Specifically, for the parent node information, the corresponding cache key value can be calculated and searched to determine the associated parent node and the corresponding tag tree, as well as its level in the tag tree.
[0133] Then, fill in the label information, such as:
[0134]
[0135] `id` is the unique identifier field for the label in the `id` field of the `blog` label configuration. `pid` is the unique identifier field for the parent label in the `pid` field of the `blog` label configuration. `name` is the label name field in the `label` field of the `blog` label configuration. `label_setting_code` is an inherent field of the label data, representing a reference to its label configuration.
[0136] Then, the cache key-value pairs corresponding to the tag content are calculated for easy retrieval later. Finally, the hierarchical relationship of the tag tree is reconstructed, including:
[0137] Based on the value of label_setting_code in the request data, determine whether the key LABEL_CHILD_IDS_${label_setting['label_setting_code']} has been constructed in Redis.
[0138] The content of `${label[label_setting['pid']]}` exists, and in the example data, the key construction result is `LABEL_CHILD_IDS_blog_0`. If the constructed key already exists, the value of id 100000 in the current tag tree is placed into the set corresponding to the key; otherwise, an empty set corresponding to the key is constructed. It's worth noting that the `root_id` configured for the `blog` tag in the example data is 0, so when initializing the top-level tag bytes after tag creation, at least its key corresponds to an empty set.
[0139] In one embodiment, when the label editing instruction is to delete the label, such as Figure 6 As shown, step S4 includes:
[0140] Step B41: Parse the identifier of the corresponding level tag from the tag editing instructions;
[0141] Step B42: Calculate the corresponding cache key value based on the identifier;
[0142] Step B43: Locate the corresponding level tag based on the cache key value and delete it;
[0143] Step B44: Update the tag tree.
[0144] Specifically, to implement the tag deletion process, in this embodiment, the identifier of the corresponding level tag is first parsed from the tag editing instruction. Then, the corresponding cache key value is calculated based on the identifier. The corresponding level tag is then searched and deleted according to the cache key value, thereby achieving a faster search process. Finally, the hierarchical relationship of the tag tree is updated.
[0145] In one embodiment, when the label editing instruction is to update the label, such as Figure 7 As shown, step S4 includes:
[0146] Step C41: Parse the identifier of the corresponding level tag from the tag editing instructions;
[0147] Step C42: Calculate the corresponding cache key value based on the identifier;
[0148] Step C43: Find the corresponding level tag based on the cache key value and update the tag content;
[0149] Step C44: Update the tag tree.
[0150] Specifically, in order to achieve a better update effect, in this embodiment, the identifier of the corresponding level tag is first parsed from the tag editing instruction, then the corresponding cache key value is calculated according to the identifier, and the corresponding level tag is found according to the cache key value and the tag content is updated. Finally, the hierarchical relationship of the tag tree is updated.
[0151] Specifically, when updating the basic attributes of a tag (such as tag name, description, etc.), the record to be updated is first located based on the tag's hash key, and then the update operation is performed. If changes to the tag hierarchy are involved, such as moving a tag from one parent tag to another, the corresponding records in the tag hierarchy must be updated simultaneously to ensure the accuracy of the hierarchy.
[0152] A Spring Boot-based hierarchical tag management method is provided for implementing the aforementioned hierarchical tag management approach, such as... Figure 8 As shown, it includes:
[0153] Key-value calculation module 1: Key-value calculation module 1 obtains the tag configuration generation information input by the user and generates the corresponding cached key-value according to the tag configuration generation information;
[0154] Configure generation module 2, and configure generation module 2 to connect to key-value calculation module 1;
[0155] Configuration generation module 2 parses the tag configuration generation information to add corresponding tag configuration information;
[0156] Key-value update module 3, which is connected to configuration generation module 2;
[0157] The key-value update module updates the cached key-value pairs according to the newly added hierarchical tags;
[0158] Tag editing module 4, which is connected to key-value update module 3;
[0159] When the tag editing module 4 obtains the tag editing command input by the user, it looks up the corresponding level tag according to the cached key value and executes the corresponding tag editing command.
[0160] The above are merely preferred embodiments of the present invention and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should recognize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.
Claims
1. A hierarchical tag management method based on Spring Boot, characterized in that, include: Step S1: Obtain the tag configuration generation information input by the user, and generate the corresponding cache key-value according to the tag configuration generation information; Step S2: Parse the generated tag configuration information to add corresponding tag configuration information; Step S3: Update the cache key-value pair according to the newly added tag configuration information; Step S4: When a user inputs a tag editing instruction, the corresponding hierarchical tag is found in the tag configuration information according to the cache key value, and the corresponding tag editing instruction is executed; Step S1 includes: Step S11: Obtain the tag configuration generation information, and parse the tag identifier code from the tag configuration generation information; Step S12: Calculate the current cache key-value parameters based on the tag identifier encoding; Step S13: Determine whether a matching cache key already exists for the current cache key-value parameter; If so, update the tag configuration information corresponding to the matched cache key value; If not, use the current cache key-value parameter as the cache key-value; Step S2 includes: Step S21: Parse the parent node information and top-level node information from the tag generation information respectively; Step S22: Create a tag tree based on the top-level node information, and then pre-add the corresponding parent node information according to the tag tree and construct the hierarchical relationship to form the tag configuration information.
2. The hierarchical label management method according to claim 1, characterized in that, The process also includes a user editing process before step S1; The user editing process includes: Step A1: Generate user information according to the user creation instructions entered by the user; Step A2: Add permission group information to the user information and configure the corresponding page permissions and tag operation permissions; The page permissions are used to provide corresponding interactive pages and interactive controls; The label operation permissions are used to control the label editing commands that can be entered.
3. The hierarchical label management method according to claim 2, characterized in that, In step S4, when the tag editing instruction is obtained, the tag operation permission is first verified to determine whether to respond to the tag editing instruction.
4. The hierarchical label management method according to claim 1, characterized in that, In step S22, the method for creating the tag tree includes: A top-level node is created based on the top-level node information contained in the tag generation information, and then an empty set is created as the tag tree based on the tag generation information.
5. The hierarchical label management method according to claim 1, characterized in that, When the label editing instruction is to add a new label, step S4 includes: Step A41: Parse the tag content and the associated parent node information from the tag editing instructions; Step A42: Add the tag content according to the parent node information, and calculate and store the cache key value corresponding to the tag content; Step A43: Update the tag tree according to the tag content.
6. The hierarchical label management method according to claim 1, characterized in that, When the label editing instruction is to delete the label, step S4 includes: Step B41: Parse the identifier of the corresponding hierarchical tag from the tag editing instructions; Step B42: Calculate the corresponding cache key value according to the identifier; Step B43: Locate the corresponding level tag based on the cache key value and delete it; Step B44: Update the tag tree.
7. The hierarchical label management method according to claim 1, characterized in that, When the label editing instruction is to update the label, step S4 includes: Step C41: Parse the identifier of the corresponding hierarchical tag from the tag editing instructions; Step C42: Calculate the corresponding cache key value according to the identifier; Step C43: Find the corresponding level tag according to the cache key value and update the tag content; Step C44: Update the tag tree.
8. A hierarchical tag management method based on Spring Boot, characterized in that, A method for implementing hierarchical label management as described in any one of claims 1-7, comprising: The key-value calculation module obtains the tag configuration generation information input by the user and generates corresponding cached key-values according to the tag configuration generation information. A configuration generation module is connected to the key-value calculation module; The configuration generation module parses the tag configuration generation information to add corresponding tag configuration information; A key-value update module, which is connected to the configuration generation module; The key-value update module updates the cached key-value according to the newly added hierarchical tag; A tag editing module is connected to the key-value update module; When the tag editing module receives a tag editing instruction input by the user, it looks up the corresponding level tag according to the cached key value and executes the corresponding tag editing instruction.
Citation Information
Patent Citations
A method and device for generating a label hierarchical structure
CN113761305B
Hierarchical label construction method, hierarchical label query method, hierarchical label construction device, hierarchical label query device, equipment and medium
CN119271857A
Tab page grouping management system and method based on tree structure
CN106897361A
User tag processing system and method based on SpringBoot service framework
CN115689513A