High-efficiency data access system under complex network connection environment based on double-end cache mechanism

By adopting the multi-level caching mode of the double-ended caching mechanism in a complex network environment, the problem of low access efficiency of large-scale map data in the existing technology is solved, and more efficient data access and better user experience are achieved.

CN119357241APending Publication Date: 2025-01-24EAST CHINA INST OF COMPUTING TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411615183.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing technology has low access efficiency to large-scale map data in complex network environments and lacks local cache support, resulting in long response time and affecting user experience.

Method used

Adopt a multi-level caching model based on a double-ended caching mechanism, including client caching and server caching, using the combination of local caching and server caching, and through strategies such as load balancing caching, in-process caching, out-of-process caching and database distributed caching. Achieve efficient access to data.

Benefits of technology

It improves the speed of data access, enhances the robustness and adaptability of the system, ensures that basic navigation services can still be provided in offline environments, and improves user experience and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357241A_ABST
    Figure CN119357241A_ABST
Patent Text Reader

Abstract

The invention discloses a high-efficiency data access system under a complex network connection environment based on a double-end cache mechanism. The invention aims to solve the limitation in the prior art, and by introducing a high-efficiency data access technology based on a double-end cache mechanism, the data access speed is increased, the robustness of the system is enhanced, and various problems in a complex network connection environment are effectively solved; comprising but not limited to limitation of a single path, insufficient local cache support, poor network condition adaptability and the like. Through the implementation of the multi-level cache mode, the efficient access requirement of large-scale map data is better met, and the user experience is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a high-efficiency data access technology in a complex network connection environment, belongs to the field of information technology, and is mainly used in map navigation applications. Background Art

[0002] Under the current technical background, existing data access technologies have some limitations in map navigation applications. Generally, these technologies mainly rely on a single data access path, such as directly requesting data from the server.

[0003] This single-path technology has the following disadvantages:

[0004] 1. Single-channel data access:

[0005] The existing technology mainly adopts the method of directly requesting data from the server, which lacks flexibility. In a complex network environment, for large-scale map data, a single way of data access cannot meet the needs of high efficiency.

[0006] 2. Lack of local cache support:

[0007] Current technologies generally lack full utilization of local cache. When there is no network connection or the network request fails, the application cannot provide basic navigation services, resulting in a poor user experience.

[0008] 3. Long response time and poor performance:

[0009] Due to the lack of local cache and server-side cache support in applications, current technologies are inefficient when processing large-scale data, with long response times, which affects application performance. Summary of the invention

[0010] The purpose of the present invention is to improve data access speed, robustness, and adaptability to various network conditions by flexibly utilizing client cache and server cache through a multi-level cache mode.

[0011] In order to achieve the above object, the technical solution of the present invention is to disclose a high-efficiency data access system in a complex network connection environment based on a dual-end cache mechanism, characterized in that it includes a client cache part and a server cache part, wherein:

[0012] The client cache part includes:

[0013] Local map data cache, used to ensure that the system can still be used normally in an offline environment through the local cached map data;

[0014] Local application data cache is used to save the location information required to complete the navigation task in the local database in an offline environment, so as to complete the most basic navigation tasks based on the local cached data, and report the location in time through Beidou short messages and complete basic communication services;

[0015] The server cache part includes:

[0016] Client application-level service cache: When requesting server-side navigation services through an application, an HTTP request is initiated. In the first request, the application's local cache library does not have cached data, so it fetches data from the server and puts it into the application's cache library. The next time a request is made, the application will read local or service information based on the cache strategy.

[0017] Load balancing cache: Use Nginx to implement application load balancing, run a cache update service, and regularly update relatively stable information in the application server to the Nginx local cache;

[0018] In-process cache: For server-side applications, frequently used road network planning data is cached to reduce data access time;

[0019] Out-of-process cache: The out-of-process cache exists outside the process in which the application runs and is implemented in the form of distributed cache;

[0020] Database distributed cache: Database distributed cache improves the access efficiency to database data by making full use of database parameter configuration;

[0021] The synchronous update of the data cache of the client cache part and the server cache part is completed through the message queue.

[0022] Preferably, the local map data cache caches the map data into a multi-level directory structure, including a cache root directory, cache directories at different scale levels, a cache image index directory and cache image file names.

[0023] Preferably, in the client application-level service cache, two cache modes are transmitted through the HTTP request header, namely forced cache and comparative cache, wherein: forced cache determines whether to use cached data through the Expires and Cache-Control fields; comparative cache determines whether to use cache by comparing the cache flags before and after twice.

[0024] Preferably, in the load balancing cache, the user request first accesses the Nginx load balancer before reaching the application server: if cache information is found, it is directly returned to the user; if no cache information is found, Nginx goes back to the application server to obtain information.

[0025] Preferably, the in-process cache is placed on the managed heap of the JVM, and since it runs in memory, the response speed to data is very fast.

[0026] Preferably, in the out-of-process cache, the distributed cache is a cache service separated from the application, which is itself an independent service. The cached data is distributed to different cache nodes, and the size of the data cached by each node is limited. The out-of-process cache provides a cache expiration mechanism and saves it to a file in the form of a snapshot, which is convenient for preheating and loading after a cache crash.

