Business data caching method and device, electronic equipment and storage medium

By analyzing historical access logs and system parameters, access patterns and popularity are predicted. Target cache parameters are then selected and determined using reinforcement learning. This solves the problem that existing caching methods cannot identify periodic patterns and sudden warnings, enabling the early caching of hot data and improving data access efficiency.

CN121958352APending Publication Date: 2026-05-01PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2026-01-13
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, business data caching methods cannot identify the periodic patterns or sudden warnings of business data, resulting in the premature elimination of data that is about to become hot before the periodic recurrence or instantaneous hot spot arrives, causing cache breakdown, repeated requests to the source, and low data access efficiency.

Method used

By acquiring historical access logs and system operating parameters, log analysis is performed to predict access patterns and access popularity, hot business data is filtered out, and target caching parameters are determined through reinforcement learning to cache hot business data in a preset caching system in advance.

Benefits of technology

It improved the access efficiency of hot business data, avoided cache breakdown and repeated origin requests, and improved the overall efficiency of data access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958352A_ABST
    Figure CN121958352A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a business data caching method and device, electronic equipment and a storage medium, belongs to the technical field of computers, and is applied to the field of financial science and technology and the field of health medical treatment. The method comprises the following steps: performing log analysis on a historical access log to obtain a predicted access mode and predicted access popularity of preset service data; screening the preset service data according to the predicted access mode and the predicted access popularity to obtain hotspot service data; determining a hotspot access mode of the hotspot service data according to the predicted access mode, and determining hotspot access popularity of the hotspot service data according to the predicted access popularity; carrying out reinforcement learning on the hotspot access mode, the hotspot access popularity and the system operation parameter to obtain a target cache parameter of the preset cache system; and caching the hotspot service data to a preset cache system according to the target cache parameter. According to the embodiment of the invention, the service data access efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Business data caching methods, devices, electronic equipment and storage media Technical Field

[0001] This application relates to the field of computer technology, and is applied to the fields of financial technology and healthcare, and particularly to a business data caching method, apparatus, electronic device and storage medium. Background Technology

[0002] To address the performance bottlenecks of traditional database architectures when faced with massive requests, business data needs to be cached in storage media with faster read and write speeds. For example, in a fintech scenario, a bank's transaction system receives a large number of order requests. To improve request response efficiency, data such as account balances and transaction permissions are cached in the transaction system's memory based on these order requests. Similarly, in a healthcare scenario, a medical system receives numerous patient requests. To enable doctors to quickly access patients' health records based on these requests, the health records are cached in the medical system's memory.

[0003] In related technologies, a Least Recently Used (LRU) strategy is employed for business data caching. This involves recording the access time of business data and evicting the least recently accessed business data when the cache is full. However, this caching method cannot identify the periodic patterns or sudden warnings of business data, causing data to be prematurely evicted before the periodic recurrence or instantaneous hotspot arrives. This results in cache breakdown, repeated requests to the source, and ultimately, low data access efficiency. Summary of the Invention

[0004] The main objective of this application is to provide a business data caching method, apparatus, electronic device, and storage medium, which aims to improve the efficiency of business data access.

[0005] To achieve the above objectives, a first aspect of this application proposes a business data caching method, the method comprising: acquiring historical access logs of preset business data and system operating parameters of a preset caching system; performing log analysis on the historical access logs to obtain a predicted access pattern and predicted access popularity of the preset business data; filtering the preset business data according to the predicted access pattern and the predicted access popularity to obtain hot-spot business data; determining the hot-spot access pattern of the hot-spot business data according to the predicted access pattern, and determining the hot-spot access popularity of the hot-spot business data according to the predicted access popularity; performing reinforcement learning on the hot-spot access pattern, the hot-spot access popularity, and the system operating parameters to obtain target caching parameters of the preset caching system; and caching the hot-spot business data to the preset caching system according to the target caching parameters.

