Physical property database optimization method based on cache proxy mechanism

By building a multi-layer cache structure and optimizing query processing, the response delay and data consistency of physical properties databases are solved, efficient and stable physical properties database optimization is achieved, and query response speed and data reliability are improved.

CN120371877APending Publication Date: 2025-07-25BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510492368.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The response delay of physical properties databases when dealing with complex physical properties analysis or large-scale data retrieval is severe, storage management is difficult, resource competition is fierce when multiple users access concurrently, data consistency problems are prominent, update propagation and cache synchronization is insufficient, which affects the performance and practicality of the database.

Method used

Build a multi-layer cache structure, including high-speed memory cache area and large-capacity disk cache area, adopt a data structure combining hash table and index tree, optimize cache hits by querying templates and parameter vectors, realize cache updates and consistency guarantees, and optimize cache strategies through performance monitoring and adaptive adjustment.

Benefits of technology

It significantly improves the query response speed and system throughput of physical properties databases, ensures data consistency, rationally utilizes resources, adapts to changes in data scale and application needs, and provides fast and accurate physical properties data services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371877A_ABST
    Figure CN120371877A_ABST
Patent Text Reader

Abstract

The invention discloses a physical property database optimization method based on a cache proxy mechanism, and the method comprises the following steps: constructing a cache proxy architecture which is internally provided with a multi-layer cache structure which comprises a high-speed memory cache region and a high-capacity disk cache region; according to query processing and cache hit optimization, when an application sends a query request to a cache agent, a system firstly analyzes a query statement, identifies a query template and a parameter vector, and judges whether a cache is queried and hit; according to cache updating and consistency guarantee, after an application program successfully executes a write-in operation on a database, an HTTP request can be quickly and automatically initiated in the same transaction context; and cache proxy performance monitoring and adaptive adjustment. According to the method, a comprehensive and efficient solution is formed from establishment of the data cache architecture to query processing and updating synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of physical property databases, and in particular to a physical property database optimization method based on a cache proxy mechanism. Background Art

[0002] Physical property databases face many challenges during operation, which seriously affect their performance and practicality. Under the traditional architecture, frequent data queries often lead to response delays, especially when dealing with complex physical property analysis or large-scale data retrieval, the system efficiency is significantly reduced. As the amount of data continues to grow, storage management becomes more difficult, and the storage layout and index structure of the data are prone to unreasonable conditions, further exacerbating the time-consuming query. In addition, in multi-user concurrent access scenarios, resource competition is fierce, which can easily lead to data consistency problems and reduce data reliability. At the same time, the dynamic update characteristics of physical property data require that the database can reflect the latest information in a timely manner, but the existing mechanism has deficiencies in update propagation and cache synchronization, and it is difficult to ensure the timeliness and accuracy of the data. These problems are intertwined, making the optimization of the physical property database a key task that needs to be solved urgently. Summary of the invention

[0003] In view of the characteristics and existing problems of physical property databases, the present invention provides a physical property database optimization method based on a cache proxy mechanism, covering a multi-stage processing flow, from data cache architecture construction to query processing and update synchronization, forming a comprehensive and efficient solution. To achieve the above purpose, the technical solution of the present invention is as follows.

[0004] A method for optimizing a physical property database based on a cache proxy mechanism, the method comprising the following steps:

[0005] S1. Build a cache proxy architecture with a multi-layer cache structure, including a high-speed memory cache area and a large-capacity disk cache area. The high-speed memory cache area uses a data structure that combines advanced hash tables and index trees, while the large-capacity disk cache area adopts a storage strategy based on data classification and access frequency.

[0006] S2. Query processing and cache hit optimization. When an application sends a query request to a cache proxy, the system first parses the query statement and identifies the query template and parameter vector. The cache proxy checks whether there is a result in the cache that is exactly the same as the current query template and parameters. If a match is found, the system determines that the query hits the cache. At this time, the stored result is directly returned to quickly respond to user requests.

[0007] S3, cache update and consistency guarantee. When the application successfully executes the write operation to the database, it will quickly and automatically initiate an HTTP request in the same transaction context.

