Airport production data access method and system based on multi-level cache

By employing a multi-level caching architecture and optimized hash algorithms, combined with encryption mechanisms and access control, the problems of high network bandwidth consumption and low reliability in traditional airport production data access methods have been solved, achieving efficient and secure data access.

CN121902191APending Publication Date: 2026-04-21QINGDAO CIVIL AVIATION KAIYA SYST INTEGRATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO CIVIL AVIATION KAIYA SYST INTEGRATION CO LTD
Filing Date
2025-11-20
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional airport production data access methods result in high network bandwidth consumption, prolonged response time, and the failure of a single user terminal can affect the overall network availability. They also lack differentiated considerations and data access reliability.

Method used

It adopts a multi-level caching architecture, combining terminal embedded caching and distributed caching, optimizes hash algorithms and intelligent cache expiration mechanisms, dynamically allocates cache resources, and uses encryption mechanisms and access control to accurately manage cache copies and reduce cross-regional data transmission.

Benefits of technology

Significantly improves data access performance and reliability, reduces network bandwidth usage, reduces system upgrade costs, ensures service availability, and enhances data security and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121902191A_ABST
    Figure CN121902191A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of civil airport digitization and informatization in the civil aviation industry, and discloses an airport production data access method and system based on multi-level cache. The method comprises the following steps: a terminal responds to an interface event, constructs a local buffer interface event and query interface name combination key, and constructs a query interface name and query parameter combination key; judging whether the event time of the local buffer interface event is smaller than the retrieved buffer timestamp or not; determining specific nodes corresponding to the distributed cache region in the terminal clustering group; judging whether the event time of the local buffer interface event is smaller than the retrieved data timestamp or not; judging whether the identifier of a certain service interface is encrypted or not, and finding out a certain interface mapping relation which can be matched; and traversal of the region set needing to create the copy is completed. According to the invention, cross-regional data access is reduced, network delay is reduced, and the efficiency of data access in the region is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digitalization and information technology of civil airports in the civil aviation industry, and in particular relates to a method and system for accessing airport production data based on multi-level caching. Background Technology

[0002] Stable, reliable, and high-performance access to airport production data is a core requirement supporting airport production operations. Traditionally, client-side access to backend services directly depends on the bottlenecks of these services. While some backend services use caching to improve data access performance, this caching, deployed in the same space as the backend services, still consumes excessive network bandwidth during peak client access, leading to increased service response times. For example, in a traditional client-server architecture, some large DTO queries may return 15MB of data per query. Furthermore, due to differences in region, network, and business attributes, centralized data access doesn't adequately consider the diverse needs of different clients. An anomaly in a single client can have a cascading impact on the entire network. Finally, if the backend service becomes unavailable, clients will also become unavailable because they cannot access backend data. Therefore, a technical solution is needed to improve data access performance, reduce the impact of a single client's data access on the overall network, and ultimately improve data access reliability. This solution should achieve these goals while minimizing the cost of modifying the existing system, adhering to the open / closed principle, and reducing potential defects and risks associated with modifications. Summary of the Invention

[0003] To overcome the problems existing in related technologies, the present invention discloses an embodiment of an airport production data access method and system based on multi-level caching.

[0004] The technical solution is as follows: A method for accessing airport production data based on multi-level caching, comprising the following steps: S1, Terminal responds to interface events, loads the terminal's local interface event buffer list, loads the interface event type list and interface event mapping relationship, constructs a combination key of local buffered interface events and query interface name, and constructs a combination key of query interface name and query parameters. S2, based on the constructed local buffer interface event and query interface name combination key, determine whether the event time of the local buffer interface event is less than the retrieved cache timestamp; S3, Based on the judgment result, determine the specific node of the corresponding distributed cache region in the terminal cluster group; S4, retrieve query data on the specific node and determine whether the event time of the local buffer interface event is less than the timestamp of the retrieved data; S5. Based on the judgment result, the terminal calls the backend service according to the query interface, judges whether the service interface is encrypted, and returns the encrypted data, encryption identifier, and encrypted symmetric key to the terminal. S6. Based on the result of the terminal calling the backend service according to the query interface, load the cached interface mapping relationship list, combine the query interface name and query parameter combination key with the processed access parameter data, retrieve the cached interface mapping relationship list, and find the first interface mapping relationship that can be matched. S7, based on the matched interface mapping relationship, completes the traversal of the set of regions that need to be replicated.

[0005] Another object of the present invention is to provide an airport production data access system based on multi-level caching, the system implementing the airport production data access method based on multi-level caching, the system comprising: The local cache processing unit is used to respond to interface events on the terminal, construct a combination key of local cached interface event and query interface name, and construct a combination key of query interface name and query parameters; retrieve data from the local cache based on the constructed combination key of local cached interface event and query interface name, and determine whether the event time of the local cached interface event is less than the retrieved cache timestamp. The distributed cache processing unit is used to determine the specific node in the corresponding distributed cache region within the terminal cluster. The query data update processing unit is used to retrieve query data on the specific node and determine whether the event time of the local buffer interface event is less than the timestamp of the retrieved data. The backend query processing unit is used by the terminal to call the backend service according to the query interface, determine whether a certain service interface is encrypted, and return the encrypted data, encryption identifier, and encrypted symmetric key to the terminal. The backend failure handling unit loads a cached interface mapping relationship list based on the result of the terminal calling the backend service through the query interface. It combines the query interface name with the query parameter combination key and the processed access parameter data, retrieves the cached interface mapping relationship list, finds a matching interface mapping relationship, and completes the traversal of the set of regions that need to create replicas based on the matching interface mapping relationship. An initialization unit, used in response to an initialization event; The cache interface mapping relationship calculation and update unit is used to calculate and update the list of cache interface mapping relationships. The terminal clustering group and distributed cache area calculation unit is used to calculate the required preset terminal clustering group list and distributed cache area list; The exception handling unit is used to handle persistent service availability exceptions when retrieving distributed cache data locally on the terminal and querying backend interfaces. Combining all the above technical solutions, the beneficial effects of this invention are as follows: First, this invention improves the performance of production data access by adopting a multi-level architecture that combines in-terminal caching with distributed caching. User terminals prioritize retrieving data from the local cache, only accessing the distributed cache if a cache miss occurs, and finally calling the backend service, significantly reducing the frequency of direct access to the backend service. Simultaneously, by optimizing the hash algorithm to achieve balanced data distribution, combined with intelligent cache expiration time settings, it reduces the memory resources occupied by invalid data, lowers network bandwidth usage during peak access periods, and effectively shortens service response time.

[0006] To improve the reliability and fault tolerance of production data access, the client-side embedded cache can ensure basic data viewing functions when the backend service or distributed cache is unavailable. At the same time, placing the distributed cache before the backend service avoids the problem of overall client unavailability caused by backend service failure in traditional architectures.

[0007] To reduce the impact of a single user terminal on the overall network, based on the corresponding management of terminal clusters and distributed cache regions, clients prioritize accessing cached data within their own region, reducing cross-regional data transmission and minimizing the impact on the overall network, while maximizing access performance.

[0008] To reduce system transformation costs and risks, the solution design follows the open / closed principle and uses aspect-oriented programming (such as Spring AOP) to intercept query methods. This allows for the embedding of a multi-level caching mechanism without large-scale modifications to the original system architecture, reducing potential defects and risks associated with the transformation, while also ensuring data security (such as distributed cache encryption).

[0009] The allocation and management of cache resources are optimized by clustering terminals using an improved K-means algorithm and dynamically allocating logical hash space based on the CPU, memory, and network bandwidth of cache nodes, thus achieving rational utilization of cache node resources. Simultaneously, the hash space allocation scheme is periodically updated and historical data is recorded, supporting backtracking data retrieval based on historical records, thereby improving the overall resource utilization and data retrieval efficiency of the cache cluster.