[0006] In some embodiments, the step of performing log analysis on the historical access logs to obtain the predicted access pattern and predicted access popularity of the preset business data includes: performing access prediction on the historical access logs using an access pattern prediction model to obtain the predicted access pattern; extracting features from the historical access logs to obtain access features; and evaluating the popularity of the preset business data based on the access features to obtain the predicted access popularity.

[0007] In some embodiments, the step of extracting features from the historical access logs to obtain access features includes: extracting time features from the historical access logs to obtain log time features; extracting spatial features from the historical access logs to obtain log spatial features; extracting content features from the historical access logs to obtain log content features; and fusing the log time features, the log spatial features, and the log content features to obtain the access features.

[0008] In some embodiments, the feature fusion of the log time feature, the log space feature, and the log content feature to obtain the access feature includes: concatenating the log time feature, the log space feature, and the log content feature to obtain a reference feature; calculating a first weight for the log time feature, a second weight for the log space feature, and a third weight for the log content feature based on the reference feature; and performing weighted fusion based on the first weight, the second weight, the third weight, the log time feature, the log space feature, and the log content feature to obtain the access feature.

[0009] In some embodiments, the step of filtering the preset service data according to the predicted access pattern and the predicted access popularity to obtain hot service data includes: filtering the preset service data according to the predicted access pattern to obtain initial service data; and filtering the initial service data according to the predicted access popularity to obtain the hot service data.

[0010] In some embodiments, the step of performing reinforcement learning on the hotspot access pattern, the hotspot access popularity, and the system operating parameters to obtain the target cache parameters of the preset cache system includes: performing reinforcement learning on the hotspot access pattern, the hotspot access popularity, and the system operating parameters and the preset cache parameters to obtain a target score; and filtering the preset cache parameters according to the target score to obtain the target cache parameters.

[0011] In some embodiments, after caching the hot service data to the preset cache system according to the target cache parameters, the method further includes: calculating the similarity between the hot service data and the preset service data; clustering the preset service data according to the similarity to obtain service data clusters; and caching the service data clusters to the preset cache system according to the target cache parameters.

[0012] To achieve the above objectives, a second aspect of this application provides a business data caching device, comprising: an acquisition module for acquiring historical access logs of preset business data and system operating parameters of a preset caching system; a log analysis module for performing log analysis on the historical access logs to obtain a predicted access pattern and predicted access popularity of the preset business data; a filtering module for filtering the preset business data according to the predicted access pattern and the predicted access popularity to obtain hot business data; a determination module for determining the hot access pattern of the hot business data according to the predicted access pattern and determining the hot access popularity of the hot business data according to the predicted access popularity; a reinforcement learning module for performing reinforcement learning on the hot access pattern, the hot access popularity, and the system operating parameters to obtain target caching parameters of the preset caching system; and a caching module for caching the hot business data to the preset caching system according to the target caching parameters.

[0013] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.

[0014] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0015] The business data caching method, device, electronic device, and computer-readable storage medium proposed in this application determine a caching strategy based on historical access logs of preset business data and system operating parameters of a preset caching system. To improve the access efficiency of business data, log analysis is performed on historical access logs to obtain predicted access patterns and predicted access popularity of the preset business data. The preset business data is then filtered based on these patterns and popularity to identify hot-spot business data, allowing for advance prediction of this data. To obtain a caching strategy for this hot-spot data, a hot-spot access pattern is determined based on the predicted access pattern, and a hot-spot access popularity is determined based on the predicted access popularity. Reinforcement learning is then performed on the hot-spot access pattern, hot-spot access popularity, and system operating parameters to obtain target caching parameters for the preset caching system. The hot-spot business data is then cached in the preset caching system according to the target caching parameters. By caching this data in advance, the access efficiency of hot-spot business data can be improved. Attached Figure Description