[0008] S4. Cache proxy performance monitoring and adaptive adjustment.

[0009] As a further technical solution of the present invention, in step S1, the hash table in the high-speed memory cache area passes through .

[0010] k: Key. This is the data item input into the hash function; hash: hash function; k: this is the key value input into the hash function; N: this is the divisor of the modulo operation, representing the size of the hash table.

[0011] Provides lookup, insertion, and deletion operations with a constant time complexity of O(1), while the Trie tree is suitable for prefix matching and string search, and the nodes represent characters .

[0012] : Character set. Represents the character or character sequence represented by the current node; : Set of child nodes. Represents all possible subsequent nodes starting from the current node.

[0013] Combining the two optimizes the query performance and further refines the query path.

[0014] As a further technical solution of the present invention, in step S1, in the large-capacity disk cache area, the data is classified into different categories according to data characteristics and access patterns through clustering analysis of the data , K-means: clustering algorithm, used to group data points into k clusters; D: data set, representing the data set to be subjected to clustering analysis; k: number of clusters, representing how many different categories the data is expected to be divided into; and the access times of each data item are counted , the access frequency is recorded, and a specific access frequency threshold N is determined. Data items with an access frequency higher than 1.5 times the average access frequency of all data items can be regarded as data items with a high access frequency, that is, if If the average access frequency is such that the data item d is considered a data item with a high access frequency. For data items that meet the above conditions, the system will automatically store them in the high-speed memory cache area to improve access efficiency. The system will store them in a memory (RAM) cache area that is faster but has a relatively smaller capacity. This cache utilizes a data structure that combines a hash table and an index tree to achieve fast look-up, insertion, and deletion operations, ensuring immediate access to the most frequently used data. For those data items that have a low access frequency but are still of important value or necessity, they will be stored on a large-capacity and more cost-effective disk cache area or other forms of persistent storage media. Although the access speed of this type of storage is not as fast as that of the memory cache, it can provide a larger storage space at a lower cost, thus effectively expanding the total storage capacity of the entire cache system and optimizing the overall performance and economic efficiency by reasonably allocating the storage locations of high-access-frequency data and low-access-frequency data.

[0015] As a further technical solution of the present invention, step S2 includes the following steps:

[0016] When the application sends a query request to the cache proxy, the system first parses the query statement, identifies queries with similar structures, and groups them; the grouping is achieved by defining query templates, and each template is distinguished according to the objects involved in the query (the set of objects O(T) mentioned in the FROM clause), the conditions (the set of predicate expression attributes A(T) in the WHERE clause and the set of user-defined functions F(T)), and whether an aggregation function is used (the flag G(T) in the SELECT clause); for each template, all possible parameters that may affect the query result are collected to form a parameter vector P(T), and the parameters include constants in the query conditions, join criteria or operators, and parameters of UDFs, etc.;

[0017] Once the query template and the corresponding parameter vector are obtained, the cache proxy will check whether there is a result in the cache that is exactly the same as the current query template and parameters; if a match is found, the system will determine that the query hits the cache, and at this time, the stored result will be directly returned to quickly respond to the user request; if no match is found, the system will forward the query to the database server to obtain the data, return the query result in the physical database to the user request, and at the same time continue the subsequent processing flow to determine whether the data is stored in the cache proxy architecture to prepare for a quick response to the next query;

[0018] To optimize query processing and predict the number of query results under different parameter combinations, we will learn the approximate yield distribution within each template, which involves establishing a yield prediction function , which estimates the yield given the parameter vector The number of query results under; The production prediction function is learned from historical data and is usually modeled in the form of linear regression, and the formula is expressed as:

[0019] ;

[0020] are the model coefficients, and are the respective elements in the parameter vector;

[0021] To understand the parameter space more deeply, we use the decision tree algorithm to recursively partition the parameter space until each partition basically belongs to only one category. The partitioning basis of the decision tree is the query log of the physical property database, and the information gain is introduced as a key indicator to guide the attribute selection. The information gain is defined as the difference between the entropy H(T) of the parent node and the weighted sum of the entropies of all child nodes:

[0022] ;

[0023] represents the information gain after splitting according to the attribute a; are all possible values of the attribute a; is the subset partitioned according to the value v of the attribute a; represents the subset 's size relative to the entire data set 's ratio; If an attribute a can effectively partition the data set T into multiple subsets , and at least 80% of the subsets 's elements belong to the same category, then the attribute is considered to have a high information gain value.

[0024] Build a linear regression model within each final partition (leaf node) to recover some of the information lost due to classification;

[0025] To determine the optimal number of categories k, use the k-means clustering method and combine technical or domain knowledge to select the optimal value; When the cache or server provides the query results, the size of the results is used as feedback to improve the learned class distribution, and a specific access frequency threshold and the space occupancy threshold are set. Set the access frequency threshold to twice the average access frequency of all data items, that is , where , D is the data set, and F(d) represents the access frequency of the data item d. Set the space occupancy threshold to 10% of the maximum capacity of the high-speed memory cache area, that is , where MaxMem is the maximum capacity of the high-speed memory cache. If the access frequency F(d) of the query result > and its space occupancy S(d) < , it is stored in the high-speed memory cache. If the access frequency F(d) of the query result > but the space occupancy S(d) ≥ , it is stored in the large-capacity disk cache. Before storage, the system evaluates the current cache status and resource utilization rate to ensure efficient use of the cache space.

[0026] After collecting query instances, update the decision tree and the corresponding linear regression function to ensure that the model can continuously adapt to changing data patterns.

[0027] As a further technical solution of the present invention, in step S3, for cache update and consistency guarantee, when the application program successfully executes a write operation on the database, it will quickly and automatically initiate an HTTP request in the same transaction context. The target of the HTTP request is the cache proxy, which is a transaction, denotes the set of all data items involved in the transaction , while represents the specific data range to be updated (i.e., a specific table, record set, or a data subset); when completes the write to the database, the application program immediately sends an HTTP request to the cache proxy, which contains and the specific change content . can be further divided into three types of operations: addition , modification and deletion ; once the transaction is committed and confirmed successfully, the system will immediately notify the cache proxy about the change details in the same transaction context through an HTTP request. The information carried by this request includes but is not limited to the affected data range and the specific change content ; after receiving this information, the cache proxy locates the corresponding cache entry according to and executes the corresponding update action according to ; if the cache state changes from to , then there is . denotes the cache state transition function, which is responsible for applying the latest changes to the cache to maintain consistency with the database.

[0028] As a further technical solution of the present invention, in step S4, cache proxy performance monitoring and adaptive adjustment: establish a comprehensive cache proxy performance monitoring system to monitor key metrics in real time. The key metrics include cache hit rate , data read and write latency , memory and disk usage conditions, etc. Based on these key metrics, use intelligent adaptive algorithms to dynamically collect and analyze real-time performance metrics , where respectively represent the usage conditions of memory and disk, and the system can evaluate the current cache status and predict future requirements.

[0029] Beneficial effects achieved by the present invention:

[0030] Excellent performance improvement: significantly shorten the query response time of physical property data, significantly improve the system throughput, and still maintain efficient and stable operation in high-concurrency and large-scale data access scenarios, effectively improving the overall performance of the database system.

[0031] Reliable data management: ensure the consistency between cached data and the database, provide accurate and reliable physical property data services, reduce errors and risks caused by data inconsistency, and enhance the credibility and availability of data.

[0032] Efficient resource utilization: by optimizing cache storage and access strategies, reasonably utilize system resources, reduce the load on the database server, reduce waste of hardware resources, and improve the utilization efficiency of resources.

[0033] Good adaptability and scalability: can adapt to the continuous growth of the data scale of the physical property database and the dynamic changes of application requirements, facilitate integration with existing database systems, are easy to expand and upgrade, and protect existing investments.

[0034] Powerful decision-making support: provide fast and accurate physical property data access services for users in various industries, assist in decision-making in fields such as scientific research and engineering design, improve work efficiency and quality, and promote the development of related industries. Description of the Drawings