[0010] To enhance data security and access control, an encryption mechanism is employed in the distributed cache. Corresponding keys are assigned to terminals with different permissions, ensuring that cached data can only be decrypted and accessed by authorized terminals. Encryption protection during data transmission is achieved through the associated terminal identifiers and public key configurations in the service interface list, thus mitigating the data security risks associated with front-end caching.

[0011] Precise cache replica management uses a list of cache interface mapping relationships, combined with flight dynamic operation data and historical access records, to create replicas only when the average access volume of service interface caches in specific regions exceeds a threshold. It also dynamically sets the expiration time for different regions based on access frequency and duration, avoiding resource waste caused by blindly creating replicas and ensuring that cache resources are tilted towards regions with high demand.

[0012] The refined terminal and cache matching, based on terminal configuration information (type, department, region, etc.) and historical access data, uses weighted features to calculate cosine similarity for clustering, so that terminal groups are accurately matched with distributed cache areas, reducing cross-regional data access, reducing network latency, and improving the efficiency of data access within the region.

[0013] Secondly, this invention is geared towards the airport production field, and the related technological achievements can be directly applied to systems such as airport collaborative decision-making systems, information integration systems, ground service support systems, and apron visualization systems. It can significantly improve the reliability and fault tolerance of production data access, reduce the impact of a single user terminal on the overall network, and has significant application value.

[0014] This invention solves the problem of continuous availability of related systems. Compared with traditional architectures, when backend services or centralized caches are unavailable, this invention adopts a multi-level architecture, which can ensure service availability when multiple service modules fail. At the same time, on the basis of meeting availability, a series of technical optimization measures are taken to address access performance, access fluctuations, and load loss. This makes the overall technical solution improve data access performance while ensuring availability, dynamically balance the load of backend services, and reduce the occurrence of load spread from a single access failure. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure; Figure 1 This is a flowchart of an airport production data access method based on multi-level caching provided in an embodiment of the present invention. Detailed Implementation

[0016] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0017] The innovations of this invention are as follows: It proposes a three-tier architecture of terminal embedded cache, distributed cache, and backend service, coupled with optimized hash algorithms and intelligent cache expiration mechanisms to reduce the frequency of direct backend access, decrease invalid resource consumption, and shorten response time. Simultaneously, it designs a local cache fallback mechanism to address the issue of overall unavailability caused by backend or distributed cache failures in traditional architectures, ensuring basic data viewing functionality. It proposes a terminal-cache region correspondence management mode combining weighted cosine similarity clustering to reduce cross-regional data transmission and network latency. It adopts a low-intrusion Spring AOP approach, embedding the caching mechanism without large-scale adjustments to the original architecture, balancing cost control with data security through distributed cache encryption. It proposes an improved K-means algorithm combined with a dynamic hash allocation strategy for cache node CPU, memory, and bandwidth resources to improve cluster resource utilization and data backtracking efficiency. It constructs a permission-based cache security system that allocates decryption keys according to terminal permissions, and uses service interface public key configuration to mitigate data security risks associated with front-end caching. Furthermore, it implements on-demand cache replica management, creating replicas only when the average access volume of service interface caches in a specific region exceeds a threshold, and dynamically setting expiration times based on access frequency and duration, avoiding resource waste caused by blindly creating replicas.

[0018] Example 1, such as Figure 1 As shown, the airport production data access method based on multi-level caching provided in this embodiment of the invention includes: S1, Terminal responds to interface events, loads the terminal's local interface event buffer list, loads the interface event type list and interface event mapping relationship, constructs a combination key of local buffered interface events and query interface name, and constructs a combination key of query interface name and query parameters. S2, based on the constructed local buffer interface event and query interface name combination key, determine whether the event time of the local buffer interface event is less than the retrieved cache timestamp; S3, Based on the judgment result, determine the specific node of the corresponding distributed cache region in the terminal cluster group; S4, retrieve query data on the specific node and determine whether the event time of the local buffer interface event is less than the timestamp of the retrieved data; S5. Based on the judgment result, the terminal calls the backend service according to the query interface, judges whether the service interface is encrypted, and returns the encrypted data, encryption identifier, and encrypted symmetric key to the terminal. S6. Based on the result of the terminal calling the backend service according to the query interface, load the cached interface mapping relationship list, combine the query interface name and query parameter combination key with the processed access parameter data, retrieve the cached interface mapping relationship list, and find the first interface mapping relationship that can be matched. S7, based on the matched interface mapping relationship, completes the traversal of the set of regions that need to be replicated.

[0019] For example, in step S1, the terminal responds to the interface event and constructs a local buffer interface event. Combined key with query interface name And construct the query interface name and query parameter combination key. .

[0020] For example, the terminal responds to interface events and loads the terminal's local interface event buffer list. Add the response interface event to the local interface event buffer list. Load the list of interface event types Mapping relationship between interface events When the local interface event buffer list When the terminal's local buffer interval requirement is met, iterate through the local interface event buffer list. Obtain the local buffer interface events of the specific terminal. Build local buffer interface event Combined key with query interface name Construct a combination key for the query interface name and query parameters. .

[0021] Specifically, this includes: responding to terminal interface events and loading the terminal's local interface event buffer list. in, This represents the total number of local interface event buffers. For the first A local buffer interface event. , Update the backend interface. To update the input and output data of the backend interface, Generate API event times for the backend. The random number generated by the backend will be placed in the response interface event. Load the list of interface event types in, The total number of interface event types. For the first Each interface event type, loading the interface event mapping relationship. ,in, For the first Other interface event types that are mapped to one interface event type. in, for The total number of other interface event types mapped. for The The mapping of interface event types; when the local interface event buffer list meets the terminal's local buffer time interval requirements, the local functional module starts a worker thread, first iterating through... Search In , For interface events with the same attributes, if duplicate interface events exist, delete the older interface event and keep only the newest interface event, then proceed in reverse order from the previous one. Iterate to get specific ,Will Put it into ThreadLocal, based on The specific query interface is queried using Spring AOP technology, which cross-cuts the query interface and retrieves data from ThreadLocal. Get the query interface name, and of , , , (Ensuring the generated hash values ​​are sufficiently dispersed and do not cluster) This is combined with the query interface name to obtain the local cache key value via a local buffer interface event. Combined key with query interface name The query interface name and query parameters are combined to obtain the query interface name and query parameter combination key. .

[0022] For example, in step S2, based on the constructed local buffer interface event Combined key with query interface name Determine local buffer interface events If the event time is less than the retrieved cache timestamp, and it is greater, then continue with the subsequent operations; if it is less, then return the data. If no data is retrieved, then the process is based on the interface event mapping relationship. Continue the search.

[0023] Specifically, based on the local cache key's local cache interface event. Combined key with query interface name Data is retrieved from the local cache, which consists of a hash table structure. The key in the hash table structure is the local cache interface event. Combined key with query interface name The value in the hash table structure is the data returned by the query interface. With cache timestamp Record nodes Recording area If data is retrieved, then determine... of If the time is less than the retrieved cached timestamp, and if it is, the data returned by the interface in the hash table structure is returned, and no further operations are performed. If it is greater than the cached timestamp, further operations are performed. If no data is found, the process continues based on... exist Other interface events for retrieving mappings traversal To obtain specific ,according to Obtain the specific backend update interface, and combine it with The backend update interface input and output data, along with the query interface from step S1, are used to construct a value containing the backend update interface, backend update input and output data, and the query interface. This new value is then used as the key to continue searching the local cache. The process continues to determine if data has been retrieved. If data is retrieved... Is it greater than of If the conditions are met, the data will be returned by the interface from the value in the retrieved hash table structure. Return, and do not perform any further operations. If the condition is not met, continue iterating. until the traversal is complete. Continue with the subsequent operations.

