Multi-inheritance strategy updating method and device based on tree structure, equipment and medium

By adopting a tree-structured multiple inheritance strategy update method, the strategy is obtained and distributed to the terminal from top to bottom, which solves the problem of low strategy configuration efficiency in the existing technology, realizes efficient strategy calculation and distribution, and improves server performance.

CN121357012APending Publication Date: 2026-01-16厦门天锐科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511583182.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

In enterprise management scenarios, existing technologies suffer from low computational efficiency and high server resource consumption during policy configuration. In particular, when adding employees to a department or canceling policy configuration, policies need to be recalculated and updated, resulting in server response latency and reduced throughput.

Method used

A tree-structure-based multiple inheritance strategy update method is adopted. By obtaining the strategy identifier and content of each group from top to bottom, a complete strategy file is generated and sent to the terminal. The terminal applies its own strategy and the strategies of all its superior groups at the same time, reducing the amount of strategy calculation when the terminal requests a strategy.

Benefits of technology

It improved the efficiency of policy calculation and distribution, reduced server response latency and resource consumption, and increased system throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121357012A_ABST
    Figure CN121357012A_ABST
Patent Text Reader

Abstract

The invention provides a multi-inheritance strategy updating method, device and equipment based on a tree structure, and relates to the technical field of computers. The method comprises the following steps: receiving a strategy downloading request sent by a terminal; acquiring a strategy identifier id and corresponding strategy content configured by the terminal from a local cache; acquiring a complete policy id set of a direct superior group to which the terminal belongs from a local cache, and matching to obtain corresponding policy content; wherein the complete strategy id set of the superior group is obtained by calculation based on a multi-strategy inheritance rule; and the strategy content configured by the terminal and the strategy content of the superior group of the terminal are spliced and then issued to the terminal, so that the terminal can apply the strategy of the terminal and the strategies of all the superior groups at the same time. According to the method and the device, in the process that a large number of terminals apply multiple inheritance strategies, the complete grouped strategies are calculated in advance, so that the strategy calculation amount when the terminals request is reduced, and the strategy calculation and issuing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method, apparatus, device, and medium for updating multiple inheritance strategies based on tree structures. Background Technology

[0002] In enterprise management scenarios, company organizational structures typically employ a standard tree structure, containing multiple hierarchical departments, each associated with several employees (corresponding to system terminals). In policy configuration requirements, administrators often need to achieve a dual effect of "hierarchical inheritance + personalized configuration." For example, after configuring policy 1 for a department, an employee within that department might need to configure policy 2. Ultimately, it's crucial to ensure that the employee simultaneously benefits from both policy 1 (inherited from the department) and policy 2 (their own configuration). In other words, for the same type of policy on the same terminal, it must support multiple effective policies coexisting and fully inherit all valid policies from the parent group.

[0003] Currently, there are two main methods in the industry to achieve the above requirements:

[0004] Method 1: If the terminal supports multiple policies of the same type, after configuring policy 1 in the department, policy 1 needs to be configured for all employees in that department one by one, so that employees can simultaneously implement the policies inherited from the department and their own personalized policies by "configuring multiple policies themselves".

[0005] Method 2: If the terminal only supports single-item effectiveness for the same type of policy - After configuring policy 1 in the department, the policy content of all employees in the department needs to be re-edited to integrate the configuration of policy 1 into the employees' original policies, so as to maintain single-item effectiveness (including department inheritance and their own personalized content).

[0006] Both methods share common performance bottlenecks: 1. When a new employee (terminal) is added to a department, all policies inherited from the parent department must be recalculated for that terminal. If the terminal belongs to a deep hierarchy and has a large number of parent department policies to inherit, the calculation efficiency of policy inheritance will be significantly reduced, increasing server response latency. 2. When a policy configuration for a department is cancelled, all terminals under that department need to be traversed and their effective policies updated one by one. If the number of terminals is large (e.g., thousands or even tens of thousands), it will cause excessive server resource consumption, severely impacting system throughput. Summary of the Invention