[0016] Figure 1 is a flowchart of a service data caching method provided in an embodiment of this application; Figure 2 is a flowchart of step S120 in Figure 1; Figure 3 is a flowchart of step S220 in Figure 2; Figure 4 is a flowchart of step S340 in Figure 3; Figure 5 is a flowchart of step S130 in Figure 1; Figure 6 is a flowchart of step S150 in Figure 1; Figure 7 is another flowchart of a service data caching method provided in an embodiment of this application; Figure 8 is a schematic diagram of the structure of a service data caching device provided in an embodiment of this application; Figure 9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0020] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

[0021] To address the performance bottlenecks of traditional database architectures when faced with massive requests, business data needs to be cached in storage media with faster read and write speeds. For example, in a fintech scenario, a bank's transaction system receives a large number of order requests. To improve request response efficiency, data such as account balances and transaction permissions are cached in the transaction system's memory based on these order requests. Similarly, in a healthcare scenario, a medical system receives numerous patient requests. To enable doctors to quickly access patients' health records based on these requests, the health records are cached in the medical system's memory.

[0022] In related technologies, a Least Recently Used (LRU) strategy is employed for business data caching. This involves recording the access time of business data and evicting the least recently accessed business data when the cache is full. However, this caching method cannot identify the periodic patterns or sudden warnings of business data, causing data to be prematurely evicted before the periodic recurrence or instantaneous hotspot arrives. This results in cache breakdown, repeated requests to the source, and ultimately, low data access efficiency.

[0023] Based on this, embodiments of this application provide a business data caching method, a business data caching device, an electronic device, and a computer-readable storage medium, aiming to improve the efficiency of business data access.

[0024] The business data caching method, business data caching device, electronic device, and computer-readable storage medium provided in this application are specifically described through the following embodiments. First, the business data caching method in this application is described.

[0025] The business data caching method provided in this application relates to the field of computer technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the business data caching method, but is not limited to the above forms.

[0026] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0027] Figure 1 is an optional flowchart of a business data caching method provided in an embodiment of this application. The method in Figure 1 may include, but is not limited to, steps S110 to S160.

[0028] Step S110: Obtain historical access logs of preset business data and system operating parameters of the preset caching system; Step S120: Perform log analysis on the historical access logs to obtain the predicted access pattern and predicted access popularity of the preset business data; Step S130: Filter the preset business data according to the predicted access pattern and predicted access popularity to obtain hot business data; Step S140: Determine the hot access pattern of the hot business data according to the predicted access pattern, and determine the hot access popularity of the hot business data according to the predicted access popularity; Step S150: Perform reinforcement learning on the hot access pattern, hot access popularity, and system operating parameters to obtain the target caching parameters of the preset caching system; Step S160: Cache the hot business data to the preset caching system according to the target caching parameters.

[0029] Steps S110 to S160 as shown in the embodiments of this application determine the predicted access pattern and predicted access popularity based on historical access logs, and determine the hot business data and target cache parameters of the hot business data based on the predicted access pattern and predicted access popularity, thereby loading the hot business data into the preset cache system in advance, which can improve the data access efficiency of the hot business data.

[0030] In step S110 of some embodiments, the preset business data is the accessible business data. Key information about access requests for the preset business data during historical periods is collected using a log collection tool deployed at the platform gateway layer to obtain historical access logs. The historical access logs include access timestamps, access IP addresses, user unique identifiers, request interface addresses, accessed business data identifiers, data access types (e.g., query, add, modify, delete), request response durations, access results (success, failure, or timeout), access terminal type, and network type. The log collection tool can be Flume, Logstash, etc.

[0031] In a fintech scenario, the default business data is financial business data, which can include financial transaction data, wealth management product details, etc. Historical access logs record access to this financial business data. Similarly, in a healthcare scenario, the default business data is medical business data, which can include patient medical records, imaging reports, drug information, treatment plans, etc. Historical access logs record access to this medical business data.

[0032] To ensure the data quality of historical access logs, preprocessing is performed. This includes data cleaning to remove invalid logs (those with formatting errors, missing fields, failed accesses, or lacking valid data identifiers). Data standardization is also performed on historical access logs, such as converting access timestamps to UTC and uniformly encoding enumerated fields like access terminal type and network type. Log information for the same access request can be correlated with user profile data to supplement user-dimensional information, facilitating subsequent precise analysis.

