Module information cache loading method based on Redis cache

Through the introduction of Redis cache technology in the 5G module, the problem of high and sending requests and frequent data IO has been solved, which significantly improves data processing capabilities and storage efficiency, reduced cost power consumption and prolongs the system life.

CN119364437APending Publication Date: 2025-01-24ZHEJIANG LIERDA INTERNET OF THINGS TECH

Patent Information

Application Number
CN202410876089.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Existing 5G module loading methods cannot efficiently handle high concurrent requests and frequent data IO, resulting in excessive storage power consumption and shortening system life.

Method used

Introducing the Redis memory cache database, through its efficient memory access mechanism, significantly improves data access efficiency, reduces the number of direct accesses to the underlying storage, implements cache invalidation and update methods, and ensures the timeliness and accuracy of cached data.

Benefits of technology

The data processing capacity of the 5G module has been improved, the IO operation is reduced, the cost power consumption is reduced, the service life of the storage medium is prolonged, and it provides more stable and efficient data services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364437A_ABST
    Figure CN119364437A_ABST
Patent Text Reader

Abstract

The invention discloses a module information cache loading method based on a Redis cache. In order to solve the problem that in the prior art, a 5G module loading method is adopted, high-concurrency requests and frequent data IO cannot be efficiently processed, storage power consumption is too much, and the service life of a system is shortened, the method comprises the steps that a 5G module configuration file is analyzed, basic cache information is generated and stored, and all starting modules are traversed; generating registration state cache information for each module and storing the registration state cache information in a Redis cache; actively reported information is monitored in real time, cache items are updated in real time, and reading operation is executed when the service API requests to read cache data; and if the data is not read, updating non-actively reported cache information according to a service API operation, completing all operations, releasing resources and recording a log. Through the Redis cache technology, the 5G module data processing capability is improved, IO operation is reduced, cost and power consumption are reduced, and an efficient and reliable solution is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of module information loading, and in particular to a module information cache loading method based on Redis cache. Background Art

[0002] With the rapid development of 5G communication technology, 5G modules are increasingly used in smart phones, IoT devices and other fields. These devices have put forward higher requirements on the data processing and storage capabilities of 5G modules when dealing with massive data transmission and storage tasks. However, the current 5G modules generally adopt embedded architecture, and the hardware performance is relatively limited, which makes it difficult to cope with high concurrent request data. At the same time, frequent reading of data through IO not only affects performance, but may also shorten the life of storage media such as flash memory. Although existing technologies have tried to improve performance by upgrading hardware configuration or using high-performance storage media, these solutions are often accompanied by rising costs, increased power consumption, and increased equipment complexity and maintenance costs. Therefore, how to effectively improve the data processing and storage capabilities of 5G modules while keeping costs and complexity controllable has become a key issue that needs to be solved in the current technological development.

[0003] For example, a "video data source information loading method based on 5G network" disclosed in Chinese patent literature, with announcement number CN116801002A, includes real-time monitoring of the client's interactive operations on the video playback end and the playback progress of the current video data; and determining when to preload the video metadata in the playback video data list; obtaining the network delay value when the server transmits video data to the video playback end, the remaining storage space of the buffer queue used to cache video data in the video playback end, and the client's viewing experience requirements, and dynamically adjusting the buffer queue size; analyzing the client's viewing habits based on the client's historical video viewing data, setting the playback priority for the video data in the buffer queue according to the client's viewing habits, and storing the video data in the buffer queue in the buffer of the video playback end in the order of playback priority. Although the "video data source information loading method based on 5G network" takes into account network delay, buffer queue and viewing habits, it lacks optimization for real-time data processing and high concurrent requests, and fails to fully utilize the advantages of memory cache database. Summary of the invention

[0004] The present invention mainly solves the problem that the loading method of 5G modules adopted in the prior art cannot efficiently process high-concurrency requests and frequent data IO, resulting in excessive storage power consumption and shortening of system life; provides a module information cache loading method based on Redis cache, introduces Redis memory cache database, and significantly improves data access efficiency through its efficient memory access mechanism; adds a new module information cache loading method to ensure that module information can be quickly loaded into the cache, reduces the number of direct accesses to the underlying storage, implements cache invalidation and update methods, ensures the timeliness and accuracy of cached data, and thus provides users with more stable and efficient data services.