[0035] Figure 1 It is a flowchart of an optimization method for a physical property database based on a cache proxy mechanism. Detailed Embodiments

[0036] The following combines specific drawings to introduce and describe the technical solutions of the present invention in detail.

[0037] Please refer to Figure 1 , the embodiment of the present invention provides an optimization method for a physical property database based on a cache proxy mechanism. The method includes the following steps;

[0038] S1. Build a cache proxy architecture with multiple levels of cache structures inside, including a high-speed memory cache area and a large-capacity disk cache area. The high-speed memory cache area uses a data structure that combines an advanced hash table and an index tree, and the large-capacity disk cache area adopts a storage strategy based on data classification and access frequency;

[0039] S2. Query processing and cache hit optimization. When an application sends a query request to the cache proxy, the system first parses the query statement to identify the query template and parameter vector. The cache proxy checks whether there is a result in the cache that is exactly the same as the current query template and parameters; if a match is found, the system determines that the query hits the cache, and at this time, it will directly return the stored result to quickly respond to the user request;

[0040] S3. Cache update and consistency guarantee. After an application successfully executes a write operation on the database, it will quickly and automatically initiate an HTTP request in the same transaction context;

[0041] S4. Cache proxy performance monitoring and adaptive adjustment.

[0042] In this embodiment, in step S1, in the high-speed memory cache area, the hash table passes through .

[0043] k: Key. This is the data item input into the hash function; hash: hash function; k: this is the key value (Key) input into the hash function; N: this is the divisor of the modulo operation, representing the size of the hash table.

[0044] Provides constant time complexity O(1) for lookup, insertion, and deletion operations, while the Trie tree is suitable for prefix matching and string search, and nodes represent characters .

[0045] : Character set. Represents the character or character sequence represented by the current node; : Sub-node set. Represents all possible subsequent nodes starting from the current node.

[0046] Combining the two optimizes the query performance and further refines the query path.

[0047] In this embodiment, in step S1, in the large-capacity disk cache area, the data is classified into different categories according to data characteristics and access patterns through clustering analysis of the data , and the access times of each data item are counted , the access frequency is recorded, and a specific access frequency threshold N is determined. Data items with an access frequency higher than 1.5 times the average access frequency of all data items can be regarded as data items with a high access frequency, that is, if If the average access frequency is such that the data item d is considered a data item with a high access frequency. For data items that meet the above conditions, the system will automatically store them in the high-speed memory cache area to improve access efficiency. The system will store them in a faster but relatively smaller-capacity memory (RAM) cache area. This cache utilizes a data structure that combines a hash table and an index tree to achieve fast lookup, insertion, and deletion operations, ensuring instant access to the most frequently used data. For those data items that, although having a lower access frequency, still have important value or necessity, they will be stored on a large-capacity and more cost-effective disk cache area or other forms of persistent storage media. Although the access speed of this type of storage is not as fast as that of the memory cache, it can provide a larger storage space at a lower cost, thereby effectively expanding the total storage capacity of the entire cache system and optimizing the overall performance and economic efficiency by reasonably allocating the storage locations of high-access-frequency data and low-access-frequency data.

[0048] In this embodiment, step S2 includes the following steps:

[0049] When the application sends a query request to the cache proxy, the system first parses the query statement, identifies queries with similar structures, and groups them; the grouping is achieved by defining query templates, and each template is distinguished according to the objects involved in the query (the object set O(T) mentioned in the FROM clause), conditions (the predicate expression attribute set A(T) in the WHERE clause and the user-defined function set F(T)), and whether an aggregation function is used (the flag G(T) in the SELECT clause); for each template, all possible parameters that may affect the query result are collected to form a parameter vector P(T), and the parameters include constants in the query conditions, join criteria or operators, and parameters of the UDF, etc.;