[0024] For example, in step S3, the local buffer interface event is determined based on the judgment. If the event time is greater than the retrieved cached timestamp, load the pre-defined list of terminal clusters that have undergone clustering calculation. Load the pre-defined list of distributed cache regions. Load the preset logical hash record and according to , , Continue calculations to determine the corresponding distributed cache region in the terminal cluster. Specific nodes .

[0025] Specifically, load the pre-defined list of terminal clusters. in This represents the total number of terminal clusters. For the first A cluster of terminals, in for The terminals included in it, In order to be in The Middle Each terminal loads a pre-defined list of distributed cache regions. ,in for The corresponding distributed cache area, in for The corresponding number of nodes for The Middle Each node loads a preset logical hash record. in The total number of time intervals. For the first A time interval, , A time interval, representing a period of time in history. For recording Logical hash space for nodes in each region within the time interval. ,in for In the time interval The logical hash space of the region, ,in for In the time interval The first in the region The logical hash space of each node; obtain terminal identification information, and retrieve based on the terminal identification information. Finally, the family group to which the terminal belongs was determined. Determine the distributed cache area Determine if local cache can be retrieved. corresponding , If it can be obtained, then the corresponding specific node is determined. If the cache cannot be retrieved , Then obtain The latest time Get the corresponding distributed cache area ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. .

[0026] For example, a pre-defined list of terminal clusters. List of Distributed Cache Regions Calculate using the following steps: S310 loads the preset terminal configuration information and creates a terminal list based on the terminal configuration information. in The total number of terminals, For the first One terminal, ,in For the first The ID of each terminal, For the first The type of terminal, For the first The department using each terminal For the first The usage area of ​​each terminal For the first For example, the user types of each terminal are as follows: For the first A list of the average frequency of each terminal accessing different interfaces and parameters in history. for The value after standardization For the first A list of the average response times of each terminal accessing different cache nodes in history. for The value after standardization For the first Average daily data volume accessed by each terminal.

[0027] S320 retrieves cached access history data for the past 12 months. This cached access history data consists of access logs for specific interfaces accessed by the terminal. It includes the access interface and access parameters for each access by each terminal, the cached nodes accessed, the response time, the amount of input and output data, and loads a pre-defined access parameter identifier structure. This structure marks the attributes in different parameter objects that are used as interfaces for access matching, and loads the preset attribute mapping relationship. This relationship indicates that a specific attribute needs to be converted into another corresponding attribute. Load the cached access history data for the past 12 months, iterate through the cached access history data, obtain the specific cached access record, retrieve its access parameter data, and then iterate through the access parameter data sequentially, according to... Retrieve relevant attributes, retain only the retrieved attribute information, and delete the remaining attribute data. Check if the retained attribute information is in If a mapping relationship exists, no action is taken if no mapping relationship exists. If a mapping relationship exists, the corresponding attribute is replaced with the corresponding mapping attribute. At the same time, the corresponding mapping attribute data is found in the loaded cached access history data according to the mapping relationship and updated to the access parameters. The access interface and access parameter data in the original specific access record are replaced. After traversing the access parameter data, the cached access data is traversed again.

[0028] S330 summarizes and calculates the cached access history data processed by S320 to obtain the specific terminal The average daily frequency of access to specific interfaces and parameters, and the calculation of specific terminals. The average response time per access to a specific cache node will be used to update the above data. In and In the process, the calculations are summarized and aggregated to determine the specific terminal. Average daily data access volume, and update the value to In .

[0029] After S320 processing, the access interface and access parameter portions of the cached historical access data are replaced with data format used for matching calculations. In the step of "summarizing and calculating the average daily frequency of a specific terminal accessing a specific interface and parameter based on the S320-processed cached historical access data," because each historical cached access record contains the terminal identifier, the accessed interface and parameters, the accessed cache node, and the response time, it is easy to summarize the data for each day to obtain the frequency data of which terminal accessed which interface and parameter, and then calculate the average frequency. Similarly, in the step of "simultaneously calculating the average response time per access for a specific terminal to a specific cache node," because the cached historical access data contains the cache node identifier, it is also easy to calculate the average response time for a specific terminal to access a specific cache node.

[0030] S340, traversal To obtain the specific details ,right In , , , Perform ordered encoding, convert to integer values, and update the original attributes. The data is processed to convert the frequency of different access interfaces and parameters into the proportion of all access frequencies of the same access interface and parameters, and the processed data is then updated. In China, The data is processed, transforming the data from different cache nodes into a ratio of the original value to the maximum response time for all terminals accessing that cache node, and then updating the data with the processed value. In the middle, after the processing is completed, for In , , , , , The data is standardized using the Min-Max method and updated in the corresponding original attributes to ensure consistency in magnitude.

[0031] S350 performs weighted distribution of different attributes and employs an improved K-means clustering algorithm. It calculates the sum of squared clustering errors corresponding to different cluster sizes, selecting the optimal cluster size as the number of clusters where the sum of squared clustering errors begins to decrease gradually. Based on weighted features, it calculates the cosine similarity between different terminals. It initializes a corresponding number of cluster centers (randomly selecting features from a corresponding number of terminals) according to the optimal cluster size. Iteratively, it assigns each terminal to the cluster containing the center with the highest similarity, updating the center to the weighted mean of features within the cluster. The calculation terminates when the change in center position is less than a set threshold. Finally, a list of terminal clusters is obtained. .

[0032] Weights are assigned to different attributes, for example, It is 0.1. It is 0.1. It is 0.1. It is 0.1. It is 0.4. For a threshold of 0.2, an improved K-means clustering algorithm is used. The sum of squared clustering errors corresponding to different cluster sizes is calculated. The optimal cluster size is selected when the sum of squared clustering errors begins to decrease gradually. Cosine similarity between different terminals is calculated based on weighted features. A corresponding number of cluster centers (randomly selected features from a corresponding number of terminals) are initialized according to the optimal cluster size. Each terminal is iteratively assigned to the cluster containing the center with the highest similarity. The center is updated to the weighted mean of features within the cluster. The calculation terminates when the change in center position is less than a set threshold (e.g., 0.001). Finally, a list of terminal clusters is obtained. .

[0033] S360 loads a pre-defined list of cache nodes. in This represents the total number of cache nodes. For the first One cache node, The average response time of a specific cache node for different terminal groups is calculated. Since S330 "calculates the average response time of a single access to a specific cache node by a specific terminal," the average response time of a specific terminal to a specific cache node is now known. Furthermore, since the specific terminal belongs to a specific group, the average access response time of all terminals within that group to that cache node is summed and averaged. for ID, for The overall performance of a CPU is calculated as clock speed × number of cores × instructions per clock cycle. for Average CPU utilization for memory size, for Average memory usage for The network bandwidth limit, for Average network bandwidth utilization for Average access response time for different terminal groups, among which , , , For static pre-configuration, the remaining attributes need to be calculated and populated later. Create a list of terminal clusters for calculating the average access frequency. ,in for Average access frequency, calculation list for average daily access data volume of terminal clusters ,in for The average daily data access volume, based on The affiliation of the middle terminal, combined with Chinese records , Data, summarized and calculated and , combined , Summarize and calculate middle .

[0034] S370, Create a list of distributed cache regions ,and The middle terminal groups correspond one-to-one and are traversed. To obtain specific ,calculate Comprehensive resource demand ratio index The specific calculation method is as follows: ; in, , The weights are average access frequency and average daily access data volume, respectively. Traversal complete .

[0035] It is understandable that this formula is used to calculate the overall resource ratio, which serves as the basis for subsequent dynamic hash calculations.

[0036] S380, from The specific resources are obtained in order of their proportion of the comprehensive resource demand index. ,calculate correspond The required number of cache nodes is , in order from Selected from Lowest average access response time already selected Do not select repeatedly, as it is the last one. At that time, the remaining Put them all into the corresponding In the middle, completed Traversal.