[0005] The above technical problems of the present invention are mainly solved by the following technical solutions: The method of the present invention includes: parsing the 5G module configuration file, generating and storing basic cache information according to the information in the configuration file, traversing all startup modules, generating and storing registration status cache information for each module in the Redis cache; establishing a monitoring mechanism, real-time monitoring of active reporting information and real-time updating of cache items, and performing a read operation when a business API requests to read cache data; if no data is read, updating the non-actively reported cache information according to the business API operation, completing all operations to release resources and record logs. The Redis cache technology improves the data processing capability of the 5G module, reduces IO operations, reduces cost and power consumption, and provides an efficient and reliable solution.

[0006] Preferably, the 5G module configuration file is parsed, and the basic data in the configuration file is parsed into a collection, and a key value is set for the collection. The collection element is the module basic data, so as to generate and store basic cache information; all startup modules of the 5G module are traversed, and key-value pairs are generated for all modules and functions, and the key-value pairs are stored in the Redis cache to generate registration status cache information. By parsing the configuration file and generating collections and key-value pairs, the present invention realizes the rapid indexing and storage of basic data and module registration status. This method improves data access efficiency, ensures the real-time and accuracy of data, and provides strong support for the efficient operation of the system.

[0007] As a preferred method, a message listener is established and started to receive and parse the message content actively reported by the 5G module in real time, determine the cache information that needs to be updated based on the parsing results, and immediately update the cache items corresponding to the Redis cache to ensure the real-time and accuracy of the cache information; when the business API sends a request to read cache data, the system receives and parses the key information in the request, performs a search operation in the cache, and returns the data to the business API based on the search results; when the business API sends an update request, the system receives and parses the update information contained in the request, and based on the update information, the system determines the non-actively reported cache items that need to be updated, and performs the update operation. Real-time monitoring of updates and quick response to reads ensures real-time and accurate data.

[0008] Preferably, the system further performs a search operation in the cache based on the key information, and reads the cache data that matches the key information. If the read is successful, the system returns the data to the business API that initiated the request. If the data is not read, it is processed according to the preset logic, including but not limited to triggering a cache update operation or returning a null value to the business API, making the cache search more efficient.

[0009] Preferably, the update information includes but is not limited to new data values ​​and attributes of status changes. The system updates the cached data according to the specific instructions provided by the business API. After completing the update operation, the system returns the update results to the business API for retention, so that the data is updated in real time, ensuring that the business data is accurate and reliable.

[0010] Preferably, the basic data in the configuration file is further parsed into a Redis cache Set collection, which uses "LIOT_CP_INFO_" plus the module code as the key value; a Redis cache Key-String key-value pair is generated for each module and function, where the key format is "LIOT_module name_function name" and the value is the registration status information of the module. By parsing the configuration file data into Redis Set collections and Key-String key-value pairs, the present invention realizes structured storage and efficient retrieval of data. This design ensures the orderliness and maintainability of the data, improves the data processing efficiency and accuracy of the system, and provides users with more reliable and convenient services.

[0011] Preferably, after completing all cache loading, updating and reading operations, the system performs an end operation, including releasing the connection resources established with the Redis cache and recording log information of the entire cache operation process. After completing the cache operation, the system releases the Redis connection resources and records the operation log, which not only ensures efficient use of resources, but also provides a detailed record of the operation process, which is helpful for performance analysis, troubleshooting and system optimization, and improves the reliability and maintainability of the system.

[0012] Preferably, the log information includes but is not limited to the operation time type and operation result; after recording the log information, performance analysis and troubleshooting audit are performed, and correct information is screened and retained. Recording detailed log information, including operation time, type and result, provides the system with rich performance analysis materials. By screening and retaining correct information, the system can locate problems more efficiently, optimize performance, ensure the stability and reliability of the system, and thus provide users with better services.

[0013] Preferably, after the log information is recorded, expired or invalid cache items in the Redis cache are scanned and deleted, a timestamp is attached to each cache item, and if the timestamp of the cache item exceeds TTL, it is deleted.