[0050] Once the query template and the corresponding parameter vector are obtained, the cache proxy will check whether there is a result in the cache that is exactly the same as the current query template and parameters; if a match is found, the system will determine that the query hits the cache, and at this time, the stored result will be directly returned to quickly respond to the user request; if no match is found, the system will forward the query to the database server to obtain the data, return the query result in the physical property database to the user request, and at the same time continue the subsequent processing flow to determine whether the data is stored in the cache proxy architecture to prepare for a quick response to the next query;

[0051] To optimize query processing and predict the number of query results under different parameter combinations, we will learn the approximate yield distribution within each template, which involves establishing a yield prediction function , which estimates the yield given the parameter vector The number of query results under; The production prediction function is learned from historical data and is usually modeled in the form of linear regression, and the formula is expressed as:

[0052] ;

[0053] are the model coefficients, and are the respective elements in the parameter vector;

[0054] To understand the parameter space more deeply, we use the decision tree algorithm to recursively partition the parameter space until each partition basically belongs to only one category. The partitioning basis of the decision tree is the query log of the physical property database, and the information gain is introduced as a key indicator to guide the attribute selection. The information gain is defined as the difference between the entropy H(T) of the parent node and the weighted sum of the entropies of all child nodes:

[0055] ;

[0056] represents the information gain after splitting according to attribute a; are all possible values of attribute a; is the subset after partitioning according to the value v of attribute a; represents the subset 's size relative to the entire data set 's ratio; If an attribute can effectively partition the data set into subsets where most elements belong to a single category, then the information gain of this attribute will be very high, which means that the uncertainty after splitting is significantly reduced.

[0057] Since the decision tree classification may lose some detailed information, we build a linear regression model within each final partition (leaf node) to recover some of the information lost due to classification. This method combines the strong classification ability of the decision tree and the accurate prediction advantage of linear regression, thereby improving the prediction accuracy while keeping the model simple;

[0058] To determine the optimal number of categories k, we use the k-means clustering method and combine technical or domain knowledge to select the optimal value; When the cache or server provides query results, the size of the result is used as feedback to improve the learned class distribution. Determine a specific access frequency threshold and space occupancy threshold. Set the access frequency threshold to twice the average access frequency of all data items, that is , where , D is the data set, and F(d) represents the access frequency of data item d. Set the space occupancy threshold to 10% of the maximum capacity of the high-speed memory cache area, that is , where MaxMem is the maximum capacity of the high-speed memory cache. If the access frequency F(d) of the query result > and its space occupancy S(d) < , it is stored in the high-speed memory cache. If the access frequency F(d) of the query result > but the space occupancy S(d) ≥ , it is stored in the large-capacity disk cache. Before storage, the system evaluates the current cache status and resource utilization to ensure efficient use of the cache space.

[0059] In addition, after collecting a certain number of query instances, we update the decision tree and the corresponding linear regression function to ensure that the model can continuously adapt to changing data patterns.

[0060] In this embodiment, in step S3, for cache update and consistency guarantee, after the application successfully executes a write operation on the database, it will quickly and automatically initiate an HTTP request in the same transaction context. The target of the HTTP request is the cache proxy. is a transaction. represents the set of all data items involved in the transaction. while represents the specific data range to be updated (i.e., a specific table, record set, or a data subset); when completes the write to the database, the application immediately sends an HTTP request to the cache proxy, which contains and the specific change content. , can be further divided into three types of operations: addition , modification and deletion ; once the transaction is committed and confirmed successfully, the system will immediately notify the cache proxy about the change details in the same transaction context through an HTTP request. The information carried by this request includes but is not limited to the affected data range and the specific change content ; after receiving this information, the cache proxy locates the corresponding cache entry according to and executes the corresponding update action based on ; if the cache status changes from to , then there is , represents the cache status transfer function, which is responsible for applying the latest changes to the cache to maintain consistency with the database.

[0061] In this embodiment, in step S4, cache proxy performance monitoring and adaptive adjustment: establish a comprehensive cache proxy performance monitoring system to monitor key indicators in real time, including cache hit rate , Data read and write delay , memory and disk usage, etc. Based on these key indicators, intelligent adaptive algorithms are used to dynamically collect and analyze real-time performance indicators ,in Respectively represent the usage of memory and disk, the system can evaluate the current cache status and predict future needs.