[0033] The default caching system is a storage medium with high read and write speeds, such as a Redis cache cluster. System operating parameters are obtained by collecting cluster runtime parameters using Redis's built-in INFO command and monitoring tools. These parameters include total cluster memory capacity, used memory capacity, memory utilization, cache hit rate, cache penetration rate, number of expired cache keys and expiration policy, read / write requests per second, average response time, number of connections, master-slave synchronization latency, node CPU utilization, and node disk I / O rate.

[0034] Please refer to Figure 2. In some embodiments, step S120 may include, but is not limited to, steps S210 to S230: Step S210, performing access prediction on historical access logs using an access pattern prediction model to obtain a predicted access pattern; Step S220, extracting features from historical access logs to obtain access features; Step S230, evaluating the popularity of preset business data based on the access features to obtain a predicted access popularity.

[0035] In step S210 of some embodiments, historical access logs are input into an access pattern prediction model to predict access patterns. Predicted access patterns include periodic access patterns, burst access patterns, and trend access patterns. The access pattern prediction model can employ deep learning networks, such as convolutional neural networks and recurrent neural networks. Periodic access patterns refer to access behavior fluctuating regularly within a fixed period. For example, in a fintech scenario, if historical access logs indicate that a user checks their bill amount on a fixed date each month, the predicted access pattern for the bill amount is a periodic access pattern. In a healthcare scenario, if historical access logs indicate that a patient checks their medical records during periodic follow-up visits, the predicted access pattern for the patient's medical records is a periodic access pattern. Burst access patterns refer to a sharp increase in access volume within a short period. For example, in a fintech scenario, when a payment platform experiences a brief malfunction, users attempt to access it again, leading to an abnormal increase in access volume; this access to the payment platform is a burst access pattern. In a healthcare scenario, when a user experiences an unexplained illness, they seek urgent consultation through an online consultation platform; this access to the online consultation platform is a burst access pattern. A trending access pattern refers to a sustained increase in website traffic. For example, in the fintech sector, with the widespread adoption of mobile payments, access to payment platform functions such as QR code payments and money transfers has been steadily rising; this constitutes a trending access pattern. Similarly, in the healthcare sector, with increased health awareness, access to online health checkup report query platforms has gradually increased; this represents a periodic access pattern.

[0036] In the fintech field, each user visit is closely related to a specific point in time and time interval. In the healthcare field, each patient visit is closely tied to treatment plans, examination schedules, and medication cycles, making visit logs highly temporal. Furthermore, a single log entry typically contains multi-dimensional information with complex interrelationships. Considering the strong temporal sequence and multi-feature correlations of visit logs, a hybrid model combining convolutional neural networks and long short-term memory networks can be used as the visit pattern prediction model. The model is divided into a feature extraction layer, a temporal modeling layer, and an output layer. The feature extraction layer uses a one-dimensional convolutional structure to extract hidden local features from the visit logs; the temporal modeling layer uses a bidirectional long short-term memory network structure to capture long-term dependencies in visit behavior; and the output layer is a fully connected layer with a softmax activation function, outputting the predicted visit patterns.

[0037] In step S220 of some embodiments, multi-dimensional feature extraction is performed on the historical access logs to obtain access features. Specifically, time features are extracted from the historical access logs to obtain log time features. Spatial features are extracted from the historical access logs to obtain log spatial features. Content features are extracted from the historical access logs to obtain log content features. The log time features, log spatial features, and log content features are then fused to obtain the access features.

[0038] In step S230 of some embodiments, the access feature includes multiple feature values. A feature weight is determined for each feature value. The feature weight is multiplied by the corresponding feature value to obtain a feature popularity value. The feature popularity values ​​of each feature value are summed to obtain a target popularity value. The target popularity value is then divided into popularity levels to obtain a predicted access popularity. The higher the popularity level, the greater the predicted access popularity.