[0037] S390, load the preset list of cache nodes. Obtain historical monitoring data of cache nodes for the past 5 days, summarize and calculate the historical monitoring data, and calculate the value of each cache node. average , , ; Traversal Get specific area , obtain Cache nodes in traversal calculation The proportion of hash space that can be occupied by cache nodes in the system, assuming correspond middle First, calculate the overall resource capacity of the cache nodes. The specific calculation method is as follows: ; in, , , The weights are CPU, memory, and network bandwidth, respectively. , example It can be 0.3. It can be 0.5. It can be 0.2.

[0038] It is understandable that this formula provides the foundation for subsequent dynamic hash calculations and offers a relatively comprehensive means of representing resource capabilities.

[0039] Calculate the proportion of hash space that can be occupied by cache nodes. The specific calculation method is as follows: ; Then according to Set the maximum hash value in sequence. The logical hash space.

[0040] S390 will be executed periodically, eventually forming a new hash space allocation scheme, and incorporating the original historical hash space allocation schemes and the start and end times of the scheme execution into the system. middle.

[0041] Understandably, this formula is used to ultimately determine the proportion of the final hash space occupied.

[0042] Another example is that in step S4, the distributed cache region corresponding to the terminal cluster is... Nodes If the data is not found, the record will be retrieved based on logical hashing. Search for nodes by backtracking in reverse order until the logical hash record is found. There is no earlier time interval available. If the queried data is retrieved, it is decrypted based on the data attributes, and the local buffer interface event is determined. Check if the event time is less than the timestamp of the retrieved data. If it is less, return the data; if it is greater, continue with subsequent operations.

[0043] Specifically, according to exist The data retrieval process uses a distributed cache structure, which is a hash table. The key has the same structure as the local cache, and the value in the hash table contains the cached data. Whether the identifier is encrypted Key Update timestamp ,in Only when It only has value when it is true. It contains the key corresponding to each authorized terminal; if not found, it will be retrieved from... The time intervals are traced back in reverse order, according to... and The logical hash space within the new time interval is obtained. Following the calculation method in step S3, the maximum logical hash value is calculated. Calculate the node where the data is located, continue searching for data on the new node, and if no data is found, continue backtracking. Action, until If there are no earlier time intervals available, and the search still fails, proceed sequentially. Other areas in the region, as described above, are subject to the following: Perform reverse traversal calculations and retrieval. If no data is found after the search is completed, proceed with subsequent operations; if data is found, then determine... of Is the time less than the value in the retrieved hash table structure? If it is less than, then the value in the hash table structure will be... Return without performing any further operations; if the value is greater than the given value, continue with the subsequent operations. After retrieving the value from a valid hash table structure, check the hash value. If not, then directly enter the value from the hash table structure. Update to local cache, Using the key as the value in the retrieved hash table structure and corresponding , , For the value in the hash table structure, update the local cache, and at the same time... The result is returned in the aspect, and no further operations are performed. This applies if the value in the hash table structure is being evaluated. If so, then load the terminal private key, load the backend service public key, obtain the terminal identification information, and first, based on the terminal identification information, retrieve... Find the corresponding key, then decrypt the corresponding key using the terminal's private key, and then decrypt the corresponding key using the backend service's public key to obtain the symmetric encryption key. Decrypt using the symmetric encryption key. After obtaining the decrypted cached data, update the local cache with the decrypted data. Use the key to decrypt the data and its corresponding... , , For the value in the hash table structure, update the local cache and return the decrypted data as the result in the aspect, without performing any further operations.

[0044] Another example is that in step S5, based on the judgment of the local buffer interface event... If the event time is greater than the retrieved data timestamp, the terminal calls the backend service based on the query interface and loads the preset service interface list. Retrieve the list of service interfaces based on the service interfaces. Get the corresponding number Service Interfaces , judge the first Service Interfaces If the value is an encryption identifier, the queried data is returned directly to the terminal. If the value is an encryption identifier, the encrypted data, encryption identifier, and encrypted symmetric key are returned to the terminal. For example, if yes, encrypting the data and returning the encrypted data, encryption identifier, and encrypted symmetric key to the terminal includes: performing a hash calculation on the retrieved data to obtain a hash value; using the hash value as the symmetric key to symmetrically encrypt the retrieved data; then loading the backend service private key; using the private key to encrypt the symmetric key; and finally using the public key corresponding to the associated terminal. Each terminal uses its public key to encrypt the encrypted symmetric key and returns the encrypted data, encryption status, and encrypted symmetric key to the terminal.

[0045] Specifically, step S5 includes: the terminal calls the backend service according to the query interface. The backend service interface adopts Spring AOP technology, cross-cutting the input and output processing logic of the service interface. After the service interface queries the specific data, it loads the preset service interface list. in The total number of service interfaces. For the first One service interface , For the service interface name, For whether or not to encrypt, Associate the service interface with a list of authorized terminal identifiers. For the public key corresponding to the associated terminal, For the list of associated service interfaces, A threshold is set for creating cache replicas related to a service interface. A replica will only be created in a specific region if the average access volume of the service interface cache exceeds this threshold, based on the service interface retrieval. Get the corresponding ,judge of If the attribute is not specified, the retrieved data is directly returned to the terminal. If it is specified, the retrieved data is hashed to obtain a hash value, which is then used as the symmetric key to encrypt the retrieved data. Next, the backend service private key is loaded, and the symmetric key is encrypted using the private key. Then, the symmetric key is encrypted using the private key. Each terminal uses its public key to encrypt the encrypted symmetric key and returns the encrypted data, encryption status, and encrypted symmetric key to the terminal.

[0046] Another example is that in step S6, a list of cached interface mapping relationships is loaded based on the result of the terminal calling the backend service according to the query interface. Combine the query interface name with the query parameter key. The query interface and the processed access parameter data are combined to retrieve a list of cached interface mapping relationships. Find the matching first Interface mapping relationship ; Specifically, a list of loading cache interface mapping relationships. in This represents the total number of interface mapping relationships. For the first Interface mapping relationships, ,in It consists of a processed access interface and access parameter data. For the set of regions that need to be replicated, for The system can create expiration time values ​​corresponding to the replica areas and load preset access parameter identifier definition structures. This structure marks the attributes in different parameter objects that are used as interfaces for access matching, and loads the preset attribute mapping relationship. This relationship indicates that a specific attribute needs to be converted into another corresponding attribute. Load the current flight dynamic operation data and iterate through... Query parameters in the middle, according to Retrieve relevant attributes, retain only the retrieved attribute information, and delete the remaining attribute data. Check if the retained attribute information is in If a mapping relationship exists, no action is taken if it doesn't. If a mapping relationship exists, the corresponding attribute is replaced with the corresponding mapped attribute. Simultaneously, the corresponding mapped attribute data is found in the loaded current flight dynamic operation data according to the mapping relationship and updated in the access parameters. The query interface is combined with the processed access parameter data to retrieve [data]. Find a match .

[0047] Example list of cache interface mapping relationships Update using the following steps: S610: Obtain flight schedule data and convert it into a flight schedule list. in This represents the total number of scheduled flights. For the first Flight schedules, , For flight schedule numbering, The start time of the flight schedule, accurate to the day. The scheduled end time for flights, accurate to the day. Here is a list of the flight numbers involved. For class period cycle identification, ,in For flight schedule planning The number of days in the shift cycle, For the first in the shift cycle identifier The status of the day is 0 or 1, where 0 indicates that there is no flight on that day and 1 indicates that there is a flight on that day. The flight schedule is calculated from the start time of the flight schedule plan.

[0048] It is understandable that the above formula is used to provide a basis for calculating historical dates for similar schedules.