[0014] The beneficial effects of the present invention are: 1. A module information cache loading method based on Redis cache in the present invention significantly improves the data processing capability of the 5G module by introducing Redis cache technology, effectively responds to the needs of high concurrent request data, and thus improves the overall performance of the device; 2. A module information cache loading method based on Redis cache of the present invention reduces frequent IO read operations by storing data in Redis cache, thereby reducing wear on flash memory, extending the service life of flash memory, and reducing equipment maintenance costs; 3. The module information cache loading method based on Redis cache of the present invention improves performance by improving data storage and processing methods instead of relying on increasing hardware configuration, thereby significantly reducing the cost and power consumption of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a method flow chart of a module information cache loading method based on Redis cache of the present invention. DETAILED DESCRIPTION

[0016] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings.

[0017] Embodiment 1: A module information cache loading method based on Redis cache in this embodiment is as follows: Figure 1As shown, the method of this embodiment generates and stores basic cache information and registration status cache information in Redis by parsing the 5G module configuration file. At the same time, a monitoring mechanism is established to monitor and update the actively reported cache items in real time, and support business APIs to read and update cache data. The system includes cache information generation, cache update, cache reading and control modules, which are responsible for cache information generation, real-time update, read response, coordination between modules, resource release and logging. The whole process ensures the real-time and accuracy of cache information, and provides a complete operation log to support performance analysis and auditing.

[0018] The system of this embodiment is mainly used to parse the 5G module configuration file, generate and store basic cache information and registration status cache information in Redis. Through real-time monitoring and update mechanisms, as well as the support of business APIs, the system ensures the real-time and accuracy of cache information, and provides a complete operation log for performance analysis and auditing.

[0019] The system is equipped with the following four modules: Cache information generation module: responsible for parsing the 5G module configuration file, extracting basic data and module information from it, generating and storing basic cache information and registration status cache information in Redis. Cache update module: by establishing a monitoring mechanism, real-time monitoring and receiving cache update information actively reported by the 5G module, and updating the cache items in Redis in real time according to the received information. Cache read module: respond to the read request of the business API, find and return the corresponding cache data from Redis. Control module: responsible for coordinating the work between modules, managing the allocation and release of resources, and recording log information of the entire cache operation process.

[0020] The method of this embodiment is explained in modules: Cache information generation: The cache information generation module parses the 5G module configuration file and extracts basic data and module information. The basic data is parsed into a Redis Set collection with the key value of "LIOT_CP_INFO_" plus the module code, which is used to save the CP-side basic data of the 5G module. A Redis Key-String key-value pair is generated for each module and function, with the key value of "LIOT_module name_function name" to save the registration status information of the 5G module.

[0021] Cache update: The cache update module establishes a monitoring mechanism to monitor and receive cache update information actively reported by the 5G module in real time. According to the received update information, the corresponding Redis cache item is found and updated in real time. If the business API sends an update request, the system will also update the cache items that are not actively reported according to the update information in the request.

[0022] Cache read: When the business API sends a read request, the cache read module receives and parses the key information in the request. It searches for cache data matching the key information in Redis and returns it to the business API if it finds it. If no matching cache data is found, it processes it according to the preset logic, such as triggering a cache update operation or returning a null value to the business API.

[0023] Control module: The control module is responsible for coordinating the work between modules to ensure the smooth progress of cache loading, updating and reading. After all operations are completed, the control module will release the connection resources established with Redis and record the log information of the entire cache operation process. The log information includes operation time, operation type, operation result, etc., which can be used for performance analysis and auditing.

[0024] The following is an explanation of the mentioned technical means: Redis: (Remote Dictionary Server) is a memory cache database for Key-Value storage. Similar to Memcached, Redis is essentially a Key-Value memory database. The entire database is loaded into the memory for operation, and the database data is flushed to the hard disk for storage through asynchronous operations regularly. Because it is a pure memory operation, Redis has excellent performance and can handle more than 100,000 read and write operations per second. It is the fastest known Key-ValueDB. Flash: A type of storage chip.