[0039] Through the above steps S210 to S230, the predicted access pattern and predicted access popularity can be obtained, so as to optimize the data caching strategy based on the predicted access pattern and predicted access popularity.

[0040] Please refer to Figure 3. In some embodiments, step S220 may include, but is not limited to, steps S310 to S340: Step S310, extracting time features from historical access logs to obtain log time features; Step S320, extracting spatial features from historical access logs to obtain log spatial features; Step S330, extracting content features from historical access logs to obtain log content features; Step S340, fusing log time features, log spatial features, and log content features to obtain access features.

[0041] In step S310 of some embodiments, time features are extracted from historical access logs to capture the temporal distribution patterns of access behavior, extracting multi-granularity time features to obtain log time features. Specifically, the timestamps of historical access logs are parsed to extract basic time attributes such as access year, month, and date to obtain basic time features. Statistical time-series features are obtained by statistically analyzing the daily average access frequency, hourly access frequency distribution, weekly access frequency fluctuation coefficient, access percentage during peak access periods, and duration of access for preset business data in the historical access logs. The interval between two consecutive accesses of the same user to the same preset business data is calculated based on the historical access logs, and user access time preferences, such as the concentration of frequently accessed periods, are statistically analyzed to obtain time-related features. The basic time features, statistical time-series features, and time-related features are used as the log time features.

[0042] In step S320 of some embodiments, spatial features are extracted from historical access logs to uncover spatial attribute access patterns and obtain log spatial features. Specifically, the user's geographical location information is obtained by accessing an IP address resolution tool to obtain core spatial features. Based on the historical access logs, the regional distribution of users accessing preset service data, the concentration of regional access frequency, and core regions are statistically analyzed to obtain regional statistical features. The network type and carrier type accessed by users are extracted from the historical access logs, and the access ratio of different network and carrier types is statistically analyzed to obtain network spatial features. The core spatial features, regional statistical features, and network spatial features are used as log spatial features.

[0043] In step S330 of some embodiments, content features are extracted from historical access logs to focus on log content attributes and relationships, thereby obtaining log content features. Specifically, based on the historical access logs, the distribution ratio of access types such as query, add, modify, and delete, the keywords of query-type accesses, and the frequency of keywords are statistically analyzed, and the keywords are converted into numerical features to obtain access behavior features. Access sequences within the same user session are obtained from the historical access logs, and the collaborative access degree between current business data and other data is calculated to obtain access association features. The access behavior features and access association features are used as log content features.

[0044] In step S340 of some embodiments, to fully express multi-dimensional features, feature fusion is performed on log time features, log space features, and log content features to obtain access features. Specifically, the log time features, log space features, and log content features are concatenated to obtain reference features. A first weight for the log time features, a second weight for the log space features, and a third weight for the log content features are calculated based on the reference features. A weighted fusion is then performed based on the first weight, second weight, third weight, log time features, log space features, and log content features to obtain the access features.

[0045] Through the above steps S310 to S340, the log characteristics of the access log can be fully extracted, thereby accurately assessing the access popularity of the preset business data.

[0046] Please refer to Figure 4. In some embodiments, step S340 may include, but is not limited to, steps S410 to S430: Step S410, concatenating the log time feature, log space feature, and log content feature to obtain a reference feature; Step S420, calculating the first weight of the log time feature, the second weight of the log space feature, and the third weight of the log content feature based on the reference feature; Step S430, performing weighted fusion based on the first weight, the second weight, the third weight, the log time feature, the log space feature, and the log content feature to obtain the access feature.

[0047] In step S410 of some embodiments, the log time feature, log space feature, and log content feature are concatenated together to obtain a reference feature.