[0062] The innovative query processing mechanism of the present invention: through the unique query template definition and parameter vector collection method, the query is effectively grouped. This grouping method can quickly determine the cache hit situation and directly return the result when it hits, which greatly reduces the query response time and significantly improves the query efficiency of the system. In addition, the production prediction function is constructed by learning from historical data, and combined with the decision tree algorithm, k-means clustering method and linear regression technology, the estimation of the number of query results is continuously optimized, providing an accurate basis for cache management, which is a very innovative breakthrough in similar technologies.

[0063] Dynamic cache optimization strategy: With the help of query result feedback information, the learned class distribution is continuously improved, and the decision tree and linear regression function are updated in a timely manner. This dynamic adjustment mechanism enables the system to closely follow new query patterns and data change trends, and continuously improves the accuracy of query result estimation and the efficiency of cache management over time, ensuring the continuous optimization of cache performance, showing unique innovation in the field of physical property database optimization.

[0064] It should be noted that, in this article, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, article or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, article or device including the element.

[0065] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for optimizing a physical property database based on a caching proxy mechanism, characterized in that The method includes the following steps; S1. Construct a cache proxy architecture with multiple levels of cache structures inside, including a high-speed memory cache area and a large-capacity disk cache area. The high-speed memory cache area utilizes a data structure that combines an advanced hash table and an index tree, and the large-capacity disk cache area adopts a storage strategy based on data classification and access frequency; S2. Query processing and cache hit optimization. When an application sends a query request to the cache proxy, the system first parses the query statement to identify the query template and parameter vector. The cache proxy checks whether there is a result in the cache that is exactly the same as the current query template and parameters; if a match is found, the system determines that the query hits the cache, and at this time, it will directly return the stored result to quickly respond to the user request; S3. Cache update and consistency guarantee. When an application successfully executes a write operation on the database, it will quickly and automatically initiate an HTTP request in the same transaction context; S4. Cache proxy performance monitoring and adaptive adjustment.

2. The physical property database optimization method based on a caching proxy mechanism according to claim 1, wherein In step S1, the hash table in the high-speed cache area passes through ; hash: Hash function; k: This is the key value input to the hash function; N: The divisor of the modulo operation, representing the size of the hash table; Provide lookup, insertion, and deletion operations with constant time complexity O(1), while Trie trees are suitable for prefix matching and string searching, and nodes represent characters ; : Character set, representing the character or character sequence represented by the current node; : Set of child nodes, representing all possible subsequent nodes starting from the current node; The combination of the two optimizes the query performance and further refines the query path.

3. A method for optimizing a physical property database based on a caching proxy mechanism according to claim 1, wherein In step S1, in the large-capacity disk buffer, data is classified into different categories according to data characteristics and access patterns through cluster analysis of the data. ; K-means: Clustering algorithm used to group data points into k clusters; D: Dataset, representing the data set to be subjected to clustering analysis; k: The number of clusters, representing how many different categories the data is expected to be divided into; And count the access times of each data item ; : The access frequency function, representing the access frequency of data item d; : Count each query within the entire time period T to calculate the access frequency of a specific data item; : The query set, representing all query requests within the time period T; Determine a specific access frequency threshold N, and consider the data items with an access frequency higher than 1.5 times the average access frequency of all data items as high-frequency access data. That is, if average access frequency, then the data item d is considered as high-frequency access data. For the data items that meet this condition, the system will automatically store them in the high-speed memory cache area to improve the access efficiency.