[0025] API: (Application Programming Interface), that is, application programming interface, is a collection of predefined functions, protocols and tools. Its main purpose is to provide a standard and controllable way to allow different software applications to communicate or interact with each other. Through API, developers can use specific functions to perform operations, request services, get or set data, etc. without accessing the source code or understanding the internal working principles.

[0026] This embodiment introduces a Redis memory cache database to meet the efficient access requirements of module information. The newly added Redis memory cache database significantly improves the access efficiency of data, thereby optimizing system performance. At the same time, in order to manage module information more efficiently, a new module information cache loading method is designed. The method first parses the 5G module configuration file, generates and stores basic cache information and registration status cache information in Redis.

[0027] In order to ensure the real-time and accuracy of cache information, a monitoring mechanism is established to monitor and update actively reported cache items in real time. In addition, in response to possible invalidation or changes in cached data, we have added cache invalidation and update methods to ensure that the data is always kept up to date. The entire solution includes multiple modules such as cache information generation, cache update, cache reading and invalidation processing. Each module works together to support fast and accurate access to module information, and supports performance analysis and audit requirements through detailed logging.

[0028] It also includes an automatic cleaning mechanism that periodically scans cache items in the Redis cache and automatically deletes expired or invalid cache items according to the preset cleaning strategy to free up cache space and maintain the accuracy of cache data. The automatic cleaning mechanism can determine whether a cache item should be deleted based on the creation time, access time, update time, or other custom strategies of the cache item. In addition, the running time and frequency of the automatic cleaning mechanism can be dynamically adjusted according to the system load and cache usage.

[0029] like Figure 1 As shown, the method in this embodiment specifically includes the following steps: (1) Generate corresponding basic cache information according to the 5G module configuration file; (2) Generate the registration status cache information of all startup modules of the corresponding 5G module; (3) Update the corresponding cache information based on the information actively reported by the monitoring; (4) Read cached data through the business API. If the data is read, jump to step (6). If the data is not read, continue with step (5). (5) According to the operation of the business API module, update the non-active reporting cache information and jump to step (4); (6) Scan all cache items in the Redis cache. If the timestamp of the cache item exceeds the TTL, jump to step (7) until all cache items do not exceed the TTL, then go to step (8); (7) Delete the cache item and then jump to step (6) to rescan; (8) End this cycle.

[0030] Among them, in step (1), the data structure of the module information is generated as a Redis Set collection, which is used to save the cp side basic data of the 5G module, and its key value is LIOT_CP_INFO_module code. In step (2), the data structure of all startup module registrations of the 5G module is generated as a Redis Key-String key-value pair, which is used to save the 5G module information, and its key value is LIOT_module name_function name. In step (3), the corresponding information is updated by monitoring the actively reported information. In step (4), the cached data is read through the business api. In step (5), the cached data is updated according to the business api module operation. In step (6), a timestamp is attached to each cache item, and if the cache item timestamp exceeds TTL, it is deleted until the (6) (7) cycle is completed so that the timestamps of all cache items meet the requirements.

[0031] The benefits are: By introducing the Redis memory cache database, the module information cache loading method and system of this embodiment significantly improves the data access efficiency. Redis ensures rapid response and processing of module information with its pure memory operation and high-performance read and write capabilities. Whether it is the generation of basic cache information, the storage of registration status cache information, or real-time update and read operations, it can be completed in a short time, thereby greatly optimizing system performance and meeting the needs of efficient access to module information.

[0032] This embodiment can monitor and update the actively reported cache items in real time by establishing a monitoring mechanism, thereby ensuring the real-time and accuracy of the cache information. At the same time, the newly added cache invalidation and update method can timely update the cache data in response to possible invalidation or changes, thereby ensuring the latest status of the data. This real-time update mechanism not only improves the response speed of the system, but also enhances the reliability of the data, providing more stable and reliable data support for business applications.

[0033] To sum up, the module information cache loading method and system of this embodiment not only significantly improves the data access efficiency, but also ensures the real-time and accuracy of the cache information by introducing the Redis memory cache database, establishing a monitoring mechanism, and adding a new cache invalidation and update method, thereby providing a strong guarantee for the fast and accurate access of module information.