[0048] In step S420 of some embodiments, the reference feature and key weight are multiplied to obtain a key vector, and the reference feature and value weight are multiplied to obtain a value vector. The query weight is multiplied by the log time feature to obtain a first query vector. Attention is calculated on the first query vector, key vector, and value vector to obtain a first weight. The query weight is multiplied by the log space feature to obtain a second query vector. Attention is calculated on the second query vector, key vector, and value vector to obtain a second weight. The query weight is multiplied by the log content feature to obtain a third query vector. Attention is calculated on the third query vector, key vector, and value vector to obtain a third weight.

[0049] In step S430 of some embodiments, the first weight is multiplied by the log time feature to obtain the first feature. The second weight is multiplied by the log space feature to obtain the second feature. The third weight is multiplied by the log content feature to obtain the third feature. The first feature, the second feature, and the third feature are then summed bit-by-bit to obtain the access feature.

[0050] Steps S410 to S430 above use an attention mechanism to perform weighted feature fusion, which promotes information complementarity and synergistic effect among different features and achieves full expression of access features.

[0051] Please refer to Figure 5. In some embodiments, step S130 may include, but is not limited to, steps S510 to S520: Step S510, filtering preset service data according to the predicted access pattern to obtain initial service data; Step S520, filtering the initial service data according to the predicted access popularity to obtain hot service data.

[0052] In step S510 of some embodiments, in order to enable the preset caching system to effectively deal with periodic access data or burst access data, if the predicted access pattern is a burst access pattern or a periodic access pattern, the preset business data is used as the initial business data.

[0053] In step S520 of some embodiments, if the predicted access popularity is greater than or equal to a preset popularity threshold, it indicates that the initial business data has a high access popularity, and the initial business data is regarded as hot business data. If the predicted access popularity is less than the preset popularity threshold, it indicates that the initial business data has a low access popularity and is not hot data.

[0054] Through the above steps S510 to S520, hot business data can be predicted in advance, solving the problem of low data access efficiency caused by the inability to load business data in a timely manner.

[0055] In step S140 of some embodiments, hot access patterns of hot business data are filtered from the predicted access patterns of preset business data, and hot access popularity of hot business data is filtered from the predicted access popularity of preset business data.

[0056] Please refer to Figure 6. In some embodiments, step S150 may include, but is not limited to, steps S610 to S620: Step S610, performing reinforcement learning on hotspot access patterns, hotspot access popularity, system operating parameters and preset cache parameters to obtain a target score; Step S620, filtering the preset cache parameters according to the target score to obtain target cache parameters.

[0057] In step S610 of some embodiments, a reinforcement learning model is constructed, which may employ a deep Q-network. The reinforcement learning model performs reinforcement learning on hotspot access patterns, hotspot access intensity, system operating parameters, and preset cache parameters to obtain a target score. The target score is the Q-value output by the deep Q-network. It should be noted that the hotspot access patterns, hotspot access intensity, and system operating parameters can be used as states, and the preset cache parameters as actions, thereby learning the optimal action based on reinforcement learning.

[0058] In step S620 of some embodiments, the preset cache parameter with the largest target score is selected as the target cache parameter to obtain the optimal cache strategy.

[0059] By going through the above steps S610 to S620, the optimal caching strategy can be obtained.

[0060] In step S160 of some embodiments, hot-topic business data is cached to a preset cache system according to target cache parameters to improve the access efficiency of hot-topic business data. Target cache parameters are parameters required for caching hot-topic business data, such as cache time and cache priority. For example, in a fintech scenario, to cope with a large number of high-concurrency account balance query requests, account balances can be used as hot-topic business data, and cached to a preset cache system according to target cache parameters, allowing direct reading of account balances from the preset cache system, thus improving the efficiency of balance queries. Similarly, in a healthcare scenario, to cope with a large number of high-concurrency medical record query requests, patient medical records can be used as hot-topic business data, and cached to a preset cache system according to target cache parameters, allowing direct reading of patient medical records from the preset cache system, thus improving the efficiency of patient medical record queries.