[0027] The present invention aims to solve the limitations of current technologies by introducing a high-efficiency data access technology based on a dual-end cache mechanism, thereby improving data access speed, enhancing system robustness, and effectively solving a variety of problems in a complex network connection environment, including but not limited to the limitation of a single path, insufficient local cache support, and poor adaptability to network conditions. Through the implementation of a multi-level cache mode, the present invention better meets the demand for efficient access to large-scale map data and effectively improves user experience.

[0028] Compared with the prior art solutions, the innovation of the present invention lies in:

[0029] 1. Multi-channel data access:

[0030] The present invention realizes multi-path data access by introducing a dual-end cache mechanism. Through the combination of local cache and server cache, the system can more flexibly select the path for data acquisition, effectively reducing the dependence on a single path and improving the flexibility and efficiency of data access.

[0031] 2. Make full use of local cache:

[0032] The present invention designs a local cache to ensure that the system can still provide basic navigation services through local cache when the network cannot be connected or the network environment is poor. Users can browse the cached map data in an offline environment, which increases the availability of the application and the user experience.

[0033] 3. Improve efficiency and response time:

[0034] By introducing multi-level cache, the present invention greatly improves the processing capacity of the system and optimizes the access speed of data. Furthermore, the present invention reduces the response time of the service system and improves the performance of the application through strategies such as load balancing cache, in-process cache, and out-of-process cache, so that users can obtain real-time information more quickly.

[0035] Due to the adoption of the above innovative technical means, the technical solution disclosed in the present invention has the following beneficial effects compared with the prior art:

[0036] 1. Improved data access flexibility:

[0037] By introducing a dual-end cache mechanism, the system implements multi-path data access, improves the system's utilization of different data acquisition methods, and increases the flexibility of data access.

[0038] 2. Improve application availability:

[0039] The combination of local cache mechanism and server cache mechanism ensures that basic navigation services can still be provided in offline environment, increasing the availability of the application and improving the user experience.

[0040] 3. Improve system performance:

[0041] Through load balancing cache, in-process cache, out-of-process cache and other strategies, the present invention greatly improves the processing capability of the system, optimizes the access speed of data, reduces the system response time, and improves the performance of the application.

[0042] 4. Cache synchronization mechanism ensures consistency:

[0043] The message queue is introduced to complete the synchronous update of the data cache. Through cache strategy and optimization, the real-time and consistency of the cached data are ensured, and the stability and reliability of the system are improved.

[0044] 5. Synchronization strategy ensures data consistency:

[0045] Through the data synchronization strategy, the consistency of the distributed cache is maintained, the data inconsistency problem that may occur in the distributed environment is solved, and the overall stability of the system is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 The system cache architecture of the present invention is illustrated;

[0047] Figure 2 It shows the user request and response;

[0048] Figure 3 It shows that the synchronization of data cache is completed through the message queue. DETAILED DESCRIPTION

[0049] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0050] The system cache architecture of the high-efficiency data access system in a complex network connection environment based on the dual-end cache mechanism proposed by the present invention is as follows: Figure 1 As shown, including:

[0051] 1. Client cache, further comprising:

[0052] a) Local map data cache:

[0053] In an offline environment, the mobile terminal APP cannot access the map service on the server side. In order to ensure that the most basic map service is available, the present invention is designed to cache map data. This level of local cache mainly solves the situation where the network cannot be connected, or the network request fails. The local cached map data ensures that the system can still be used normally. The present invention caches the map data into a multi-level directory structure, including a cache root directory, cache directories at different scale levels, a cache image index directory, and a cache image file name. This hierarchical structure enables the system to efficiently manage the cache of map data and perform rapid retrieval based on scale level and specific location.

[0054] b) Local application data cache:

[0055] In an offline environment, in addition to accessing map services, some basic data are also needed to complete the navigation task. In order to provide basic navigation services in an offline environment, the present invention stores some basic data, such as the application data that has been issued, the basic information of the vehicle, the main vector road network information, and the key location information such as the key toll stations, bridges, tunnels, U-turn points, gas stations on the road network in a local database. In this way, the present invention can complete the most basic navigation tasks based on these locally cached data, and report the location in time through Beidou short messages and complete basic communication services. This level of local cache is used to improve the availability of applications in an offline environment, so that users can perform basic navigation operations regardless of whether they are connected to the Internet.

[0056] 2. Server cache, further including:

[0057] a) Client application-level service cache:

[0058] When the server-side navigation service is requested through the application, an HTTP request is initiated. In the first request, the local cache library of the application does not have cached data, so it will fetch data from the server and put it into the cache library of the application. The next time the request is made, the application will read local or service information according to the cache strategy. Two cache methods are passed through the HTTP request header, namely forced cache and comparative cache. Forced cache determines whether to use cached data through the Expires and Cache-Control fields. Comparative cache determines whether to use cache by comparing the cache flags before and after twice. This level of local cache is used to improve the response speed of client application-level services and reduce the number of requests to the server.

