A method, medium, and system for fast loading and caching of online map tiles
By establishing a tile index library, priority matrix, and heat scoring mechanism in the online map system, combined with a thermodynamic entropy reduction algorithm and dynamic control model, the distribution of cache resources was optimized, solving the problem of excessively long access paths caused by disordered caching, and improving map tile loading speed and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 山东省地图院
- Filing Date
- 2025-11-24
- Publication Date
- 2026-05-26
AI Technical Summary
During the online map tile loading process, the disordered distribution of cached resources leads to excessively long access paths for high-value tiles, reducing the overall loading response speed.
By establishing a tile index library on the map server, initializing the tile exchange priority matrix on the client, collecting user sliding operation parameters to calculate the viewport movement trend vector, predicting the viewport range, filtering preloaded tiles and checking cache validity, establishing a tile hit rate statistics matrix, calculating heat scores, using a thermodynamic entropy reduction algorithm to optimize cache space, dynamically selecting tile detail levels and view frustum clipping judgments, and using a tile layout dynamic control model for real-time optimization.
The system achieves ordered configuration of cache space, ensuring that high-value tiles are always on the fast access path, reducing lookup overhead, and improving the response speed of map tile loading and the smoothness of user experience.
Smart Images

Figure CN121326442B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of map processing technology, and specifically relates to a method, medium, and system for fast loading and caching of online map tiles. Background Technology
[0002] Online map applications rely on tile technology to load map data in chunks. Traditional methods improve loading speed by establishing tile indexes and caching mechanisms. Common caching strategies include Least Recently Used (LRU) and First-In-First-Out (FIFO) algorithms. These methods preload surrounding tiles when a user browses the map and store frequently accessed tiles in a local cache. However, traditional caching strategies manage tiles as independent entities, neglecting the access correlations and spatial distribution characteristics between tiles. This results in a random mix of frequently and infrequently accessed tiles in the cache space, leading to an unordered cache environment. In existing technologies, due to the disordered distribution of cached resources, the system needs to traverse a large amount of irrelevant data when searching for high-value tiles. This lengthens the access path for high-value tiles, significantly increasing the average overhead of cache lookups and ultimately reducing the overall loading response speed of map tiles. In other words, existing technologies suffer from the technical problem of disordered distribution of cached resources during online map tile loading, leading to excessively long access paths for high-value tiles and thus reducing the overall loading response speed. Summary of the Invention
[0003] In view of this, the present invention provides a method, medium and system for fast loading and caching of online map tiles, which can solve the technical problem in the prior art where the disordered distribution of cache resources during the online map tile loading process leads to excessively long access paths for high-value tiles, thereby reducing the overall loading response speed.
[0004] This invention is implemented as follows: The first aspect of this invention provides a method for fast loading and caching optimization of online map tiles. A tile index library is established on the map server side, and each tile is assigned a unique identifier and version timestamp. During client initialization, a tile exchange priority matrix is established. User sliding operation parameters on the map are collected, and a viewport movement trend vector is calculated based on these parameters. The predicted viewport range is calculated based on the viewport movement trend vector and a prediction time window. A list of tiles requiring preloading is selected and sorted. The cache validity of the tiles in the list is checked, and a method for detecting minute changes in tiles is established. The system determines whether the local cache is invalid, establishes a tile hit rate statistical matrix, calculates the tile popularity score based on the tile hit rate statistical matrix, and optimizes the cache space using a simulated thermodynamic entropy reduction algorithm. The simulated thermodynamic entropy reduction algorithm maps the disorder of the cache space to the system entropy value, and achieves cache ordering by minimizing the system entropy value. A depth level description matrix is established for 3D map tiles, and the detail level of the tile is dynamically selected for loading based on the current camera view distance. View frustum clipping is performed on the building models in the 3D tiles, and a tile layout dynamic control model is used to optimize the tile loading strategy in real time.
[0005] The steps for establishing the tile exchange priority matrix are as follows: dividing the map viewport into a central region and an edge region, calculating the normalized distance from each tile position within the viewport to the viewport center point, assigning priority weights to each tile position based on the normalized distance, and arranging the priority weights according to the row and column positions of the tiles to form a matrix.
[0006] The calculation steps for the viewport movement trend vector are as follows: collecting user sliding operation data from multiple consecutive frames, calculating the difference between the viewport center point coordinates of two adjacent frames to obtain the displacement vector for each frame, performing time series analysis on the displacement vector and using a weighted moving average method to calculate the average displacement vector, calculating the sliding speed and sliding acceleration based on the average displacement vector, and combining the sliding speed and sliding acceleration into the viewport movement trend vector.
[0007] The steps for establishing the tile minute change detection vector are as follows: on the server side, the hash value of the original data of each tile is calculated. When the tile data is updated, the hash value of the updated tile data is recalculated. The hash value before the update and the hash value after the update are compared bit by bit to count the number of different bits. The degree of change value is calculated based on the number of different bits. The degree of change values of all tiles are arranged in the order of the tile index to form a vector.
[0008] The hash value is calculated using a 128-bit message digest algorithm. The degree of change is the number of different bits divided by the total number of bits in the hash value. When the degree of change is lower than the change threshold, the local cache is retained and no update is performed.
[0009] The steps for establishing the tile hit rate statistical matrix are as follows: First, a tile access record database is established on the client side. Then, the records in the tile access record database are grouped according to the tile identifier code, and the total number of times each tile is accessed is calculated. The timestamp of the most recent access is obtained. Based on the total number of accesses and the timestamp of the most recent access, the hit frequency index and the time freshness index are calculated for each tile. Finally, the hit frequency index and the time freshness index are arranged according to the row and column positions of the tiles to form a matrix.
[0010] The calculation steps for the popularity score are as follows: extract the hit frequency index and time freshness index of the corresponding tile from the tile hit rate statistical matrix; calculate the time decay weight based on the time freshness index and decay coefficient; determine the spatial correlation factor based on the distance between the tile and the current viewport center; and multiply the hit frequency index by the time decay weight and the spatial correlation factor to obtain the popularity score of the tile.
[0011] The time decay weight is calculated using an exponential decay function, and the spatial correlation factor uses a Gaussian function model. When the cache space reaches the capacity threshold, the tiles in the cache are replaced according to the popularity score, and the tile with the lowest popularity score is eliminated.
[0012] The steps of the thermodynamic entropy reduction algorithm are as follows: each tile in the cache space is regarded as a particle in a thermodynamic system; the access frequency of the tile is mapped to the energy state of the particle; the position of the tile in the cache is mapped to the spatial distribution of the particle; the system entropy value is defined as the weighted sum of the variance of the access frequency of the tile in the cache and the uniformity of the spatial distribution of the tile; the tiles in the cache are rearranged so that the frequently accessed tiles are gathered in the fast access area of the cache; and the system entropy value is reduced by iteratively adjusting the cache position of the tile.
[0013] The steps for establishing the depth-level description matrix are as follows: First, perform geometric complexity analysis on all tiles in the 3D map scene to count the number of faces and vertices of the building models in the tiles. Second, divide the model details of each tile into multiple levels based on the number of faces and vertices. Third, set a corresponding viewing distance range for each detail level. Finally, arrange the detail level information and corresponding viewing distance range of all tiles according to the spatial position of the tiles to form a matrix.
[0014] The specific steps of the view frustum clipping determination are as follows: obtain the current camera's position coordinates, observation direction vector, and field of view angle parameters; calculate the six plane equations of the view frustum based on the position coordinates, observation direction vector, and field of view angle parameters; calculate the axis-aligned bounding box for each building model in the 3D tile; substitute the coordinates of the eight vertices of the axis-aligned bounding box into the six plane equations to determine the positional relationship with the plane equations; and load the building model when at least one vertex coordinate is located inside or on all plane equations.
[0015] Among them, the tile layout dynamic control model adopts a hybrid architecture of spiral progressive network structure and fractal dimension network structure. The input layer receives the user's historical access path sequence and current viewport parameters. The spiral progressive network structure consists of multiple spiral convolutional layers. The convolution kernel of each spiral convolutional layer samples the input feature map along the spiral path. The fractal dimension network structure is constructed recursively using a network topology with fractal features.
[0016] The spiral path starts from the center of the feature map and expands outward along the trajectory of the Archimedean spiral. By expanding the coverage of the spiral path layer by layer, a balance is achieved between global feature capture and local detail preservation. The output features of the spiral convolutional layer and the output features of the fractal network layer are concatenated through the feature fusion layer. The feature fusion layer uses a channel attention mechanism to assign dynamic weights to features from different sources.
[0017] The steps for establishing the training dataset for the tile layout dynamic control model are as follows: deploying user behavior collection modules in multiple map applications to record each tile access operation of the user; cleaning the collected user behavior data; grouping the cleaned data according to user identifiers to form user access path sequences; dividing each user access path sequence into time windows; and extracting input features and labels for each sample unit.
[0018] The training steps for the tile layout dynamic control model are as follows: initializing the network weights of the tile layout dynamic control model, dividing the training dataset into a training set and a validation set, using the cross-entropy loss function to measure the difference between the tile access probability predicted by the tile layout dynamic control model and the actual access label, and using the adaptive moment estimation optimization algorithm to update the network weights of the tile layout dynamic control model.
[0019] Specifically, when the average heat score is detected to be lower than the activity threshold, the number of preloaded tiles is increased; when the network latency is detected to exceed the latency threshold, the detail level of the tile is reduced. The activity threshold is determined based on the average heat score of all tiles in the past time period, and the latency threshold is determined based on the round-trip time between the client and the map server.
[0020] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described method for fast loading and caching of online map tiles.
[0021] A third aspect of the present invention provides an online map tile fast loading and caching optimization system, comprising the aforementioned computer-readable storage medium, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
[0022] This invention establishes a tile hit rate statistical matrix to record the historical access frequency and time information of tiles, integrates time decay factors and spatial correlation factors to calculate tile popularity scores, and employs a simulated thermodynamic entropy reduction algorithm to map the cache space as a thermodynamic system. This algorithm clusters frequently accessed tiles in fast access regions and distributes infrequently accessed tiles in ordinary access regions, achieving ordered cache configuration by iteratively reducing system entropy. The simulated thermodynamic entropy reduction algorithm of this invention actively adjusts the positional distribution of tiles in the cache through external intervention, breaking the limitations of traditional algorithms that passively respond to access requests. It transforms the cache space from a high-entropy chaotic state to a low-entropy ordered state, ensuring that high-value tiles remain on the fast access path. During cache lookups, target tiles can be directly located without traversing irrelevant data, shortening the access path length and reducing lookup overhead. In summary, this invention solves the technical problem mentioned in the background art where the disordered distribution of cache resources during online map tile loading leads to excessively long access paths for high-value tiles, thus reducing the overall loading response speed. Attached Figure Description
[0023] Figure 1 This is a flowchart of the method of the present invention.
[0024] Figure 2 This is a graph showing the distribution of tile heat ratings in the cache space in the embodiment.
[0025] Figure 3 This is a graph showing the relationship between the coverage of the spiral sampling path and the number of network layers in the embodiment. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0027] like Figure 1 The diagram shown is a flowchart of a method for fast loading and caching of online map tiles provided by the first aspect of the present invention. This method includes the following steps:
[0028] S01. Establish a tile index library on the map server side, assign a unique identifier and version timestamp to each tile. The unique identifier is composed of the tile's zoom level, row number, and column number. Establish a tile exchange priority matrix during client initialization. The tile exchange priority matrix is used to record the loading order weight of each tile in the viewport. Collect the user's sliding operation parameters on the map. The sliding operation parameters include sliding speed, sliding acceleration, and sliding direction angle. Calculate the viewport movement trend vector based on the sliding operation parameters.
[0029] S02. Calculate the predicted viewport range for future moments based on the viewport movement trend vector and the preset prediction time window, where the prediction time window is ∈ [2, 4] seconds; based on the predicted viewport range and the tile exchange priority matrix, select a list of tiles that need to be preloaded, and sort the tiles in the list according to their distance from the viewport center.
[0030] S03. Perform a cache validity check on the tiles in the tile list. By querying the version timestamp of the tile and the version timestamp of the corresponding tile in the local cache, determine whether the local cache is invalid.
[0031] S04. Establish a tile minute change detection vector. The tile minute change detection vector is used to record the degree of change in tile data. When the value of the corresponding element in the tile minute change detection vector is lower than the preset change threshold, the local cache is retained and no update is performed. Start an asynchronous loading task for the tiles that need to be updated. The asynchronous loading task adopts a multi-threaded concurrency mechanism, and the number of tiles loaded at the same time is dynamically adjusted according to the network bandwidth.
[0032] S05. Establish a tile hit rate statistics matrix, wherein the tile hit rate statistics matrix records the frequency of each tile being hit in historical visits and the most recent visit time;
[0033] S06. Calculate the heat score of the tile based on the tile hit rate statistical matrix. The heat score integrates the time decay factor and the spatial correlation factor. Tiles with high heat scores are preferentially retained in the cache. A simulated thermodynamic entropy reduction algorithm is used to optimize the cache space. This algorithm maps the disorder of the cache space to the system entropy value, achieving cache ordering by minimizing the system entropy value. When the cache space reaches a preset capacity threshold, tiles in the cache are replaced according to the heat score, and the tile with the lowest heat score is discarded.
[0034] S07. Establish a depth level description matrix for the 3D map tiles. The depth level description matrix records the detail level of the tiles at different viewing distances. Based on the current camera viewing distance and the depth level description matrix, dynamically select the detail level of the tiles for loading. When the viewing distance is greater than a preset far viewing distance threshold, load tiles with lower detail levels. Perform view frustum clipping judgment on the building models in the 3D tiles, calculate the intersection relationship between the bounding box of the building model and the camera view frustum, and only load the building models that intersect with the view frustum.
[0035] S08. A tile layout dynamic control model is used to optimize the tile loading strategy in real time. The tile layout dynamic control model predicts the next tile demand based on the user's historical access path. The loaded tiles are decoded and rendered, and the tile images are drawn to the corresponding positions on the map canvas to complete the map display update.
[0036] S09 also includes: when the average value of the popularity score is detected to be lower than a preset activity threshold, increasing the number of preloaded tiles to improve the predictive ability of the cache; when the network latency is detected to exceed a preset latency threshold, reducing the detail level of the tiles to reduce the amount of data loaded per time.
[0037] The steps for establishing the tile exchange priority matrix specifically include: dividing the map viewport into a central region and an edge region, wherein the central region is a circular region with a radius ∈ [20, 40]% of the viewport width around the center point of the viewport; calculating the normalized distance from each tile position within the viewport to the center point of the viewport, wherein the normalized distance is the actual distance divided by the length of the viewport diagonal; assigning a priority weight to each tile position according to the normalized distance, wherein the priority weight is negatively correlated with the normalized distance; and arranging the priority weights according to the row and column positions of the tiles to form a matrix, wherein the number of rows and columns of the matrix corresponds to the number of rows and columns of the tiles within the viewport.
[0038] In the tile swapping priority matrix, the element values are ∈ [0, 1], the element values in the central region are close to 1, and the element values in the edge regions are close to 0. The tile swapping priority matrix needs to be recalculated when the user performs a zoom operation to adapt to the tile distribution under different zoom levels.
[0039] The calculation steps of the viewport movement trend vector specifically include: collecting user swiping operation data for N consecutive frames, N∈[5,10], the swiping operation data including the screen coordinates of the viewport center point in each frame; calculating the difference between the viewport center point coordinates of two adjacent frames to obtain the displacement vector of each frame; performing time series analysis on the displacement vector, and calculating the average displacement vector using a weighted moving average method, in which the weight of recent frames is greater than the weight of earlier frames; calculating the swiping speed based on the average displacement vector and the time interval between the current frame and the previous frame; calculating the difference between the swiping speeds obtained from two consecutive calculations to obtain the swiping acceleration; combining the swiping speed and the swiping acceleration into a viewport movement trend vector, the direction of the viewport movement trend vector being the swiping direction, the magnitude of the viewport movement trend vector reflecting the intensity of the movement, and the viewport movement trend vector being used to predict the user's next browsing area.
[0040] The steps for establishing the tile minute change detection vector specifically include: calculating a hash value for the original data of each tile on the server side, wherein the hash value is generated using a 128-bit message digest algorithm; when the tile data is updated, recalculating the hash value of the updated tile data; comparing the hash value before the update with the hash value after the update bit by bit, and counting the number of different bits; calculating the degree of change value based on the number of different bits, wherein the degree of change value is the number of different bits divided by the total number of bits in the hash value; arranging the degree of change values of all tiles in the order of tile index to form a vector, wherein the vector is the tile minute change detection vector.
[0041] In the tile minute change detection vector, the element values are ∈ [0, 1]. When the element value is close to 0, it indicates that the tile data has hardly changed, and when the element value is close to 1, it indicates that the tile data has changed significantly. The change threshold is ∈ [0.05, 0.15]. When the change level value is lower than the change threshold, the change in the tile data is considered to be minute, and there is no need to force an update of the local cache.
[0042] The steps for establishing the tile hit rate statistical matrix specifically include: establishing a tile access record database on the client side, which records the tile identifier code and access timestamp for each tile access; grouping and statistically analyzing the records in the tile access record database according to the tile identifier code, and calculating the total number of times each tile is accessed; sorting the access timestamps of each tile to obtain the timestamp of the most recent access; calculating the hit frequency index and time freshness index for each tile based on the total number of accesses and the timestamp of the most recent access; and arranging all the tile hit frequency indexes and time freshness indexes according to the row and column positions of the tiles to form a matrix, which is the tile hit rate statistical matrix.
[0043] The tile hit rate statistical matrix is a dual-channel matrix. The first channel stores the hit frequency index, and the second channel stores the time freshness index. The hit frequency index is normalized by dividing the original number of visits by the maximum number of visits within the statistical time window. The time freshness index is obtained by calculating the difference between the current time and the timestamp of the most recent visit, and then dividing it by a preset time decay period.
[0044] The calculation steps for the popularity score specifically include: extracting the hit frequency index and time freshness index of the corresponding tile from the tile hit rate statistics matrix; setting the decay coefficient of the time decay factor ∈ [0.7, 0.9], and calculating the time decay weight based on the time freshness index and the decay coefficient; setting a spatial correlation factor, which is determined based on the distance between the tile and the current viewport center, with the spatial correlation factor being larger the closer the distance; and multiplying the hit frequency index by the time decay weight and the spatial correlation factor to obtain the tile's popularity score.
[0045] The popularity score is defined as ∈ [0, 1], with high popularity scores indicating that the tile has been frequently accessed recently and is located near the user's area of interest. The time decay weight is calculated using an exponential decay function, decreasing exponentially with increasing time intervals. The spatial relevance factor uses a Gaussian function model, peaking at the viewport center and gradually decaying towards the edges.
[0046] The specific steps of the simulated thermodynamic entropy reduction algorithm include: treating each tile in the cache space as a particle in a thermodynamic system; mapping the access frequency of the tile to the energy state of the particle; mapping the position of the tile in the cache to the spatial distribution of the particle; and mapping the disorder of the cache space to the entropy value of the system. The system entropy value is defined as the weighted sum of the variance of the tile access frequency in the cache and the uniformity of the tile spatial distribution. The tiles in the cache are rearranged so that frequently accessed tiles are clustered in the fast access region of the cache, and frequently accessed tiles are distributed in the normal access region of the cache. The system entropy value is gradually reduced by iteratively adjusting the cache position of the tiles. When the system entropy value is reduced to below a preset entropy threshold, the cache is considered to have reached an ordered state.
[0047] The design principle of the simulated thermodynamic entropy reduction algorithm is based on the inverse process of entropy increase in the second law of thermodynamics. It reduces the disorder of the system through external intervention, thereby improving cache access efficiency. The simulated thermodynamic entropy reduction algorithm maps the cache management problem to the entropy reduction problem of a thermodynamic system, because the disordered state of the cache is similar to the high-entropy state of a thermodynamic system, while the ordered cache layout is similar to the low-entropy state. The effectiveness of the simulated thermodynamic entropy reduction algorithm is verified through multi-level experiments. The first-level experiment tests the entropy change curves under different cache capacities in a simulated environment to verify the algorithm's convergence. The second-level experiment compares the cache hit rate improvement before and after using the simulated thermodynamic entropy reduction algorithm in a real map application to verify the algorithm's practicality. The third-level experiment tests the algorithm's stability and response time in high-concurrency user scenarios to verify the algorithm's robustness.
[0048] The technical effect of the simulated thermodynamic entropy reduction algorithm is that by establishing a mapping relationship between the cache space and the thermodynamic system, the dynamic optimization configuration of cache resources is realized, ensuring that high-value tiles are always on the fast access path, reducing the average overhead of cache lookup. At the same time, by quantitatively monitoring the entropy value, a real-time evaluation index of cache health is provided, which facilitates the system to make adaptive adjustments, thereby improving the overall response speed of map tile loading and the smoothness of user experience.
[0049] The steps for establishing the depth hierarchy description matrix specifically include: performing geometric complexity analysis on all tiles in the 3D map scene, which includes counting the number of faces and vertices of the building models in the tiles; dividing the model details of each tile into M levels, M∈[3,5], based on the number of faces and vertices, with the levels corresponding to model precision from coarse to fine from low to high; setting a corresponding viewing distance range for each detail level, which is determined based on the human eye's ability to distinguish at different distances; and arranging the detail level information and corresponding viewing distance ranges of all tiles according to the spatial position of the tiles to form a matrix, which is the depth hierarchy description matrix.
[0050] The depth-level description matrix is a multi-dimensional matrix, where each element contains a tile identifier, a detail level number, and upper and lower limits of the view distance. The view distance range is divided according to a logarithmic distribution, ensuring a smooth transition between details at different view distances.
[0051] The specific structure of the tile layout dynamic control model is as follows: The tile layout dynamic control model adopts a hybrid architecture of spiral progressive network structure and fractal dimension network structure. The input layer receives the user's historical access path sequence and current viewport parameters. The historical access path sequence contains the most recent Q tile access records, Q∈[50, 100]. The spiral progressive network structure consists of L spiral convolutional layers, L∈[5, 7]. The convolutional kernel of each spiral convolutional layer samples the input feature map along the spiral path. The spiral path starts from the center of the feature map and expands outward according to the trajectory of the Archimedean spiral. The polar radius of the Archimedean spiral increases linearly with the polar angle. The spiral path of the first layer covers an area with a radius of 10% of the feature map center, the second layer covers an area with a radius of 25%, the third layer covers an area with a radius of 45%, the fourth layer covers an area with a radius of 70%, and the fifth layer covers an area with a radius of 100%. By expanding the coverage of the spiral path layer by layer, the system achieves the desired effect in the third to fourth layers. A balance is struck between global feature capture and preservation of local details. The fractal-dimensional network structure adopts a network topology with D-dimensional fractal features, D∈[1.8, 2.2]. The network topology is constructed recursively, with each node connecting to K child nodes, K∈[3, 4]. The connection pattern of the child nodes maintains self-similarity with the parent node. The network depth is H layers, H∈[4, 6]. The self-similarity of fractal geometry enables the network to have the same feature extraction capability at different scales. The output features of the spiral convolutional layer and the output features of the fractal network layer are concatenated through a feature fusion layer. The feature fusion layer uses a channel attention mechanism to assign dynamic weights to features from different sources. The fused features are then subjected to dimensionality reduction and nonlinear transformation through P fully connected layers, P∈[2, 3]. The number of neurons in the fully connected layers decreases sequentially, and the number of neurons in the last fully connected layer is equal to the number of predicted tiles. The output layer outputs an access probability value for each tile, which represents the probability that the tile will be accessed within a future time window.
[0052] The spiral path sampling mechanism in the spiral progressive network structure extracts feature points sequentially along the spiral trajectory, allowing the network to expand its receptive field while maintaining focus on the central region. This avoids oversampling of corner areas by traditional rectangular convolutional kernels. The continuity of the spiral path ensures a smooth transition in feature extraction, reducing information loss caused by sampling jumps. In shallow spiral convolutional layers, the smaller spiral radius allows the network to focus on local detailed features and capture short-term dependencies in tile access patterns. In deep spiral convolutional layers, the expanded spiral radius enables the network to integrate global contextual information and discover long-term patterns in user access paths. Through progressive spiral expansion, the network achieves feature aggregation from local to global at different levels. The transition from the third to the fourth layer is a key balancing point, where the spiral path covers the main area of the feature map but still retains the weight advantage of central details. This allows the model to capture both the core features that users care about and the potential access needs of surrounding areas. This balancing mechanism significantly improves the model's prediction accuracy for the user's next action.
[0053] The fractal dimension network structure is implemented by defining basic connection patterns as fractal generators. Each fractal generator contains a parent node and K child nodes. During network construction, each child node is recursively replaced with a new fractal generator, forming a self-similar tree structure. The fractal dimension is determined by calculating the relationship between the number of network nodes and the number of network layers. When the number of nodes is D times the logarithm of the number of layers, the network possesses the fractal characteristics. The self-similarity of the fractal dimension network structure enables the model to have consistent feature extraction capabilities when processing map tiles at different zoom levels. Regardless of whether the tile belongs to a high-zoom level detailed area or a low-zoom level overview area, the network can apply the same feature recognition pattern, improving the model's generalization ability. The recursive nature of the fractal dimension network structure also enables the network to efficiently reuse computational resources, as sub-networks at different levels share the same weight parameters, reducing the total number of model parameters and accelerating inference speed.
[0054] The spiral progressive network structure employs a unique spatial sampling method that breaks the regular grid limitations of traditional convolutional networks. This allows the dynamic tile layout control model to adapt more naturally to the spatial distribution characteristics of map tiles. Map users' browsing behavior often spreads outward from a point of interest. The sampling pattern of the spiral path naturally matches this browsing behavior pattern, enabling the dynamic tile layout control model to more accurately capture the user's spatial exploration patterns. At the same time, the continuity of the spiral path reduces information breaks during feature extraction, improving the sensitivity of the dynamic tile layout control model to subtle changes in access patterns.
[0055] The fractal-dimensional network structure possesses the dual advantages of multi-scale feature extraction capability and parameter efficiency. Its self-similarity enables the tile layout dynamic control model to apply consistent feature recognition logic across different abstraction levels, avoiding the redundancy of traditional networks that require dedicated layers for different scales. When handling tile prediction tasks across scaling levels, the fractal-dimensional network structure can automatically adapt to scale changes without additional scale normalization or feature alignment operations. Its scale invariance allows the tile layout dynamic control model to maintain stable prediction performance even when the user performs scaling operations. Furthermore, the parameter sharing mechanism of the fractal-dimensional network structure allows the tile layout dynamic control model to achieve the same prediction accuracy with only 40% to 60% of the parameters of a traditional fully connected network, significantly reducing storage overhead and computational complexity, and accelerating real-time inference.
[0056] The synergistic effect of the spiral progressive network structure and the fractal dimension network structure brings several technical benefits to the entire solution. First, the spatial awareness provided by the spiral progressive network structure combined with the scale invariance provided by the fractal dimension network structure enables the tile layout dynamic control model to accurately predict the tile demand of users at different zoom levels and spatial locations. This predictive ability is directly transformed into a more efficient tile preloading strategy, reducing the time users wait for tiles to load and improving the smoothness of map browsing. Second, the lightweight nature of the tile layout dynamic control model allows it to run in real time on client devices without relying on server-side computing resources, reducing system network latency and server load.
[0057] The steps for establishing the training dataset for the dynamic tile layout control model specifically include: deploying user behavior collection modules in multiple map applications, whereby these modules record each tile access operation by the user, including the accessed tile identifier, access timestamp, zoom level, and viewport position; cleaning the collected user behavior data, removing invalid records with access durations of less than 1 second and duplicate access records; grouping the cleaned data according to user identifiers to form multiple user access path sequences, each containing all tile access records of the user in a single map browsing session; and dividing each user access path sequence into time windows, with R consecutive accesses constituting one sample unit. R∈[50, 100]; Extract input features and labels for each sample unit, where the input features are the first 80% of the access records in the sample unit, and the labels are the last 20% of the access records in the sample unit; Encode the input features by converting the tile identifier code into a three-dimensional coordinate vector, where the three-dimensional coordinate vector contains the tile's scaling level, row number, and column number; Binarize the labels to generate an access marker for each possible tile location, with visited tiles marked as 1 and unvisited tiles marked as 0; Perform data augmentation on all samples by applying time offset, spatial translation, and scaling level transformations to the access sequence to expand the size of the training dataset; Finally, form a training dataset containing S samples, S∈[ , ].
[0058] The specific steps of training the tile layout dynamic control model include: initializing the network weights of the tile layout dynamic control model, wherein the network weights are randomly initialized using a normal distribution with a mean of 0 and a standard deviation of 0.01; dividing the training dataset into a training set and a validation set in an 8:2 ratio; setting the batch size for training to [32, 64] samples and the initial learning rate to [0.001, 0.005]; using the cross-entropy loss function to measure the difference between the tile access probability predicted by the tile layout dynamic control model and the actual access label; and updating the network weights of the tile layout dynamic control model using an adaptive moment estimation optimization algorithm, wherein the adaptive moment estimation optimization algorithm dynamically adjusts each weight according to the first-order moment estimate and the second-order moment estimate of the gradient. The learning rate is set as follows: During training, after every T batches of training, the prediction accuracy of the tile layout dynamic control model is evaluated on the validation set, T∈[10, 20]. When the prediction accuracy on the validation set no longer improves after 5 consecutive iterations, the learning rate is reduced to 50% of its original value. The training process is repeated until the prediction accuracy on the validation set converges or reaches the preset maximum number of training rounds E, E∈[100, 200]. The network weight with the highest prediction accuracy on the validation set is selected as the final training result. The trained tile layout dynamic control model is evaluated on a test set, which is new user behavior data independent of the training dataset. The prediction accuracy on the test set must be ≥75% for the tile layout dynamic control model to be considered successfully trained.
[0059] The initial learning rate in the dynamic tile layout control model is determined based on the number of samples in the training dataset. A smaller initial learning rate is used when the number of samples is large to ensure training stability. The number of spiral coils in the spiral convolutional layer of the dynamic tile layout control model is determined based on the size of the input feature map; a larger feature map size requires more spiral coils to cover the entire region. The number of child node connections in the fractal network of the dynamic tile layout control model is determined based on the complexity of the prediction task. A larger number of child node connections is used when there are many types of tiles to predict to enhance the expressive power of the dynamic tile layout control model.
[0060] The specific steps of determining the view frustum clipping include: obtaining the current camera's position coordinates, viewing direction vector, and field of view angle parameters; calculating six plane equations of the view frustum based on the position coordinates, viewing direction vector, and field of view angle parameters, the six plane equations including the near clipping plane equation, far clipping plane equation, left plane equation, right plane equation, top plane equation, and bottom plane equation; calculating the axis-aligned bounding box of each building model in the 3D tile, the axis-aligned bounding box being determined by the minimum and maximum values of the building model's vertex coordinates; substituting the coordinates of the eight vertices of the axis-aligned bounding box into the six plane equations, and determining the positional relationship between the eight vertex coordinates and the six plane equations; when all eight vertex coordinates are located outside a certain plane equation, it is determined that the building model is completely outside the view frustum and no loading is performed; when at least one vertex coordinate is located inside or on all plane equations, it is determined that the building model intersects with the view frustum or is located inside the view frustum, and the building model needs to be loaded.
[0061] The specific steps for setting the activity threshold include: calculating the average popularity score of all tiles over a past period of [1, 2] hours; multiplying the average popularity score by a coefficient of [0.6, 0.8] to obtain the activity threshold; when the average popularity score is detected to be lower than the activity threshold, it is determined that the current user's browsing activity is low, and the system increases the number of preloaded tiles, expanding the preload range from 1 circle around the current viewport to 2 circles; when the average popularity score is greater than or equal to the activity threshold, it is determined that the user's browsing activity is high, and the system restores the normal preload range.
[0062] The specific steps for setting the latency threshold include: benchmarking network latency during system initialization and measuring the round-trip time between the client and the map server; multiplying the round-trip time by a coefficient ∈ [1.5, 2] to obtain the latency threshold; continuously monitoring network latency during map usage, and determining poor network conditions when the latency value measured W times consecutively exceeds the latency threshold, where W ∈ [3, 5], and automatically reducing the detail level of the tiles, replacing the originally loaded high-precision tiles with low-precision tiles to reduce the amount of data transmitted per transmission; and gradually restoring the detail level of the tiles when the network latency is less than the latency threshold.
[0063] The unique identifier ensures the global uniqueness of each tile, facilitating fast indexing and retrieval by the caching system. The version timestamp uses a Unix timestamp format, accurate to milliseconds, to track the update history of tile data. The length of the prediction time window is determined based on the user's average browsing speed; users with faster browsing speeds use longer prediction time windows. The number of threads in the multi-threaded concurrency mechanism is dynamically adjusted based on the number of processor cores on the client device, typically set to 1 to 2 times the number of cores. The capacity threshold is determined based on the available storage space on the client device, generally set to 60% to 80% of the available storage space. The far-view distance threshold is determined based on the overall scale of the 3D scene, typically set to 10% to 20% of the scene's diagonal length. The message digest algorithm is a standard hash algorithm, capable of mapping data of arbitrary length to a fixed-length hash value. The length of the statistical time window ∈ [7, 30] days is used to statistically analyze historical access data for tiles. The time decay period ∈ [1, 3] days represents the timeliness of tile access records. The standard deviation parameter of the Gaussian function model is determined based on the viewport size; the smaller the standard deviation, the faster the spatial correlation factor decays. The fast access region is the portion of the cache stored using solid-state drives or memory, while the normal access region is the portion stored using mechanical hard drives. The entropy threshold is determined based on the cache capacity and the number of tile types; the larger the cache capacity, the higher the required entropy threshold. The number of faces is the total number of triangular faces in the 3D model, and the number of vertices is the total number of non-repeating vertices in the 3D model. The logarithmic distribution ensures that the switching of detail levels conforms to the visual perception characteristics of the human eye, avoiding abrupt changes in detail. The extreme radius growth rate of the Archimedean spiral is constant, ensuring the uniform expansion of the spiral path. The channel attention mechanism automatically adjusts the contribution of each feature channel to the final output by calculating the importance weights of different feature channels. The adaptive moment estimation optimization algorithm combines historical and current gradient information to dynamically adjust the learning rate. The axis-aligned bounding box is the smallest rectangular box parallel to the coordinate axes, which is simple to calculate and can effectively approximate the spatial range of the building model. The round-trip time is the total time required for a data packet to be sent from the client to the server and back to the client. The zoom level represents the magnification of the map; the higher the zoom level, the more details the map displays.
[0064] It should be noted that this invention also solves the following technical problems: Traditional tile preloading methods only extend the current viewport range, without considering the dynamic and personalized differences in user browsing behavior, resulting in a mismatch between the preloading strategy and the actual needs of users, leading to a waste of network bandwidth and cache space. This invention establishes a dynamic tile layout control model, employs a spiral progressive network structure to gradually expand the receptive field along a spiral path to capture the user's browsing pattern spreading outward from the center, and uses a fractal dimensional network structure to leverage self-similarity and consistent feature extraction capabilities at different scaling levels. It integrates spatial and scale dimensions to establish a complete user behavior representation, predicts the next tile requirement based on historical access paths, and enables the preloading strategy to adapt to the personalized browsing habits of different users. For fast-browsing users, more surrounding tiles are preloaded; for slow-exploring users, resources are concentrated on loading high-precision tiles of the current viewport. This achieves efficient utilization of network bandwidth and cache space, significantly improving the preloading hit rate and the rationality of resource allocation.
[0065] Furthermore, traditional 3D map loading methods apply a uniform level of detail to tiles across all viewing distances. Loading high-precision models at long viewing distances wastes computational resources, while displaying low-precision models at short viewing distances results in a coarse visual effect, failing to achieve a balance between performance and quality. This invention establishes a depth-level description matrix to record the level of detail for tiles at different viewing distances. It sets the viewing distance range based on the human eye's resolution at different distances, divides the level of detail according to a logarithmic distribution to ensure smooth transitions, and dynamically selects the level of detail matching the current viewing distance for loading. Loading low-detail levels at long viewing distances reduces computational overhead, while loading high-detail levels at short viewing distances ensures visual quality. Simultaneously, it performs view frustum clipping judgment on building models, calculates the intersection relationship between the bounding box and the view frustum, and loads only models located within the view frustum, avoiding invalid loading of invisible areas. This achieves optimized utilization of computational resources and network bandwidth while maintaining visual quality.
[0066] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described method for fast loading and caching of online map tiles.
[0067] A third aspect of the present invention provides an online map tile fast loading and caching optimization system, comprising the aforementioned computer-readable storage medium, wherein the system is any one of a computer, a server, or a microcontroller, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0068] Specifically, the principle of this invention is as follows: The invention solves the aforementioned technical problems by mapping the cache management problem to an entropy reduction process in a thermodynamic system. Drawing on the theory that entropy reflects the disorder of a system in the second law of thermodynamics, the disordered distribution of tiles in the cache space is equated to a high-entropy state of the thermodynamic system. The degree of disorder in the cache is quantified by defining the system entropy as a weighted sum of the variance of tile access frequency and the uniformity of spatial distribution. This invention treats each tile as a particle in a thermodynamic system, mapping access frequency to the energy state of the particle. High-energy particles should be concentrated in energy potential wells to reduce the total energy of the system. Tiles corresponding to high-frequency access should be concentrated in fast-access regions to reduce access overhead. By iteratively adjusting the cache position of the tiles, the system entropy is gradually reduced, causing the cache space to move from disorder to order. This mapping relationship conforms to the natural laws of physical systems, because ordered structures always have higher energy utilization efficiency than disordered structures. The ordered layout of the cache enables the system to quickly locate tiles along a defined path when searching for them, avoiding the time waste caused by random searches. This scheme establishes the theoretical basis for cache optimization based on the principles of physics, making cache management quantifiable and predictable.
[0069] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0070] The specific implementation of step S01 is that the unique tile identifier is composed of a combination of scaling level, row number, and column number, represented as follows: In the formula, A unique identifier for each tile. This represents the scaling level, with values ranging from 0 to 20. For line numbers, The column number is used. The tile exchange priority matrix is established by calculating the normalized distance, and the formula for the normalized distance is: In the formula, The normalized distance is dimensionless. The x-coordinate of the tile's position is in pixels. The vertical coordinate of the tile position is in pixels. The x-coordinate of the viewport center point, in pixels. The ordinate of the viewport center point is in pixels. The length of the viewport diagonal, in pixels, is calculated using the formula... The calculation yielded, where Viewport width, in pixels. This represents the viewport height, in pixels. The priority weight calculation formula is as follows: In the formula, This is the priority weight, dimensionless, and its value ranges from 0 to 1. The attenuation coefficient is dimensionless and has an empirical value of 3.5. This is the normalized distance. The viewport movement trend vector is calculated using a weighted moving average method, and the formula for the average displacement vector is: In the formula, This is the average displacement vector, in pixels. For the first The weighting coefficients of a frame are dimensionless. For the first The frame's displacement vector, in pixels. The number of frames captured is dimensionless and ranges from 5 to 10. The formula for calculating the weighting coefficient is as follows: In the formula, For the first The weighting coefficients of a frame are dimensionless. The frame number is dimensionless and ranges from 1 to [value missing]. , The total number of frames is dimensionless. The formula for calculating the sliding speed is: In the formula, The sliding speed is expressed in pixels per second. The magnitude of the average displacement vector, in pixels. The time interval, in seconds, is calculated using the difference in timestamps between two adjacent frames. The formula for calculating sliding acceleration is: In the formula, This refers to the sliding acceleration, measured in pixels per second squared. The current frame scrolling speed, in pixels per second. The scrolling speed of the previous frame, in pixels per second. The time interval is in seconds. The formula for calculating the unit vector of the sliding direction is: In the formula, Let be a unit vector in the direction of sliding, dimensionless. This is the average displacement vector, in pixels. Let be the magnitude of the average displacement vector, in pixels. The viewport movement trend vector is represented as... In the formula, This is the viewport movement trend vector, expressed in pixels per second. The sliding speed is expressed in pixels per second. Let be a unit vector in the direction of sliding, dimensionless. This is the acceleration influence coefficient, in seconds, with a default value of 0.3 seconds. This represents the sliding acceleration, measured in pixels per second squared.
[0071] The specific implementation of step S02 is as follows: the predicted viewport range is calculated based on the viewport movement trend vector and the prediction time window, and the formula for predicting the viewport center coordinates is: In the formula, To predict the viewport center coordinates, in pixels. These are the coordinates of the current viewport center, in pixels. This is the viewport movement trend vector, expressed in pixels per second. The prediction time window is in seconds and ranges from 2 to 4 seconds. The formula for calculating the distance between the tile and the viewport center is as follows: In the formula, The distance between the tile and the center of the predicted viewport, in pixels. The x-coordinate of the tile center is in pixels. The vertical coordinate of the tile center is in pixels. To predict the x-coordinate of the viewport center, in pixels. This is the predicted viewport center ordinate in pixels.
[0072] The specific implementation method of step S03 is the same as described above, and will not be repeated in detail here.
[0073] The specific implementation of step S04 is as follows: the establishment of the tile minute change detection vector is achieved through hash value comparison, and the formula for calculating the degree of change is: In the formula, This is a dimensionless value representing the degree of change, ranging from 0 to 1. For the quantity of different digits, dimensionless. This represents the total number of bits in the hash value, dimensionless, and has a value of 128. When... Local cache is retained at the same time, where, The variable threshold is dimensionless and ranges from 0.05 to 0.15. The formula for the number of tiles loaded simultaneously in an asynchronous loading task is: In the formula, The number of tiles loaded simultaneously, dimensionless. Network bandwidth, measured in kilobytes per second. The average size of a single tile, in kilobytes, is calculated using historical statistical data.
[0074] The specific implementation of step S05 is that the hit frequency index is calculated through normalization, and the formula is as follows: In the formula, This is a hit frequency indicator, dimensionless, with a value ranging from 0 to 1. To count the number of times this tile is accessed within a time window, dimensionless. The maximum number of visits to all tiles within a given time window is dimensionless. The formula for calculating the time freshness index is as follows: In the formula, A time freshness index, dimensionless. This is the current timestamp, in seconds. This is the timestamp of the tile's most recent access, in seconds. The time decay period is in seconds, with a default value of 3600 seconds.
[0075] The specific implementation of step S06 is as follows: the formula for calculating the popularity score is... In the formula, This is a popularity score, dimensionless, with a value ranging from 0 to 1. This is a hit frequency indicator, dimensionless. The time decay weight is dimensionless. This is a spatial correlation factor, dimensionless. The formula for calculating the time decay weight is as follows: In the formula, This is a time decay weight, dimensionless, with a value ranging from 0 to 1. The attenuation coefficient is dimensionless and ranges from 0.7 to 0.9. This is a dimensionless indicator of time freshness. The formula for calculating the spatial correlation factor is: In the formula, This is a spatial correlation factor, dimensionless, with values ranging from 0 to 1. The distance between the tile and the center of the current viewport, in pixels. The standard deviation of the Gaussian function, in pixels, defaults to viewport width. 30%, of which Where is the viewport width, in pixels. The formula for calculating the system entropy in the thermodynamic entropy reduction algorithm is: In the formula, The system entropy is a dimensionless value. This is the access frequency variance weighting coefficient, dimensionless, with a default value of 0.6. Let V be the variance of tile access frequency, which is dimensionless. The reference variance is dimensionless and has a value of 1.0 for normalization. This is the spatial distribution weighting coefficient, dimensionless, with a default value of 0.4. Let be the spatial distribution uniformity of the tiles, which is dimensionless. The formula for calculating the variance of tile access frequency is: In the formula, Let V be the variance of tile access frequency, which is dimensionless. The total number of tiles in the cache, dimensionless. For the first The frequency of access to each tile, dimensionless. The average frequency of visits to all tiles, dimensionless, is expressed by the formula... The calculation is as follows: The formula for calculating the spatial distribution uniformity is... In the formula, The spatial distribution uniformity of the tiles is dimensionless and ranges from 0 to 1. The total number of tiles in the cache, dimensionless. For the first Each tile is a dimensionless, dimensionless, and ranges from 1 to 1. , The ideal location for the tile based on its access frequency is assigned a dimensionless number, determined by ranking all tiles in descending order of access frequency.
[0076] The specific implementation of step S07 is that the view distance range in the depth hierarchy description matrix is determined according to the logarithmic distribution law, and the first... The formula for calculating the view distance range of the layer detail level is as follows: In the formula, For the first The upper limit of the view distance for the layer of detail, in meters. This is the minimum viewing distance, in meters, with a default value of 10 meters. This represents the maximum line-of-sight distance, in meters, with a default value of 10,000 meters. This is the current level number, dimensionless, and its value ranges from 1 to... , The total number of levels is dimensionless and ranges from 3 to 5. In the view frustum clipping decision, the positional relationship between the bounding box and the plane is determined by the signed distance, calculated using the formula: In the formula, Symbolic distance, in meters. , , The normal vector component of the plane equation is dimensionless and satisfies... , The constant term in the plane equation is represented by a unit of meters. , , These are the coordinates of the bounding box vertices, in meters.
[0077] The specific implementation of step S08 is as follows: the formula for calculating the coordinates of the spiral path sampling points of the spiral convolutional layer in the tile layout dynamic control model is: In the formula, The extreme radius is expressed in pixels. Polar angle, in radians. The starting radius is in pixels; the default value is the feature map width. 5%, of which The width of the feature map is in pixels. This is the spiral growth factor, expressed in pixels per radian. The formula for calculating the spiral growth factor is: In the formula, This is the spiral growth factor, expressed in pixels per radian. This represents the maximum radius of the spiral path in this layer, in pixels. The starting radius is in pixels. This represents the number of turns in the helix, dimensionless, and defaults to 3 to 5 turns. The formula for calculating the coverage radius of a spiral convolutional layer is as follows: In the formula, For the first The layer's coverage radius, in pixels. For the first The coverage radius scaling factor for the layers is dimensionless, with a value of 0.1 for the first layer, 0.25 for the second layer, 0.45 for the third layer, 0.7 for the fourth layer, and 1.0 for the fifth layer. The width of the feature map is in pixels. The hierarchy number is dimensionless and ranges from 1 to 5. The formula for calculating the number of nodes in a fractal dimension network structure is: In the formula, For the first The number of nodes in a layer is dimensionless. This represents the number of child node connections, a dimensionless value ranging from 3 to 4. The current level depth, dimensionless, with a value range of 0 to... ,in The total network depth is dimensionless and ranges from 4 to 6. The fractal dimension is calculated using the following formula: In the formula, The fractal dimension is dimensionless and ranges from 1.8 to 2.2. For the first The number of nodes in a layer is dimensionless. This represents the level depth, which is dimensionless. Adding 1 is to avoid the base of the logarithmic function being zero.
[0078] The specific implementation of step S09 is as follows: the activity threshold calculation formula is: In the formula, The activity threshold is dimensionless. is a coefficient, dimensionless, with values ranging from 0.6 to 0.8. The average heat score of all tiles within a past statistical time window is dimensionless and calculated using the formula. The calculation yielded, where To count the total number of tiles accessed within a time window, dimensionless. For the first The heat rating of each tile is dimensionless. The delay threshold is calculated using the following formula: In the formula, This is the delay threshold, in milliseconds. is a coefficient, dimensionless, with values ranging from 1.5 to 2. The baseline round-trip time, measured in milliseconds, is obtained during system initialization by sending a test request to the server and measuring the round-trip latency.
[0079] It needs to be explained that the system entropy formula of the thermodynamic entropy reduction algorithm... The cache disorder metric is quantified as a weighted sum of access frequency variance and spatial distribution uniformity, with the access frequency variance term... The spatial uniformity term measures the dispersion of tile access popularity. This algorithm measures the ordered layout of tiles in the cache and minimizes system entropy to cluster high-frequency tiles in fast-access areas. This reduces the average cache lookup overhead by 30% to 45%, improving map loading response speed.
[0080] The formula for the line-of-sight range of the depth hierarchy description matrix By using a logarithmic distribution to divide the detail levels, the transition between details at different viewing distances is smooth, avoiding visual discontinuities caused by abrupt changes. This formula increases the frame rate of 3D map rendering by 15% to 25%, improving the smoothness of the user experience.
[0081] Archimedes' spiral formula for spiral convolution layers This allows the network sampling path to continuously expand outward from the center, naturally aligning with users' browsing patterns centered on points of interest, and the coverage radius formula... By using a progressively increasing coverage radius ratio coefficient to achieve feature aggregation from local to global, this formula reduces tile demand prediction error by 20% to 30%, improving the accuracy of the preloading strategy.
[0082] Formula for the number of nodes in a fractal dimension network structure By employing recursive self-similarity, the model achieves consistent feature extraction capabilities across different scaling levels; fractal dimension formula. This formula ensures that the network topology maintains self-similarity across different scales, reducing the number of model parameters by 40% to 60%, accelerating real-time inference while maintaining prediction accuracy.
[0083] Activity threshold formula The preloading range is dynamically adjusted based on historical average popularity. When user browsing activity decreases, the preloading quantity is increased to improve cache prediction capability. This formula enables the system to adapt to different user behavior patterns, resulting in an overall performance optimization of 15% to 25%.
[0084] To better understand and implement this invention, a specific application scenario of this invention is provided below as an example 2: In traditional solutions, users often experience tile loading delays and screen stuttering when quickly scrolling or zooming on the map, severely impacting the user experience. The technical team decided to comprehensively overhaul the system using the online map tile fast loading and caching optimization method of this invention.
[0085] During system initialization, the technical team established a tile index library on the map server, assigning each tile a unique identifier consisting of a zoom level, row number, and column number, and recording a version timestamp for each tile in Unix format accurate to the millisecond level. When establishing the tile exchange priority matrix on the client side, the map viewport was divided into a central region and an edge region. The central region was defined as a circular area with a radius of 30% of the viewport width surrounding the viewport center point. For each tile location within the viewport, the normalized distance to the viewport center point was calculated (actual distance divided by the viewport diagonal length). Priority weights were assigned to each tile location based on this normalized distance. The element values for the central region were set between 0.85 and 0.95, and the element values for the edge region were set between 0.15 and 0.25, forming the tile exchange priority matrix.
[0086] The technical team deployed a user swipe operation parameter acquisition module, continuously collecting user swipe operation data for 8 frames, recording the screen coordinates of the viewport center point in each frame. The displacement vector for each frame was obtained by subtracting the viewport center point coordinates of two adjacent frames. A weighted moving average method was used to calculate the average displacement vector, with a weighting coefficient of 0.6 for recent frames and 0.4 for earlier frames. The swipe speed was calculated based on the average displacement vector and the time interval between the current and previous frames. The swipe acceleration was obtained by subtracting the swipe speeds from two consecutive calculations. The swipe speed and swipe acceleration were combined to form the viewport movement trend vector. Based on the viewport movement trend vector and a preset prediction time window of 3 seconds, the predicted viewport range for future moments was calculated. Based on the predicted viewport range and a tile exchange priority matrix, a list of tiles that need to be preloaded was selected, and the tiles in the list were sorted from closest to furthest from the viewport center.
[0087] When performing cache validity checks on tiles in the tile list, the technical team calculates a 128-bit hash value for the raw data of each tile on the server side. When the tile data is updated, the hash value is recalculated. The hash value before and after the update is compared bit by bit, and the number of different bits is counted. The degree of change is calculated by dividing the number of different bits by the total number of bits in the hash value. The change threshold is set to 0.10. When the degree of change is below 0.10, the tile data is considered to have undergone a minor change, and it is retained in the local cache without being updated. For tiles that need to be updated, an asynchronous loading task is initiated, employing a multi-threaded concurrency mechanism. The number of threads is dynamically adjusted based on the number of processor cores on the client device; on a quad-core processor, six concurrent threads are configured.
[0088] The technical team established a tile hit rate statistical matrix and created a tile access record database on the client side, recording the tile identifier and access timestamp for each tile access. Records in the tile access record database were grouped and statistically analyzed according to tile identifiers, calculating the total number of times each tile was accessed. The access timestamps of each tile were sorted, and the timestamp of the most recent access was obtained. The statistical time window was set to 14 days, and the hit frequency metric was normalized by dividing the original number of accesses by the maximum number of accesses within 14 days. The time freshness metric was obtained by calculating the difference between the current time and the most recent access timestamp, then dividing by the time decay period of 2 days. As shown in Table 1, the hit statistics for some tiles reflect the access characteristics of different regions.
[0089] Table 1. Tile Hit Rate Statistics Sample
[0090]
[0091] The technical team calculates the tile popularity score based on the tile hit rate statistical matrix. The decay coefficient of the time decay factor is set to 0.8, and the time decay weight is calculated using an exponential decay function based on the time freshness index and the decay coefficient. The spatial correlation factor uses a Gaussian function model, with a peak value at the viewport center and decaying towards the edges. The standard deviation parameter of the Gaussian function is determined to be 0.3 times the viewport width based on the viewport size. The hit frequency index is multiplied by the time decay weight and the spatial correlation factor to obtain the tile popularity score, which ranges from 0 to 1.
[0092] The technical team employs a thermodynamic entropy reduction algorithm to optimize cache space management. Each tile in the cache space is treated as a particle in a thermodynamic system, mapping the access frequency of a tile to the energy state of a particle, and the tile's position in the cache to the spatial distribution of particles. The system entropy is defined as a weighted sum of the variance of the tile access frequency and the uniformity of the tile's spatial distribution, with weighting coefficients set to 0.6 and 0.4, respectively. Tiles in the cache are rearranged so that frequently accessed tiles are clustered in the fast access area using solid-state drives (SSDs), while less frequently accessed tiles are distributed in the normal access area using hard disk drives (HDDs). By iteratively adjusting the cache position of tiles, the system entropy is gradually reduced. The entropy threshold is set to 2.5; when the system entropy drops below 2.5, the cache is considered to have reached an ordered state. When the cache space reaches 70% of its capacity threshold, tiles in the cache are replaced based on their popularity score, discarding the tile with the lowest popularity score. Figure 2 As shown, the tile heat rating exhibits a clear hierarchical distribution in the cache space.
[0093] When establishing a depth-level description matrix for 3D map tiles, the technical team performed geometric complexity analysis on all tiles in the 3D map scene, counting the number of faces and vertices of the building models within each tile. Based on the number of faces and vertices, the model detail of each tile was divided into four levels, with the levels corresponding to model precision from coarse to fine, from low to high. The first level had 25% of the original model's face count, the second level 50%, the third level 75%, and the fourth level 100%. A corresponding view distance range was set for each detail level, following a logarithmic distribution: the first level corresponded to a view distance greater than 800m, the second level to 400m to 800m, the third level to 150m to 400m, and the fourth level to less than 150m. When the view distance exceeded the far view distance threshold of 600m, tiles of a lower detail level were loaded.
[0094] The technical team performs view frustum clipping on building models within the 3D tile array, obtaining the current camera's position coordinates, viewing direction vector, and 60-degree field of view angle parameter. Based on these parameters, they calculate the equations for six planes representing the view frustum: the near clipping plane, the far clipping plane, the left plane, the right plane, the top plane, and the bottom plane. For each building model within the 3D tile array, they calculate the axis-aligned bounding box, substituting the coordinates of the bounding box's eight vertices into the six plane equations to determine the positional relationship between the vertices and the planes. If all eight vertices are located outside a certain plane, the building model is considered completely outside the view frustum and is not loaded; otherwise, the building model is loaded.
[0095] The technical team employed a dynamic tile layout control model to optimize the tile loading strategy in real time. This model uses a hybrid architecture of a spiral progressive network structure and a fractal-dimensional network structure. The spiral progressive network structure consists of six spiral convolutional layers, with the kernel of each layer sampling the input feature map along an Archimedean spiral path. The spiral path of the first layer covers a region with a center radius of 10% of the feature map, the second layer covers 25%, the third layer covers 45%, the fourth layer covers 70%, and the fifth layer covers 100%. The fractal-dimensional network structure uses a network topology with a fractal dimension of 2.0, with each node connected to three child nodes, and a network depth of five layers. The output features of the spiral convolutional layers and the output features of the fractal network layers are concatenated through a feature fusion layer. The fused features are then subjected to dimensionality reduction and nonlinear transformation through two fully connected layers. Figure 3 As shown, the layer-by-layer expansion process of the spiral sampling path demonstrates the progressive nature of feature extraction. The spiral progressive network structure reduces the prediction error of the tile layout dynamic adjustment model for the user's next access location by 20% to 30%, significantly improving the hit rate of tile preloading.
[0096] The technical team deployed user behavior collection modules in multiple map applications, collecting data including... The training dataset contains 80 consecutive access records as input features and 20 access records as labels. The training dataset is divided into training and validation sets in an 8:2 ratio, with a batch size of 48 samples and an initial learning rate of 0.003. A cross-entropy loss function and adaptive moment estimation optimization algorithm are used to train the tile layout dynamic adjustment model. After 150 training epochs, the prediction accuracy on the validation set reaches 78%.
[0097] During system operation, the technical team set the activity threshold to 70% of the average popularity score over the past 1.5 hours. When the average popularity score is detected to be lower than the activity threshold, the number of preloaded tiles is increased, expanding the preload range from one circle around the current viewport to two circles. The latency threshold is set to 1.8 times the baseline round-trip time, with a measured baseline round-trip time of 45ms and a latency threshold set to 81ms. When the latency value exceeds 81ms for four consecutive measurements, the system automatically reduces the tile detail level, replacing the originally loaded high-precision tiles with low-precision tiles.
[0098] It should be noted that the variables involved in this invention are explained in detail in Tables 2 and 3.
[0099] Table 2. Variable Explanation Table (Part 1)
[0100]
[0101] Table 3. Variable Explanation Table (Part Two)
[0102]
[0103] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for fast loading and caching optimization of online map tiles, characterized in that, A tile index library is established on the map server side, and each tile is assigned a unique identifier and version timestamp. A tile exchange priority matrix is established during client initialization. User sliding operation parameters on the map are collected, and a viewport movement trend vector is calculated based on the sliding operation parameters. The predicted viewport range is calculated based on the viewport movement trend vector and the prediction time window. A list of tiles that need to be preloaded is selected and sorted. The cache validity of the tiles in the list is checked. A small change detection vector for tiles is established to determine whether the local cache is invalid. A tile hit rate statistics matrix is established, and the popularity score of the tiles is calculated based on the tile hit rate statistics matrix. A simulated thermodynamic entropy reduction algorithm is used to optimize and manage the cache space. The simulated thermodynamic entropy reduction algorithm maps the disorder of the cache space to the system entropy value. The ordering of the cache is achieved by minimizing the system entropy value. A depth level description matrix is established for the 3D map tiles, and the detail level of the tiles is dynamically selected for loading based on the current camera viewing distance. View frustum clipping judgment is performed on the building models in the 3D tiles. A tile layout dynamic control model is used to optimize the tile loading strategy in real time. The steps for establishing the tile minute change detection vector are as follows: on the server side, the hash value of the original data of each tile is calculated. When the tile data is updated, the hash value of the updated tile data is recalculated. The hash value before the update and the hash value after the update are compared bit by bit to count the number of different bits. The degree of change value is calculated based on the number of different bits. The degree of change values of all tiles are arranged in the order of the tile index to form a vector. Among them, the tile layout dynamic control model adopts a hybrid architecture of spiral progressive network structure and fractal dimension network structure. The input layer receives the user's historical access path sequence and current viewport parameters. The spiral progressive network structure consists of multiple spiral convolutional layers. The convolution kernel of each spiral convolutional layer samples the input feature map along the spiral path. The fractal dimension network structure is constructed recursively using a network topology with fractal features.
2. The method according to claim 1, characterized in that, The steps for establishing the tile swapping priority matrix are as follows: divide the map viewport into a central region and an edge region; calculate the normalized distance from each tile position within the viewport to the viewport center point; assign priority weights to each tile position based on the normalized distances; and arrange the priority weights according to the row and column positions of the tiles to form a matrix.
3. The method according to claim 2, characterized in that, The calculation steps for the viewport movement trend vector are as follows: collect user sliding operation data for multiple consecutive frames, calculate the difference between the coordinates of the viewport center point of two adjacent frames to obtain the displacement vector of each frame, perform time series analysis on the displacement vector and calculate the average displacement vector using the weighted moving average method, calculate the sliding speed and sliding acceleration based on the average displacement vector, and combine the sliding speed and sliding acceleration into the viewport movement trend vector.
4. The method according to claim 3, characterized in that, The hash value is calculated using a 128-bit message digest algorithm. The degree of change is the number of different bits divided by the total number of bits in the hash value. When the degree of change is lower than the change threshold, the local cache is retained and not updated.
5. The method according to claim 4, characterized in that, The steps for establishing the tile hit rate statistical matrix are as follows: First, a tile access record database is established on the client side. Then, the records in the tile access record database are grouped according to the tile identifier code, and the total number of times each tile is accessed is calculated. The timestamp of the most recent access is obtained. Based on the total number of accesses and the timestamp of the most recent access, the hit frequency index and the time freshness index are calculated for each tile. Finally, the hit frequency index and the time freshness index are arranged according to the row and column positions of the tiles to form a matrix.
6. The method according to claim 5, characterized in that, The calculation steps for the popularity score are as follows: extract the hit frequency index and time freshness index of the corresponding tile from the tile hit rate statistical matrix; calculate the time decay weight based on the time freshness index and decay coefficient; determine the spatial correlation factor based on the distance between the tile and the current viewport center; and multiply the hit frequency index by the time decay weight and the spatial correlation factor to obtain the popularity score of the tile.
7. The method according to claim 6, characterized in that, The time decay weight is calculated using an exponential decay function, and the spatial correlation factor uses a Gaussian function model. When the cache space reaches the capacity threshold, the tiles in the cache are replaced according to the popularity score, and the tile with the lowest popularity score is discarded.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform the online map tile fast loading and caching optimization method according to any one of claims 1-7.
9. An online map tile fast loading and caching optimization system, characterized in that, The system comprises the computer-readable storage medium of claim 8, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes program instructions stored in the computer-readable storage medium.