[0049] S620, Get Current Time and Date Precision down to the day, creation , This is a list structure used to store a list of flight schedules that subsequently meet the criteria. The core function is to store a list of flight schedules effective on the current date. It also represents a list of flight schedules that meet the following criteria, and it iterates through the flight schedule list. To obtain specific First, determine whether If not, skip this step. Continue traversing the subsequent... If yes, then calculate the subscript of the shift cycle identifier. The specific calculation method is as follows: ; according to from Get specific Determine if it is 1; if it is 1, then... Put in If the value is 0, no action is taken, and the iteration continues. until the traversal is complete. .

[0050] It is understandable that this formula is used to calculate the subscript of the shift cycle identifier, providing a basis for subsequent calculations.

[0051] S630, obtained through comparison The earliest scheduled start time for flights from China Create a list of filtered dates It stores the filtered dates, and iterates through them. Obtain the specific flight schedule, including the start and end times of the flight schedule, and determine... If it is within the valid time, then continue to calculate the index position of the specific flight schedule's period identifier according to the formula implementation method in step S620. If the position is 1, then continue to traverse. If the position is 0 or If the time limit is not met, the program will exit. Iterate through the loop, +1 is assigned to Continue traversing If all the specific flight schedules retrieved meet the judgment criteria, then the latest schedule will be updated. Put in This cycle continues until the latest version is reached. Date equals When the date is reached, the loop iteration ends.

[0052] S640 retrieves current flight status, filters flights whose actual departure time is not empty, and compiles a flight status list. in The total number of flight data to meet the filtering criteria, For the first Each flight's data. Iterate through them sequentially. Obtain historical flight data for a specific date, and select from the historical flight data... Flight data with the same flight number as China Airlines.

[0053] S650 performs data standardization, starting with standardizing critical moments of the flight, including the standard value for aircraft landing deviation. for: ; in For flights The actual landing time For flights The planned landing time is accurate to the second.

[0054] The standard value for aircraft takeoff deviation is for: ; in For flights The actual departure time; if the flight departure time is not available, then... Instead, the CTOT time from the flight data is used, with accuracy down to the second.

[0055] Standard values ​​for abnormal aircraft conditions The value is 1 when there is an abnormal status in the flight data, and 0 when there is no abnormal status.

[0056] Key types of aircraft protection for: ; in For flights The key protection type is 0 when there is no key protection type, 1 when the key protection type is VIP, 2 when the key protection type is VVIP, 3 when the key protection type is living organ donation, and 4 when the key protection type is special passenger.

[0057] Aircraft seat reservation standardization for: ; in For flights Number of reservations The maximum number of seats to be reserved.

[0058] S660, Construct the feature vector, assuming the current... The feature vector is After the calculation in step S650, Obtain historical flight data for specific dates, and select from the historical flight data... For flight data with consistent flight numbers, the feature vector is: After the calculation in step S650, Then the similarity between the two is The calculation method is as follows: ; S670, when At that time, it was considered that the flight data was highly similar, among which The preset similarity threshold is used; traversal complete. This yields a set of flight dates that meet the similarity requirements. in To meet the total number of flight dates required to achieve the similarity score, For the first Flight dates that meet the similarity requirements, accurate to the day, are taken separately. The cached access data for the corresponding flight date is the terminal's access log data for a specific interface, which includes the access interface and access parameter data.

[0059] Understandably, this step is to calculate the similarity between the two flights in order to help determine which specific historical dates are similar to the current time of business operations.

[0060] S680, when At that time, it was considered that the flight data were highly similar, among which The preset similarity threshold is used; traversal complete. This yields a set of flight dates that meet the similarity requirements. in To meet the total number of flight dates required to satisfy the similarity requirement, For the first Flight dates that meet the similarity requirements, accurate to the day, are taken separately. The cached access data for the corresponding flight date is the terminal's access log data for a specific interface, which includes the access interface and access parameter data.

[0061] Load the preset access parameter identifier definition structure This structure marks the attributes in different parameter objects that are used as interfaces for access matching. For example, the structure is {"flightID", "dispatchID", "taskID"...}, loading a preset attribute mapping relationship. This relationship indicates that a specific attribute needs to be converted into other corresponding attributes. For example, the structure is {"flightID:flightNO", "dispatchID:dispatchName", "taskID:taskName"....};

[0062] S690, load the preset access parameter identifier definition structure. This structure marks the attributes in different parameter objects that are used as interfaces for access matching, and loads the preset attribute mapping relationship. This relationship indicates that a specific attribute needs to be converted into another corresponding attribute, loading. The corresponding flight date cache access history data is retrieved. The cache access data for each specific flight date is then traversed to obtain the specific cache access record and its access parameter data. This process is repeated sequentially based on the cache access parameter data. Retrieve relevant attributes, retain only the retrieved attribute information, and delete the remaining attribute data. Check if the retained attribute information is in If a mapping relationship exists, no processing is performed if it does not exist. If a mapping relationship exists, the corresponding attribute is replaced with the corresponding mapping attribute. At the same time, the corresponding mapping attribute data is found in the loaded cached access history data according to the mapping relationship and updated to the access parameters. The access interface and access parameter data in the original specific access record are replaced. After traversing the access parameter data, the cached access data under the specific flight date is traversed again until all cached access data for all relevant flight dates is processed.

[0063] S6100, according to and The data processed in step S690 is summarized and calculated to obtain a list of access interfaces, parameters, and regional relationships corresponding to each matched flight date. ,in For flight date The corresponding access interfaces, parameters, and region list. ,in For flight date Lower region The following are the access interfaces and parameter lists. in for The total number of access interfaces and parameters in the Chinese database. for The Middle Each access interface and parameter is used to calculate the access frequency for each matched flight date. Duration of visit Assuming the region The next The frequency of summarizing and calculating the access interfaces and parameters is as follows: The specific calculation method is as follows: ; in , where is the attenuation coefficient.

[0064] Assuming region The next The frequency of summarizing and calculating the access interface and parameters is as follows: The specific calculation method is as follows: ; Calculate all access interfaces and parameters for all regions, and create a list of cached interface mapping relationships. in This represents the total number of interface mapping relationships. For the first Interface mapping relationships, ,in It consists of a processed access interface and access parameter data. For the set of regions that need to be replicated, for The set of replica regions can be created with corresponding expiration time values, and loaded. Get all access interfaces and parameter access frequencies for all regions. According to the access interface Get the corresponding , obtain corresponding ,judge Does it meet the threshold requirements? If it does, then based on the corresponding region... exist Create the corresponding If the corresponding If it already exists, then... The system updates the additional copy creation area and expiration time. If the conditions are not met, it continues to check other access frequency values ​​until all access interfaces and parameters for all areas have been checked.

[0065] This step involves considering the access interface for time decay and the frequency calculation of parameter aggregation, overcoming the distortion caused by the traditional "average" calculation, and considering time decay is more in line with reality.

[0066] Another example is that in step S7, based on the match made in step S6, the first... Interface mapping relationship Complete the set of regions where replicas need to be created. Traversal; Specifically, to obtain the first Interface mapping relationship The set of regions that need to be replicated Expiration time value Iterate through the set of regions where replicas need to be created. Get the specific distributed cache area , obtain The latest time Get the corresponding distributed cache area ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. ,by Using the key and the data returned in step S5 as the value in the hash table structure, the data is stored in the node. and set The expiration time of the corresponding cache area is traversed. .

[0067] Example 2, exemplarily, in response to a terminal calling a backend update interface event, the following steps may be included before step S1: B100: The terminal calls the backend update interface. The backend service interface uses Spring AOP technology to cross-cut the input and output processing logic of the update interface. After the update interface execution is complete, an interface event is created. , Enter the name of the backend update interface that is currently being called in the field. Enter the input and output data of the currently invoked backend update interface. Enter the current time. Enter a randomly generated number to ensure that the generated hash values ​​are more balanced.