[0059] b) Load balancing cache:

[0060] In order to ensure the scalability of the application, Nginx is used to implement application load balancing, and a cache update service is run to regularly update the relatively stable information in the application server to the Nginx local cache. Figure 2 As shown in the figure, before the user request reaches the application server, it will first access the Nginx load balancer. If cached information is found, it will be directly returned to the user. If no cached information is found, Nginx will go back to the application server to obtain information. This level of cache mechanism improves system throughput through load balancing, reduces the pressure of client access on the application server, and speeds up data access.

[0061] c) In-process caching:

[0062] For server-side applications, frequently used data for road network planning is cached to reduce data access time. The in-process cache is placed on the managed heap of the JVM. Since it runs in memory, it responds to data very quickly. This level of cache improves the efficiency of data access, reduces frequent queries to the database, and speeds up the calculation process of road network planning.

[0063] d) Out-of-process cache:

[0064] The out-of-process cache exists outside the process in which the application is running and is implemented as a distributed cache. Distributed cache is a cache service that is separated from the application and is an independent service in itself. The cached data will be distributed to different cache nodes, and the size of the data cached by each node is usually limited. The out-of-process cache provides a cache expiration mechanism and saves it to a file as a snapshot, which is convenient for preheating and loading after a cache crash. The introduction of the out-of-process cache expands the overall cache capacity of the system and improves the efficiency of data storage and access.

[0065] e) Database distributed cache:

[0066] Improve the access efficiency of the database through the configuration of the database itself. The database distributed cache improves the access efficiency of the database data by making full use of the parameter configuration of the database. This level of cache mechanism further accelerates the system's access to the database and improves the data retrieval speed through the optimized configuration of the database.

[0067] 3. Cache synchronization update:

[0068] In order to ensure the real-time and consistency of cached data, the present invention introduces a message queue to complete the synchronous update of data cache. Figure 3 As shown in the figure, after the application has modified its own cached data and database data, it will send a data change notification through the message queue. Other applications subscribe to the message notification and modify the cached data when they receive the notification. Through the application of the message queue, the system realizes the timely synchronization of cached data and avoids data inconsistency.

Claims

1. A high-efficiency data access system based on a dual-end cache mechanism in a complex network connection environment, characterized in that: It includes the client cache part and the server cache part, where: The client cache part includes: Local map data cache, used to ensure that the system can still be used normally in an offline environment through the local cached map data; Local application data cache is used to save the location information required to complete the navigation task in the local database in an offline environment, so as to complete the most basic navigation tasks based on the local cached data, and report the location in time through Beidou short messages and complete basic communication services; The server cache part includes: Client application-level service cache: When requesting server-side navigation services through an application, an HTTP request is initiated. In the first request, the application's local cache library does not have cached data, so it fetches data from the server and puts it into the application's cache library. The next time a request is made, the application will read local or service information based on the cache strategy. Load balancing cache: Use Nginx to implement application load balancing, run a cache update service, and regularly update relatively stable information in the application server to the Nginx local cache; In-process cache: For server-side applications, frequently used road network planning data is cached to reduce data access time; Out-of-process cache: The out-of-process cache exists outside the process in which the application runs and is implemented in the form of distributed cache; Database distributed cache: Database distributed cache improves the access efficiency to database data by making full use of database parameter configuration; The synchronous update of the data cache of the client cache part and the server cache part is completed through the message queue.

2. A high-efficiency data access system based on a dual-end cache mechanism in a complex network connection environment as claimed in claim 1, characterized in that: The local map data cache caches the map data into a multi-level directory structure, including a cache root directory, cache directories at different scale levels, a cache image index directory, and cache image file names.

3. A high-efficiency data access system based on a dual-end cache mechanism in a complex network connection environment as claimed in claim 1, characterized in that: In the client application-level service cache, two cache modes are transmitted through the HTTP request header, namely forced cache and comparative cache, wherein: forced cache determines whether to use cached data through the Expires and Cache-Control fields; comparative cache determines whether to use cache by comparing the cache flags before and after twice.

4. A high-efficiency data access system based on a dual-end cache mechanism in a complex network connection environment as claimed in claim 1, characterized in that: In the load balancing cache, the user request first accesses the Nginx load balancer before reaching the application server: if cached information is found, it is directly returned to the user; if no cached information is found, Nginx goes back to the application server to obtain information.

5. A high-efficiency data access system based on a dual-end cache mechanism in a complex network connection environment as claimed in claim 1, characterized in that: The in-process cache is placed on the managed heap of the JVM, and since it runs in memory, it responds to data very quickly.

6. A high-efficiency data access system based on a dual-end cache mechanism in a complex network connection environment as claimed in claim 1, characterized in that: In the out-of-process cache, the distributed cache is a cache service separated from the application. It is an independent service itself. The cached data is distributed to different cache nodes, and the size of the data cached by each node is limited. The out-of-process cache provides a cache expiration mechanism and saves it to a file in the form of a snapshot, which is convenient for preheating and loading after a cache crash.