Web cache method based on content fingerprint technology and intelligent middleware device

CN120744262BActive Publication Date: 2026-10-27JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510854184.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2026-10-27
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

然而,现有技术中的Web缓存方法在处理数据集同构但呈现形式异构的情况下,存在缓存利用率低、网络请求冗余的问题

Benefits of technology

[0031]本发明实施例的一种基于内容指纹技术的Web缓存方法和智能中间件装置,通过计算返回数据的内容指纹,并对数据集进行排序后缓存,同时根据请求URL的特征动态调整缓存数据的顺序,从而更大程度地利用缓存数据,减少网络请求,解决现有技术中因数据集同构但呈现形式异构导致的缓存利用率低、网络请求冗余问题,提高Web应用的性能和用户体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744262B_ABST
    Figure CN120744262B_ABST
Patent Text Reader

Abstract

The application discloses a web cache method and intelligent middleware device based on content fingerprint technology, aiming at solving the problems of low cache utilization and network request redundancy when the existing web cache technology processes data sets with isomorphism but different presentation forms. The method includes the steps of content data standardization processing, content fingerprint generation, feature vector generation and matching, URL analysis and dynamic data processing, cache storage and updating, and cache self-learning mechanism. Through standardization processing and data hash calculation, the application can accurately identify different presentation forms of the same data set, improve cache utilization; at the same time, the cache data is dynamically adjusted according to the request characteristics to meet the diversified needs of the client. The intelligent middleware mechanism realizes the transparent processing of the cache logic, without modifying the existing web application code. The application improves the performance and user experience of the web application, and has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer networks, and more particularly to a web caching method and intelligent middleware device based on content fingerprinting technology. Background Technology

[0002] With the rapid development of the internet, the complexity and user volume of web applications are constantly increasing, placing higher demands on their performance and response speed. Caching technology, as one of the important means to improve web application performance, is widely used in various web applications. However, existing web caching solutions have two major drawbacks:

[0003] URL uniqueness dependency: Existing web caching mechanisms primarily rely on the uniqueness of URLs to determine whether to use the cache. When different URL requests return the same dataset, for example, due to differences in pagination parameters (page=1 vs page=2), sorting rules (sort=asc / desc), or filtering conditions (filter=price>100), traditional caching mechanisms cannot identify the data correlation between these requests, thus failing to effectively utilize the cache and leading to unnecessary network requests and resource waste.

[0004] Data homology blind spot: For cases where the field order differs in JSON / XML data (e.g., {name:"A"}, {name:"B"} vs. {name:"B"}, {name:"A"}), existing caching mechanisms lack standardized processing capabilities and cannot identify the homology of these datasets, further limiting the utilization of the cache.

[0005] In current web applications, caching technologies are widely used to improve access speed and user experience. However, existing web caching methods suffer from low cache utilization and redundant network requests when dealing with homogeneous datasets but heterogeneous presentation formats. Specifically, when the same dataset is returned in different orders or formats, traditional caching methods may fail to recognize the similarity of their content, leading to cache misses and increasing unnecessary network requests. Furthermore, the dynamic adjustment and processing capabilities of cached data are limited, making it difficult to adapt well to diverse client request needs. Summary of the Invention

[0006] The present invention aims to at least partially solve one of the technical problems in the related art.

[0007] This invention proposes a web caching method based on content fingerprinting technology for efficient caching and dynamic processing of scenarios where datasets are homogeneous but their presentation is heterogeneous (data with the same return value but different URLs, such as data that is sensitive to sorting, has variable filtering conditions, or has different pagination parameters).

[0008] Another objective of this invention is to propose a web caching system based on content fingerprinting technology.

[0009] To achieve the above objectives, this invention proposes a web caching method based on content fingerprinting technology, comprising:

[0010] The client requests a URL and receives a dataset returned by the server. This includes sorting list-type data according to predefined rules to eliminate order differences.