[0007] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for updating policies based on a tree structure with multiple inheritance, which can reduce the amount of policy calculation when the terminal requests a policy, thereby improving the efficiency of policy calculation and distribution.

[0008] In a first aspect, embodiments of this application provide a tree-structure-based multiple inheritance strategy update method, applied to the server side of a computer information system with a tree-like organizational structure, the method comprising:

[0009] Receive policy download requests sent by the terminal;

[0010] Retrieve the policy identifier ID and corresponding policy content configured by the terminal itself from the local cache;

[0011] The complete set of policy IDs of the direct parent group to which the terminal belongs is obtained from the local cache, and the corresponding policy content is obtained by matching; wherein, the complete set of policy IDs of the parent group is calculated based on multiple policy inheritance rules;

[0012] The policy content configured by the terminal itself is concatenated with the policy content of the terminal's superior group to generate a complete policy file. The complete policy file is then sent to the terminal so that the terminal can apply its own policy and the policies of all superior groups simultaneously.

[0013] In one possible implementation, the multiple strategy inheritance rules include:

[0014] Starting from the root node of the tree-like organizational structure, obtain the group identifier ID of each level of group in a top-down order;

[0015] For each group, obtain the policy configured for the current group, which includes a unique policy ID and policy content;

[0016] Get the policy cache of the direct parent group of the current group. The policy cache of the parent group stores the policy ID configured by the parent group itself and the set of policy IDs inherited from the parent group of the parent group.

[0017] The policy ID configured in the current group is merged with the policy ID set of the parent group to generate a complete policy ID set for the current group, and this complete policy ID set is cached.

[0018] In one possible implementation, the step of obtaining the group ID of each level of grouping sequentially from the root node of the tree-like organizational structure in a top-down order includes:

[0019] Starting with the root group of the tree-like organizational structure as the starting node, the IDs of all direct subgroups of the root group are obtained sequentially through hierarchical traversal. Then, the IDs of the next-level subgroups of each subgroup are obtained, until all levels of groups have been traversed.

[0020] In one possible implementation, merging the policy ID configured in the current group with the policy ID set of the parent group includes:

[0021] If the policy ID configured in the current group is the same as the policy ID set of the parent group, then the unique policy ID is retained to avoid duplicate loading of policy content.

[0022] If there are no duplicate policy IDs, the policy ID of the current group is directly added to the policy ID set of the parent group to form the complete policy ID set of the current group.

[0023] In one possible implementation, the method further includes:

[0024] When the policy of a certain group in a computer information system is updated, the policy calculation process of that group and all its subordinate groups is re-executed, and the policy cache of the corresponding group is updated.

[0025] The group and its subordinate groups are notified to send policy download requests to their respective terminals.

[0026] Secondly, embodiments of this application provide a tree-structure-based multiple inheritance strategy update device, applied to the server side of a computer information system with a tree-like organizational structure, the device comprising:

[0027] The receiving module is used to receive policy download requests sent by the terminal;

[0028] The acquisition module is used to obtain the policy identifier ID and corresponding policy content configured by the terminal itself from the local cache; obtain the complete set of policy IDs of the direct parent group to which the terminal belongs from the local cache, and match them to obtain the corresponding policy content; wherein, the complete set of policy IDs of the parent group is calculated based on multiple policy inheritance rules;

[0029] The sending module is used to concatenate the policy content configured by the terminal itself with the policy content of the terminal's superior group to generate a complete policy file, and send the complete policy file to the terminal so that the terminal can apply its own policy and the policies of all superior groups at the same time.

[0030] In one possible implementation, the device further includes:

[0031] The strategy calculation module is used for:

[0032] Starting from the root node of the tree-like organizational structure, obtain the group identifier ID of each level of group in a top-down order;

[0033] For each group, iterate through all the preset strategy types in the computer information system;

[0034] Retrieve the policy configured for the current group, wherein the policy contains a unique policy ID and policy content;