[0034] Embodiment 2: A module information cache loading method based on Redis cache in this embodiment includes the following steps: Step 1: Cache initialization: Step 1.1: Parse the 5G module configuration file and extract basic information from the configuration file; Step 1.2: Based on the extracted basic information, generate the corresponding basic cache information and store it in Redis.

[0035] Step 2: Module registration and monitoring: Step 2.1: Traverse all startup modules of the 5G module, generate registration status cache information for each module, and store this information in Redis; Step 2.2: Establish a monitoring mechanism to continuously monitor active reporting information; Step 2.3: When active reporting information is received, update the corresponding cache information in real time according to the reported content.

[0036] Step 3: Read and update cache data: Step 3.1: When the business API requests to read cache data, perform data reading operations from Redis; Step 3.2: If the cache data is read, it is directly returned to the business API; Step 3.3: If the cache data is not read, update the non-actively reported cache information according to the business API module operation; Step 3.4: Store the updated cache information back in Redis.

[0037] Step 4: End the operation: Step 4.1: After completing all operations, release the connection resources with Redis; Step 4.2: Record the operation log for subsequent analysis.

[0038] In this modified method, step 1 of the original method in the embodiment is split into two sub-steps of "cache initialization" to more clearly express the process of parsing basic information from the configuration file and generating basic cache information. At the same time, steps 2, 3, and 4 are combined into a more comprehensive "module registration and monitoring", "cache data reading and updating", and "end operation" steps to simplify the description and highlight the key operations.

[0039] Cache initialization phase: In the initial stage of the system, the first task is to initialize the cache. First, the system will parse the 5G module configuration file, which contains the basic information of the module, such as device code, configuration parameters, etc. Then, based on the basic information extracted from the configuration file, the system will generate the corresponding basic cache information, which will serve as the data basis for subsequent operations. Finally, this basic cache information will be stored in Redis for quick reading and updating.

[0040] Configuration file parsing usually uses configuration file parsing libraries (such as Properties in Java, XML parsing libraries such as JAXB, DOM, SAX, or ConfigParser in Python) to read configuration files. These libraries allow programs to access key-value pairs in configuration files in a structured manner. Data extraction Through the configuration file parsing library, the program can traverse the configuration file and extract basic information of the module, such as device code, configuration parameters, etc. This information is usually stored in a data structure (such as an array, list, dictionary, or object) for subsequent processing.

[0041] Redis storage, Redis is an open source, in-memory data structure storage system that can be used as a database, cache, and message broker. During the cache initialization phase, the program will use the Redis client library (such as Java libraries such as Jedis and Lettuce, or Python libraries such as redis-py) to connect to the Redis server and store the generated basic cache information in Redis in the form of key-value pairs. Redis provides a rich set of data structures (such as strings, hashes, lists, sets, ordered sets) and commands, making data storage and reading efficient and flexible.

[0042] When storing cache information, you also need to consider the cache expiration policy (such as TTL setting), cache elimination policy (such as LRU, LFU, TTL, etc.), and cache partitioning policy to ensure the efficiency and accuracy of the cache. During the entire cache initialization process, the program needs to handle possible errors and exceptions, such as configuration file reading failure, Redis connection failure, etc. These errors should be recorded in the log for subsequent troubleshooting.

[0043] The benefit of cache initialization is that it realizes an automated data preprocessing process. By parsing the 5G module configuration file, the system can quickly and accurately extract the basic information of the module and generate the corresponding basic cache information. This cache information is then stored in Redis, greatly improving the efficiency of subsequent data reading and updating. This automated approach not only reduces the error rate of manual operations, but also greatly shortens the system startup and preparation time, laying a solid foundation for the efficient operation of the entire system.

[0044] During the module registration and monitoring phase, after initialization, the system needs to register each module of the 5G module and establish a monitoring mechanism to track the module status changes in real time. Specifically, the system will traverse all startup modules of the module, generate registration status cache information for each module, and store this information in Redis. At the same time, the system will establish a continuously running monitoring mechanism to monitor in real time whether the module actively reports status information. Once the active reporting information is received, the system will immediately update the corresponding cache information according to the reported content to ensure the real-time and accuracy of the cached data.