[0068] B200, Loading Service Interface List Retrieve based on the current backend update interface To obtain specific ,according to Get the list of affected service interfaces, iterate through the list of affected service interfaces, get the specific service interfaces, and then... of , , , Combined with the service interface name, the local cache key value is obtained. .

[0069] B300, load the preset logical hash record. Reverse traversal To obtain specific traversal To obtain specific ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. .

[0070] B400, according to exist The system searches for data; if no data is found, it continues iterating. If the corresponding data is retrieved, the value structure in the retrieved key-hash table structure is expired and invalidated, and the traversal is complete. Traversal complete The list of affected service interfaces is traversed.

[0071] Example 3, exemplary, includes the following steps prior to step S1: A100, in response to the initialization event, creates a terminal local interface event buffer list. And complete the initialization, creating a list of interface event types based on the configuration file. Mapping relationship with interface events .

[0072] A200 creates a pre-defined list of terminal clusters based on configuration files. At the same time, a pre-defined list of distributed cache regions is created. Create a preset logical hash record And initialize it; create a preset access parameter identifier definition structure based on the configuration file. Mapping relationship with preset attributes It creates preset terminal configuration information based on configuration files; it also creates a preset cache node list based on configuration file data. .

[0073] A300, creates a list of preset service interfaces based on configuration file data. List of mapping relationships between cache interfaces Create backend service private keys and private keys for each terminal based on the private key configuration file, and create public keys for each terminal based on the public key configuration file.

[0074] When retrieving distributed cache data and querying backend interfaces locally on the terminal, if a persistent service availability exception occurs, the local cache will no longer be checked, and the local response will be returned directly. At the same time, when the backend service is unavailable but the distributed cache data is available, the distributed cache data expiration time will no longer be set, and the distributed cache will no longer be checked; the query will return directly.

[0075] Example 4: This invention provides an airport production data access system based on multi-level caching, the system comprising: The local cache processing unit is used to handle terminal response interface events and construct local cached interface events. Combined key with query interface name And construct the query interface name and query parameter combination key. Based on the constructed local buffer interface events Combined key with query interface name Retrieve data from local cache and determine local cache interface events. Is the event time less than the retrieved cache timestamp? The distributed cache processing unit is used to determine the specific node in the corresponding distributed cache region within the terminal cluster. ; The query data update processing unit is used to retrieve query data on the specific node and determine local buffer interface events. Is the event time less than the timestamp of the retrieved data? The backend query processing unit is used by the terminal to call backend services based on the query interface and determine which service interface is being used. The system determines whether the data is encrypted and returns the encrypted data, the encryption identifier, and the encrypted symmetric key to the terminal. The backend failure handling unit loads a list of cached interface mapping relationships based on the results of the terminal's query interface call to the backend service. Combine the query interface name with the query parameter key. The query interface and the processed access parameter data are combined to retrieve a list of cached interface mapping relationships. Find the first matching interface mapping relationship. ; and the mapping relationship for a certain interface based on the matching. Complete the traversal of the set of regions where copies need to be created; An initialization unit, used in response to an initialization event; The cache interface mapping relationship calculation and update unit is used to update the list of interface mapping relationships that need to be cached. Perform calculation updates; The terminal clustering and distributed cache area computing unit is used to process the required preset list of terminal clustering groups. List of Distributed Cache Regions Perform calculations; The exception handling unit is used to handle persistent service availability exceptions when retrieving distributed cache data and querying backend interfaces locally on the terminal.

[0076] For example, the local cache processing unit is used to load the terminal's local interface event buffer list in response to terminal interface events. Place the response interface event into Load the list of interface event types Mapping relationship between interface events When the local interface event buffer list meets the terminal's local buffer time interval requirements, iterate through... Obtain specific terminal local interface events Construct a composite key with the query interface name. Construct a combination key for the query interface name and query parameters. Used according to Retrieve data from local cache and make a judgment. If the event time is less than the retrieved cache timestamp, and it is greater, then continue with subsequent operations; if it is less, then return the data. If no data is found, then... Continue the search.

[0077] The distributed cache processing unit loads a pre-defined list of terminal clusters that have undergone clustering calculations. Load the pre-defined list of distributed cache regions. Load the preset logical hash record ,according to , , Continue calculations to determine specific nodes. Used in If the search query does not find the data, based on Search for nodes by backtracking in reverse order until... There is no earlier time interval available. If the queried data is found, it will be decrypted based on its attributes to determine its validity. Check if the event time is less than the timestamp of the retrieved data. If it is less, return the data; if it is greater, continue with subsequent operations.

[0078] The query data update processing unit is used to load the list of cache interface mapping relationships. in This represents the total number of interface mapping relationships. For the first Interface mapping relationships, ,in It consists of a processed access interface and access parameter data. For the set of regions that need to be replicated, for The system can create expiration time values ​​corresponding to the replica areas and load preset access parameter identifier definition structures. This structure marks the attributes in different parameter objects that are used as interfaces for access matching, and loads the preset attribute mapping relationship. This relationship indicates that a specific attribute needs to be converted into another corresponding attribute. Load the current flight dynamic operation data and iterate through... Query parameters in the middle, according to Retrieve relevant attributes, retain only the retrieved attribute information, and delete the remaining attribute data. Check if the retained attribute information is in If a mapping relationship exists, no action is taken if it doesn't. If a mapping relationship exists, the corresponding attribute is replaced with the corresponding mapped attribute. Simultaneously, the corresponding mapped attribute data is found in the loaded current flight dynamic operation data according to the mapping relationship and updated in the access parameters. The query interface is combined with the processed access parameter data to retrieve [data]. Find a match Used to obtain In , traversal Get the specific distributed cache area , obtain The latest time Get the corresponding distributed cache area ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. ,by Using the key and the data returned in step S5 as the value in the hash table structure, the data is stored in the node. and set The expiration time of the corresponding cache area is traversed. .

[0079] The backend query processing unit is used by the terminal to call backend services based on the query interface and load a list of preset service interfaces. Retrieve based on service interface Get the corresponding ,judge The system checks if the data is encrypted. If no, the retrieved data is returned directly to the terminal. If yes, the retrieved data is hashed to obtain a hash value, which is then used as the symmetric key to encrypt the retrieved data. Next, the backend service's private key is loaded, and the symmetric key is encrypted using the private key. Then, the symmetric key is encrypted using the private key. Each terminal uses its public key to encrypt the encrypted symmetric key and returns the encrypted data, encryption status, and encrypted symmetric key to the terminal.

[0080] The backend failure handling unit is used to respond to terminal calls to the backend update interface. The terminal calls the backend update interface, which uses Spring AOP technology to cross-cut the input and output processing logic of the update interface. After the update interface execution is complete, an interface event is created. , Enter the name of the backend update interface that is currently being called in the field. Enter the input and output data of the currently invoked backend update interface. Enter the current time. Enter a randomly generated number to ensure a more balanced distribution of subsequent hash values. Load the service interface list. Retrieve based on the current backend update interface To obtain specific ,according to Get the list of affected service interfaces, iterate through the list of affected service interfaces, get the specific service interfaces, and then... of , , , Combined with the service interface name, the local cache key value is obtained. Load the preset logical hash record. Reverse traversal To obtain specific traversal To obtain specific ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. .according to exist The system searches for data; if no data is found, it continues iterating. If the corresponding data is retrieved, the value structure in the retrieved key-hash table structure is expired and invalidated, and the traversal is complete. Traversal complete The list of affected service interfaces is traversed.

[0081] The initialization unit is used to create a terminal local interface event buffer list in response to an initialization event. And complete the initialization, creating a list of interface event types based on the configuration file. Mapping relationship with interface events Create a pre-defined list of terminal clusters based on the configuration file. At the same time, a pre-defined list of distributed cache regions is created. Create a preset logical hash record And initialize it; create a preset access parameter identifier definition structure based on the configuration file. Mapping relationship with preset attributes It creates preset terminal configuration information based on configuration files; it also creates a preset cache node list based on configuration file data. Create a list of preset service interfaces based on configuration file data. List of mapping relationships between cache interfaces Create backend service private keys and private keys for each terminal based on the private key configuration file, and create public keys for each terminal based on the public key configuration file.

