Canonical URI Parameter Normalization for Web Cache Efficiency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing request hashing schemes for URIs, including their parameters, often result in different hashes for semantically equivalent URIs due to parameter order variations, leading to unnecessary storage of the same content in web caches.
Innovation Solution
A method and apparatus for generating a canonical URI by reordering parameters in a consistent manner, removing meaningless parameters and characters, and normalizing case, followed by hashing, to ensure cache hit ratios are improved by eliminating duplicate storage of semantically equivalent requests.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If request URIs including parameters are hashed directly, then the hashing operation is simple and fast, but semantically equivalent URIs with different parameter orders produce different hashes leading to duplicate storage
Solution Approach 1:
The patent applies preliminary action by canonicalizing the URI parameters (sorting, removing duplicates, normalizing format) before the hashing operation. This preprocessing step ensures that semantically equivalent URIs produce identical hashes, improving cache hit ratios while maintaining relatively simple overall processing.
2Loss of information
If all URI parameters are preserved in hashing, then complete request information is captured, but meaningless parameters cause duplicate storage of semantically equivalent requests
Solution Approach 1:
The patent extracts and removes meaningless parameters from the URI before hashing. By identifying and eliminating parameters that do not affect the semantic meaning of the request (such as redundant sorting parameters or default value parameters), the system maintains complete meaningful request information while improving storage efficiency and reducing duplicate caching.
3Stability of the object's composition
If parameter order in URIs is maintained as received, then the original request structure is preserved, but different parameter orders result in different hashes for the same content
Solution Approach 1:
The patent applies asymmetry by transforming the variable parameter order into a fixed, canonical order through sorting. This creates an asymmetric transformation where different input orders are systematically converted to a unique standardized form, ensuring that semantically equivalent requests always produce the same hash while maintaining request structure integrity.
Data Source
AI summary
A caching system receives a request Uniform Resource Identifier (URI) that includes multiple parameters. The request URI is modified to create a canonical request URI including: ordering the parameters by name while keeping a relative order of any of the parameters that have a same name but different value; normalizing a case of the parameters; and removing any of the parameters that are determined to have no effect on a resource that corresponds to the request URI. The modified request URI is hashed thereby creating a hash value. The hash value is used to determine whether the resource that corresponds to the request URI is available in cache.