[0045] The system uses advanced module management technology and real-time communication mechanism. Specifically, the system traverses all the startup modules of the 5G module, assigns a unique identifier to each module, and generates the corresponding registration status cache information in the Redis database. The system has established an efficient monitoring mechanism to communicate with the module through real-time communication protocols (such as MQTT, WebSocket, etc.). Once the module changes state or actively reports information, the system can immediately capture these events and trigger the corresponding processing logic. During the processing, the system will update the cache information in Redis in real time according to the reported content to ensure the real-time and accuracy of the data.

[0046] The benefit of the module registration and monitoring phase is that it ensures the real-time and accuracy of the 5G module system. By generating registration status cache information for each module and storing it in Redis, the system can quickly respond to changes in module status. At the same time, the established continuous monitoring mechanism can capture the status information actively reported by the module in real time, and update the cache data accordingly, ensuring the real-time and accuracy of the data. This mechanism provides efficient and reliable data support for the system, improving the overall performance of the system and user experience.

[0047] Cache data reading and updating. During system operation, the business API may request to read cache data. At this time, the system will perform a data reading operation to obtain the requested data from Redis. If the cache data is read, the system will directly return the data to the business API; if the cache data is not read, the system will update the non-actively reported cache information according to the module operation of the business API. This mechanism ensures that even if the cache data is missing, the system can update and supplement the data according to business needs. After completing the data reading or updating, the system will store the updated cache information back to Redis for subsequent use.

[0048] In the existing technology, the cache data reading and updating mechanism ensures the efficient operation of the 5G module system. The system can quickly respond to the read request of the business API and retrieve data from Redis; if the data is missing, the cache is updated according to the business needs. The updated data will be stored back in Redis to provide real-time and accurate data support for subsequent operations. This mechanism realizes efficient access and real-time update of data, improving the overall performance of the system.

[0049] The benefit of cache data reading and updating is that it greatly improves the system's response speed and data accuracy. When the business API requests data, the system can quickly read the cache data from Redis and return it, reducing the database access time, thereby speeding up the system's response speed. At the same time, when the cache data is missing, the system can automatically update the cache information according to business needs, ensuring the real-time and accuracy of the data. This mechanism not only improves the user experience, but also enhances the stability and reliability of the system.

[0050] In the end operation phase, after all operations are completed, the system will execute the end operation. First, the system will release the connection resources with Redis to ensure the effective use of resources and the stability of the system. Then, the system will record the operation log, including detailed information such as operation time, operation type, and operation results, for subsequent performance analysis and auditing. These log records are of great significance for system maintenance, troubleshooting, and performance optimization.

[0051] At the end of the operation phase, by releasing the connection resources to Redis and recording the operation log, the effective use of resources, the stability and traceability of the system are ensured. By releasing the connection resources, potential resource leakage is avoided and the stable operation of the system is guaranteed. At the same time, recording the operation log provides valuable data support for subsequent performance analysis, troubleshooting and auditing, further improving the maintainability and reliability of the system.

[0052] Embodiment 3: A module information cache loading method based on Redis cache in this embodiment brings the method of embodiment 1 or embodiment 2 into an actual application scenario to optimize the performance and management efficiency of 5G network equipment. This embodiment simulates a specific application scenario description of 5G base station management based on this method.

[0053] In a large-scale 5G base station management system, each base station is equipped with multiple modules that handle various communication and network functions. Due to the large number of base stations and the frequent state changes and configuration updates of each base station, directly accessing and managing the module information of each base station becomes very time-consuming and complicated. Therefore, introducing a module information cache loading method based on Redis cache can significantly improve the response speed and stability of the system.

[0054] When maintaining and managing base stations, first when the 5G base station management system is started, the system will read the configuration files of all base stations and parse the basic data of each base station module, such as module type, number, configuration parameters, etc. Then, the system stores these basic data in the Redis cache in the form of a collection and sets a unique key value for each collection, such as "LIOT_CP_INFO_base station number".

[0055] Next, the system will traverse the startup modules of all base stations and generate a Redis cache Key-String key-value pair for each module and function. The key format is "LIOT_base station number_module name_function name", and the value is the module's registration status information or other related attributes. In this way, the system can quickly locate the registration status and other important information of each base station module in the Redis cache.