4. A method for optimizing a physical property database based on a caching proxy mechanism according to claim 1, characterized in that, Step S2 includes the following steps: When an application sends a query request to the cache proxy, the system first parses the query statement to identify queries with similar structures and groups them together; the grouping is achieved by defining query templates, and each template is distinguished according to the objects, conditions involved in the query, and whether an aggregation function is used; for each template, all parameters that may affect the query result are collected to form a parameter vector P(T), and the parameters include constants in the query conditions, join criteria or operators, and parameters of UDFs; Once the query template and the corresponding parameter vector are obtained, the cache proxy checks whether there is a result in the cache that is exactly the same as the current query template and parameters; if a match is found, the system determines that the query hits the cache, and at this time, it will directly return the stored result to quickly respond to the user request; if no match is found, the system will forward the query to the database server to obtain the data, return the query result in the physical property database to the user request, and at the same time continue the subsequent processing flow to determine whether the data is stored in the cache proxy architecture to prepare for a quick response to the next query; To optimize query processing and predict the number of query results under different parameter combinations, learn the approximate yield distribution within each template, and establish a yield prediction function , which estimates the number of query results for a given parameter vector ; the yield prediction function is learned from historical data and is usually modeled in the form of linear regression, expressed by the formula: ; is the model coefficient, and are the respective elements in the parameter vector; Recursively divide the parameter space using the decision tree algorithm until each partition basically belongs to only one category. The division of the decision tree is based on the query logs of the physical property database, and information gain is introduced as a key indicator to guide attribute selection. Information gain is defined as the difference between the entropy H(T) of the parent node and the weighted sum of the entropies of all child nodes: ; represents the information gain after splitting according to attribute a; are all possible values of attribute a; is the subset divided according to the value v of attribute a; represents the subset the ratio of the size of to the entire data set If an attribute a can effectively divide the data set T into multiple subsets and at least 80% of the subsets the elements in belong to the same category, then the information gain value of this attribute is considered high; Construct a linear regression model within each final partition to recover some of the information lost due to classification; To determine the optimal number of categories k, the k-means clustering method is used and combined with technical or domain knowledge to select the optimal value; after the cache or server provides the query result, the size of the result is used as feedback to improve the learned class distribution and determine a specific access frequency threshold and the space occupancy threshold . Set the access frequency threshold to be twice the average access frequency of all data items, that is , where , D is the data set, and F(d) represents the access frequency of data item d. Set the space occupancy threshold to be 10% of the maximum capacity of the high-speed memory cache, that is , where MaxMem is the maximum capacity of the high-speed memory cache. If the access frequency F(d) of the query result > and its space occupancy S(d) < , then store it in the high-speed memory cache. If the access frequency F(d) of the query result > but the space occupancy S(d) ≥ , then store it in the large-capacity disk cache. Before storing, the system evaluates the current state of the cache and resource utilization to ensure efficient use of the cache space; After collecting query instances, update the decision tree and the corresponding linear regression function to ensure that the model can continuously adapt to changing data patterns.

5. A physical property database optimization method based on a caching proxy mechanism according to claim 1, characterized in that In step S3, cache update and consistency guarantee. After the application successfully executes a write operation on the database, it will quickly and automatically initiate an HTTP request within the same transaction context. The target of the HTTP request is the cache proxy. is a transaction. represents the transaction. the set of all data items involved in the transaction, and represents the specific data range that needs to be updated; when completes the write to the database, the application immediately sends an HTTP request to the cache proxy, which contains and the specific change content. , subdivided into three types of operations: addition , modification and deletion Once the transaction is committed and confirmed successfully, the system will immediately notify the cache proxy about the change details in the same transaction context through an HTTP request. The information carried by this request includes but is not limited to the affected data range and the specific change content. ; After receiving the information, the cache proxy locates the corresponding cache entry according to and executes the corresponding update action according to ; The cache state changes from to , then there is , represents the cache state transition function, which is responsible for applying the latest changes to the cache to maintain consistency with the database.

6. A method for optimizing a physical property database based on a caching proxy mechanism according to claim 1, characterized in that, In step S4, cache proxy performance monitoring and adaptive adjustment: Establish a comprehensive cache proxy performance monitoring system to monitor key metrics in real time. The key metrics include cache hit rate , data read / write latency , memory and disk usage. Based on the key metrics, use intelligent adaptive algorithms to dynamically collect and analyze real-time performance metrics , where represent the usage conditions of memory and disk respectively. The system evaluates the current cache status and predicts future requirements.