[0011] Perform SHA-3 hash calculation on the standardized data content to generate content fingerprint, extract request features as feature parameter vector, perform MurmurHash3 hash calculation on the feature parameter vector to generate dynamic feature identifier;

[0012] Parse the client request parameters to generate a feature vector, and check if there is a record in the cache that matches the feature vector;

[0013] When a matching feature vector exists in the cache, the URL features of the request are parsed, and the cached data is dynamically processed based on the URL features.

[0014] The generated content fingerprint, standardized data, and feature vector are stored in the cache. If the data content of a new request matches the content fingerprint in the cache, the cache record is updated.

[0015] When a cache miss occurs, the server is requested to retrieve 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 fingerprinting technology in this embodiment of the invention may also have the following additional technical features:

[0017] In one embodiment of the present invention, the predefined rule includes sorting by primary key in ascending order.

[0018] In one embodiment of the present invention, the SHA-3 hash calculation is performed on 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 used directly, and after dynamic processing based on the request features, it is returned to the client.

[0020] In one embodiment of the present invention, the dynamic processing includes sorting the cached data according to the sorting method of the request, or filtering the cached data according to the filtering conditions of the request.

[0021] In one embodiment of the invention, the cache record further includes an associated list of URLs.

[0022] In one embodiment of the present invention, an intelligent middleware mechanism is also provided for transparently handling caching logic in a web application. 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 status.

[0023] In one embodiment of the present invention, the middleware implementation further includes configuration and initialization, deploying intelligent middleware and initializing the cache storage structure.

[0024] To achieve the above objectives, another aspect of the present invention proposes a web caching intelligent middleware device based on content fingerprinting technology, comprising:

[0025] The standardization processing module is used to standardize the dataset returned by the server from the client's requested 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 as 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 client request parameters to generate feature vectors and check whether there are records in the cache that match the feature vectors.

[0028] The URL analysis and dynamic data processing module is used to parse the URL features of the request when a matching feature vector exists in the cache, and to dynamically process the cached data according to the URL features.

[0029] The cache storage and update module is used to store the generated content fingerprint, standardized data and feature vector into the cache, and update the cache record when the data content of a new request matches the content fingerprint in the cache.

[0030] The cache self-learning module is used to request data from the server when the cache is not hit, and to 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.

[0031] This invention discloses a web caching method and intelligent middleware device based on content fingerprinting technology. By calculating the content fingerprint of returned data and sorting the dataset before caching, the order of cached data is dynamically adjusted according to the characteristics of the request URL. This maximizes the utilization of cached data, reduces network requests, and solves the problems of low cache utilization and redundant network requests caused by homogeneous datasets but heterogeneous presentation formats in the prior art, thereby improving the performance and user experience of web applications.

[0032] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[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 taken in conjunction with the accompanying drawings, wherein:

[0034] Figure 1 This is a flowchart of a web caching method based on content fingerprinting technology according to an embodiment of the present invention;

[0035] Figure 2 This is an interaction diagram of the client, middleware, cache, and backend services according to an embodiment of the present invention;

[0036] Figure 3 This is a caching flowchart illustrating the process from request to cache matching, dynamic processing, and return according to an embodiment of the present invention;

[0037] Figure 4 This is a structural diagram of a Web caching intelligent middleware device based on content fingerprinting technology according to an embodiment of the present invention. Detailed Implementation

[0038] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0039] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0040] The following description, with reference to the accompanying drawings, illustrates a web caching method and intelligent middleware device based on content fingerprinting technology according to embodiments of the present invention.

[0041] First, let's introduce the technical terms mentioned in this invention:

[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 protocol used to transfer hypertext from a World Wide Web server to a local browser.

[0044] URL: Uniform Resource Locator, is an address used on the Internet to identify a resource.

[0045] JSON: JavaScript Object Notation, a lightweight data interchange 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 up electronic documents to give them structure.

[0047] SHA-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, often used for fast hash calculations.

[0049] Figure 1 This is a flowchart of a web caching method based on content fingerprinting technology according to an embodiment of the present invention, such as... Figure 1 As shown, it includes:

[0050] S1, standardizes the dataset returned by the server from the client's requested URL, including sorting list-type data according to predefined rules to eliminate order differences;

[0051] S2, perform SHA-3 hash calculation on the standardized data content to generate content fingerprint, extract request features as feature parameter vector, perform MurmurHash3 hash calculation on the feature parameter vector to generate dynamic feature identifier;

[0052] S3, parse the client request parameters to generate a feature vector, and check if there is a record in the cache that matches the feature vector;

[0053] S4, when a matching feature vector exists in the cache, parse the URL features of the request and dynamically process the cached data based on the URL features;

[0054] S5 stores the generated content fingerprint, standardized data, and feature vector in the cache. If the data content of a new request matches the content fingerprint in the cache, the cache record is updated.

[0055] S6: When the cache is not hit, request the server to retrieve the data and perform normalization and hash calculation. If the newly generated content fingerprint matches the fingerprint in the cache, add the feature vector and URL of the new request to the cache pool.

[0056] In one embodiment of the present invention, the content data standardization process includes the following steps:

[0057] When a client requests a URL and receives data from the server, the middleware standardizes the returned dataset: for list-type data, it sorts it according to predefined rules (such as ascending primary key order) to eliminate order differences. For example, if the returned result is a list, it sorts the list 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 through the following steps:

[0059] Combining SHA-3 (content hash) and MurmurHash3 (feature hash) dual hashing mechanisms:

[0060] SHA-3 (UTF-8 (standardized 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. It then extracts the request features into a feature parameter vector and performs feature hashing to achieve 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 are performed as follows:

[0064] When a client request arrives, the middleware parses the request parameters (such as sorting method, filtering conditions, pagination information, etc.) and generates a feature vector.

[0065] The middleware checks if a record matching the feature vector exists in the cache. 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 involve the following steps:

[0067] When a client requests a URL again, the middleware first parses the parameters to generate a fingerprint of the request and checks if this fingerprint exists in the cache. If it does, it analyzes the request characteristics of the URL (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 request requests data in ascending order, but the cache stores data in descending order, the middleware will process the cached data in ascending order before returning it to the frontend.

[0070] If the URL request is for a filtered result of a specific field, the middleware filters the cached data before returning it to the front end.

[0071] In one embodiment of the present invention, cache storage and updating are performed as follows:

[0072] The generated content fingerprint, standardized data, and feature vector are stored in the cache. The cache record includes the content fingerprint, data content, feature vector, and a list of associated URLs.

[0073] If the data content of the new request matches the content fingerprint in the cache, update the cache record and add the URL of the new request and its feature vector to the cache pool.

[0074] In one embodiment of the present invention, the cache self-learning mechanism includes the following steps:

[0075] When a cache miss occurs, the middleware requests data from the server and performs normalization and hash calculations on the data. 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, this invention provides an intelligent middleware mechanism for transparently handling caching logic in web applications. The middleware automatically checks the cache upon request arrival; if a cache hit occurs, it dynamically processes the cached data based on the request characteristics and returns it; if a cache miss occurs, it requests the backend service and updates the cache.

[0077] like Figure 2 The diagram illustrates the interaction relationships between the client, middleware, cache, and backend services. The specific data interaction process is as follows:

[0078] When a client initiates a request, this request first reaches the smart middleware. The smart middleware, acting as a bridge between the client and the backend service, is responsible for receiving and processing all requests from the client.

[0079] When the intelligent middleware receives a request from a client, it first checks the cache to see if the required data already exists there. If the data exists, the intelligent middleware directly returns this cached data to the client, thereby speeding up the response and reducing reliance on backend services. This approach effectively reduces the load on backend services and improves the overall system performance.

[0080] If the required data is not in the cache, the smart middleware sends a request to the backend service to retrieve it. The backend service, responsible for handling complex business logic and data operations, receives the request, performs the corresponding processing, and returns the result to the smart middleware. After receiving the data returned by the backend service, the smart middleware performs the necessary processing and then returns the final result to the client.

[0081] To improve the response speed of subsequent requests, the intelligent middleware updates the cached data after retrieving new data from the backend service. This way, when the same request comes in again, the intelligent middleware can directly retrieve the data from the cache without needing to request the backend service again. This mechanism not only improves data access speed but also reduces frequent calls to the backend service, thus improving the overall efficiency of the system.

[0082] like Figure 3 The diagram illustrates the complete process from request to cache matching, dynamic processing, and response. The specific data interaction process is as follows:

[0083] When a client initiates a request, the request first reaches the intelligent middleware. The intelligent middleware is responsible for receiving and parsing the request, and generating a corresponding feature vector based on the request content for subsequent data processing and cache matching operations. When processing a request, the intelligent middleware first checks if the cache contains data related to the request. If a matching record exists in the cache (i.e., a cache hit), the intelligent middleware directly proceeds to dynamically process the cached data; if no relevant data is found (i.e., a cache miss), it needs to further request data from the backend service. In the case of a cache hit, the intelligent middleware dynamically processes the cached data. This includes updating or customizing existing data to ensure that the data returned to the client is up-to-date and meets user needs. Subsequently, this processed data is directly sent to the client, thereby speeding up response time and reducing reliance on backend services. In the case of a cache miss, the intelligent middleware sends a request to the backend service to obtain the latest data. Upon receiving the request, the backend service performs the corresponding business logic processing and returns the result to the intelligent middleware. The intelligent middleware standardizes this data to ensure its format conforms to the system's unified requirements. After obtaining standardized data, the intelligent middleware generates a corresponding content fingerprint and matches it against existing cached records. If the match is successful, it means the data already exists in the system, and the intelligent middleware updates the cached record and adds the new feature vector. If the match fails, it means the data is entirely new, and the intelligent middleware stores the new content fingerprint and its associated data. Regardless of whether the match is successful or not, the processed data is returned to the client to complete 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] One key aspect is deploying intelligent middleware: This involves deploying intelligent middleware between the web server and the client to ensure that all client requests are processed through the middleware.

[0087] The initialization of cache storage involves setting up the cache storage structure to save information such as content fingerprints, standardized data, feature vectors, and associated URLs.

[0088] 2) Request processing and feature vector generation, including client request arrival, parsing request parameters, and generating feature vectors;

[0089] In this context, "client request arrival" refers to the client sending 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, pagination information, filtering conditions, etc.

[0091] Among them, generating feature vectors involves constructing feature vectors based on request parameters, such as sort=desc&page=1.

[0092] 3) Cache match check, including checking cache records and cache hit processing;

[0093] Among these, checking cached records involves the middleware searching 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 used directly, and after dynamic processing (such as sorting or filtering) based on the request characteristics, it is returned to the client.

[0095] 4) Request server and data processing, including cache misses, server responses, and data normalization processing;

[0096] In the case of a cache miss: if no matching record is found, the middleware forwards the request to the backend server to retrieve the data.

[0097] Server response: The server processes the request and returns data, such as a JSON list of products.

[0098] Among them, data standardization processing: the middleware performs standardization processing on the returned data, such as sorting it 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 fingerprints involves applying the SHA-3 hash algorithm to the standardized data to generate unique content fingerprints.

[0101] Among them, the storage cache records: the content fingerprint, standardized data, feature vector and request URL are stored in the cache and a relationship is established.

[0102] 6) Dynamic data processing and return, including dynamically adjusting data and returning processing results;