[0082] The cache interface mapping relationship calculation and update unit is used to update the cache interface mapping relationship list required in step S6. The calculation update is performed, specifically in steps S610-S690.

[0083] The terminal clustering group and distributed cache area computing unit is used to process the preset terminal clustering group list required in step S3. List of Distributed Cache Regions The calculation is performed, and the specific steps are S310-S390.

[0084] The exception handling unit is used to handle persistent service availability exceptions when retrieving distributed cache data and querying backend interfaces on the terminal. In such cases, the local cache will no longer be checked, and the local data will be returned directly. At the same time, when the backend service is unavailable but the distributed cache data is available, the distributed cache data expiration time will no longer be set, and the distributed cache will no longer be checked. The query will return directly.

[0085] To verify the advanced nature and practicality of the technical solution described in this application, a verification was conducted in the upgrade and maintenance scenario of a large airport. To ensure that actual production is not affected, the verification experiment was conducted after the flight was completed. The experimental hardware environment is shown in Table 1 below. Table 1 Experimental Hardware Environment

[0086] The experimental software environment is shown in Table 2 below.

[0087] Table 2 Experimental Software Environment

[0088] The experimental data consisted of real production operation data from the past 12 months. Dynamic production data was taken from the actual dynamic data of the day after the planned-to-dynamic conversion. After the experiment, any changed data was deleted, and the planned-to-dynamic conversion was re-executed to ensure no impact on the next day's production operation. The experiment comprised three scenarios: normal load, peak load, and fault scenario. Normal load simulated off-peak business (approximately one query request per terminal every 10 seconds), peak load simulated the morning rush hour with heavy flight takeoffs and landings (approximately one query request per terminal every 2 seconds), and the fault scenario simulated a backend service outage.

[0089] The experiment was divided into control group 1, control group 2, and experimental group. Control group 1 disabled backend service caching, allowing terminals to directly call backend services. Control group 2 enabled backend caching, triggering cached data return when the terminal called the backend service under certain conditions. The experimental group adopted the technical solution of this application. To accommodate different experimental groups, terminal devices were configured according to the requirements of their respective groups. Experimental parameters were set using the exemplary settings of this application, with a maximum hash value of 10000. Historical access logs from 50 terminals were imported, and clustering calculations were performed according to the method of this application to generate a terminal group list. Based on group resource requirements, a region list and logical hash records were generated. After calculation, the terminals were divided into four groups, with the number of cache nodes configured for each group being 3, 2, 2, and 1 respectively. Flight dynamic data was loaded, and a cache interface mapping list was generated according to the method of this application.

[0090] Tests were conducted sequentially according to the scenario settings. In the normal load scenario, the service configurations of control group 1, control group 2, and the experimental group were started respectively. The terminal where the event occurred simulated business events for 2 hours, recording data every 5 minutes and calculating the average. In the peak load scenario, based on the normal load scenario, the frequency of simulated business events on the terminal was adjusted to simulate the morning peak business pressure, and the test was conducted continuously for 2 hours, with the test results recorded periodically. In the fault scenario, the system ran for 30 minutes based on the normal load scenario, then the backend service was shut down for 10 minutes, and the corresponding data was recorded. After simulation testing, the results for the normal load scenario are shown in Table 3 below.

[0091] Table 3 Results under Normal Load Scenario

[0092] The results for peak load scenarios are shown in Table 4 below; Table 4 Results of Peak Load Scenarios

[0093] The results of the fault scenarios are shown in Table 5 below; Table 5 Results of Fault Scenario

[0094] Through the above scenario tests, it can be seen that the multi-level caching architecture of this application significantly improves the average response time and peak bandwidth usage under normal / peak load conditions compared to the traditional no-caching and backend caching architectures, solving the pain points of "slow response to large DTO queries and peak bandwidth overload" in the traditional architecture; it can ensure the continuous availability of terminal devices in backend downtime scenarios; at the same time, the frequency of backend service access in the experimental group is also significantly reduced, which can reduce the resource consumption of backend servers, bear more airport business pressure, and reduce the probability of response crashes caused by service overload.

[0095] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention and within the spirit and principles of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for accessing airport production data based on multi-level caching, characterized in that, The method includes the following steps: S1, Terminal responds to interface events, loads the terminal's local interface event buffer list, loads the interface event type list and interface event mapping relationship, constructs a combination key of local buffered interface events and query interface name, and constructs a combination key of query interface name and query parameters. S2, based on the constructed local buffer interface event and query interface name combination key, determine whether the event time of the local buffer interface event is less than the retrieved cache timestamp; S3, Based on the judgment result, determine the specific node of the corresponding distributed cache region in the terminal cluster group; S4, retrieve query data on the specific node and determine whether the event time of the local buffer interface event is less than the timestamp of the retrieved data; S5. Based on the judgment result, the terminal calls the backend service according to the query interface, judges whether the service interface is encrypted, and returns the encrypted data, encryption identifier, and encrypted symmetric key to the terminal. S6. Based on the result of the terminal calling the backend service according to the query interface, load the cached interface mapping relationship list, combine the query interface name and query parameter combination key with the processed access parameter data, retrieve the cached interface mapping relationship list, and find the first interface mapping relationship that can be matched. S7, based on the matched interface mapping relationship, completes the traversal of the set of regions that need to be replicated.

2. The airport production data access method based on multi-level caching according to claim 1, characterized in that, In step S1, a key combination of local buffer interface event and query interface name is constructed, and a key combination of query interface name and query parameters is constructed, including: terminal response interface event, and loading the terminal local interface event buffer list. ;in, This represents the total number of local interface event buffers. For the first A local buffer interface event. , Update the backend interface. To update the input and output data of the backend interface, Generate API event times for the backend. The random number generated by the backend will be placed in the response interface event. Load the list of interface event types ;in, The total number of interface event types. For the first Each interface event type, loading the interface event mapping relationship. ,in, For the first Other interface event types that are mapped to one interface event type. ;in, for The total number of other interface event types mapped. for The The interface event type of each mapping; When the local interface event buffer list meets the terminal's local buffer time interval requirements, the local function module starts a worker thread, which first iterates through the event buffer list. retrieval In , For interface events with the same attributes, if duplicate interface events exist, delete the older interface event and keep only the newest interface event, then proceed in reverse order from the previous one. Iterate to get specific ,Will Put it into ThreadLocal, based on The specific query interface is queried using Spring AOP technology, which cross-cuts the query interface and retrieves data from ThreadLocal. Get the query interface name, and of , , , The local cache interface event that combines the query interface name to obtain the local cache key. Combined key with query interface name The query interface name and query parameters are combined to obtain the query interface name and query parameter combination key. .

3. The airport production data access method based on multi-level caching according to claim 2, characterized in that, In step S2, based on the constructed local buffer interface event and query interface name combination key, it is determined whether the event time of the local buffer interface event is less than the retrieved cache timestamp, including: Based on the local cache key's local buffer interface event Combined key with query interface name Data is retrieved from the local cache, which consists of a hash table structure. The key in the hash table structure is the local cache interface event. Combined key with query interface name The value in the hash table structure is the data returned by the query interface. With cache timestamp Record nodes Recording area If data is retrieved, then determine... of If the time is less than the retrieved cache timestamp, and if it is, the data returned by the interface in the hash table structure is returned, and no further operations are performed. If it is greater than the cache timestamp, further operations are performed. If no data is found, the process continues based on... exist Other interface events for retrieving mappings traversal To obtain specific ,according to Obtain the specific backend update interface, and combine it with The backend update interface input and output data, along with the query interface from step S1, are used to construct a value containing the backend update interface, backend update input and output data, and the query interface. This new value is then used as the key to continue searching the local cache. The process continues to determine if data has been retrieved. If data is retrieved... Is it greater than of If the conditions are met, the data will be returned by the interface from the value in the retrieved hash table structure. Return, and do not perform any further operations. If the condition is not met, continue iterating. until the traversal is complete. Continue with the subsequent operations.