[0061] Please refer to Figure 7. In some embodiments, after step S160, the business data caching method may include, but is not limited to, steps S710 to S730: Step S710, calculate the similarity between hot business data and preset business data; Step S720, cluster the preset business data according to the similarity to obtain business data clusters; Step S730, cache the business data clusters to the preset caching system according to the target caching parameters.

[0062] In step S710 of some embodiments, features can be extracted from both hot-spot business data and preset business data using a large language model to obtain first data features of the hot-spot business data and second data features of the preset business data. The similarity between the first data features and the second data features is then calculated. The greater the similarity, the more similar the hot-spot business data and the preset business data are.

[0063] In step S720 of some embodiments, if the similarity is greater than or equal to a preset similarity threshold, it indicates that the preset business data and the hot business data are relatively similar. In this case, the preset business data with a similarity greater than the preset similarity threshold are clustered into one category to obtain a business data cluster. If the similarity is less than the preset similarity threshold, it indicates that the preset business data and the hot business data are significantly different.

[0064] Clustering algorithms such as K-means, hierarchical clustering, or DBSCAN can also be used to cluster the preset business data and hot business data, and the preset business data that are clustered with the hot business data are taken as the business data cluster.

[0065] In step S730 of some embodiments, if the hot-spot business data and the preset business data are similar, and the preset business data is frequently accessed when the hot-spot business data is frequently accessed, then the same data caching strategy as the hot-spot business data can be used to cache the business data cluster to the preset caching system according to the target caching parameters. Taking a fintech scenario as an example, account asset overview and real-time transaction records are closely related. When users view the account asset overview, they will further view the transaction records to verify fund changes. By setting the same caching strategy for the account asset overview and real-time transaction records, the access efficiency of both can be improved simultaneously. Taking a healthcare scenario as an example, patient medical records and medical insurance reimbursement information are closely related. When patient medical records are accessed frequently, medical insurance reimbursement information will also be accessed frequently. By setting the same caching strategy for patient medical records and medical insurance reimbursement information, the access efficiency of both can be improved simultaneously.

[0066] Through steps S710 to S730 above, the data caching strategy for business data similar to hot business data can be quickly determined, thereby improving the access efficiency of the business data.

[0067] Referring to Figure 8, this application embodiment also provides a business data caching device that can implement the above-described business data caching method. The business data caching device includes: an acquisition module 810, used to acquire historical access logs of preset business data and system operating parameters of a preset caching system; a log analysis module 820, used to perform log analysis on the historical access logs to obtain the predicted access pattern and predicted access popularity of the preset business data; a filtering module 830, used to filter the preset business data according to the predicted access pattern and predicted access popularity to obtain hot business data; a determination module 840, used to determine the hot access pattern of the hot business data according to the predicted access pattern, and determine the hot access popularity of the hot business data according to the predicted access popularity; a reinforcement learning module 850, used to perform reinforcement learning on the hot access pattern, hot access popularity and system operating parameters to obtain the target caching parameters of the preset caching system; and a caching module 860, used to cache the hot business data to the preset caching system according to the target caching parameters.

[0068] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned business data caching method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0069] Please refer to Figure 9, which illustrates the hardware structure of an electronic device according to another embodiment. The electronic device includes: a processor 910, which can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, for executing related programs to implement the technical solutions provided in the embodiments of this application; and a memory 920, which can be implemented using a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM), etc. The memory 920 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 920 and is called and executed by the processor 910 to implement the business data caching method of the embodiments of this application. The input / output interface 930 is used to implement information input and output. The communication interface 940 is used to realize communication interaction between this device and other devices. Communication can be realized through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, WIFI, Bluetooth, etc.). The bus 950 transmits information between the various components of the device (such as the processor 910, memory 920, input / output interface 930 and communication interface 940). The processor 910, memory 920, input / output interface 930 and communication interface 940 realize communication connection between each other within the device through the bus 950.

[0070] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described business data caching method.