[0103] Among them, dynamic data adjustment: based on the characteristics of client requests (such as ascending or descending order), cached data is dynamically processed.

[0104] The process of returning the processing result involves sending the processed data back to the client, thus completing the response.

[0105] 7) The 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, repeat the above steps.

[0107] Among them, data consistency detection: if the content fingerprint generated after the data obtained by the new request is consistent with the fingerprint in the cache, the cache self-learning mechanism is triggered.

[0108] Among them, the extended cache pool adds the feature vector and URL of the new request to the association list of the original cache records, dynamically expanding the coverage of the cache.

[0109] 8) Continuous optimization and updates, including regular cache cleanup and statistics and analysis;

[0110] Among them, regular cache cleanup: According to preset strategies (such as least recently used), expired or infrequently used cache records are cleaned up to free up storage space.

[0111] Among them, statistics and analysis: records indicators such as cache hit rate and request processing time, which are used to evaluate and optimize caching strategies.

[0112] In summary, this invention parses the URL parameters of a client request to generate a feature vector. It then checks if a cached record matching the feature vector exists. If no match is found, it requests data from the server and standardizes the returned data. The standardized data is then hashed to generate a content fingerprint. The content fingerprint, standardized data, and feature vector are stored in the cache. The cached data is dynamically processed based on the request characteristics, and the processed data is returned. When the content of a new request matches the content fingerprint in the cache, the feature vector and URL of the new request are added to the cached record.