[0056] In order to track the status changes and configuration updates of the base station module in real time, the system will establish a message listener. When the base station module actively reports status changes or configuration update messages, the listener will immediately receive these messages and parse the cache information that needs to be updated. Then, the system will immediately update the corresponding cache items in the Redis cache to ensure the real-time and accuracy of the cached data.

[0057] When the base station management system receives a read request from the business API, the system parses the key information in the request and performs a search operation in the Redis cache. If matching cache data is found, the system returns the data to the business API; if no data is found, the system may trigger a cache update operation or return a null value to the business API. When the business API needs to update the configuration or status of the base station module, the system receives and parses the information in the update request, determines the cache items that need to be updated, and performs the update operation. After the update is completed, the system returns the update result to the business API.

[0058] After completing all cache loading, updating, and reading operations, the system will release the connection resources established with the Redis cache and record log information for the entire operation process. These log information include operation time, type, and results, etc., which are used for subsequent performance analysis, auditing, and troubleshooting. In addition, the system will regularly scan cache items in the Redis cache to check whether there is expired or invalid data. For expired cache items, the system will delete them to free up memory space; for invalid data, the system will clean up and correct it to ensure the accuracy and reliability of cached data.

[0059] By introducing a module information cache loading method based on Redis cache, the 5G base station management system can significantly improve the response speed and stability. The system can quickly locate and obtain the information of the base station module, reducing the number of interactions with the underlying equipment and the response time; at the same time, the real-time updated cache data ensures the accuracy and real-time nature of the information. In addition, through log recording and performance analysis, system administrators can discover and solve problems in a timely manner, improving the maintainability and reliability of the system.

[0060] Introducing the module information cache loading method based on Redis cache into the 5G base station management system has brought many significant benefits. The following is a detailed description of these benefits: As a high-performance memory data structure storage system, Redis supports fast data read and write operations. In the 5G base station management system, by caching module information in Redis, the system can quickly locate and read this data without having to obtain it from the underlying device or database every time. This greatly improves the system's response speed, reduces user waiting time, and improves user experience.

[0061] In traditional architectures, whenever module information needs to be read or updated, the system directly accesses the underlying device or database. However, these operations are usually time-consuming and put a certain amount of pressure on the underlying device and database. By introducing Redis cache, most data reading and updating operations can be completed at the cache layer, thereby reducing the burden on the underlying device and database and improving the overall performance and stability of the system.

[0062] The module information cache loading method based on Redis cache supports real-time updates. When the status or configuration of the module changes, the system can immediately update the corresponding items in the Redis cache to ensure the real-time and accuracy of the cached data. This real-time update capability enables the system to quickly respond to changes in the status of the base station module, improving the flexibility and reliability of the system.

[0063] The Redis cache system has good scalability and maintainability. When the system needs to process more base station module information, you can simply increase the capacity of the Redis cache or use a distributed cache architecture to expand the system's processing capabilities. In addition, Redis provides a wealth of APIs and tools to make system development and maintenance simpler and more efficient.

[0064] By introducing Redis cache, the system can achieve fault tolerance and load balancing to a certain extent. Even if some underlying devices or databases fail, the system can still read module information from the Redis cache to ensure the normal operation of the business. In addition, Redis also provides data persistence. Even if the system crashes, cached data can be restored from persistent data, further improving the availability of the system.

[0065] Since most of the data read and write operations can be completed in the Redis cache layer, the system can reduce the amount of network communication with the underlying devices or databases. This not only reduces network traffic and bandwidth requirements, but also reduces the risk of network delays and failures, and improves system stability and reliability.

[0066] The Redis cache system supports detailed logging and performance analysis functions. By recording and analyzing the log information of cache operations, system administrators can promptly discover and solve problems and improve the maintainability of the system. At the same time, these log information can also be used for data auditing and security monitoring to ensure the compliance and security of the system.

