Image tile service elastic concurrency control method and system under bandwidth constraint
By collecting bandwidth data in real time and using time-series prediction models, combined with viewport movement speed and image content complexity, the image encoding parameters of the image tile service are dynamically adjusted. This solves the problem of insufficient bandwidth utilization in high-concurrency scenarios, achieving efficient service operation and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, image tile services cannot ensure smooth and uninterrupted service in high-concurrency scenarios under fixed bandwidth network environments. At the same time, they cannot fully utilize remaining bandwidth resources, resulting in a user visual experience quality that is lower than the potential capacity of the hardware facilities.
By collecting bandwidth data in real time through the image tile service interface, using a time series prediction model to predict future bandwidth usage trends, distinguishing between high-frequency and non-high-frequency tiles, dynamically adjusting image coding parameters, degrading and compressing high-frequency tiles, and intelligently adjusting based on viewport movement speed and image content complexity, temporary tile data is generated.
It achieves a dynamic balance between ensuring service connectivity and user image browsing quality in high-concurrency scenarios, improving network resource utilization and user visual experience while reducing computing resource consumption.
Smart Images

Figure CN121864973A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication network technology, and in particular to a method and system for elastic concurrency control of image tile services under bandwidth constraints. Background Technology
[0002] With the rapid development of remote sensing and geographic information technology, massive amounts of multi-resolution remote sensing imagery data have become crucial foundational assets for the construction of digital earth and smart cities. To efficiently distribute this massive data in a network environment, image tile services (such as WMTS and XYZ standard services) are widely adopted. This service model is based on a pyramid model, pre-slicing the huge imagery data into small images (tiles) of different resolution levels. Clients then request the corresponding tile data on demand, based on the user's browsing area and zoom level, for stitching and display. This model allows users to smoothly view geographic information from macro to micro levels through a browser or lightweight client, and is widely used in emergency command and various map application platforms.
[0003] In related technologies, the network egress bandwidth used by the platform to provide image tile services is typically pre-planned and fixed. To accommodate this fixed bandwidth environment and prevent network congestion, preset strategies are usually employed to control the data transmission scale. For example, the expected maximum concurrency is pre-assessed, and a lower global tile quality standard is configured accordingly (e.g., lower JPEG compression quality or less color bit depth), or simply tiers are defined based on client connection type. When the service is running, regardless of whether the actual load is high or low, the server returns tile data to all users according to this preset conservative quality standard, thereby ensuring that the total bandwidth usage does not exceed the physical limit during peak traffic periods, thus maintaining service connectivity.
[0004] However, network access traffic exhibits a significant "tidal effect," with outbound bandwidth resources largely idle during most off-peak periods. The "one-size-fits-all" static configuration solutions of related technologies, in order to cope with the rare risk of peak congestion, force the system to operate at lower image quality throughout the day. This means that in normal scenarios with ample bandwidth, users who could obtain richer colors and clearer details in high-definition images are instead forced to receive compressed, low-quality tiles. This inefficient use of bandwidth resources makes it difficult for the system to release its potential data transmission capacity when bandwidth is not fully utilized, resulting in users experiencing a visual quality far below the theoretical upper limit supported by the hardware most of the time. Summary of the Invention
[0005] This application provides a method and system for elastic concurrency control of image tile services under bandwidth constraints, which addresses the problem of how to fully utilize remaining bandwidth resources to maximize the image browsing quality for users in image tile services with fixed outgoing bandwidth, while ensuring that the service does not lag or congestion in high-concurrency scenarios.
[0006] In a first aspect, this application provides a method for elastic concurrency control of image tile services under bandwidth constraints, applied to an elastic concurrency control system for image tile services, the method comprising: Real-time collection of actual bandwidth data at the service interface of the image tile service; The actual bandwidth data within a preset past time period is input into a preset time series prediction model, and the bandwidth usage prediction value within a preset future time period is output, wherein the preset past time period ends at the current time. Based on the predicted bandwidth usage value and the preset fixed egress bandwidth threshold, determine the bandwidth usage rate corresponding to the predicted bandwidth usage value, and the bandwidth warning level to which the bandwidth usage rate belongs; When a client requests access to a target image tile, if the bandwidth warning level is detected to exceed a preset warning level, it is determined whether the target image tile belongs to a high-frequency tile set. The high-frequency tile set includes one or more image tiles whose current access count exceeds a set frequency threshold within a preset time period. If the target image tile does not belong to the high-frequency tile set, the original quality target image tile data will be returned to the client. If the target image tile belongs to the high-frequency tile set, the image encoding parameters of the target image tile are adjusted based on the adjustment coefficient corresponding to the bandwidth utilization rate, and temporary tile data after degraded compression is generated and returned to the client. The adjustment coefficient is inversely correlated with the bandwidth utilization rate.
[0007] By adopting the above technical solution, the system collects bandwidth data in real time at the interface of the image tile service and uses a time series prediction model to predict future bandwidth usage trends, thereby determining the bandwidth warning level. Based on this, the system can distinguish whether a target image tile belongs to a high-frequency access set, and only dynamically adjusts image encoding parameters for de-enhanced compression based on usage rate when bandwidth is tight for high-frequency tiles, while maintaining the original quality for non-high-frequency tiles. This method can maximize the user's image browsing quality while ensuring high-concurrency service connectivity, under unsaturated bandwidth conditions, achieving a dynamic balance between network resource utilization and user visual experience.
[0008] In some embodiments, before the step of inputting the actual bandwidth data from a past preset time period into a preset time series prediction model and outputting a predicted bandwidth usage value for a future preset time period, the method further includes: Obtain the actual compressed data volume of temporary tile data generated within a preset time period in the past, and the original data volume before compression corresponding to the temporary tile data; Calculate the difference between the original data volume before compression and the actual data volume after compression to obtain the amount of implicit bandwidth saved; The implicit bandwidth occupancy is superimposed on the actual bandwidth data to obtain the restored equivalent bandwidth data; Replace the actual bandwidth data input to the time series prediction model with the restored equivalent bandwidth data.
[0009] By adopting the above technical solution, before inputting bandwidth data into the prediction model, the system first calculates the implicit bandwidth saving due to degraded compression and adds it back to the actual bandwidth data to restore the equivalent bandwidth. This corrects the deviation that may occur if prediction is based solely on the current actual traffic, because when the compression strategy is in effect, the actual traffic does not truly reflect the user's original request demand. By restoring the true bandwidth demand load, the system can more accurately train and use the time series prediction model, reduce data distortion caused by policy intervention, and thus improve the accuracy of bandwidth prediction and the robustness of subsequent concurrency control strategies.
[0010] In some embodiments, the step of receiving a client's access request for a target image tile specifically includes: The viewport movement speed is calculated based on the time interval between consecutive access requests from the same client and the tile spatial coordinate span. If the viewport movement speed exceeds a preset inertia threshold, the access request is determined to be a transitional request, and the temporary tile data is generated directly using the preset minimum quality encoding parameters.
[0011] By adopting the above technical solution, the system calculates the viewport movement speed based on the time interval and spatial span of continuous client access, and can intelligently identify the user's rapid browsing behavior. When the viewport movement speed exceeds the inertia threshold, the system determines that the request is a transitional request and directly generates tile data using the lowest quality encoding parameters. Since the human eye's ability to perceive details decreases when rapidly dragging the map, this strategy significantly reduces the amount of data transmission during the transition phase without affecting the user's subjective visual experience, reduces the waste of ineffective bandwidth resources, and improves the smoothness and response speed of map operations.
[0012] In some embodiments, the step of the high-frequency tile set including one or more image tiles whose access frequency exceeds a set frequency threshold within a preset time period specifically includes: If the number of times the target image tile is accessed within a preset time period exceeds a set frequency threshold, then the target image tile is determined to belong to a high-frequency tile set. If the current number of visits to the target image tile within a preset time period does not exceed a set frequency threshold, then the spatial location identifier corresponding to the target image tile is obtained, and it is queried whether there is an access record of an associated image tile with the same spatial location identifier within the preset time period. The associated image tile belongs to a different time phase or data layer than the target image tile. If the number of accesses to the associated image tile exceeds the set frequency threshold, the target image tile is determined to belong to the high-frequency tile set. If the associated image tile does not exist or the associated image tile does not exceed the set frequency threshold, then query the historical access count of the parent tile of the target image tile at the next higher level in the pyramid storage structure in the previous preset time period. If the number of historical visits to the parent tile exceeds the set frequency threshold, the target image tile will be determined to belong to the high-frequency tile set.
[0013] By adopting the above technical solution, when determining high-frequency tiles, the system not only considers the current access frequency of a single tile, but also further correlates access records of different time phases and different layers of data at the same spatial location, and even traces back to the historical popularity of parent tiles in the pyramid structure. This multi-dimensional popularity determination mechanism utilizes the correlation of geospatial data and the inheritance of user browsing habits, enabling a more comprehensive and sensitive capture of potential hotspot areas. This helps the system accurately identify and implement control strategies in the early stages of local hotspot outbreaks, reducing the risk of bandwidth overflow caused by the lag in judgment based on a single indicator.
[0014] In some embodiments, before the step of adjusting the image coding parameters of the target image tile based on the adjustment coefficient corresponding to the bandwidth utilization rate to generate degraded and compressed temporary tile data, the method further includes: The content complexity weight of the target image tile is determined based on the image information entropy of the target image tile; The adjustment coefficient is corrected based on the content complexity weight to obtain the corrected adjustment coefficient. Under the same bandwidth utilization, the corrected adjustment coefficient is positively correlated with the image information entropy.
[0015] By adopting the above technical solution, the system introduces image information entropy as an indicator to measure the complexity of image content, and adjusts the compression adjustment coefficient accordingly. For tiles with high information entropy and rich texture details, the system appropriately increases their adjustment coefficient to retain more details; while for tiles with low information entropy and flat content, a larger compression range is allowed. This content-aware adaptive adjustment strategy enables the system to achieve compression processing that better conforms to the characteristics of human vision for image tiles of different complexities under the same bandwidth constraints, optimizing the overall visual consistency after degraded compression.
[0016] In some embodiments, the step of adjusting the image coding parameters of the target image tile based on the adjustment coefficient corresponding to the bandwidth utilization rate to generate degraded and compressed temporary tile data specifically includes: When the adjustment coefficient is greater than or equal to the preset high-fidelity threshold, the original color depth of the target image tile is maintained; When the adjustment coefficient is between the preset low-fidelity threshold and the high-fidelity threshold, the color depth of the target image tile is reduced to the first depth level, and the target image tile is compressed according to the first compression ratio. When the adjustment coefficient is less than the low fidelity threshold, the color depth of the target image tile is reduced to the second depth level, and the target image tile is compressed according to the second compression ratio, wherein the first depth level is higher than the second depth level, and the second compression ratio is greater than the first compression ratio.
[0017] By adopting the above technical solution, the system sets dual thresholds for high fidelity and low fidelity, constructing a tiered degradation compression mechanism. Depending on the different ranges of the adjustment coefficients, the system can flexibly switch between maintaining the original colors, reducing color depth to the first or second level, and applying different compression ratios. This hierarchical processing avoids the computational complexity that linear adjustments may bring, enabling the system to exchange image quality for the required transmission space when facing varying degrees of bandwidth pressure, achieving refined traffic shaping.
[0018] In some embodiments, after the step of adjusting the image coding parameters of the target image tile based on the adjustment coefficient corresponding to the bandwidth utilization, generating degraded and compressed temporary tile data and returning it to the client, the method further includes: The temporary tile data is stored in a temporary high-frequency cache area; When the same access request for the same target image tile is received again, if the target image tile is still in the bandwidth warning level that triggers the adjustment of image encoding parameters, the temporary tile data corresponding to the target image tile is retrieved from the temporary high-frequency buffer and returned to the client.
[0019] By adopting the above technical solution, the system stores the generated degraded and compressed temporary tiles in a temporary high-frequency cache. When a subsequent access request for the same high-frequency tile is received while the system is still under bandwidth warning, the system prioritizes directly retrieving the data from the cache and returning it to the client. This mechanism eliminates the high computational overhead of repeatedly decoding, resampling, and encoding the same popular tile, reducing the load on the server CPU. Simultaneously, directly reading the cache significantly shortens I / O response time, further improving the system's throughput and service response efficiency in high-concurrency scenarios.
[0020] Secondly, this application provides a flexible concurrent control system for image tile services, the system comprising: one or more processors and a memory; The memory is coupled to the one or more processors. The memory is used to store computer program code, which includes computer instructions. The one or more processors call the computer instructions so that the system can implement the elastic concurrency control method for image tile services under bandwidth constraints provided in the above embodiments, which will not be described in detail here.
[0021] Thirdly, this application provides a computer-readable storage medium including instructions that, when executed on an image tile service elastic concurrency control system, enable the system to implement an image tile service elastic concurrency control method under bandwidth constraints provided in the above embodiments, which will not be elaborated here.
[0022] Fourthly, this application provides a computer program product, including a computer program / instruction. When the computer program / instruction runs on the image tile service elastic concurrency control system, the system can implement the image tile service elastic concurrency control method under bandwidth constraints provided in the above embodiments, which will not be elaborated here.
[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. The system uses time series models to predict future bandwidth trends, calculates the bandwidth saved due to degraded compression (i.e., implicit bandwidth), and adds it back to the actual traffic data to restore the true equivalent bandwidth load. This eliminates the "deceptive" impact of compression strategies on traffic monitoring, ensuring that the prediction model is always trained and inferred based on the user's real needs. This enables accurate prediction and dynamic control of concurrency pressure in bandwidth-constrained environments.
[0024] 2. On the one hand, the system identifies users' rapid browsing behavior (transitional requests) by calculating viewport movement speed. Leveraging the human eye's visual sensitivity to motion blur, it directly employs the lowest quality transmission during rapid dragging to save unnecessary bandwidth. On the other hand, by associating different layers, time phases, and even the historical heat of parent tiles at the same spatial location, the system can more accurately capture potential hotspot areas. This identification strategy, combining human visual characteristics with geospatial patterns, achieves accurate differentiation between high-value data and low-value transmission scenarios.
[0025] 3. The system dynamically adjusts the compression coefficient based on the content complexity (information entropy) of the image tiles, ensuring that areas with complex textures retain more detail, while flat areas bear more compression tasks, thus maintaining a consistent visual experience even with limited overall bandwidth. Simultaneously, combined with tiered color depth reduction and compression ratio switching, as well as a dedicated secondary caching mechanism for degraded data, the system not only achieves a fine balance between image quality and bandwidth but also significantly reduces the computational resource consumption caused by repetitive encoding, improving service throughput performance under high concurrency. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating an elastic concurrency control method for image tile services under bandwidth constraints, as described in an embodiment of this application. Figure 2 This is another flowchart illustrating a bandwidth-constrained elastic concurrency control method for image tile services in an embodiment of this application. Figure 3 This is a flowchart illustrating a process in an embodiment of this application for determining whether a target image tile belongs to a set of high-frequency tiles; Figure 4 This is a schematic diagram of the physical device structure of an image tile service elastic concurrency control system in the embodiments of this application. Detailed Implementation
[0027] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0028] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0029] For ease of understanding, the method provided in this implementation is described in process below. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating an elastic concurrency control method for image tile services under bandwidth constraints in an embodiment of this application.
[0030] S101. Collect actual bandwidth data in real time at the service interface of the image tile service.
[0031] Among them, the service interface of the image tile service refers to the standardized interface built on image service standards such as WMTS and XYZ, which is used to receive client tile access requests and return corresponding tile data; the actual bandwidth data refers to the network transmission rate data generated in real time during the operation of the service interface, which is used to reflect the current actual bandwidth usage.
[0032] This step continues to run after the image tile service is started. Regardless of whether a client access request is received, the system will continuously collect bandwidth data to provide basic data support for subsequent bandwidth prediction and early warning level determination. It is applicable to all scenarios that rely on fixed outbound bandwidth to provide image tile services, especially geographic information application scenarios with high concurrency access risks.
[0033] Specifically, the system captures network transmission data at the service interface of the image tile service in real time, and then extracts the actual bandwidth data. Optionally, the system can deploy a customized probe script at the network egress of the server corresponding to the service interface of the image tile service; configure the sampling frequency of the script to collect network transmission data at the interface once every millisecond; the script calculates the actual bandwidth data by capturing information such as the size and transmission time of network packets, and sorts the collected data by timestamp to form a continuous real-time bandwidth data sequence stored in the local database. Optionally, the system can also achieve this by calling network monitoring tools (such as NetFlow, SNMP, etc.), which is not limited here.
[0034] S102. Input the actual bandwidth data of the past preset time period into the preset time series prediction model, and output the bandwidth usage prediction value for the future preset time period.
[0035] Among them, the preset time period refers to a fixed duration that traces back from the current time, and its length can be flexibly configured according to the service scenario and data requirements.
[0036] Specifically, the system sets the duration of a preset time period, for example, 10 minutes, meaning it extracts actual bandwidth data collected within the 10 minutes prior to the current time. The system then preprocesses the extracted bandwidth data, removing outliers (such as zero values due to equipment malfunction or values far exceeding the normal range). The preprocessed bandwidth data is then input into a preset time series prediction model. This model has been trained on a large amount of historical bandwidth data and has the ability to deduce future bandwidth trends based on historical data patterns. After receiving the input data, the model performs calculations according to its internal algorithm logic, ultimately outputting a predicted bandwidth usage value for the preset time period (e.g., the next 5 minutes). This predicted value will be used for subsequent calculations of bandwidth utilization and determination of bandwidth warning levels.
[0037] Optionally, the system can collect actual bandwidth data from the past 30 days in advance as training samples to train the ARIMA model and determine the optimal parameters of the model (such as p, d, and q values); set a preset time period of 15 minutes, and the system periodically extracts actual bandwidth data within the 15 minutes before the current time, and performs data smoothing (such as using a moving average method) to eliminate the impact of instantaneous fluctuations; input the processed actual bandwidth data into the trained ARIMA model (i.e., the time series prediction model mentioned above), and the model calculates and outputs the predicted bandwidth usage value for the next 8 minutes based on the periodicity and trend of historical data, and the predicted values are stored in order of timestamp.
[0038] Optionally, the system can also construct an LSTM neural network model, set the number of neurons in the input layer, hidden layer, and output layer, and use the actual bandwidth data from the past 60 days as the training set to iteratively train the model until the prediction error of the model reaches a preset threshold; set a preset time period of 20 minutes, and the system extracts the actual bandwidth data within this time period in real time, converts the data into a matrix format that the model can recognize; input the formatted actual bandwidth data into the trained LSTM model (i.e., the time series prediction model mentioned above), and the model learns the changing patterns of historical data to output the bandwidth usage prediction value for the next 10 minutes, while simultaneously associating the prediction result with a timestamp and transmitting it to the next processing module.
[0039] It is understandable that other methods can be used to output bandwidth usage predictions, such as through other time series prediction models like the Prophet model, which are not limited here.
[0040] S103. Determine the bandwidth utilization rate corresponding to the bandwidth utilization forecast and the bandwidth warning level to which the bandwidth utilization rate belongs based on the bandwidth utilization forecast and the preset fixed egress bandwidth threshold.
[0041] Among them, the fixed outbound bandwidth threshold is a ratio set based on the upper limit of the transmission rate between the server and the external network (fixed outbound bandwidth), used to determine whether the bandwidth is close to or exceeds the upper limit; the bandwidth utilization rate is the ratio of the bandwidth utilization prediction value to the fixed outbound bandwidth, used to quantify the current bandwidth occupancy; the bandwidth warning level refers to different warning levels divided according to the bandwidth utilization rate, used to reflect the degree of bandwidth urgency, and different levels correspond to different response strategies.
[0042] Specifically, the system obtains a preset fixed outbound bandwidth threshold. For example, if the fixed outbound bandwidth is 1000Mbps, the fixed outbound bandwidth threshold is set to 900Mbps (i.e., 90% of the fixed outbound bandwidth). Then, the system divides the bandwidth usage prediction value output in step S102 by the fixed outbound bandwidth to obtain the corresponding bandwidth utilization rate. Next, the system determines the level to which the calculated bandwidth utilization rate belongs based on preset bandwidth warning level classification rules. For example, a bandwidth utilization rate below 70% is considered normal, 70%-80% is a Level 1 warning, 80%-90% is a Level 2 warning, and 90% and above is an emergency warning. By comparing the bandwidth utilization rate with the threshold range of each level, the corresponding bandwidth warning level is determined.
[0043] S104. When a client requests access to a target image tile, if the bandwidth warning level is detected to exceed the preset warning level, it is determined whether the target image tile belongs to the high-frequency tile set.
[0044] Among them, the target image tile refers to the specific image tile that the client is currently requesting to access. Each target image tile has unique identification information (such as layer, row, and column coordinates); the preset warning level refers to a baseline warning level that the system has set in advance to determine whether the tile data needs to be adjusted. It is usually set to a level one warning; the high-frequency tile set refers to a set of one or more image tiles whose current access frequency exceeds a set frequency threshold within a preset time period. These tiles are the main source of bandwidth consumption.
[0045] Specifically, the system listens for client access requests. When it receives an access request from a client for a specific image tile (i.e., the target image tile), the system extracts the target image tile identifier information from the request and simultaneously obtains the current bandwidth warning level determined in step S103. The system then compares the current bandwidth warning level with a preset warning level. If the current bandwidth warning level does not exceed the preset warning level, it indicates that the bandwidth is relatively sufficient, and no adjustment to the tile data is needed; the original quality tile is returned directly. If the current bandwidth warning level exceeds the preset warning level, it indicates that the bandwidth is tight, and further determination is needed to determine whether the target image tile belongs to a high-frequency tile set. Because high-frequency tiles are accessed more frequently, adjusting them can more effectively save bandwidth resources. The determination result will determine the subsequent processing method for the target image tile.
[0046] In one specific embodiment, the system can determine whether a target image tile belongs to a high-frequency tile set by directly counting the number of accesses. The system presets a time period of 5 minutes and sets a frequency threshold of 200 times, meaning that tiles accessed more than 200 times within 5 minutes are determined to be high-frequency tiles. When an access request for a target image tile is received, the system extracts the unique identifier of the target image tile, queries the access records of the tile in the past 5 minutes, and counts the number of accesses. The counted number of accesses is compared with the set frequency threshold. If the number of accesses is ≥200, the target image tile is determined to belong to the high-frequency tile set; if the number of accesses is <200, it is determined not to belong to the high-frequency tile set.
[0047] S105. If the target image tile belongs to the high-frequency tile set, the image coding parameters of the target image tile are adjusted based on the adjustment coefficient corresponding to the bandwidth utilization rate, and temporary tile data after degraded compression is generated and returned to the client.
[0048] The adjustment coefficient is a quantitative parameter that is inversely related to bandwidth utilization. Its value is dynamically adjusted as bandwidth utilization changes, and it is used to determine the adjustment range of image coding parameters. Image coding parameters refer to relevant parameters that affect the quality of image tiles, including color depth and compression ratio. Degraded and compressed temporary tile data refers to tile data whose quality is reduced by adjusting image coding parameters to reduce the data volume. It is only used temporarily under the current situation of bandwidth shortage. The client refers to the device that initiates the image tile access request, including terminal devices such as computers and mobile phones.
[0049] Specifically, the system determines the corresponding adjustment coefficient based on the bandwidth utilization rate calculated in step S103. Since the adjustment coefficient is inversely correlated with the bandwidth utilization rate, the higher the bandwidth utilization rate, the smaller the adjustment coefficient, and the greater the corresponding adjustment range of tile quality. Next, the system extracts the original image encoding parameters of the target image tile, including the original color depth (e.g., 24-bit) and the original compression ratio (e.g., 50%). Then, these image encoding parameters are adjusted according to the adjustment coefficient. For example, when the adjustment coefficient is 0.75, the color depth is reduced from 24-bit to 16-bit, and the compression ratio is increased from 50% to 62.5%. After the adjustment is completed, the system processes the target image tile according to the new image encoding parameters, generating degraded and compressed temporary tile data. Finally, this temporary tile data is returned to the client that initiated the access request, completing the data response.
[0050] In one specific embodiment, the system can preset the correspondence between the adjustment coefficient and the bandwidth utilization rate. For example, when the bandwidth utilization rate is between 80% and 90%, the adjustment coefficient = 1 - (bandwidth utilization rate - 0.8) / 0.2, and when the bandwidth utilization rate is ≥ 90%, the adjustment coefficient is fixed at 0.5. After calculating the adjustment coefficient based on the current bandwidth utilization, the adjustment rules for the image encoding parameters are determined as follows: when the adjustment coefficient is ≥0.8, the 24-bit color depth and 50% compression ratio are maintained; when the adjustment coefficient is 0.5≤0.8, the color depth is reduced to 16 bits, and the compression ratio = (1-adjustment coefficient)×100%+50%; The system calls an image processing tool (such as OpenCV) to compress the target image tiles according to the adjusted encoding parameters, generate temporary tile data, store the data in a temporary cache, and then return the temporary tile data to the client through the service interface.
[0051] In another specific embodiment, the system can also preset a high-fidelity threshold of 0.8 and a low-fidelity threshold of 0.5. The adjustment coefficient is inversely correlated with the bandwidth utilization rate, and the higher the bandwidth utilization rate, the smaller the adjustment coefficient. Set encoding parameter adjustment rules: When the adjustment coefficient is ≥0.8, maintain the original 24-bit color depth and 50% compression ratio; when 0.5≤adjustment coefficient<0.8, reduce the color depth to the first depth level (16 bits) and use the first compression ratio (e.g., (1-adjustment coefficient)×100%+55%); when the adjustment coefficient<0.5, reduce the color depth to the second depth level (8 bits) and use the second compression ratio (80%). The system determines the corresponding encoding parameters based on the calculated adjustment coefficients, uses the Pillow image processing library to encode and adjust the target image tiles, generates temporary tile data, records the association between the tile identifier and the temporary data, and then transmits the temporary tile data back to the client via the network.
[0052] It is understandable that other methods can be used to generate and return temporary tile data, such as adjusting encoding parameters based on the complexity of the tile content, etc., which are not limited here.
[0053] S106. If the target image tile does not belong to the high-frequency tile set, the original quality target image tile data is returned to the client.
[0054] Specifically, after determining that the target image tile does not belong to the high-frequency tile set, the system does not need to adjust its image encoding parameters and directly extracts the original data of the target image tile from the tile storage system. The original data maintains the original image quality of the tile, including parameters such as original color depth and compression ratio, without any degradation processing. After extracting the original data, the system performs a simple format check and then transmits the original-quality target image tile data to the client that initiated the access request through the image tile service interface, allowing users to obtain high-definition tile images and ensuring a good visual experience.
[0055] Optionally, when it is determined that the target image tile does not belong to the high-frequency tile set, the system can determine its storage path in the distributed storage system based on the unique identifier (layer, row, and column coordinates) of the target image tile; access the distributed storage system through the storage access interface, and directly read the original data of the target image tile according to the storage path. During the reading process, the system verifies the integrity and accuracy of the data to avoid data corruption; after the reading is completed, the system encapsulates the original quality tile data into a response format that conforms to the service interface specification, and sends it to the client through a network transmission protocol (such as HTTP) to complete the data return.
[0056] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating a bandwidth-constrained elastic concurrency control method for image tile services in this application.
[0057] S201. Obtain the actual compressed data volume of temporary tile data generated within a preset time period in the past, as well as the original data volume before compression corresponding to the temporary tile data.
[0058] Temporary tile data refers to image tile data generated through degraded compression and used only temporarily when bandwidth is limited; the actual data size after compression refers to the actual storage or transmission size of the temporary tile data after compression; the original data size before compression refers to the storage or transmission size of the temporary tile data when maintaining its original quality before degraded compression.
[0059] This step is executed periodically after the system completes the generation and response of a batch of temporary tile data, usually synchronized with the bandwidth prediction cycle (e.g., every 10 minutes). It is suitable for scenarios that require optimization of the accuracy of the bandwidth prediction model—by collecting data before and after compression, it provides a basis for subsequent correction of the input data for bandwidth prediction, avoiding statistical distortion of bandwidth data due to the compression of temporary tiles.
[0060] Specifically, the system sets a preset time period (e.g., the past 15 minutes), and then filters out all temporary tile data records generated within that time period from the temporary tile storage log or data statistics module. For each record, the system extracts the actual data volume of the temporary tile after compression (i.e., the size of the data transmitted to the client) and the original data volume of the tile before compression (i.e., the original size before degradation processing). The system categorizes and summarizes this data to ensure that the data volume of each temporary tile before and after compression matches accordingly.
[0061] S202. Calculate the difference between the original data volume before compression and the actual data volume after compression to obtain the amount of implicit bandwidth saved, and add it to the actual bandwidth data to obtain the restored equivalent bandwidth data.
[0062] Implicit bandwidth usage refers to the bandwidth consumption reduction of temporary tiles after de-compression compared to the original data; the restored equivalent bandwidth data refers to the simulated uncompressed bandwidth data obtained by adding the compression savings of temporary tiles to the actual collected bandwidth data, which is used to correct the input of the time series prediction model.
[0063] Specifically, the system calculates the implicit bandwidth saving per temporary tile for each set of "original data volume before compression - actual data volume after compression" obtained in step S201, subtracting the actual data volume from the original data volume. Then, the system sums the implicit bandwidth saving of all temporary tiles within the same time period to obtain the total implicit bandwidth saving for that period. Next, the system acquires the actual bandwidth data collected within the same time period and adds the total implicit bandwidth saving to the actual bandwidth data to obtain "restored equivalent bandwidth data"—this data simulates the bandwidth the system might actually consume without temporary tile compression, ensuring that subsequent prediction models can be calculated based on real bandwidth demand trends.
[0064] S203. Replace the actual bandwidth data of the input time series prediction model with the restored equivalent bandwidth data.
[0065] Specifically, the system acquires the current input data source for the time series forecasting model (i.e., the previously collected actual bandwidth data), and then uses the "restored equivalent bandwidth data" obtained in step S202 as the new input data to replace the original actual bandwidth data. During the replacement process, the system ensures that the timestamp of the equivalent bandwidth data matches the input time dimension of the forecasting model (e.g., aligned to the minute level), while verifying the continuity and integrity of the data to avoid affecting the model's prediction performance due to data gaps. After the replacement is completed, the time series forecasting model will predict future bandwidth based on the equivalent bandwidth data, thereby obtaining a bandwidth usage prediction value that is closer to the actual demand.
[0066] S204. Calculate the viewport movement speed based on the time interval of consecutive access requests from the same client and the tile space coordinate span.
[0067] Among them, the time interval of consecutive access requests refers to the time difference between two adjacent tile access requests from the same client; tile spatial coordinates refer to the row and column position information of the image tile in the map layer, used to represent the spatial position of the tile; viewport movement speed refers to how fast the view moves on the map interface, which is determined by the time interval and changes in spatial coordinates.
[0068] Specifically, the system identifies consecutive access requests from the same client using a unique identifier (such as a session ID), then extracts the timestamps of two adjacent requests to calculate the time interval between them. Simultaneously, the system extracts the tile spatial coordinates (row and column) corresponding to these two requests and calculates the spatial distance between the two tiles (e.g., the pixel distance corresponding to the difference in rows and columns at adjacent levels). Finally, the system divides the spatial distance by the time interval to obtain the client's viewport movement speed—this speed reflects how quickly the user interacts with the map.
[0069] S205. Does the viewport movement speed exceed the preset inertia threshold?
[0070] The preset inertia threshold refers to the viewport movement speed threshold set by the system in advance to distinguish between "fast operation" and "slow operation" by the user. If the speed exceeds the threshold, it is judged as fast operation.
[0071] Specifically, the system obtains a preset inertia threshold (e.g., set to 500 pixels / second, which can be adjusted according to the service scenario), and then compares the viewport movement speed calculated in step S204 with this threshold. If the viewport movement speed is greater than the inertia threshold, it indicates that the user is dragging the map quickly. At this time, the user may not pay attention to the detail quality of the tiles, and the system will trigger the minimum quality tile policy in step S206. If the viewport movement speed is less than or equal to the inertia threshold, it indicates that the user may be browsing slowly or viewing statically, and is highly sensitive to tile quality. The system will continue to execute the subsequent bandwidth warning level judgment step (step S207).
[0072] S206. Generate temporary tile data directly using the preset minimum quality encoding parameters.
[0073] Specifically, the system obtains preset minimum quality encoding parameters (e.g., 8-bit color depth, 90% compression ratio). These parameters are configured to minimize data volume while ensuring tile recognizability. Then, the system calls the tile encoding module, loads the raw data of the target image tiles, and performs de-quality compression processing on the raw data according to the minimum quality encoding parameters—including reducing color depth and increasing the compression ratio—to generate temporary tile data with a very small data volume. Finally, the system returns this temporary tile data to the client, completing the response.
[0074] S207. Does the bandwidth warning level exceed the preset warning level?
[0075] Specifically, the system obtains the current bandwidth warning level calculated using the predicted bandwidth usage and the fixed egress bandwidth threshold, and then extracts the pre-configured preset warning level. Next, it compares the current bandwidth warning level with the preset warning level to determine if the current level is higher than the preset warning level. If the current bandwidth warning level exceeds the preset warning level, it indicates that the bandwidth is under strain, and further determination is needed to determine if the target image tile is a high-frequency tile to initiate targeted adjustments; if it does not exceed the preset warning level, no tile quality adjustment is required, and the original quality tile data is returned directly.
[0076] In some embodiments, the comparison between the bandwidth warning level and the preset warning level can be achieved in several ways: Optionally, the system can pre-assign corresponding priority values to each bandwidth warning level (e.g., normal level is 1, level 1 warning is 2, level 2 warning is 3, and emergency warning is 4), with the priority value corresponding to the preset warning level (level 1 warning) being 2; the system obtains the priority value corresponding to the current bandwidth warning level and compares it with the priority value of the preset warning level; if the current priority value is greater than 2, it is determined that the preset warning level has been exceeded, otherwise it is determined that it has not been exceeded. Optionally, the system can also pre-build a warning level comparison table, specifying the bandwidth utilization range and corresponding level identifier for each warning level; the system first determines the identifier of the current bandwidth warning level, and then looks up the identifier of the preset warning level; by comparing the hierarchical position of the two identifiers in the comparison table, if the hierarchical position of the current level identifier is after the preset level identifier (i.e., the bandwidth is more strained), it is determined that it has exceeded, otherwise it has not exceeded.
[0077] In addition, the system monitors in real time whether the bandwidth utilization rate reaches a preset hard circuit breaker threshold (e.g., 98% or 99% of the fixed outbound bandwidth). If this threshold is reached, the system determines that the current network is in a dangerous state of extreme congestion (i.e., an emergency circuit breaker state). At this time, the system will skip the judgment and calculation process in steps S208 to S211 and directly execute step S214 or S206, that is, use the lowest quality image encoding parameters (e.g., 8-bit color depth, high compression ratio) to process all currently received tile access requests. Only when the bandwidth utilization rate is lower than the hard circuit breaker threshold, but still higher than the regular warning threshold (e.g., exceeding the preset warning level), will the system execute step S208 to finely identify whether the target image tile belongs to the high-frequency tile set.
[0078] S208. Does the target image tile belong to the high-frequency tile set?
[0079] Specifically, the system obtains the unique identifier of the target image tile, queries the access records of the tile within a preset time period (e.g., 5 minutes) based on this identifier, and counts the current access count. Then, the system extracts a pre-set frequency threshold (e.g., 200 times) and compares the counted current access count with the frequency threshold. If the current access count exceeds the frequency threshold, the target image tile is directly determined to belong to the high-frequency tile set; if it does not exceed the threshold, the system further queries the access records of the tile's associated image tiles (tiles with the same spatial location identifier but different time phases or data layers) and the parent tile at the next higher level in the pyramid storage structure, comprehensively judging whether it belongs to the high-frequency tile set from multiple dimensions.
[0080] S209. Return the original quality target image tile data to the client.
[0081] Specifically, once the system determines that the target image tile does not belong to the high-frequency tile set, it does not need to adjust its image encoding parameters and directly retrieves the original data of the tile from the distributed storage system. This data is then sent to the client that initiated the access request via a network transmission protocol (such as HTTP), ensuring that the client can correctly receive and display the high-definition tile image.
[0082] S210. Determine the content complexity weight of the target image tile based on the image information entropy of the target image tile.
[0083] Among them, image information entropy is an indicator used to measure the richness of information in image tiles. It reflects the degree of dispersion of pixel gray values in tile images. The higher the information entropy, the more complex the image texture and the richer the details. The content complexity weight is a quantitative parameter used to correct and adjust the coefficient based on image information entropy. Its value is positively correlated with image information entropy.
[0084] Specifically, the system extracts the raw image data of the target image tile, processes the raw data using an image information entropy calculation algorithm, and obtains the image information entropy value of the tile. Then, the system presets the value range of the image information entropy and the corresponding content complexity weight mapping rules (e.g., the weight is 0.8 when the information entropy is between 0 and 5, the weight is 1.0 when it is between 5 and 10, and the weight is 1.2 when it is above 10). Based on the calculated information entropy value, the system queries the mapping rules to determine the corresponding content complexity weight.
[0085] Optionally, the system can call the information entropy calculation interface in the OpenCV image processing library, inputting the original pixel matrix of the target image tile; the interface calculates the probability distribution of pixel grayscale values and outputs the image information entropy value; the system presets a weight mapping table to divide the information entropy into four intervals: low (0-5), medium (5-10), high (10-15), and very high (above 15), with corresponding weights of 0.8, 1.0, 1.2, and 1.4, respectively; based on the interval in which the calculated information entropy value is located, the corresponding weight is extracted as the content complexity weight.
[0086] Optionally, the system can also convert the raw data of the target image tiles into grayscale images, count the number of pixels at each grayscale level (0-255), calculate the pixel proportion (probability) of each grayscale level, and calculate the information entropy value using the formula (information entropy = -Σ probability × log2 probability). Based on the information entropy distribution of historical tile data, the system uses the K-means clustering algorithm to determine the weight division threshold and establish a dynamic mapping relationship between information entropy and weight. Based on the calculated information entropy value, the content complexity weight is determined through the dynamic mapping relationship.
[0087] It is understandable that other methods can also be used, such as predicting the complexity of image content through a deep learning model and mapping it to weights; this is not limited here.
[0088] S211. Adjust the adjustment coefficients according to the content complexity weights to obtain the adjusted adjustment coefficients.
[0089] Specifically, the system calculates the original adjustment coefficient based on the current bandwidth utilization (e.g., the original adjustment coefficient is 0.75 when the bandwidth utilization is 85%), and then obtains the content complexity weight determined in step S210 (e.g., 1.0). Then, the system uses a preset correction algorithm (e.g., corrected adjustment coefficient = original adjustment coefficient × content complexity weight) to correct the original adjustment coefficient, obtaining the corrected adjustment coefficient. The corrected adjustment coefficient can dynamically change according to the tile content complexity. Under the same bandwidth utilization, the more complex the content of the tile, the higher the corrected adjustment coefficient and the smaller the compression amplitude, in order to retain more details.
[0090] Optionally, the system can preset the correction formula as "corrected adjustment coefficient = original adjustment coefficient × content complexity weight"; calculate the original adjustment coefficient based on the bandwidth utilization rate. For example, when the bandwidth utilization rate is between 80% and 90%, the original adjustment coefficient = 1 - (bandwidth utilization rate - 0.8) / 0.2. If the bandwidth utilization rate is 83%, then the original adjustment coefficient = 0.85; obtain the content complexity weight as 1.1; substitute the original adjustment coefficient and the weight into the formula to obtain the corrected adjustment coefficient = 0.85 × 1.1 = 0.935; the corrected coefficient will be used for subsequent encoding parameter adjustments.
[0091] Optionally, the system can also preset correction rules: when the content complexity weight is <1.0, the corrected adjustment coefficient = original adjustment coefficient × weight (further increasing the compression range); when the weight = 1.0, the corrected adjustment coefficient = original adjustment coefficient (maintaining the original compression range); when the weight > 1.0, the corrected adjustment coefficient = original adjustment coefficient × weight, and the upper limit is 1.0 (to avoid the adjustment coefficient being too high and thus failing to save bandwidth); the original adjustment coefficient is calculated to be 0.6, and the content complexity weight is 1.3; according to the rules, the corrected adjustment coefficient = 0.6 × 1.3 = 0.78 (not exceeding the upper limit), and if the weight is 1.8, the corrected adjustment coefficient is taken as 1.0.
[0092] S212. Maintain the original color depth of the target image tiles.
[0093] This means that the color depth of the target image tile is not adjusted, and the original target image tile is directly output.
[0094] S213. Reduce the color depth of the target image tile to the first depth level, and compress the target image tile according to the first compression ratio.
[0095] The first depth level refers to a preset intermediate color depth level that is lower than the original color depth but higher than the second depth level, such as reducing from 24 bits to 16 bits; the first compression ratio is a preset compression ratio corresponding to the first depth level, used to control the reduction of image tile data, and its value is less than the second compression ratio.
[0096] Specifically, the system obtains the original color depth of the current target image tile, then calls the encoding parameter adjustment interface to reduce it to a pre-configured first depth level (e.g., from 24-bit true color to 16-bit high color). After completing the color depth adjustment, the system extracts a first compression ratio that matches the first depth level, and performs encoding compression processing on the adjusted image tile data based on this compression ratio. This reduces the amount of data while ensuring a basic visual experience, thereby alleviating bandwidth pressure.
[0097] In some embodiments, the system can first read the metadata of the target image tile to determine that its original color depth is 24 bits; call the color depth adjustment interface of the image encoding library to convert 24 bits to 16 bits (first depth level), and retain the main color information in the RGB565 format during the conversion process; extract the preset first compression ratio of 2:1; use the JPEG encoding algorithm to compress the 16-bit color depth tile data at a compression ratio of 2:1; after compression, perform integrity verification on the data to ensure that the compressed data can be decoded and displayed normally.
[0098] Optionally, the system can also pre-establish a mapping table between color depth and compression ratio, with the first depth level corresponding to 12-bit color depth and the first compression ratio being 3:1. The original color depth of the target image tile is obtained as 24 bits, which is then reduced to 12 bits using a color space conversion algorithm (preserving luminance and major color channel information). Based on the mapping table, the first compression ratio is determined to be 3:1, and the WebP encoding algorithm is used to compress the 12-bit data at a 3:1 ratio. After compression, the data is encapsulated in a format conforming to the image tile service standard, and the compression parameters are recorded for subsequent verification. It is understood that other methods can also be used, such as using a hardware-accelerated encoding module to complete color depth adjustment and compression; this is not limited here.
[0099] S214. Reduce the color depth of the target image tile to the second depth level, and compress the target image tile according to the second compression ratio.
[0100] The second depth level refers to a pre-set lower color depth level than the first depth level, such as reducing from 24 bits to 8 bits; the second compression ratio is a preset compression ratio corresponding to the second depth level, and its value is greater than the first compression ratio, used to achieve a greater reduction in data volume.
[0101] Specifically, the system obtains the original color depth of the target image tile and calls the encoding parameter adjustment interface to reduce it to a pre-configured second depth level (such as reducing from 24 bits to 8 bits of grayscale or indexed color). After completing the color depth adjustment, the system extracts a second compression ratio (usually larger than the first compression ratio) that matches the second depth level. Based on this compression ratio, the adjusted image tile data is encoded and compressed to achieve a more significant reduction in data volume and prioritize bandwidth availability.
[0102] In some embodiments, the system can read the original color depth of the target image tile as 24 bits; call the color depth adjustment interface of the image encoding library to convert the 24 bits into 8-bit indexed color (second depth level), retaining core color information through a color quantization algorithm during the conversion process; extract a preset second compression ratio of 5:1; use the JPEG2000 encoding algorithm to compress the 8-bit indexed color tile data at a compression ratio of 5:1; after compression, verify whether the visual effect of the decoded data meets the minimum recognizable standard, and adjust the compression ratio appropriately if it does not. Optionally, the system can also set the second depth level to 8-bit grayscale mode and the second compression ratio to 4:1; obtain the original color depth of the target image tile as 24 bits, convert it into an 8-bit grayscale image through a luminance channel extraction algorithm; based on the preset second compression ratio, use the PNG encoding algorithm (grayscale mode) to compress the 8-bit data at a 4:1 ratio; after compression, store the data in a temporary buffer and record the current compression level for subsequent restoration of the original quality. It is understood that other methods can also be used, such as dynamically adjusting the compression ratio in combination with color depth reduction, which is not limited here.
[0103] S215. Store the temporary tile data in the temporary high-frequency cache area.
[0104] Specifically, the system can identify the compressed temporary tile data (including information such as the original tile identifier, compression level, and generation time), and then determine the storage path and capacity status of the temporary high-frequency cache. If the cache has available capacity, the identified temporary tile data is written to the cache, and the cache validity period is set (e.g., 10 minutes). If the cache capacity is insufficient, some expired or low-priority cache data is evicted according to the "least recently used" rule, and then written to the current temporary tile data to ensure that the temporary data of the high-frequency tiles can be retrieved quickly.
[0105] S216. When the same target image tile is received again, if the target image tile is still in the bandwidth warning level that triggers the adjustment of image coding parameters, the temporary tile data corresponding to the target image tile shall be retrieved from the temporary high-frequency buffer and returned to the client.
[0106] Specifically, after receiving an access request for the same target image tile, the system first checks whether the current bandwidth warning level is still at the level that triggers image encoding parameter adjustments. If it is at that level, it directly accesses the temporary high-frequency buffer and queries the corresponding temporary tile data through the identifier of the target image tile. If there is valid data (not expired) in the buffer, it directly retrieves the data and returns it to the client. If there is no valid data in the buffer, it re-executes the process starting from step S207 to generate new temporary tile data and cache it.
[0107] To facilitate understanding, the following explanation further clarifies the process of determining whether a target image tile belongs to the high-frequency tile set in step S208. Specifically, as follows... Figure 3 As shown, this embodiment of the application is a flowchart illustrating a process for determining whether a target image tile belongs to a set of high-frequency tiles.
[0108] S301. Obtain the current number of visits to the target image tile within a preset time period.
[0109] The current access count represents the cumulative number of access requests for the target image tile received by the system from the start of the preset time period to the current moment. This value increases dynamically over time, reflecting the real-time popularity of the tile within the statistical period.
[0110] Specifically, the system extracts the unique identifier of the target image tile from the received access request. This identifier contains key parameters such as the tile's layer, row coordinates, and column coordinates, enabling precise location of the tile within the tile storage system. Next, the system obtains the configuration parameters for a preset time period, typically set to a fixed duration of five or ten minutes, tracing back from the current moment. Then, the system accesses the access record database or log system, retrieving all access record entries containing the target image tile's identifier within that time period. The system counts and analyzes the retrieved records, eliminating duplicate and invalid requests, to obtain the current access count for that tile within the preset time period.
[0111] S302. Has the current number of accesses exceeded the set frequency threshold?
[0112] Specifically, the system reads the pre-set frequency threshold value from the configuration file or parameter management module. This threshold may vary depending on the service scenario. For example, it may be set to 200 accesses every five minutes in a high-concurrency application scenario, while it may be set to 100 accesses every five minutes in a medium-to-low load scenario.
[0113] Next, the system obtains the current access count of the target image tile obtained in step S301. Then, the system performs a numerical comparison operation to determine whether the current access count is greater than or equal to a set frequency threshold. If the current access count exceeds or equals the set frequency threshold, it indicates that the tile has extremely high access popularity within the statistical period, meeting the direct determination criteria for high-frequency tiles. The system will then directly execute step S309 to determine that the tile belongs to the high-frequency tile set.
[0114] If the current number of visits does not reach the set frequency threshold, it means that the high-frequency attribute cannot be determined by direct access statistics from a single time dimension. The system needs to further execute step S303, and comprehensively judge whether the tile has potential high-frequency access characteristics by using multi-dimensional analysis methods such as associating spatial location identifiers, querying access records of different time phases of different layers, and tracing the historical popularity of parent tiles.
[0115] S303. Obtain the spatial location identifier corresponding to the target image tile and the access record of the spatial location identifier within a preset time period.
[0116] Spatial location identifiers are used to represent the abstract location information of image tiles in geospatial space. These identifiers are usually composed of the row and column coordinates of the tile corresponding to the geographic range or center point coordinates under a specific projection coordinate system. The same spatial location identifier means that different tiles cover the same geographic area but may belong to different data layers or time phases. Associated image tiles refer to other image tiles that have the same spatial location identifier as the target image tile but belong to different time phases or different data layers, such as historical images, real-time images, or image data acquired by different sensors in the same geographic area.
[0117] Specifically, the system extracts the layer, row coordinates, and column coordinates of the target image tile based on its unique identifier. Then, according to the map projection standard and resolution parameters used in the image tile service, the system converts the row and column coordinates of the tile into the corresponding geospatial range, and calculates the geographic boundary coordinates or center point latitude and longitude of the area covered by the tile. This geographic information constitutes the spatial location identifier.
[0118] Then, the system uses the calculated spatial location identifiers as query conditions to access the tile metadata database or spatial indexing system, retrieving all image tile records with the same spatial location identifier but different tile identifiers; these tiles are the associated image tiles. After obtaining the identifier list of all associated image tiles, the system further accesses the access record database to query the access records of these associated image tiles within a preset time period, extracting the access frequency data for each associated tile. The system groups and organizes the retrieved access records by tile identifier, forming a structured dataset containing information such as associated tile identifiers, access frequency, and access time distribution.
[0119] S304. Does the access record contain any associated image tiles?
[0120] Specifically, the system checks the structure and content of the access record dataset returned in step S303. The system determines whether the dataset is empty or whether it only contains access records for the target image tile itself and not records for other tiles. If the dataset is empty or only contains records for the target tile itself, it means that no other layers or time phase tiles at this spatial location have been accessed within the preset time period, i.e., there are no access records for related image tiles. The system will then proceed to step S306 to query the historical access information of the pyramid's parent tile.
[0121] If the dataset is not empty and contains access records for other tiles besides the target tile, the system further verifies whether the tile identifiers in these records do indeed have the same spatial location identifier as the target tile but belong to different data layers or temporal phases. The validity of the association is confirmed through metadata comparison. After confirming the existence of valid associated image tile access records, the system will execute step S305 to perform statistical analysis on the access counts of these associated tiles to determine whether they exceed a set frequency threshold.
[0122] S305. Does the number of accesses to the associated image tile exceed the set frequency threshold?
[0123] Specifically, the system extracts the access count data of all associated image tiles from the access record dataset obtained in step S303. Since there may be multiple associated tiles, the system aggregates the access counts of these tiles. This can be done by summing the total access counts of all associated tiles or by taking the maximum value to obtain the access count of the associated tile with the highest access popularity.
[0124] After the system completes the calculation according to the preset aggregation strategy, it obtains the same set frequency threshold value as in step S302. Next, the system performs a numerical comparison operation to determine whether the number of visits to the aggregated associated tiles is greater than or equal to the set frequency threshold. If the number of visits to the associated tiles exceeds the threshold, it indicates that although the target image tile itself is not frequently accessed, its geographical area exhibits high-frequency access characteristics through tiles in other layers or time phases. Based on the principle of spatial heat transfer, the system determines that the target image tile also belongs to a potential high-frequency access area and proceeds to step S309 to determine that it belongs to the high-frequency tile set.
[0125] If the number of visits to the associated tile does not reach the threshold, it means that the high-frequency attribute of the tile cannot be confirmed from the spatial association dimension. The system needs to continue to execute step S306 to make further judgments from the time dimension and hierarchical inheritance relationship by querying the historical access data of the pyramid parent tile.
[0126] S306. Query the historical access count of the parent tile of the target image tile in the pyramid storage structure at the previous preset time period.
[0127] The pyramid storage structure refers to the multi-resolution hierarchical storage architecture adopted by the image tile service. This structure organizes data according to map scaling levels. Each level of tiles covers the same geographical area but has different resolutions. The smaller the level number, the lower the resolution and the larger the coverage area. The parent tile is used to represent the image tile that is one level above the target image tile in the pyramid storage structure and whose geographical coverage completely includes the target tile's coverage area. A parent tile usually corresponds to four child tiles in the next level.
[0128] Specifically, the system determines the target image tile's position in the pyramid storage structure based on its layer parameters; for example, the target tile might be at layer 12. Next, the system calculates the layer number of the next higher layer, i.e., layer 11. Tiles at this layer have lower resolution than the target tile layer, but cover a larger geographical area. Then, according to the tile pyramid's coordinate conversion rules, the system calculates the row and column coordinates of its parent tile using the target tile's row and column coordinates. The typical conversion formula is that the parent tile's row coordinate equals the target tile's row coordinate divided by two and rounded down, and the parent tile's column coordinate equals the target tile's column coordinate divided by two and rounded down.
[0129] The system constructs a unique identifier for the parent tile based on the calculated parent tile level and row / column coordinates. Next, the system determines the time range of the previous preset time period. If the current time period is the most recent five minutes (i.e., five minutes from the current moment to the current moment), then the previous preset time period is ten minutes from the current moment to five minutes from the current moment. The system uses the parent tile identifier and the previous time period as query conditions to access the access record database or historical access statistics system, retrieving all access records for the parent tile within the previous time period. The system counts and statistically analyzes the retrieved records to obtain the historical access count of the parent tile. This value will be compared with a set frequency threshold in step S307 to determine whether a popularity inheritance relationship exists in terms of level and time dimensions.
[0130] S307. Has the number of historical visits to the parent tile exceeded the set frequency threshold?
[0131] Specifically, the system retrieves the historical access count value of the parent tile obtained in step S306. Next, the system retrieves the same set frequency threshold parameter as in steps S302 and S305 to ensure consistency in the judgment criteria. Then, the system performs a numerical comparison operation to determine whether the historical access count of the parent tile is greater than or equal to the set frequency threshold. If the historical access count of the parent tile exceeds the threshold, it indicates that the geographic area had high access popularity in the previous time period. Based on the continuity and hierarchical progression of user browsing behavior, this area may still maintain high access popularity in the current period. Even if the target tile's current direct access count is not high, as a refined layer of the parent tile's coverage area, it has a high probability of being accessed. Therefore, the system will execute step S309 to determine that the target image tile belongs to the high-frequency tile set. If the number of historical visits to the parent tile does not reach the threshold, it means that the target tile cannot be confirmed to have high-frequency access characteristics from the three dimensions of current access statistics, spatial correlation analysis, and historical hierarchy inheritance. The system will execute step S308 and finally determine that the target image tile does not belong to the high-frequency tile set. Subsequently, the system will return the original quality tile data without performing de-compression processing.
[0132] S308. Determine that the target image tile does not belong to the high-frequency tile set; S309. Determine that the target image tile belongs to the high-frequency tile set.
[0133] If the target image tile is determined not to belong to the high-frequency tile set, then step S209 is executed to return the original quality target image tile data to the client; if the target image tile is determined to belong to the high-frequency tile set, then step S210 and subsequent steps are executed to adjust the image encoding parameters of the target image tile based on the adjustment coefficient corresponding to the bandwidth utilization rate, generate degraded and compressed temporary tile data and return it to the client.
[0134] The image tile service elastic concurrency control system of this invention is applied to electronic devices. Figure 4 A schematic diagram of the architecture of an electronic device suitable for implementing embodiments of the present invention is shown.
[0135] It should be noted that, Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0136] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by instructions (computer programs), or by instructions (computer programs) controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. The electronic device of this embodiment includes a storage medium and a processor, wherein the storage medium stores multiple instructions that can be loaded by the processor to execute any step of the method provided in the embodiments of the present invention.
[0137] Specifically, the storage medium and the processor are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more signal lines. The storage medium stores computer-executable instructions that implement data access control methods, including at least one software functional module that can be stored in the storage medium in the form of software or firmware. The processor executes various functional applications and data processing by running the software program and module stored in the storage medium. The storage medium can be, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The storage medium stores the program, and the processor executes the program after receiving the execution instructions.
[0138] Furthermore, the software programs and modules within the aforementioned storage medium may also include an operating system, which may include various software components and / or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.) and can communicate with various hardware or software components to provide an operating environment for other software components. The processor may be an integrated circuit chip with signal processing capabilities. The aforementioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc., which can implement or execute the methods, steps, and logic flowcharts disclosed in this embodiment. The general-purpose processor may be a microprocessor or any conventional processor.
[0139] Since the instructions stored in the storage medium can execute the steps in any of the methods provided in the embodiments of the present invention, the beneficial effects of any of the methods provided in the embodiments of the present invention can be achieved, as detailed in the preceding embodiments, and will not be repeated here.
[0140] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for elastic concurrent control of image tile services under bandwidth constraints, applied to an elastic concurrent control system for image tile services, characterized in that, The method includes: Real-time collection of actual bandwidth data at the service interface of the image tile service; The actual bandwidth data within a preset past time period is input into a preset time series prediction model, and the bandwidth usage prediction value within a preset future time period is output, wherein the preset past time period ends at the current time. Based on the predicted bandwidth usage value and the preset fixed egress bandwidth threshold, determine the bandwidth usage rate corresponding to the predicted bandwidth usage value, and the bandwidth warning level to which the bandwidth usage rate belongs; When a client requests access to a target image tile, if the bandwidth warning level is detected to exceed a preset warning level, it is determined whether the target image tile belongs to a high-frequency tile set. The high-frequency tile set includes one or more image tiles whose current access count exceeds a set frequency threshold within a preset time period. If the target image tile does not belong to the high-frequency tile set, the original quality target image tile data will be returned to the client. If the target image tile belongs to the high-frequency tile set, the image encoding parameters of the target image tile are adjusted based on the adjustment coefficient corresponding to the bandwidth utilization rate, and temporary tile data after degraded compression is generated and returned to the client. The adjustment coefficient is inversely correlated with the bandwidth utilization rate.
2. The method according to claim 1, characterized in that, Before the step of inputting the actual bandwidth data from the past preset time period into a preset time series prediction model and outputting the predicted bandwidth usage value for the future preset time period, the method further includes: Obtain the actual compressed data volume of temporary tile data generated within a preset time period in the past, and the original data volume before compression corresponding to the temporary tile data; Calculate the difference between the original data volume before compression and the actual data volume after compression to obtain the amount of implicit bandwidth saved; The implicit bandwidth occupancy is superimposed on the actual bandwidth data to obtain the restored equivalent bandwidth data; Replace the actual bandwidth data input to the time series prediction model with the restored equivalent bandwidth data.
3. The method according to claim 1, characterized in that, The step of receiving a client's access request for the target image tile specifically includes: The viewport movement speed is calculated based on the time interval between consecutive access requests from the same client and the tile spatial coordinate span. If the viewport movement speed exceeds a preset inertia threshold, the access request is determined to be a transitional request, and the temporary tile data is generated directly using the preset minimum quality encoding parameters.
4. The method according to claim 1, characterized in that, The high-frequency tile set includes one or more image tiles whose access frequency exceeds a set frequency threshold within a preset time period. Specifically, this includes: If the number of times the target image tile is accessed within a preset time period exceeds a set frequency threshold, then the target image tile is determined to belong to a high-frequency tile set. If the current number of visits to the target image tile within a preset time period does not exceed a set frequency threshold, then the spatial location identifier corresponding to the target image tile is obtained, and it is queried whether there is an access record of an associated image tile with the same spatial location identifier within the preset time period. The associated image tile belongs to a different time phase or data layer than the target image tile. If the number of accesses to the associated image tile exceeds the set frequency threshold, the target image tile is determined to belong to the high-frequency tile set. If the associated image tile does not exist or the associated image tile does not exceed the set frequency threshold, then query the historical access count of the parent tile of the target image tile at the next higher level in the pyramid storage structure in the previous preset time period. If the number of historical visits to the parent tile exceeds the set frequency threshold, the target image tile will be determined to belong to the high-frequency tile set.
5. The method according to claim 1, characterized in that, Before the step of adjusting the image coding parameters of the target image tile based on the adjustment coefficient corresponding to the bandwidth utilization rate to generate degraded and compressed temporary tile data, the method further includes: The content complexity weight of the target image tile is determined based on the image information entropy of the target image tile; The adjustment coefficient is corrected based on the content complexity weight to obtain the corrected adjustment coefficient. Under the same bandwidth utilization, the corrected adjustment coefficient is positively correlated with the image information entropy.
6. The method according to claim 5, characterized in that, The step of adjusting the image coding parameters of the target image tile based on the adjustment coefficient corresponding to the bandwidth utilization rate to generate degraded and compressed temporary tile data specifically includes: When the adjustment coefficient is greater than or equal to the preset high-fidelity threshold, the original color depth of the target image tile is maintained; When the adjustment coefficient is between the preset low-fidelity threshold and the high-fidelity threshold, the color depth of the target image tile is reduced to the first depth level, and the target image tile is compressed according to the first compression ratio. When the adjustment coefficient is less than the low fidelity threshold, the color depth of the target image tile is reduced to the second depth level, and the target image tile is compressed according to the second compression ratio, wherein the first depth level is higher than the second depth level, and the second compression ratio is greater than the first compression ratio.
7. The method according to claim 6, characterized in that, After the step of adjusting the image coding parameters of the target image tile based on the adjustment coefficient corresponding to the bandwidth utilization rate, generating degraded and compressed temporary tile data and returning it to the client, the method further includes: The temporary tile data is stored in a temporary high-frequency cache area; When the same access request for the same target image tile is received again, if the target image tile is still in the bandwidth warning level that triggers the adjustment of image encoding parameters, the temporary tile data corresponding to the target image tile is retrieved from the temporary high-frequency buffer and returned to the client.
8. A flexible concurrent control system for image tile services, characterized in that, The system includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the system to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the image tile service elastic concurrency control system, the system performs the method as described in any one of claims 1-7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are run on the image tile service elastic concurrent control system, the system performs the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Video code rate adjusting method and device thereof
CN112929712A
Bandwidth control method and device, storage medium and computer equipment
CN118646657A
Online analysis-based image and grid cube data storage management method and system
WO2022188453A1
Cited By
Case consultation and pathological section automatic diagnosis system based on AI analysis
CN122091163A