[0113] Extract request parameters such as sorting method, filtering conditions, and pagination information. Encode the extracted parameters to form feature vectors. Sort list-type data according to predefined rules (e.g., ascending or descending order by primary key). Perform hash calculation using the SHA-3 algorithm. Store a list of URLs associated with the feature vectors. Sort or filter cached data based on request features. Check if the data content of a new request matches the content fingerprint in the cache. If they match, add the new request's feature vector and URL to the cache record.

[0114] The beneficial effects of this invention are as follows:

[0115] Improve cache utilization: Through standardized processing and dynamic fingerprint matching, it can identify and cache data with the same return value but different URLs, as well as data with the same dataset but different return order, significantly improving the cache hit rate.

[0116] Reduce network requests: Reduce unnecessary network requests, lower server load, and improve the response speed of web applications.

[0117] High flexibility: This method does not rely on the uniqueness of URLs and is suitable for various web application scenarios. At the same time, the middleware can dynamically adjust data according to request characteristics, further improving the flexibility of caching.

[0118] Response latency optimization: By hitting the cache, response speed is significantly improved and response latency 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 constantly changing request patterns.

[0120] Easy to integrate and maintain: The middleware is designed to be easy to integrate into existing web architectures and is easy to operate and maintain, reducing operation and maintenance costs.

[0121] Data consistency: Through standardized processing and content fingerprint generation, the consistency of the same dataset is ensured, avoiding cache invalidation due to differences in data order or format.

[0122] The Web caching method based on content fingerprinting technology according to embodiments of the present invention calculates the content fingerprint of returned data, sorts the dataset and caches it, and dynamically adjusts the order of cached data according to the characteristics of the request URL, thereby making greater use of cached data, reducing network requests, solving the problems of low cache utilization and redundant network requests caused by homogeneous datasets but heterogeneous presentation in the prior art, and improving the performance and user experience of Web applications.

[0123] To achieve the above embodiments, such as Figure 4 As shown, this embodiment also provides a Web caching intelligent middleware device 10 based on content fingerprint technology, including:

[0124] The standardization processing module 100 is used to standardize the dataset returned by the server from the client's requested URL.

[0125] The content fingerprint generation module 200 is used to 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.

[0126] The feature vector generation and matching module 300 is used to parse the client request parameters to generate feature vectors and check whether there are records in the cache that match the feature vectors.

[0127] The URL analysis and dynamic data processing module 400 is used to parse the URL features of the request when a matching feature vector exists in the cache, and to dynamically process the cached data according to the URL features.

[0128] The cache storage and update module 500 is used to store the generated content fingerprint, standardized data and feature vector into the cache, and update the cache record when the data content of a new request matches the content fingerprint in the cache;

[0129] The cache self-learning module 600 is used to request data from the server when the cache is not hit, and to 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.

[0130] Specifically, the process involves parsing the URL parameters of the client request and generating a feature vector. It then checks the cache for a record matching the feature vector. The data retrieved from the server is standardized. A content fingerprint is generated from the standardized data. The cached records are stored and updated. The cached data is dynamically processed based on request characteristics. The feature vector and URL of new requests are added to the cached records to expand cache coverage.