[0035] Get the policy cache of the direct parent group of the current group. The policy cache of the parent group stores the policy ID configured by the parent group itself and the set of policy IDs inherited from the parent group of the parent group.

[0036] The policy ID configured in the current group is merged with the policy ID set of the parent group to generate a complete policy ID set for the current group, and this complete policy ID set is cached.

[0037] In one possible implementation, the policy calculation module is specifically used for:

[0038] Starting with the root group of the tree-like organization structure as the starting node, the IDs of all direct subgroups of the root group are obtained sequentially through recursive traversal or level-order traversal. Then, the IDs of the next-level subgroups of each subgroup are obtained, until all levels of groups have been traversed.

[0039] In one possible implementation, the policy calculation module is specifically used for:

[0040] If the policy ID configured in the current group is the same as the policy ID set of the parent group, then the unique policy ID is retained to avoid duplicate loading of policy content.

[0041] If there are no duplicate policy IDs, the policy ID of the current group is directly added to the policy ID set of the parent group to form the complete policy ID set of the current group.

[0042] In one possible implementation, the device further includes:

[0043] The policy update module is used for:

[0044] When the policy of a certain group in a computer information system is updated, the policy calculation process of that group and all its subordinate groups is re-executed, and the policy cache of the corresponding group is updated.

[0045] The group and its subordinate groups are notified to send policy download requests to their respective terminals.

[0046] Thirdly, this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in the first aspect.

[0047] Fourthly, this application provides a computer-readable storage medium having computer-readable instructions stored thereon, which can be executed by a processor to implement the method described in the first aspect.

[0048] Compared to existing technologies, the tree-structure-based multiple inheritance policy update method provided in this application receives a policy download request sent by a terminal; retrieves the policy identifier ID and corresponding policy content configured by the terminal from the local cache; retrieves the complete policy ID set of the direct parent group to which the terminal belongs from the local cache, and matches it to obtain the corresponding policy content; wherein, the complete policy ID set of the parent group is calculated based on multiple policy inheritance rules; concatenates the policy content configured by the terminal with the policy content of the parent group of the terminal to generate a complete policy file, and sends the complete policy file to the terminal, so that the terminal can simultaneously apply its own policy and the policies of all parent groups. Compared to existing technologies, this application improves the efficiency of policy calculation and delivery by pre-calculating the complete policies of groups in the process of applying multiple inheritance policies in a large number of terminals, thereby reducing the amount of policy calculation when the terminal requests the policy. Attached Figure Description

[0049] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0050] Figure 1 A flowchart of a tree-structure-based multiple inheritance strategy update method provided in an embodiment of this application is shown;

[0051] Figure 2 The flowchart illustrating the calculation process corresponding to the multiple strategy inheritance rules provided in the embodiments of this application is shown.

[0052] Figure 3 This illustration shows a schematic diagram of a computer information system with a tree-like organizational structure provided in an embodiment of this application;

[0053] Figure 4 This paper shows a schematic diagram of a tree-structure-based multiple inheritance strategy update device provided in an embodiment of this application.

[0054] Figure 5 A schematic diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0055] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0056] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.

[0057] Furthermore, the terms "first" and "second," etc., are used to distinguish different objects, not to describe a specific order. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to those processes, methods, products, or apparatuses.

[0058] Please refer to Figure 1 , Figure 1 This is a flowchart of a tree-structure-based multiple inheritance strategy update method provided in an embodiment of this application, applied to the server side of a computer information system with a tree-like organizational structure. The method includes the following steps S101~S104:

[0059] S101, Receive policy download request sent by terminal;

[0060] S102. Obtain the policy identifier id and corresponding policy content configured by the terminal itself from the local cache;

[0061] S103. Obtain the complete set of policy IDs of the direct parent group to which the terminal belongs from the local cache, and match them to obtain the corresponding policy content; wherein, the complete set of policy IDs of the parent group is calculated based on multiple policy inheritance rules;

[0062] Among them, the multiple policy inheritance rule is that for the same policy type, the terminal will not only apply the policy assigned to itself, but also inherit the policy of each group level.

