Web caching method based on content fingerprint technology and intelligent middleware device
Through the Web caching method and intelligent middleware device based on content fingerprint technology, the problem of isomorphic data sets but heterogeneous presentation forms in Web cache is solved, more efficient cache utilization and network request optimization are achieved, and the performance and user experience of Web applications are improved.
Patent Information
- Application Number
- CN202510854184.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-03
AI Technical Summary
Existing Web caching solutions cannot effectively utilize the situation where datasets are homogeneous but presentation forms are heterogeneous, resulting in low cache utilization and redundant network requests, especially defects in URL dependency and data homology processing.
A web caching method based on content fingerprint technology is adopted. By standardizing the data set requested by the client, content fingerprints and feature vectors are generated, and the cache is dynamically matched and updated, including SHA-3 hash calculation and MurmurHash3 hash calculation, and transparent cache logic processing is performed in combination with intelligent middleware devices.
It improves cache hit rate, reduces network requests, enhances Web application performance and user experience, adapts to diverse request requirements, reduces server load and improves response speed.
Smart Images

Figure CN120744262A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer networks, and in particular to a Web caching method and an intelligent middleware device based on content fingerprint technology. Background Art
[0002] With the rapid development of the internet, the complexity and user base of web applications are constantly increasing, placing higher demands on the performance and responsiveness of web applications. Caching technology, as one of the key means of improving web application performance, is widely used in various web applications. However, existing web caching solutions suffer from two core flaws:
[0003] URL uniqueness dependency: Existing web caching mechanisms primarily rely on URL uniqueness to determine whether to use the cache. When different URL requests return the same dataset, for example due to different paging parameters (page=1 vs. page=2), sorting rules (sort=asc / desc), or filtering conditions (filter=price>100), traditional caching mechanisms cannot identify the data relevance between these requests, resulting in ineffective cache utilization and unnecessary network requests and wasted resources.
[0004] Data homology blind spot: For cases where the order of fields in JSON / XML data differs (such as {name:"A"},{name:"B"} vs. {name:"B"},{name:"A"}), existing caching mechanisms lack standardized processing capabilities and are unable to identify the homology of these data sets, further limiting cache utilization.
[0005] In current web applications, caching technology is widely adopted to improve access speed and user experience. However, existing web caching methods suffer from low cache utilization and redundant network requests when processing homogeneous datasets but heterogeneous presentation formats. Specifically, when the same dataset is returned in different orders or formats, traditional caching methods may fail to identify the similarities in their content, resulting in cache misses and unnecessary network requests. Furthermore, the dynamic adjustment and processing capabilities of cached data are limited, making it difficult to adapt effectively to the diverse client requests. Summary of the Invention
[0006] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.
[0007] The present invention proposes a Web caching method based on content fingerprint technology, which is used to efficiently cache and dynamically process scenarios with homogeneous data sets but heterogeneous presentation forms (data with the same return value but different URLs, such as sensitive sorting, variable filtering conditions, different paging parameters, etc.).
[0008] Another object of the present invention is to provide a Web cache system based on content fingerprint technology.
[0009] To achieve the above-mentioned object, the present invention provides a web caching method based on content fingerprint technology, comprising:
[0010] Normalize the data set returned by the server after the client requests the URL, including sorting the list data according to predefined rules to eliminate order differences;
[0011] Perform SHA-3 hash calculation on the standardized data content to generate a content fingerprint, extract the request features as a feature parameter vector, perform MurmurHash3 hash calculation on the feature parameter vector, and generate a dynamic feature identifier;
[0012] Parse the client request parameters to generate a feature vector and check whether there is a record matching the feature vector in the cache;
[0013] When a matching feature vector exists in the cache, the requested URL features are parsed and the cached data is dynamically processed based on the URL features;
[0014] The generated content fingerprint, normalized data, and feature vector are stored in the cache. If the data content of the new request matches the content fingerprint in the cache, the cache record is updated.
[0015] When the cache misses, the server is requested to obtain the data and perform normalization and hash calculation. If the newly generated content fingerprint matches the fingerprint in the cache, the feature vector and URL of the new request are added to the cache pool.
[0016] The web caching method based on content fingerprint technology in the embodiment of the present invention may also have the following additional technical features:
[0017] In one embodiment of the present invention, the predefined rule includes sorting in ascending order of primary key.
[0018] In one embodiment of the present invention, the SHA-3 hash calculation is a hash calculation performed on the standardized JSON data encoded in UTF-8.
[0019] In one embodiment of the present invention, if a matching feature vector exists in the cache, the cached data is directly used and dynamically processed according to the request features before being returned to the client.
[0020] In one embodiment of the present invention, the dynamic processing includes sorting the cached data according to the requested sorting method, or filtering the cached data according to the requested filtering conditions.
[0021] In one embodiment of the present invention, the cache record further includes an associated URL list.
[0022] In one embodiment of the present invention, an intelligent middleware mechanism is also provided for transparently processing cache logic in Web applications. The middleware automatically checks the cache when a request arrives, and dynamically processes cached data or requests backend services and updates the cache based on the cache hit situation.
[0023] In one embodiment of the present invention, the middleware implementation further includes configuration and initialization, deployment of intelligent middleware and initialization of cache storage structure.
[0024] To achieve the above-mentioned object, the present invention further provides a web cache intelligent middleware device based on content fingerprint technology, comprising:
[0025] The standardization processing module is used to standardize the data set returned by the server after the client requests the URL;
[0026] The content fingerprint generation module is used to perform SHA-3 hash calculation on the standardized data content to generate a content fingerprint, extract the request features into a feature parameter vector, perform MurmurHash3 hash calculation on the feature parameter vector, and generate a dynamic feature identifier;
[0027] The feature vector generation and matching module is used to parse the client request parameters to generate a feature vector and check whether there is a record matching the feature vector in the cache;
[0028] The URL analysis and dynamic data processing module is used to parse the requested URL features when there is a matching feature vector in the cache, and dynamically process the cached data based on the URL features;
[0029] A cache storage and update module, which is used to store the generated content fingerprint, normalized data and feature vector in the cache, and update the cache record when the newly requested data content matches the content fingerprint in the cache;
[0030] The cache self-learning module is used to request the server to obtain data and perform normalization and hash calculation when the cache misses. If the newly generated content fingerprint matches the fingerprint in the cache, the feature vector and URL of the new request are added to the cache pool.
[0031] A Web caching method and intelligent middleware device based on content fingerprint technology in an embodiment of the present invention calculates the content fingerprint of the returned data, sorts the data set, and then caches it. At the same time, the order of the cached data is dynamically adjusted according to the characteristics of the request URL, thereby making greater use of the cached data and reducing network requests. This solves the problems of low cache utilization and redundant network requests caused by isomorphic data sets but heterogeneous presentation forms in the prior art, thereby improving the performance of Web applications and user experience.
[0032] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0034] Figure 1 is a flow chart of a Web caching method based on content fingerprint technology according to an embodiment of the present invention;
[0035] Figure 2 is an interactive relationship diagram of the client, middleware, cache, and backend services according to an embodiment of the present invention;
[0036] Figure 3 is a cache flow chart showing the process from request to cache matching, dynamic processing and return according to an embodiment of the present invention;
[0037] Figure 4 4 is a structural diagram of a Web cache intelligent middleware device based on content fingerprint technology according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0039] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0040] The following describes a Web caching method and an intelligent middleware device based on content fingerprint technology according to an embodiment of the present invention with reference to the accompanying drawings.
[0041] First, the technical terms mentioned in this invention are introduced:
[0042] Web: World Wide Web is a service on the Internet that presents information to users in the form of web pages through hypertext and hypermedia technologies.
[0043] HTTP: HyperText Transfer Protocol, is a transmission protocol used to transfer hypertext from the World Wide Web server to the local browser.
[0044] URL: Uniform Resource Locator, is the address used to identify a resource on the Internet.
[0045] JSON: JavaScript Object Notation, a lightweight data exchange format that is easy for humans to read and write, and also easy for machines to parse and generate.
[0046] XML: eXtensible Markup Language, a markup language used to mark electronic files to make them structured.
[0047] SHA-3: Secure Hash Algorithm 3, Secure Hash Algorithm 3, is a cryptographic hash function used to generate hash values for data.
[0048] MurmurHash3: A non-cryptographic hash algorithm with high computation speed and low collision rate, commonly used for fast hash calculations.
[0049] Figure 1 is a flow chart of a Web caching method based on content fingerprint technology according to an embodiment of the present invention. Figure 1 Shown, including:
[0050] S1, standardizes the data set returned by the server after the client requests the URL, including sorting the list data according to predefined rules to eliminate order differences;
[0051] S2, performs SHA-3 hash calculation on the standardized data content to generate a content fingerprint, extracts the request features into a feature parameter vector, performs MurmurHash3 hash calculation on the feature parameter vector, and generates a dynamic feature identifier;
[0052] S3, parses the client request parameters to generate a feature vector and checks whether there is a record matching the feature vector in the cache;
[0053] S4, when there is a matching feature vector in the cache, parse the requested URL features and dynamically process the cached data based on the URL features;
[0054] S5, storing the generated content fingerprint, normalized data, and feature vector in the cache. If the newly requested data content matches the content fingerprint in the cache, updating the cache record;
[0055] S6, when the cache misses, the server is requested to obtain the data and perform normalization and hash calculation. If the newly generated content fingerprint matches the fingerprint in the cache, the feature vector and URL of the new request are added to the cache pool.
[0056] In one embodiment of the present invention, content data normalization is performed as follows:
[0057] When a client requests a URL and receives data returned by the server, the middleware normalizes the returned dataset: it sorts list-like data according to predefined rules (such as ascending primary key order) to eliminate order differences. For example, if the returned result is a list, it is sorted according to a fixed rule (such as sorting by field) to ensure that different orders of the same dataset can generate the same content fingerprint.
[0058] In one embodiment of the present invention, the content fingerprint is generated in the following steps:
[0059] Combining SHA-3 (content hash) and MurmurHash3 (feature hash) double hashing mechanisms:
[0060] SHA-3 (UTF-8 (normalized JSON)) → content fingerprint
[0061] MurmurHash3(feature parameter vector) → dynamic feature identifier
[0062] When a client requests a URL and receives data returned by the server, the middleware performs fingerprint calculation on the standardized data content, extracts the request features into feature parameter vectors, and performs feature hashing to implement dynamic parameter mapping (e.g. mapping sort=asc to feature identifier S1).
[0063] In one embodiment of the present invention, the feature vector generation and matching steps are as follows:
[0064] When a client request arrives, the middleware parses the request parameters (such as sorting method, filtering conditions, paging information, etc.) and generates a feature vector.
[0065] The middleware checks the cache for records that match the feature vector. If a match is found, the cached data is used directly, dynamically processed, and returned to the client, avoiding sending a request to the server.
[0066] In one embodiment of the present invention, URL analysis and dynamic data processing are as follows:
[0067] When the client requests a URL again, the middleware first parses the parameters to generate the request's fingerprint and checks whether the request fingerprint exists in the cache record. If so, it analyzes the URL's request characteristics (such as sorting method, filtering conditions, etc.).
[0068] Based on the request characteristics of the URL, the middleware dynamically processes the data in the cache. For example:
[0069] If the URL requests ascending data, but the cache stores descending data, the middleware processes the cached data in ascending order before returning it to the front end.
[0070] If the URL requests the filtering result of a specific field, the middleware filters the cached data and then returns it to the front end.
[0071] In one embodiment of the present invention, cache storage and update are as follows:
[0072] The generated content fingerprint, normalized data, and feature vector are stored in the cache. The cache record includes the content fingerprint, data content, feature vector, and associated URL list.
[0073] If the data content of the new request matches the content fingerprint in the cache, the cache record is updated and the URL of the new request and its feature vector are added to the cache pool.
[0074] In one embodiment of the present invention, the cache self-learning mechanism performs the following steps:
[0075] When a cache miss occurs, the middleware requests the server to obtain the data, normalizes the data, and performs hash calculations. If the newly generated content fingerprint matches the fingerprint in the cache, the feature vector and URL of the new request are added to the cache pool, enabling dynamic cache expansion.
[0076] Furthermore, the present invention provides an intelligent middleware mechanism for transparently handling caching logic in web applications. The middleware automatically checks the cache when a request arrives. If a cache hit is found, the cached data is dynamically processed based on the request characteristics and returned. If a cache miss is found, the backend service is requested and the cache is updated.
[0077] like Figure 2 As shown in the figure, the interaction between the client, middleware, cache and backend services is shown. The specific data interaction process is as follows:
[0078] The client initiates a request, which first reaches the smart middleware. The smart middleware acts as a bridge between the client and the backend service, responsible for receiving and processing all requests from the client.
[0079] When the intelligent middleware receives a client request, it first checks its cache to see if the requested data already exists. If so, it returns the cached data directly to the client, speeding up the response and reducing reliance on backend services. This approach effectively reduces the load on backend services and improves overall system performance.
[0080] If the required data isn't in the cache, the intelligent middleware sends a request to the backend service to retrieve it. The backend service handles complex business logic and data operations. Upon receiving the request, it performs the appropriate processing and returns the result to the intelligent middleware. After receiving the data from the backend service, the intelligent middleware performs the necessary processing and returns the final result to the client.
[0081] To improve the response speed of subsequent requests, the intelligent middleware updates the data in its cache after obtaining new data from the backend service. This allows the intelligent middleware to retrieve the data directly from the cache the next time the same request comes in, without having to call the backend service again. This mechanism not only speeds up data access but also reduces frequent calls to backend services, improving overall system efficiency.
[0082] like Figure 3 As shown in the figure, the complete process from request to cache matching, dynamic processing and return is shown. The specific data interaction process is as follows:
[0083] When a client initiates a request, it first reaches the intelligent middleware. The intelligent middleware is responsible for receiving and parsing the request, generating a corresponding feature vector based on the request content for subsequent data processing and cache matching. When processing the request, the intelligent middleware first checks the cache for data relevant to the request. If a matching record exists in the cache (a cache hit), the intelligent middleware directly proceeds to dynamically process the cached data. If no relevant data is found (a cache miss), it further requests data from the backend service. In the case of a cache hit, the intelligent middleware dynamically processes the cached data. This includes updating or personalizing the existing data to ensure that the data returned to the client is up-to-date and meets user needs. This processed data is then sent directly to the client, speeding up response times and reducing reliance on backend services. In the case of a cache miss, the intelligent middleware sends a request to the backend service for the latest data. Upon receiving the request, the backend service performs the appropriate business logic processing and returns the results to the intelligent middleware. The intelligent middleware standardizes this data to ensure that its format conforms to the system's unified requirements. After obtaining standardized data, the intelligent middleware generates a corresponding content fingerprint and matches it with existing cached records. If a match is successful, indicating that the current data already exists in the system, the intelligent middleware updates the cache record and adds the new feature vector. If a match fails, indicating that the data is completely new, the intelligent middleware stores the new content fingerprint and its associated data. Regardless of whether the match succeeds or fails, the final processed data is returned to the client, completing the entire interaction process.
[0084] The specific implementation process is as follows:
[0085] 1) Configuration and initialization, including deploying intelligent middleware and initializing cache storage;
[0086] Among them, deploy intelligent middleware: deploy intelligent middleware between the Web server and the client to ensure that all client requests are processed through the middleware.
[0087] Among them, initializing cache storage: setting up a cache storage structure for storing information such as content fingerprints, standardized data, feature vectors, and associated URLs.
[0088] 2) Request processing and feature vector generation, including client request arrival, request parameter parsing, and feature vector generation;
[0089] The client request arrives: the client sends a request through a browser, such as http: / / example.com / products?page=1&sort=desc.
[0090] Among them, parsing request parameters: the middleware parses the request URL parameters and extracts sorting method, paging information, filtering conditions, etc.
[0091] Among them, generating a feature vector: constructing a feature vector according to request parameters, such as sort=desc&page=1.
[0092] 3) Cache match check, including checking cache records and cache hit processing;
[0093] Among them, check the cache record: the middleware searches the cache for records that match the generated feature vector.
[0094] Among them, cache hit processing: if a matching record is found, the cached data is directly used, and dynamic processing (such as sorting or filtering) is performed according to the request characteristics before returning it to the client.
[0095] 4) Request server and data processing, including cache misses, server responses, and data normalization;
[0096] Among them, cache miss: If no matching record is found, the middleware forwards the request to the backend server to obtain the data.
[0097] Among them, server response: the server processes the request and returns data, such as JSON data of the product list.
[0098] Among them, data standardization processing: the middleware standardizes the returned data, such as sorting in ascending order by product ID.
[0099] 5) Content fingerprint generation and cache storage, including generating content fingerprints and storing cache records;
[0100] Among them, generating content fingerprint: applying the SHA-3 hash algorithm to the standardized data to generate a unique content fingerprint.
[0101] Among them, storing cache records: storing content fingerprints, standardized data, feature vectors and request URLs in the cache and establishing associations.
[0102] 6) Dynamic data processing and return, including dynamic adjustment of data and return of processing results;
[0103] Among them, dynamically adjusting data: dynamically processing cached data according to the characteristics of the client request (such as ascending or descending order).
[0104] Among them, returning the processing result: returning the processed data to the client to complete the response.
[0105] 7) Cache self-learning mechanism is triggered, including subsequent request processing, data consistency detection, and cache pool expansion;
[0106] Subsequent request processing: when a new client request (such as http: / / example.com / products?page=1&sort=asc) arrives, the above steps are repeated.
[0107] Among them, data consistency detection: if the content fingerprint generated by the data obtained by the new request after standardization is consistent with the fingerprint in the cache, the cache self-learning mechanism is triggered.
[0108] Among them, expanding the cache pool: adding the feature vector and URL of the new request to the association list of the original cache record to dynamically expand the coverage of the cache.
[0109] 8) Continuous optimization and updates, including regular cache cleanup and statistics and analysis;
[0110] Among them, regular cache cleaning: clearing expired or infrequently used cache records according to preset strategies (such as least recently used) to free up storage space.
[0111] Among them, statistics and analysis: record indicators such as cache hit rate and request processing time for evaluating and optimizing cache strategies.
[0112] In summary, the present invention parses the URL parameters requested by the client and generates a feature vector. Check whether there is a cache record in the cache that matches the feature vector. If no cache record is matched, request data from the server and perform standardization on the returned data. Perform hash calculation on the standardized data to generate a content fingerprint. Store the content fingerprint, standardized data and feature vector in the cache. Dynamically process the cache data according to the request characteristics and return the processed data. When the data content of the new request matches the content fingerprint in the cache, the feature vector and URL of the new request are added to the cache record.
[0113] Extract request parameters such as sorting method, filtering conditions, and paging information. Encode the extracted parameters to form a feature vector. Sort list data according to predefined rules (such as ascending or descending primary key order). Use the SHA-3 algorithm for hash calculation. Store the URL list associated with the feature vector. Sort or filter the cached data based on the request characteristics. Check whether the data content of the new request matches the content fingerprint in the cache. If so, add the feature vector and URL of the new request to the cache record.
[0114] The beneficial effects of the present invention are:
[0115] Improve cache utilization: Through standardized processing and dynamic fingerprint matching, it is possible to identify and cache data with the same return value but different URLs, as well as the same data set but different return orders, significantly improving the cache hit rate.
[0116] Reduce network requests: Reduce unnecessary network requests, reduce server load, and improve the response speed of web applications.
[0117] High flexibility: This method does not rely on the uniqueness of the URL and is applicable to a variety of Web application scenarios. At the same time, the middleware can dynamically adjust data according to request characteristics, further improving the flexibility of the cache.
[0118] Response delay optimization: By hitting the cache, the response speed is greatly improved and the response delay is reduced.
[0119] Intelligent cache self-learning mechanism: Through the cache self-learning mechanism, the cache coverage is dynamically expanded to further improve cache utilization and adapt to changing request patterns.
[0120] Easy to integrate and maintain: The design of the middleware makes it easy to integrate into the existing Web architecture, and it is easy to operate and maintain, reducing operation and maintenance costs.
[0121] Data consistency: Through standardization processing and content fingerprint generation, the consistency of the same data set is ensured, avoiding cache invalidation caused by differences in data sequence or format.
[0122] According to an embodiment of the present invention, a Web caching method based on content fingerprint technology calculates the content fingerprint of the returned data, sorts the data set, and then caches it. At the same time, the order of the cached data is dynamically adjusted according to the characteristics of the request URL, thereby making greater use of the cached data and reducing network requests. This solves the problems of low cache utilization and redundant network requests caused by isomorphic data sets but heterogeneous presentation forms in the prior art, thereby improving the performance of Web applications and user experience.
[0123] In order to implement the above embodiment, Figure 4 As shown, this embodiment also provides a web cache intelligent middleware device 10 based on content fingerprint technology, including:
[0124] The standardization processing module 100 is used to perform standardization processing on the data set returned by the server after the client requests the URL;
[0125] The content fingerprint generation module 200 is used to perform SHA-3 hash calculation on the data content after standardization to generate a content fingerprint, extract request features as feature parameter vectors, perform MurmurHash3 hash calculation on the feature parameter vectors, and generate dynamic feature identifiers;
[0126] The feature vector generation and matching module 300 is used to parse the client request parameters to generate a feature vector and check whether there is a record matching the feature vector in the cache;
[0127] URL analysis and dynamic data processing module 400, for analyzing the requested URL features when a matching feature vector exists in the cache, and dynamically processing the cached data according to the URL features;
[0128] Cache storage and update module 500, used to store the generated content fingerprint, normalized data and feature vector in the cache, and update the cache record when the newly requested data content matches the content fingerprint in the cache;
[0129] The cache self-learning module 600 is used to request the server to obtain data and perform normalization and hash calculation when the cache misses. If the newly generated content fingerprint matches the fingerprint in the cache, the feature vector and URL of the new request are added to the cache pool.
[0130] Specifically, the client request URL parameters are parsed and a feature vector is generated. The cache is checked for records matching the feature vector. The data obtained from the server is normalized. A content fingerprint is generated for the normalized data. The cache record is stored and updated. The cached data is dynamically processed based on the request characteristics. The feature vector and URL of the new request are added to the cache record to expand cache coverage.
[0131] Furthermore, the cache storage and update module is designed to regularly clean up expired or infrequently used cache records.
[0132] Furthermore, the cache storage and update module sorts the cache data in ascending or descending order and filters the fields according to the request characteristics.
[0133] Furthermore, the cache self-learning module automatically expands the cache pool when a content fingerprint match is detected.
[0134] According to an embodiment of the present invention, a Web cache intelligent middleware device based on content fingerprint technology calculates the content fingerprint of the returned data, sorts the data set and then caches it, and dynamically adjusts the order of the cached data according to the characteristics of the request URL, thereby making greater use of the cached data and reducing network requests. This solves the problems of low cache utilization and redundant network requests caused by isomorphic data sets but heterogeneous presentation forms in the prior art, thereby improving the performance of Web applications and user experience.
[0135] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0136] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
Claims
1. A web caching method based on content fingerprint technology, characterized in that: include: Normalize the data set returned by the server after the client requests the URL, including sorting the list data according to predefined rules to eliminate order differences; Perform SHA-3 hash calculation on the standardized data content to generate a content fingerprint, extract the request features as a feature parameter vector, perform MurmurHash3 hash calculation on the feature parameter vector, and generate a dynamic feature identifier; Parse the client request parameters to generate a feature vector and check whether there is a record matching the feature vector in the cache; When a matching feature vector exists in the cache, the requested URL features are parsed and the cached data is dynamically processed based on the URL features; The generated content fingerprint, normalized data, and feature vector are stored in the cache. If the data content of the new request matches the content fingerprint in the cache, the cache record is updated. When the cache misses, the server is requested to obtain the data and perform normalization and hash calculation. If the newly generated content fingerprint matches the fingerprint in the cache, the feature vector and URL of the new request are added to the cache pool.
2. The Web caching method according to claim 1, wherein: The predefined rules include sorting by primary key in ascending order.
3. The Web caching method according to claim 1, wherein: The SHA-3 hash calculation is to perform hash calculation on the standardized JSON data after UTF-8 encoding.
4. The Web caching method according to claim 1, wherein: If a matching feature vector exists in the cache, the cached data is used directly and dynamically processed according to the request characteristics before being returned to the client.
5. The Web caching method according to claim 1, wherein: The dynamic processing includes sorting the cached data according to the requested sorting method, or filtering the cached data according to the requested filtering conditions.
6. The Web caching method according to claim 1, wherein: The cache record also includes an associated URL list.
7. The Web caching method according to claim 1, wherein: It also includes providing an intelligent middleware mechanism for transparently processing cache logic in Web applications. The middleware automatically checks the cache when a request arrives, and dynamically processes cached data or requests backend services and updates the cache based on cache hits.
8. The Web caching method according to claim 7, wherein: The middleware implementation also includes configuration and initialization, deployment of intelligent middleware and initialization of cache storage structure.
9. A web cache intelligent middleware device based on content fingerprint technology, characterized in that: include: The standardization processing module is used to standardize the data set returned by the server after the client requests the URL; The content fingerprint generation module is used to perform SHA-3 hash calculation on the standardized data content to generate a content fingerprint, extract the request features into a feature parameter vector, perform MurmurHash3 hash calculation on the feature parameter vector, and generate a dynamic feature identifier; The feature vector generation and matching module is used to parse the client request parameters to generate a feature vector and check whether there is a record matching the feature vector in the cache; The URL analysis and dynamic data processing module is used to parse the requested URL features when there is a matching feature vector in the cache, and dynamically process the cached data based on the URL features; A cache storage and update module, which is used to store the generated content fingerprint, normalized data and feature vector in the cache, and update the cache record when the newly requested data content matches the content fingerprint in the cache; The cache self-learning module is used to request the server to obtain data and perform normalization and hash calculation when the cache misses. If the newly generated content fingerprint matches the fingerprint in the cache, the feature vector and URL of the new request are added to the cache pool.
10. The intelligent middleware device according to claim 9, characterized in that: The cache storage and update module is designed to regularly clear out expired or infrequently used cache records.
11. The intelligent middleware device according to claim 9, characterized in that The cache storage and update module sorts the cache data in ascending or descending order and filters the fields according to the request characteristics.
12. The intelligent middleware device according to claim 9, wherein: The cache self-learning module automatically expands the cache pool when a content fingerprint match is detected.
Citation Information
Patent Citations
Systems and methods for video cache indexing
CN103222272A
Web cache and return optimization method and Web cache system
CN103269353A
Configurable caching method and system for artificial intelligence reasoning process
CN119201498A
Customer relation information storage and retrieval method and system based on bidirectional graph cache
CN120179699A
Caching Historical Embeddings in Conversational Search
US20230267126A1