4. The airport production data access method based on multi-level caching according to claim 1, characterized in that, In step S3, based on the judgment result, the specific node corresponding to the distributed cache region in the terminal cluster is determined, including: local buffer interface events based on the judgment. If the event time is greater than the retrieved cached timestamp, load the pre-defined list of terminal clusters that have undergone clustering calculation. Load the pre-defined list of distributed cache regions. Load the preset logical hash record and according to , , Continue calculations to determine the corresponding distributed cache region in the terminal cluster. Specific nodes ; Determining the specific node corresponding to the distributed cache region within the terminal cluster includes: loading the preset list of terminal clusters. ;in, This represents the total number of terminal clusters. For the first A cluster of terminals, ;in, for The terminals included in it, In order to be in The Middle Each terminal loads a pre-defined list of distributed cache regions. ,in, for The corresponding distributed cache area, ;in, for The corresponding number of nodes for The Middle Each node loads a preset logical hash record. ;in, The total number of time intervals. For the first A time interval, , A time interval, representing a period of time in history. For recording Logical hash space for nodes in each region within the time interval. ,in, for In the time interval The logical hash space of the region, ,in, for In the time interval The first in the region The logical hash space of each node; obtain terminal identification information, and retrieve based on the terminal identification information. Finally, the family group to which the terminal belongs was determined. Determine the distributed cache area Determine whether the local cache has been retrieved. corresponding , If it can be obtained, then the corresponding specific node is determined. If the cache cannot be retrieved , Then obtain The latest time Get the corresponding distributed cache area ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. .

5. The airport production data access method based on multi-level caching according to claim 1, characterized in that, In step S4, the query data is retrieved on the specific node to determine the local buffer interface event. Whether the event time is less than the retrieved data timestamp, including: the timestamp of the corresponding distributed cache region in the terminal cluster. Nodes If the data is not found, the record will be retrieved based on logical hashing. Search for nodes by backtracking in reverse order until the logical hash record is found. There is no earlier time interval available. If the queried data is retrieved, it is decrypted based on the data attributes, and the local buffer interface event is determined. Check if the event time is less than the timestamp of the retrieved data. If it is less, return the data; if it is greater, continue with subsequent operations.

6. The airport production data access method based on multi-level caching according to claim 1, characterized in that, In step S5, based on the judgment result, the terminal calls the backend service according to the query interface to determine the service interface. The system determines whether the data is encrypted and returns the encrypted data, the encryption identifier, and the encrypted symmetric key to the terminal; this includes: based on judging local buffer interface events. If the event time is greater than the retrieved data timestamp, the terminal calls the backend service based on the query interface and loads the preset service interface list. Retrieve the list of service interfaces based on the service interfaces. Get the corresponding number Service Interfaces , judge the first Service Interfaces The system checks if the data is encrypted. If not, the retrieved data is returned directly to the terminal. If yes, the data is encrypted, and the encrypted data, encryption flag, and encrypted symmetric key are returned to the terminal. This includes: performing a hash calculation on the retrieved data to obtain a hash value; using the hash value as the symmetric key to symmetrically encrypt the retrieved data; then loading the backend service private key; using the private key to encrypt the symmetric key; and finally using the public key corresponding to the associated terminal. Each terminal uses its public key to encrypt the encrypted symmetric key and returns the encrypted data, encryption status, and encrypted symmetric key to the terminal.

7. The airport production data access method based on multi-level caching according to claim 1, characterized in that, In step S6, the cache interface mapping list is loaded. Combine the query interface name with the query parameter key. The query interface and the processed access parameter data are combined to retrieve a list of cached interface mapping relationships. Find the first matching interface mapping relationship. Includes: a list of cache interface mapping relationships. Combine the query interface name with the query parameter key. The query interface and the processed access parameter data are combined to retrieve a list of cached interface mapping relationships. Find the matching first Interface mapping relationship .

8. The airport production data access method based on multi-level caching according to claim 1, characterized in that, In step S7, based on the matched interface mapping relationship Complete the traversal of the set of regions that need to be replicated, including: based on the matching of the first... Interface mapping relationship Complete the set of regions where replicas need to be created. Traversal; obtaining the first Interface mapping relationship The set of regions that need to be replicated Expiration time value Iterate through the set of regions where replicas need to be created. Get the specific distributed cache area , obtain The latest time Get the corresponding distributed cache area ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. ,by Using the key and the data returned in step S5 as the value in the hash table structure, the data is stored in the node. and set The expiration time of the corresponding cache area is traversed. .

9. The airport production data access method based on multi-level caching according to claim 1, characterized in that, Before step S1, the following steps are also performed: B100: The terminal calls the backend update interface. The backend service interface uses Spring AOP technology to cross-cut the input and output processing logic of the update interface. After the update interface execution is complete, an interface event is created. , Enter the name of the backend update interface that is currently being called in the field. Enter the input and output data of the currently invoked backend update interface. Enter the current time. Enter a randomly generated number to ensure that the generated hash values ​​are more balanced in the future; B200, Loading Service Interface List Retrieve based on the current backend update interface To obtain specific ,according to Get the list of affected service interfaces, iterate through the list of affected service interfaces, get the specific service interfaces, and then... of , , , Combined with the service interface name, the local cache key value is obtained. ; B300, load the preset logical hash record. Reverse traversal To obtain specific traversal To obtain specific ,Sure The maximum logical hash value in the middle is calculated. The remainder after dividing by the maximum logical hash value, according to The specific node is determined by the logical hash space range of different nodes recorded in the record. ; B400, according to exist The system searches for data; if no data is found, it continues iterating. If the corresponding data is retrieved, the value structure in the retrieved key-hash table structure is expired and invalidated, and the traversal is complete. Traversal complete The list of affected service interfaces is traversed.

10. An airport production data access system based on multi-level caching, characterized in that, The system implements the airport production data access method with multi-level caching as described in any one of claims 1-9, and the system includes: The local cache processing unit is used to respond to interface events on the terminal, construct a combination key of local cached interface event and query interface name, and construct a combination key of query interface name and query parameters; retrieve data from the local cache based on the constructed combination key of local cached interface event and query interface name, and determine whether the event time of the local cached interface event is less than the retrieved cache timestamp. The distributed cache processing unit is used to determine the specific node in the corresponding distributed cache region within the terminal cluster. The query data update processing unit is used to retrieve query data on the specific node and determine whether the event time of the local buffer interface event is less than the timestamp of the retrieved data. The backend query processing unit is used by the terminal to call the backend service according to the query interface, determine whether a certain service interface is encrypted, and return the encrypted data, encryption identifier, and encrypted symmetric key to the terminal. The backend failure handling unit loads a cached interface mapping relationship list based on the result of the terminal calling the backend service through the query interface. It combines the query interface name with the query parameter combination key and the processed access parameter data, retrieves the cached interface mapping relationship list, finds a matching interface mapping relationship, and completes the traversal of the set of regions that need to create replicas based on the matching interface mapping relationship. An initialization unit, used in response to an initialization event; The cache interface mapping relationship calculation and update unit is used to calculate and update the list of cache interface mapping relationships. The terminal clustering group and distributed cache area calculation unit is used to calculate the required preset terminal clustering group list and distributed cache area list; The exception handling unit is used to handle persistent service availability exceptions when retrieving distributed cache data and querying backend interfaces locally on the terminal.