[0063] In this application, the terminal may need to inherit the policy of the parent group, and the parent group may also need to inherit the policy of its parent group. For the convenience of policy calculation, the group policy can be calculated and cached level by level from the root node downwards. When a group inherits the policy of the parent group, it can directly obtain it from the policy cache of the parent group. When the terminal inherits the policy of the parent group, it can also directly obtain it from the policy cache of the parent group.

[0064] Each policy has a policy ID, and the policy content is a JSON string. After configuring policies, the program caches these policies. Multiple policy inheritance rules: For the same policy type, the terminal will not only apply the policy assigned to it, but also inherit the policies from each level of grouping.

[0065] Therefore, as Figure 2 As shown, the calculation process corresponding to the multiple strategy inheritance rule includes the following steps:

[0066] S201. Starting from the root node of the tree-like organizational structure, obtain the group identifier id of each level of group in a top-down order;

[0067] Specifically, starting with the root group of the tree-like organizational structure, the IDs of all direct subgroups of the root group are obtained sequentially through hierarchical traversal. Then, the IDs of the next-level subgroups of each subgroup are obtained, until all levels of groups have been traversed.

[0068] S202. For each group, obtain the policy configured for the current group itself, wherein the policy includes a unique policy ID and policy content;

[0069] S203. Obtain the policy cache of the direct parent group of the current group. The policy cache of the parent group stores the policy ID configured by the parent group itself and the set of policy IDs inherited from the parent group of the parent group.

[0070] S204. Merge the policy ID configured in the current group with the policy ID set of the obtained parent group to generate a complete policy ID set for the current group, and cache the complete policy ID set.

[0071] Specifically, if the policy ID configured in the current group is the same as the policy ID set of the parent group, the unique policy ID is retained to avoid duplicate loading of policy content; if there is no duplicate policy ID, the current group's own policy ID is directly added to the policy ID set of the parent group to form the complete policy ID set of the current group.

[0072] S104. The policy content configured by the terminal itself is concatenated with the policy content of the terminal's superior group to generate a complete policy file, and the complete policy file is sent to the terminal so that the terminal can apply its own policy and the policies of all superior groups at the same time.

[0073] In typical organizational structures, the number of terminals far exceeds the number of department groups. To improve policy calculation efficiency and server throughput, policies are calculated in advance, but only for department groups. Each department group's own configured policy ID and policy IDs inherited from its superiors are cached. When a terminal requests a policy, the system retrieves the current terminal's configured policy ID and the superior department's policy ID, and sends them to the terminal. This achieves the goal of enabling the terminal to apply its own policies as well as the policies of all superior departments.

[0074] In some embodiments, the tree-structure-based multiple inheritance policy update method provided in this application further includes: when the policy of a certain group in the computer information system is updated, re-executing the policy calculation process of the group and all its subordinate groups, updating the policy cache of the corresponding group; and notifying the terminals under the group and its subordinate groups to send policy download requests.

[0075] The strategy calculation process provided in this application is as follows:

[0076] 1. Starting from the root node, retrieve each group ID from top to bottom;

[0077] 2. Iterate through all strategy types;

[0078] 3. Obtain the terminal group's own policy;

[0079] 4. Obtain the parent group policy of the terminal group;

[0080] 5. Update the policy ID set of the terminal group based on its own policy and the policy of the parent group;

[0081] The strategy download process provided in this application is as follows:

[0082] 1. Cache all policy IDs and their policy content;

[0083] 2. Receive terminal policy download requests;

[0084] 3. Retrieve terminal policy cache;

[0085] 4. Retrieve the policy cache of the terminal's parent group;

[0086] 5. Find the policy content from the policy ID set cached in steps 2 and 3 above, reassemble the JSON strings of all policy IDs into a single JSON string, and then send it to the terminal.

[0087] Specifically, each strategy is a JSON string. If there are multiple strategies, these strings need to be concatenated to form a single JSON string that represents the multiple strategies that the terminal needs to apply.