[0067] In summary, introducing the module information cache loading method based on Redis cache into the 5G base station management system can significantly improve the system's response speed, performance and stability, reduce the pressure on the underlying equipment and database, support real-time updates and accuracy, facilitate expansion and maintenance, improve system availability, reduce network traffic and bandwidth requirements, and facilitate data analysis and auditing. These benefits make the module information cache loading method based on Redis cache an indispensable part of the 5G base station management system.

[0068] It should be understood that the embodiments are only used to illustrate the present invention and are not used 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 also fall within the scope limited by the appended claims of the application.

Claims

1. A module information cache loading method based on Redis cache, characterized in that: include: S1: Parse the 5G module configuration file, generate and store basic cache information based on the information in the configuration file, traverse all startup modules, generate and store registration status cache information for each module in the Redis cache; S2: Establish a monitoring mechanism to monitor actively reported information in real time and update cache items in real time. When the business API requests to read cached data, perform the read operation; if no data is read, update the non-actively reported cache information according to the business API operation. After all operations are completed, release resources and record logs.

2. According to a module information cache loading method based on Redis cache according to claim 1, it is characterized in that: S1.1: Parse the 5G module configuration file, parse the basic data in the configuration file into a collection, set a key value for the collection, and the collection element is the module basic data, so as to generate and store basic cache information; S1.2: Traverse all startup modules of the 5G module, generate key-value pairs for all modules and functions, and store the key-value pairs in the Redis cache to generate registration status cache information.

3. According to a module information cache loading method based on Redis cache as described in claim 1, it is characterized in that: S2.1: Establish and start a message listener to receive and parse the message content actively reported by the 5G module in real time, determine the cache information that needs to be updated based on the parsing results, and immediately update the corresponding cache items in the Redis cache; S2.2: When the business API sends a request to read cached data, the system receives and parses the key information in the request, performs a search operation in the cache, and returns the data to the business API based on the search result; S2.3: When the business API sends an update request, the system receives and parses the update information contained in the request. Based on the update information, the system determines the non-actively reported cache items that need to be updated and performs the update operation.

4. According to a module information cache loading method based on Redis cache according to claim 3, it is characterized in that: S2.2 specifically includes: the system performs a search operation in the cache according to the key information, reads the cache data that matches the key information, and if the reading is successful, the system returns the data to the business API that initiated the request. If the data is not read, it is processed according to the preset logic, including but not limited to triggering a cache update operation or returning a null value to the business API.

5. According to a module information cache loading method based on Redis cache as described in claim 3, it is characterized in that: S2.3 specifically includes: Update information includes but is not limited to new data values ​​and attributes of status changes. The system updates cached data according to the specific instructions provided by the business API. After completing the update operation, the system returns the update results to the business API for retention.

6. A module information cache loading method based on Redis cache according to claim 2, characterized in that: S1.1 specifically includes: parsing the basic data in the configuration file into a Set set of Redis cache, which uses "LIOT_CP_INFO_" plus the module code as the key value.

7. A module information cache loading method based on Redis cache according to claim 2, characterized in that: S1.2 specifically includes: generating a Redis cache Key-String key-value pair for each module and function, where the key format is "LIOT_module name_function name" and the value is the registration status information of the module.

8. A module information cache loading method based on Redis cache according to claim 1 or 4 or 5 or 6 or 7, characterized in that: The module information cache loading method also includes S3: after completing all cache loading, updating and reading operations, the system executes an end operation, including releasing connection resources established with the Redis cache and recording log information of the entire cache operation process.

9. A module information cache loading method based on Redis cache according to claim 8, characterized in that: The log information in S3 includes but is not limited to the operation time type and operation results; after recording the log information, performance analysis and troubleshooting audit are performed to screen the correct log information records.

10. A module information cache loading method based on Redis cache according to claim 8, characterized in that: S3 also includes: after the log information is recorded, scan and delete expired or invalid cache items in the Redis cache, attach a timestamp to each cache item, and check if the cache item timestamp exceeds TTL and delete it.

Citation Information

Patent Citations

  • Video data source information loading method based on 5G network

    CN116801002A

Cited By

  • Hospital information integration platform management method and system based on big data

    CN121144325A

  • A hospital information integration platform management method and system based on big data

    CN121144325B

  • Internet of Things equipment state updating method and system based on Redis cache

    CN121334172A