Longest Increasing Subsequence for Policy Rule Reordering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for reordering policy rules in network devices require numerous commands, consuming significant resources and potentially causing device crashes due to inefficiency, especially when dealing with hundreds or thousands of policy rules.
Innovation Solution
The use of a longest increasing subsequence (LIS) algorithm to determine and generate reordering commands, which reduces the number of commands needed and improves computational and space complexity compared to traditional methods like longest common subsequence (LCS), allowing for more efficient reconfiguration of network devices.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional longest common subsequence (LCS) method is used to determine reordering commands, then complete reordering accuracy is achieved, but computational complexity and space complexity increase significantly
Solution Approach 1:
The patent extracts and utilizes only the relevant portion of the LCS algorithm by focusing on the longest increasing subsequence (LIS) of policy rule indices. Instead of computing the full LCS between two policy rule sequences, the invention extracts the LIS from the destination policy's rule indices, which directly provides the reordering information needed. This extraction approach maintains reordering accuracy while significantly reducing computational and space complexity.
Solution Approach 2:
The patent changes the problem parameter from computing LCS between two sequences to finding LIS within a single sequence of indices. By transforming the destination policy rules into a sequence of indices referencing the source policy, the problem becomes finding the LIS of these indices, which is computationally more efficient (O(n log n) vs O(n²) for LCS) and uses less space.
2Manufacturing precision
If numerous reorder commands are generated to reconfigure policy rules, then complete policy update accuracy is achieved, but network resources and device resources are consumed excessively
Solution Approach 1:
The patent extracts only the essential reordering information from the policy comparison by identifying the LIS of indices. This extracted LIS directly indicates which rules need to be moved and to what positions, allowing the generation of minimal reordering commands. This approach maintains complete policy update accuracy while minimizing the number of commands transmitted over the network and executed on the device.
3Productivity
If numerous reorder commands are sent to network device, then policy reconfiguration completeness is achieved, but device reliability decreases due to potential crashes
Solution Approach 1:
The patent extracts the critical reordering subset through LIS identification, which provides a minimal yet complete set of reordering operations. By using the LIS of indices to generate commands, the system achieves complete policy reconfiguration with fewer commands, thereby reducing the risk of device crashes or operational instability that can result from processing excessive reordering instructions.
4Productivity
If traditional LCS algorithm is used for determining reordering commands, then comprehensive reordering coverage is achieved, but memory space and processor cycles are utilized inefficiently
Solution Approach 1:
The patent changes the algorithmic parameter from LCS (longest common subsequence) to LIS (longest increasing subsequence). By transforming the problem into finding the LIS of destination policy indices referencing source policy rules, the solution achieves comprehensive reordering coverage with O(n log n) time complexity and O(n) space complexity, compared to LCS's O(n²) time and space requirements. This parameter change dramatically reduces processor cycle consumption and memory usage.
Solution Approach 2:
The patent substitutes the mechanical LCS computation process with a more efficient LIS-based approach. Instead of performing the complex dual-sequence alignment of LCS, the invention uses index transformation and LIS finding, which can be implemented with more efficient data structures and algorithms (e.g., binary search, patience sorting), thereby reducing the mechanical overhead of computation.
Data Source
AI summary
In general, techniques are described for determining reorder commands for remote reordering of policy rules. A device management system comprising a memory, a processor, and an interface may be configured to perform the techniques. A memory may store a currently configured policy for a managed network device and an updated policy for the managed device. The processor may determine a longest increasing subsequence (LIS) between a source list comprising the plurality of policy rules in a first ordering and a destination list of the plurality of policy rules in a second ordering. The processor may generate, based on the LIS, one or more policy configuration commands for the managed network device that direct the managed network device to conform the currently configured policy to the updated policy. The interface may output the one or more policy configuration commands to the managed network device.