[0088] For example:

[0089] 1. Group A has a subordinate group B, and group B has a terminal C. The user configures policy 1 for terminal group A and policy 2 and policy 3 for terminal C through the console.

[0090] 2. After receiving the policy update notification, the server calculates the policy for group A and its subgroups. Group B inherits policy A from group A.

[0091] 3. The server notifies all terminals in group A of the request policy;

[0092] 4. Terminal C requests a policy from the server;

[0093] 5. The server obtains policy 2 and policy 3 of terminal C itself, and then obtains policy 1 of its parent group B. Finally, the server sends policy 1, policy 2 and policy 3 to terminal C.

[0094] like Figure 3 The diagram shows a computer information system with a tree-like organizational structure. The update process of this computer information system based on the multiple inheritance strategy of this application is as follows:

[0095] 1. Configure policy 1 for group A, policy 2 and policy 3 for group A1, and policy 4 for terminal A11;

[0096] 2. After configuring the strategy, perform strategy calculation on the subgroups under group A. According to the rules of multiple inheritance strategy, mark group A as applying strategy 1, and group A1 as applying strategy 1, strategy 2, and strategy 3.

[0097] 3. Notify all terminals in group A of the acquisition policy;

[0098] 4. When terminals A2 and A3 request a policy, if the terminal itself has no policy configured, it will obtain the policy of the parent group, i.e., group A. Then, terminals A2 and A3 need to apply policy 1.

[0099] 5. When terminal A11 requests a policy, if the terminal itself is configured with policy 4, it will then obtain the policy of the parent group, i.e., group A1. Because group A1 was marked to apply policy 1, policy 2, and policy 3 during the policy calculation process, terminal A11 applies policy 1, policy 2, policy 3, and policy 4.

[0100] 6. When terminal A12 requests a policy, the terminal itself has not configured a policy. It obtains the policy of the parent group, i.e., group A1. Because group A1 was marked to apply policy 1, policy 2, and policy 3 during the policy calculation process, terminal A12 applies policy 1, policy 2, and policy 3.

[0101] 7. When terminal B1 requests a policy, if the terminal itself has not configured a policy, it will then obtain the policy of its parent group. If the parent group B has not applied a policy either, then terminal B1 has no policy to apply.

[0102] The beneficial effects of the tree-structure-based multiple inheritance strategy update method provided in this application are as follows:

[0103] This application provides a tree-structure-based multiple inheritance policy update method that receives a policy download request from a terminal; retrieves the policy identifier ID and corresponding policy content configured by the terminal from a local cache; retrieves the complete policy ID set of the direct parent group to which the terminal belongs from the local cache, and matches it to obtain the corresponding policy content; wherein the complete policy ID set of the parent group is calculated based on multiple policy inheritance rules; concatenates the policy content configured by the terminal with the policy content of the parent group to generate a complete policy file, and distributes the complete policy file to the terminal, so that the terminal can simultaneously apply its own policy and the policies of all parent groups. Compared with the prior art, this application improves the efficiency of policy calculation and distribution by pre-calculating the complete policies of groups in the process of applying multiple inheritance policies in a large number of terminals, thereby reducing the amount of policy calculation when the terminal requests the policy.

[0104] In the above embodiments, a method for updating a multiple inheritance strategy based on a tree structure is provided. Correspondingly, this application also provides a device for updating a multiple inheritance strategy based on a tree structure. The device for updating a multiple inheritance strategy based on a tree structure provided in this application can implement the above-described method for updating a multiple inheritance strategy based on a tree structure. This device can be implemented through software, hardware, or a combination of both. For example, the device may include integrated or separate functional modules or units to execute the corresponding steps in the above methods. Please refer to... Figure 4 As shown, this application provides a tree-structure-based multiple inheritance strategy update device 10, comprising:

[0105] The receiving module 101 is used to receive policy download requests sent by the terminal;