[0071] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0072] The business data caching method, business data caching device, electronic device, and computer storage medium provided in this application determine the predicted access pattern and predicted access popularity based on historical access logs, and determine the hot business data and target caching parameters of the hot business data based on the predicted access pattern and predicted access popularity, thereby loading the hot business data into the preset caching system in advance, which can improve the data access efficiency of the hot business data.

[0073] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0074] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0075] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0076] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0077] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0078] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0080] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0081] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0082] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0083] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A business data caching method, characterized in that, The method includes: acquiring historical access logs of preset business data and system operating parameters of a preset caching system; performing log analysis on the historical access logs to obtain predicted access patterns and predicted access popularity of the preset business data; filtering the preset business data according to the predicted access patterns and predicted access popularity to obtain hot-spot business data; determining the hot-spot access patterns of the hot-spot business data according to the predicted access patterns, and determining the hot-spot access popularity of the hot-spot business data according to the predicted access popularity; performing reinforcement learning on the hot-spot access patterns, the hot-spot access popularity, and the system operating parameters to obtain target caching parameters of the preset caching system; and caching the hot-spot business data to the preset caching system according to the target caching parameters.

2. The method according to claim 1, characterized in that, The step of performing log analysis on the historical access logs to obtain the predicted access pattern and predicted access popularity of the preset business data includes: performing access prediction on the historical access logs using an access pattern prediction model to obtain the predicted access pattern; extracting features from the historical access logs to obtain access features; and evaluating the popularity of the preset business data based on the access features to obtain the predicted access popularity.

3. The method according to claim 2, characterized in that, The step of extracting features from the historical access logs to obtain access features includes: extracting time features from the historical access logs to obtain log time features; extracting spatial features from the historical access logs to obtain log spatial features; extracting content features from the historical access logs to obtain log content features; and fusing the log time features, the log spatial features, and the log content features to obtain the access features.

4. The method according to claim 3, characterized in that, The step of fusing the log time feature, the log space feature, and the log content feature to obtain the access feature includes: concatenating the log time feature, the log space feature, and the log content feature to obtain a reference feature; calculating a first weight for the log time feature, a second weight for the log space feature, and a third weight for the log content feature based on the reference feature; and performing a weighted fusion based on the first weight, the second weight, the third weight, the log time feature, the log space feature, and the log content feature to obtain the access feature.

5. The method according to claim 1, characterized in that, The step of filtering the preset business data according to the predicted access pattern and the predicted access popularity to obtain hot business data includes: filtering the preset business data according to the predicted access pattern to obtain initial business data; and filtering the initial business data according to the predicted access popularity to obtain the hot business data.

6. The method according to any one of claims 1 to 5, characterized in that, The step of performing reinforcement learning on the hotspot access pattern, the hotspot access popularity, and the system operating parameters to obtain the target cache parameters of the preset cache system includes: performing reinforcement learning on the hotspot access pattern, the hotspot access popularity, the system operating parameters, and the preset cache parameters to obtain a target score; and filtering the preset cache parameters according to the target score to obtain the target cache parameters.

7. The method according to any one of claims 1 to 5, characterized in that, After caching the hot service data to the preset cache system according to the target cache parameters, the method further includes: calculating the similarity between the hot service data and the preset service data; clustering the preset service data according to the similarity to obtain service data clusters; and caching the service data clusters to the preset cache system according to the target cache parameters.

8. A business data caching device, characterized in that, The device includes: an acquisition module for acquiring historical access logs of preset business data and system operating parameters of a preset caching system; a log analysis module for performing log analysis on the historical access logs to obtain predicted access patterns and predicted access popularity of the preset business data; a filtering module for filtering the preset business data according to the predicted access patterns and predicted access popularity to obtain hot business data; a determination module for determining the hot access patterns of the hot business data according to the predicted access patterns and determining the hot access popularity of the hot business data according to the predicted access popularity; a reinforcement learning module for performing reinforcement learning on the hot access patterns, the hot access popularity, and the system operating parameters to obtain target caching parameters of the preset caching system; and a caching module for caching the hot business data to the preset caching system according to the target caching parameters.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.