[0131] Furthermore, the cache storage and update module is designed to periodically clean up expired or infrequently used cache records.

[0132] Furthermore, the cache storage and update module sorts the cached data in ascending or descending order and filters fields based on request characteristics.

[0133] Furthermore, the cache self-learning module automatically expands the cache pool when it detects a content fingerprint match.

[0134] The Web caching intelligent middleware device based on content fingerprint technology according to embodiments of the present invention calculates the content fingerprint of the returned data, sorts the dataset and caches it, and dynamically adjusts the order of cached data according to the characteristics of the request URL, thereby making greater use of cached data, reducing network requests, solving the problems of low cache utilization and redundant network requests caused by homogeneous datasets but heterogeneous presentation in the prior art, and improving the performance and user experience of Web applications.

[0135] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[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 technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

Claims

1. A Web caching method based on content fingerprinting technology, characterized in that, include: Intelligent middleware is used to transparently handle caching logic in web applications. When a request arrives, the intelligent middleware automatically checks the cache and dynamically processes cached data or requests backend services and updates the cache based on the cache hit. Receive a client request, parse the parameters of the client request to generate a feature parameter vector, and use the MurmurHash3 algorithm to perform a hash operation on the feature parameter vector to generate a dynamic feature identifier. Based on the feature parameter vector, check whether there is a matching record in the cache. If a record matching the feature parameter vector exists in the cache, the cached data is used directly to parse the URL features of the request, and the cached data is dynamically processed according to the URL features before being returned to the client; the dynamic processing includes sorting the cached data according to the request's sorting method, or filtering the cached data according to the request's filtering conditions. When no matching record is found in the cache, a request is made to the server to retrieve the dataset. The intelligent middleware performs standardization processing on the dataset returned by the server: sorting list-type data according to predefined rules to eliminate order differences, so as to ensure that different orders of the same dataset can generate the same content fingerprint; the predefined rules include sorting in ascending order by primary key. The standardized data content is subjected to SHA-3 hash calculation to generate a content fingerprint. The SHA-3 hash calculation is performed on the UTF-8 encoding of the standardized JSON data to generate the content fingerprint. The generated content fingerprint is matched with the existing content fingerprint in the cache. If the match is successful, the feature parameter vector and URL of the new request are added to the cache pool to update the cache record. If the match fails, the generated content fingerprint, normalized data and feature parameter vector are stored in the cache. The cached records also include a list of associated URLs; The implementation of the intelligent middleware also includes configuration and initialization, deploying the intelligent middleware and initializing the cache storage structure.

2. A web caching intelligent middleware device based on content fingerprinting technology, using the method as described in claim 1, characterized in that, include: The standardization processing module is used to standardize the dataset returned by the server from the client's requested 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 request features as 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 client request parameters to generate feature parameter vectors and check whether there are records in the cache that match the feature parameter vectors. The URL analysis and dynamic data processing module is used to parse the URL features of the request when a matching feature parameter vector exists in the cache, and to dynamically process the cached data according to the URL features. The cache storage and update module is used to store the generated content fingerprint, standardized data and feature parameter vector into the cache, and update the cache record when the data content of a new request matches the content fingerprint in the cache. The cache self-learning module is used to request data from the server when the cache is not hit, and to perform normalization and hash calculation. If the newly generated content fingerprint matches the fingerprint in the cache, the feature parameter vector and URL of the new request are added to the cache pool.

3. The intelligent middleware device according to claim 2, characterized in that, The cache storage and update module is designed to periodically clean up expired or infrequently used cache records.

4. The intelligent middleware device according to claim 2, characterized in that, The cache storage and update module sorts the cached data in ascending or descending order and filters fields based on request characteristics.

Citation Information

Patent Citations

  • Systems and methods for video cache indexing

    CN103222272A

  • Web cache and return optimization method and Web cache system

    CN103269353A