[0106] The acquisition module 102 is used to acquire the policy identifier ID and corresponding policy content configured by the terminal itself from the local cache; acquire the complete set of policy IDs of the direct parent group to which the terminal belongs from the local cache, and match them to obtain the corresponding policy content; wherein, the complete set of policy IDs of the parent group is calculated based on multiple policy inheritance rules;

[0107] The sending module 103 is used to concatenate the policy content configured by the terminal itself with the policy content of the upper-level group of the terminal to generate a complete policy file, and send the complete policy file to the terminal so that the terminal can apply its own policy and the policies of all upper-level groups at the same time.

[0108] In one possible implementation, the device further includes:

[0109] The strategy calculation module is used for:

[0110] Starting from the root node of the tree-like organizational structure, obtain the group identifier ID of each level of group in a top-down order;

[0111] For each group, iterate through all the preset strategy types in the computer information system;

[0112] Retrieve the policy configured for the current group, wherein the policy contains a unique policy ID and policy content;

[0113] Get the policy cache of the direct parent group of the current group. The policy cache of the parent group stores the policy ID configured by the parent group itself and the set of policy IDs inherited from the parent group of the parent group.

[0114] The policy ID configured in the current group is merged with the policy ID set of the parent group to generate a complete policy ID set for the current group, and this complete policy ID set is cached.

[0115] In one possible implementation, the policy calculation module is specifically used for:

[0116] Starting with the root group of the tree-like organization structure as the starting node, the IDs of all direct subgroups of the root group are obtained sequentially through recursive traversal or level-order traversal. Then, the IDs of the next-level subgroups of each subgroup are obtained, until all levels of groups have been traversed.

[0117] In one possible implementation, the policy calculation module is specifically used for:

[0118] If the policy ID configured in the current group is the same as the policy ID set of the parent group, then the unique policy ID is retained to avoid duplicate loading of policy content.

[0119] If there are no duplicate policy IDs, the policy ID of the current group is directly added to the policy ID set of the parent group to form the complete policy ID set of the current group.

[0120] In one possible implementation, the device further includes:

[0121] The policy update module is used for:

[0122] When the policy of a certain group in a computer information system is updated, the policy calculation process of that group and all its subordinate groups is re-executed, and the policy cache of the corresponding group is updated.

[0123] The group and its subordinate groups are notified to send policy download requests to their respective terminals.

[0124] The tree-structure-based multiple inheritance strategy update device and the tree-structure-based multiple inheritance strategy update method provided in this application are based on the same inventive concept and have the same beneficial effects as the methods they adopt, run, or implement.

[0125] This application also provides an electronic device corresponding to the method provided in the foregoing embodiments. The electronic device may be an electronic device for a client, such as a mobile phone, laptop, tablet computer, desktop computer, etc., to execute the above-described tree-structure-based multiple inheritance strategy update method.

[0126] Please refer to Figure 5 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 5 As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the tree-structure-based multiple inheritance strategy update method provided in any of the foregoing embodiments of this application.

[0127] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.

[0128] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs. After receiving an execution instruction, the processor 200 executes the program. The tree-structure-based multiple inheritance strategy update method disclosed in any of the foregoing embodiments of this application can be applied to the processor 200, or implemented by the processor 200.

[0129] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.

[0130] The electronic device provided in this application embodiment and the tree-structure-based multiple inheritance strategy update method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, run or implement.

[0131] This application also provides a computer-readable storage medium corresponding to the tree-structure-based multiple inheritance strategy update method provided in the foregoing embodiments, wherein a computer program (i.e., a program product) is stored thereon. When the computer program is run by a processor, it executes the tree-structure-based multiple inheritance strategy update method provided in any of the foregoing embodiments.

[0132] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0133] The computer-readable storage medium provided in the above embodiments of this application and the tree-structure-based multiple inheritance strategy update method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application.

Claims

1. A tree structure-based multiple inheritance policy updating method, characterized by, The method is applied to a server end of a computer information system with a tree organization structure, and comprises the following steps: receiving a policy downloading request sent by a terminal; obtaining a policy identifier (id) and corresponding policy content of a policy configured by the terminal from a local cache; obtaining a complete policy id set of a direct superior group to which the terminal belongs from the local cache, and matching to obtain corresponding policy content, wherein the complete policy id set of the superior group is calculated based on a multiple policy inheritance rule; splicing the policy content configured by the terminal and policy content of the superior group of the terminal, generating a complete policy file, and downloading the complete policy file to the terminal, so that the terminal applies the self policy and all superior group policies.

2. The method of claim 1, wherein, The multiple policy inheritance rule comprises the following steps: starting from a root node of the tree organization structure, obtaining group ids of each level group in a top-down order; for each group, obtaining a policy configured by the current group, wherein the policy comprises a unique policy id and policy content; obtaining a policy cache of a direct superior group of the current group, wherein the policy cache of the superior group stores a policy id configured by the superior group and a policy id set inherited from a superior group of the superior group; merging the policy id configured by the current group and the policy id set of the superior group to generate a complete policy id set of the current group, and caching the complete policy id set.

3. The method of claim 2, wherein, The step of starting from the root node of the tree organization structure and obtaining the group ids of each level group in the top-down order comprises the following steps: taking the root group of the tree organization structure as a starting node, obtaining all direct child group ids of the root group in a hierarchical traversal manner, and then obtaining next-level child group ids of each child group, until all hierarchical groups are traversed.

4. The method of claim 2, wherein, The step of merging the policy id configured by the current group and the policy id set of the superior group comprises the following steps: if there are duplicate policy ids in the policy id configured by the current group and the policy id set of the superior group, retaining a unique policy id to avoid duplicate loading of the policy content; if there are no duplicate policy ids, directly adding the policy id of the current group to the policy id set of the superior group to form the complete policy id set of the current group.

5. The method of claim 1, wherein, The method further comprises the following steps: when a policy of a group in the computer information system is updated, re-executing a policy calculation process of the group and all subordinate groups of the group to update a policy cache of the corresponding group; informing a terminal subordinate to the group and the subordinate groups to send a policy downloading request.

6. A tree structure-based multiple inheritance policy updating apparatus, characterized by comprising: The device is applied to a server end of a computer information system with a tree organization structure, and comprises the following modules: a receiving module, configured to receive a policy downloading request sent by a terminal; The acquisition module is configured to acquire the policy identifier (id) and corresponding policy content of the terminal itself from the local cache; and acquire the complete policy id set of the direct superior group to which the terminal belongs from the local cache, and match to obtain the corresponding policy content; wherein the complete policy id set of the superior group is calculated based on a multiple policy inheritance rule; The sending module is configured to splice the policy content of the terminal itself and the policy content of the superior group of the terminal, generate a complete policy file, and downlink the complete policy file to the terminal, so that the terminal applies the self policy and the policies of all superior groups.

7. The apparatus of claim 6, wherein, The device further comprises: The policy calculation module is configured to: start from the root node of the tree-shaped organizational structure, and acquire the group identifier (id) of each level group in turn in a top-down order; for each group, traverse all preset policy types in the computer information system; acquire the policy configured by the current group itself, wherein the policy contains a unique policy id and policy content; acquire the policy cache of the direct superior group of the current group, wherein the policy cache of the superior group stores the policy id configured by the superior group itself and the policy id set inherited from the superior group of the superior group; merge the policy id configured by the current group itself and the acquired policy id set of the superior group, generate the complete policy id set of the current group, and cache the complete policy id set.

8. The apparatus of claim 7, wherein, The policy calculation module is specifically configured to: take the root group of the tree-shaped organizational structure as a starting node, acquire all direct child group ids of the root group in a recursive traversal or hierarchical traversal manner, then acquire the next level child group id of each child group, and traverse all hierarchical groups until all hierarchical groups are traversed.

9. An electronic device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 5 when executing the computer program.

10. A computer-readable storage medium, characterized in that, A computer readable instruction is stored thereon, and the computer readable instruction can be executed by a processor to implement the method of any one of claims 1 to 5.