Data caching method and device, computer equipment, storage medium and program product

By analyzing users' historical query data to generate precise data caching strategies and preloading potentially queried data, the problem of low data query efficiency in online banking systems has been solved, achieving rapid response and resource optimization.

CN121786080APending Publication Date: 2026-04-03SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing online banking system caching solutions cannot meet the diverse data query needs of large enterprise users, resulting in low efficiency when querying other business data for the first time, which affects the normal operation of business.

Method used

By analyzing users' historical query data, we can generate precise data caching strategies, preload data that users may query, and use query characteristics to formulate caching strategies to improve query response speed.

Benefits of technology

It improves the response speed of data queries, reduces unnecessary resource consumption, enhances cache hit rate, and meets the diverse query needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786080A_ABST
    Figure CN121786080A_ABST
Patent Text Reader

Abstract

The invention relates to a data caching method and device, computer equipment, a storage medium and a program product. The method comprises the following steps: for each user, analyzing historical query data of the user, and obtaining query characteristics of the user for a target service; generating a data caching strategy of the target service based on the query feature; and preloading the service data of the target service according to the data caching strategy to obtain preloaded data, and caching the preloaded data. By adopting the method, the query behavior of the user can be analyzed by utilizing the historical query data of the ss user so as to determine the query habit and rule of the user and formulate the data caching strategy, the service data is preloaded and cached according to the caching strategy, the resources are concentrated on the data which can be queried by the user, the cache hit rate is increased, and the user experience is improved. And unnecessary resource consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology, and in particular to a data caching method, apparatus, computer equipment, storage medium, and program product. Background Technology

[0002] In an era of rapid development in fintech, corporate online banking systems play a crucial role in providing diversified data query services to corporate clients. Functions such as account inquiry, transaction history viewing, electronic receipt retrieval, and investment and wealth management information browsing greatly facilitate corporate financial management. This is especially true for large enterprises, whose business scale is enormous, their data volume is massive, and their query needs are characterized by high frequency, complexity, and periodicity.

[0003] In related technologies, most corporate online banking systems adopt an on-demand caching scheme to meet the data query needs of corporate users. This caching scheme only caches the query results corresponding to a certain business after the user performs the first query for that business, so that the query results can be retrieved from the cache when querying the same business again, thereby improving query efficiency.

[0004] However, if a user subsequently needs to query data related to other business operations, the query still needs to be performed on the database, impacting the efficiency of the initial query for other business operations. Therefore, the current caching solution cannot meet the query requirements. Summary of the Invention

[0005] Therefore, it is necessary to provide a data caching method, apparatus, computer device, computer-readable storage medium, and computer program product that can accurately predict users' data query needs and preload relevant data according to those needs, thereby improving query response speed, in order to address the aforementioned technical problems.

[0006] Firstly, this application provides a data caching method, including:

[0007] For each user, analyze the user's historical query data to obtain the user's query characteristics for the target business;

[0008] Generate data caching strategies for target businesses based on query characteristics;

[0009] Based on the data caching strategy, the business data of the target business is preloaded, the preloaded data is obtained, and the preloaded data is cached.

[0010] In one embodiment, the user's historical query data is analyzed to obtain the user's query characteristics for the target business, including:

[0011] For historical query data of the target business across multiple time periods, obtain the correspondence between the data type and query frequency of the historical query data in each time period;

[0012] Based on the correspondence between data types and query frequencies in different time periods, the target query frequency is determined; the target query frequency includes query frequencies that are greater than the preset frequency.

[0013] The query characteristics are determined as the target query frequency, the data type corresponding to the target query frequency, and the time period corresponding to the target query frequency.

[0014] In one embodiment, a data caching strategy is generated based on query features, including:

[0015] Based on query characteristics, determine the data query requirements for the time period corresponding to the target query frequency;

[0016] Data caching strategies are generated based on data query requirements.

[0017] In one embodiment, the data caching strategy includes caching time and caching parameters; preloading business data of the target business according to the data caching strategy, obtaining preloaded data, and caching the preloaded data, including:

[0018] If the current time and the cache time are the same, determine the business data corresponding to the target query frequency in the business data of the target business;

[0019] The business data corresponding to the target query frequency is marked using cache parameters to obtain preloaded data.

[0020] In one embodiment, the method further includes:

[0021] Retrieve new event information from users and update the preloaded data based on the new event information to obtain new preloaded data.

[0022] In one embodiment, the preloaded data is updated based on the newly added event information to obtain new preloaded data, including:

[0023] The newly added event information is parsed to obtain event feature information, which includes the target user, the business to be changed, and the changed data.

[0024] When the target user and the user are the same, and the business to be changed is the same as the target business, the cached preloaded data is updated according to the changed data to obtain new preloaded data.

[0025] Secondly, this application also provides a data caching device, comprising:

[0026] The strategy generation module is used to generate data caching strategies for target businesses based on query characteristics;

[0027] The preloading processing module is used to preload the business data of the target business according to the data caching strategy, obtain the preloaded data, and cache the preloaded data.

[0028] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0029] For each user, analyze the user's historical query data to obtain the user's query characteristics for the target business;

[0030] Generate data caching strategies for target businesses based on query characteristics;

[0031] Based on the data caching strategy, the business data of the target business is preloaded, the preloaded data is obtained, and the preloaded data is cached.

[0032] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0033] For each user, analyze the user's historical query data to obtain the user's query characteristics for the target business;

[0034] Generate data caching strategies for target businesses based on query characteristics;

[0035] Based on the data caching strategy, the business data of the target business is preloaded, the preloaded data is obtained, and the preloaded data is cached.

[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0037] For each user, analyze the user's historical query data to obtain the user's query characteristics for the target business;

[0038] Generate data caching strategies for target businesses based on query characteristics;

[0039] Based on the data caching strategy, the business data of the target business is preloaded, the preloaded data is obtained, and the preloaded data is cached.

[0040] The aforementioned data caching methods, apparatuses, computer devices, computer-readable storage media, and computer program products analyze user query behavior using historical query data to determine user query habits and patterns, i.e., query characteristics. Then, based on these query characteristics, a data caching strategy is developed for the user, enabling them to quickly retrieve data within their preferred query timeframes, thereby improving query response speed. Subsequently, business data is preloaded and cached according to the caching strategy, concentrating resources on data the user is likely to query, improving cache hit rate, and reducing unnecessary resource consumption. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a diagram illustrating the application environment of a data caching method in one embodiment.

[0043] Figure 2 This is a flowchart illustrating a data caching method in one embodiment;

[0044] Figure 3 This is a flowchart illustrating the process of determining user query characteristics for a target service in one embodiment.

[0045] Figure 4 This is a flowchart illustrating the process of generating a data caching strategy in one embodiment;

[0046] Figure 5 This is a flowchart illustrating the preloading operation in one embodiment;

[0047] Figure 6 This is a schematic diagram of the process for updating preloaded data in one embodiment;

[0048] Figure 7 This is a schematic diagram of the process for updating preloaded data in another embodiment;

[0049] Figure 8 This is a structural block diagram of a data caching device in one embodiment;

[0050] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0051] 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.

[0052] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0053] In related technologies, corporate online banking systems mostly adopt on-demand caching schemes to meet the data query needs of corporate users. This scheme operates by caching the query results only after a user performs an initial query for a particular service. This allows subsequent queries to retrieve the results directly from the cache, improving query efficiency to some extent. However, this scheme has significant limitations. If a user subsequently needs to query data related to other services, the system still needs to query the database. Database queries often involve complex procedures, consuming more time and system resources, which undoubtedly affects the efficiency of initial queries for other services. Furthermore, corporate users have diverse business needs, frequently involving data queries across different services. The current scheme, which only caches results from already queried services, clearly cannot meet their diverse query requirements. In real-world business scenarios, users need to quickly access various business data to support decision-making, and inefficient initial queries can cause significant inconvenience and even disrupt normal business operations.

[0054] Based on this, embodiments of this application provide a data caching method, apparatus, computer device, computer-readable storage medium, and computer program product, which can accurately predict users' data query needs and preload relevant data based on these data query needs, so that users can quickly obtain the required data during subsequent queries, greatly improving query response speed.

[0055] The data caching method provided in this application can be executed by a single electronic device with computing power, or by a system composed of multiple electronic devices. For example, the data caching method provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located on a cloud or other network server. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, and tablets. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.

[0056] In one embodiment, such as Figure 2 As shown, a container startup method is provided, which includes the following steps:

[0057] Step 202: For each user, analyze the user's historical query data to obtain the user's query characteristics for the target business.

[0058] In such Figure 1 In the application environment shown, to make data caching methods serve users more efficiently, it is necessary to deeply understand user behavior patterns. Different users have different query needs for the target business, and these differences are contained in their historical query data.

[0059] For example, historical query data from different users is obtained. This historical query data includes, but is not limited to, multi-dimensional information such as query time, query keywords, and query business type. Erroneous query data is removed to obtain query data that each user can use for analysis. Then, this analytical query data is analyzed, such as analyzing each user's query frequency; or extracting keywords from the query data, such as field names and their uses. This allows us to determine each user's query habits and active query periods for different businesses, thereby constructing the query characteristics for each business, i.e., the user's query characteristics for the target business.

[0060] For example, if Customer A initiated a "transaction history" query every Monday morning between 9 and 10 a.m. for the past four weeks, it would be analyzed as a "weekly recurring query on Monday mornings". Or, if Customer B's query volume accounts for more than 80% of the total query volume in the last three days of each month, and the query type is "statement statement", it would be analyzed as a "month-end recurring query".

[0061] In some possible embodiments, the user's historical query data includes detailed query logs, which include user ID, user identifier, query time, query data type (such as transaction history and account balance), query time range (such as querying from October 1st to October 31st, 2023), query conditions (such as transaction amount greater than 1 million), etc. The specific log information is shown in Table 1 below:

[0062] Table 1

[0063]

[0064] The hash value of the query SQL (Structured Query Language) is used to identify identical queries.

[0065] Step 204: Generate a data caching strategy for the target business based on query features.

[0066] User query characteristics for a target business reflect their needs, preferences, and behavioral patterns in that business. These characteristics can be used to predict future query trends. Therefore, to ensure data caching better aligns with actual user needs, a matching caching strategy must be developed based on these query characteristics.

[0067] For example, the query characteristics targeting the target business are analyzed to identify patterns in user queries, such as frequently queried business data, periodic information, and query frequency. Then, based on these patterns, the possible query times and data types that users might query within those times are determined. A caching strategy is then implemented to retrieve the corresponding business data from the business database before the likely query times and cache this data.

[0068] Step 206: Preload the business data of the target business according to the data caching strategy, obtain the preloaded data, and cache the preloaded data.

[0069] For example, based on the established data caching strategy, the target business data that needs to be preloaded is clearly defined, as well as when this business data needs to be preloaded and how to cache the preloaded business data. Then, according to the defined relevant information, such as business data, preload time, and cache path, the preload operation is initiated, thereby caching the preloaded data in a cache space, such as memory.

[0070] In some possible implementations, the data of the same business process in the historical query data is statistically analyzed. For example, if the same operator queries the "account balance" within 5 minutes after the "payment instruction system" generates a record with a status of "success", it can be analyzed and determined to be an event-driven pattern of "querying balance after payment".

[0071] Then, in actual operation, if a customer completes a payment, the relevant data analysis based on the event-driven pattern will determine whether the customer frequently checks their balance after payment. If so, the customer's balance data needs to be obtained and cached in memory so that the customer can check their balance after a certain period of time.

[0072] The aforementioned data caching method analyzes users' query behavior using historical query data to determine their query habits and patterns, i.e., query characteristics. Then, based on these query characteristics, a data caching strategy is developed to enable users to quickly retrieve data within their preferred query time periods, thereby improving query response speed. Subsequently, business data is preloaded and cached according to the caching strategy, concentrating resources on data that users are likely to query, improving cache hit rate, and reducing unnecessary resource consumption.

[0073] To ensure the accuracy of analyzing users' historical query data and improve the efficiency of subsequent data caching strategies based on the analyzed query features in finding and caching business data, this paper explains how to analyze users' historical query data for target businesses to obtain more accurate query features, as shown in the following examples.

[0074] In one embodiment, such as Figure 3 As shown, analyzing users' historical query data reveals the query characteristics of users targeting specific business needs, including:

[0075] Step 302: For historical query data of the target business in multiple time periods, obtain the correspondence between the data type and query frequency of the historical query data in each time period.

[0076] For example, historical query data for the target business is divided according to different time granularities, such as by time period, by day, by week, or by month. After dividing for different time granularities, the historical query data for that time granularity is further divided according to data type, such as customer information, product details, and transaction records. Then, statistics are performed based on the divided data types to determine the query frequency of different data types within that time granularity. For example, transaction records are queried more frequently during weekday working hours, while account balances are queried more frequently on weekends. Finally, based on the determined query frequencies of different data types within that time granularity, a correspondence between the data types and query frequencies of historical query data for each time period is constructed.

[0077] Step 304: Determine the target query frequency based on the correspondence between data types and query frequencies in each time period; the target query frequency includes query frequencies that are greater than the preset frequency.

[0078] For example, by conducting detailed analysis of the historical query data of the target business over multiple time periods, the query frequency of various data types in different time periods can be clearly identified. Based on this, frequency values ​​can be preset, i.e., preset frequencies.

[0079] Based on the correspondence between data types and query frequencies in each time period, the query frequency of each data type is compared with the preset frequency for each time period to determine a query frequency that is not lower than the preset frequency.

[0080] For example, count the number of times the database corresponding to each data type is accessed within a week, i.e., query frequency. Set an access threshold for a certain data type, such as 20 times. For instance, a bank presets the query frequency for information on a certain type of wealth management product to be 100 times per day. However, in the three days before the product's launch, the query frequency for that product information reached 300 times per day. This 300-times-per-day query frequency is then the target query frequency.

[0081] Step 306: Determine the query features as the target query frequency, the data type corresponding to the target query frequency, and the time period corresponding to the target query frequency.

[0082] For example, the target query frequency is determined based on the correspondence between data types and query frequencies across different time periods, reflecting situations where the query frequency exceeds a preset frequency. Data types are determined based on the target query frequency, such as stock market data in financial transactions. Furthermore, the time periods when the data type corresponding to the target query frequency is frequently queried can also be determined based on the target query frequency, i.e., the time period corresponding to the target query frequency.

[0083] For example, by analyzing a user's historical query data, it is determined that the customer has been querying "transaction statement from the 1st to the 27th of the month" every time after 4 pm on the 28th of the month in the past 6 months. Then the target query frequency is once a month, the data type corresponding to the target query frequency is transaction statement, and the time period corresponding to the target query frequency is the 28th of each month.

[0084] In this embodiment, by analyzing historical query data from multiple time periods of the target business, the correspondence between data types and query frequencies is obtained. This allows for the determination of the query popularity of various data types within different time periods, which helps analyze users' demand preferences for different data types during different time periods. Furthermore, by combining this with preset frequencies, resources are allocated to data types with frequencies no lower than the preset frequency, thereby improving resource utilization.

[0085] In one embodiment, such as Figure 4 As shown, the data caching strategy based on query features includes:

[0086] Step 402: Based on the query characteristics, determine the data query requirements for the time period corresponding to the target query frequency.

[0087] For example, the query features clearly define the target query frequency, the data type corresponding to the target query frequency, and the time period corresponding to the target query frequency. The target query frequency reflects the popularity of the data type corresponding to the target query frequency, while the time period corresponding to the target query frequency reflects the temporal distribution pattern of that data type. Combining this with the data type corresponding to the target query frequency allows for further refinement of data query requirements, specifically querying a particular type of data within a certain time period. For instance, around the monthly payday, users query data such as salary deposits and account balances more frequently than a preset frequency. Here, the query frequency of salary deposits and account balances is the target query frequency, the time period around the monthly payday is the time period corresponding to the target query frequency, and the data type of salary deposits and account balances is the data type corresponding to the target query frequency. Therefore, the data query requirement can be determined as querying user monetary information within a few days around the monthly payday.

[0088] Step 404: Generate a data caching strategy based on data query requirements.

[0089] For example, based on predicted data query needs, which involve querying a specific type of data within a certain time period, such as querying user statement information and repayment amounts five days before the monthly credit card repayment due date, a corresponding data caching strategy can be formulated to address this data query need. This strategy involves retrieving and caching a specific type of data from a point preceding a certain point in time, such as retrieving and caching user statement information and repayment amounts ten days before the monthly credit card repayment due date.

[0090] In some possible implementations, the data caching strategies that can be identified include periodic caching strategies, event-driven caching strategies, and advanced query caching strategies.

[0091] For periodic caching strategies, queries are determined by a fixed time pattern, such as users routinely querying last week's transaction data every Monday. Therefore, by identifying this periodic pattern, preloading and caching operations are automatically triggered every Monday at 8:00 AM to preload the transaction data from Monday to Sunday of the previous week into the cache. The cache validity period can be set to 24 hours.

[0092] For event-driven caching strategies, there is a need for immediate queries triggered by specific business events, such as a user checking their account balance immediately after completing a payment. Therefore, by monitoring related events such as "payment successful," the cache is automatically updated after the event occurs, loading the current balance information into the cache, and setting a cache validity period (e.g., 5 minutes).

[0093] For advanced query caching strategies, which have high requirements for timeliness, such as continuous monitoring of large transactions, the system adopts a "persistent caching" mechanism, keeping all transaction data for the day permanently in the cache and updating it in real time through an event-driven approach. That is, the cache is refreshed synchronously as soon as a new transaction occurs.

[0094] In this embodiment, based on query characteristics, the actual data needs of users in a specific time period can be accurately grasped, and then a data caching strategy corresponding to the actual needs can be generated, making the caching strategy more in line with the actual usage situation, caching the data that users may frequently query in advance, thereby shortening the query response time and reducing the query pressure on the database.

[0095] In one embodiment, such as Figure 5 As shown, the data caching strategy includes cache time and cache parameters; according to the data caching strategy, the business data of the target business is preloaded, the preloaded data is obtained, and the preloaded data is cached, including:

[0096] Step 502: If the current time and the cache time are consistent, determine the business data corresponding to the target query frequency in the business data of the target business.

[0097] For example, if the current time matches the cache time, it means that data caching can be performed at this time. Based on the cache time, determine the business data that can be cached at that time, that is, determine the business data of the target business that may be queried in the next moment after the cache time. Specifically: predict which target business data is most likely to be queried in the next moment after the cache time, and then prepare this potentially queried data in advance at that time, i.e., during the cache time.

[0098] For example, taking credit card business as an example, assuming the billing date for bank credit cards is the 5th of each month, analysis can determine that the frequency of credit card bill information queries on the billing date far exceeds the preset frequency. Therefore, data related to credit card bill information, such as transaction details, repayment amount, and repayment date, constitutes the business data corresponding to the target query frequency. The data caching strategy is set to cache on the 3rd of each month, meaning that data related to credit card bill information is prepared in advance and cached in memory on the 3rd of each month.

[0099] Step 504: Use cache parameters to mark the business data corresponding to the target query frequency to obtain preloaded data.

[0100] For example, cache parameters are used to mark business data corresponding to a target query frequency in order to improve the speed of cache data retrieval. In some possible embodiments, the cache parameters include, but are not limited to, cache key, cache duration, and cache priority.

[0101] A cache key is a unique cache identifier generated based on predicted query conditions. For example, if it is predicted that customers will query their salary deposit status on the monthly salary payment date, a cache key can be generated based on "salary deposit - payment date" to mark this type of business data.

[0102] The cache duration is set according to the data update frequency and query mode. For example, if the daily balance is updated frequently, the cache duration can be set to 5 minutes; if the historical transaction volume is relatively stable, the cache duration can be set to 24 hours.

[0103] Cache priority reflects data of different importance. For example, account balance data related to customer fund security has a high priority, while business introduction data for ordinary business has a low priority. Therefore, low-priority data can be evicted first when memory is insufficient.

[0104] By tagging data using cache parameters, preloaded data can be obtained. During a query, the required business data can be quickly retrieved based on data identifiers in the cache parameters, such as the cache key. Simultaneously, cached data in memory can be promptly cleaned up based on parameters such as cache duration and cache priority to prevent memory exhaustion and maintain query efficiency.

[0105] In this embodiment, the business data that may be queried at the next moment is determined within the cache time, and then the business data is marked by the cache parameters to obtain preloaded data, so that when the user initiates a query, it can be quickly responded to directly from the preloaded data, significantly shortening the query waiting time.

[0106] In one embodiment, the method further includes:

[0107] Retrieve new event information from users and update the preloaded data based on the new event information to obtain new preloaded data.

[0108] For example, when a user interacts with the system, various new events are generated, such as a new transaction. The new event information of the new event is then analyzed to determine whether the business data contained in the new event information is related to the preloaded data. If so, the preloaded data needs to be updated according to the characteristics of the business data; otherwise, the preloaded data does not need to be updated.

[0109] In this embodiment, by analyzing the newly added event information to determine whether the business data contained in the newly added event information is related to the preloaded data, the preloaded data can be updated in a timely manner to improve the timeliness and accuracy of the preloaded data.

[0110] In one embodiment, such as Figure 6As shown, the preloaded data is updated based on the newly added event information to obtain new preloaded data, including:

[0111] Step 602: Analyze the newly added event information to obtain event feature information; the event feature information includes the target user, the business to be changed, and the changed data.

[0112] For example, by parsing newly added event information, the event characteristic information of the newly added event is determined. Specifically, it is necessary to identify the subject of the event by searching for subject information such as login information or user identifiers from the newly added event information, that is, to identify the target user. Then, business-related data is extracted from the newly added event information and analyzed to determine the data type of the business data.

[0113] For example, taking a customer's purchase of a wealth management product as an example, after the customer completes the purchase operation in the bank's system, the underlying business database records the purchase operation and related data, and sends the relevant data as an event message to the message queue. Upon receiving the message, the message queue parses it, specifically:

[0114] Identify the target users, namely customers who purchase financial products;

[0115] The business to be changed includes the customer's account balance and the wealth management products they hold;

[0116] The changed data includes the amount paid by the customer for purchasing wealth management products, the quantity of wealth management products, and their types.

[0117] Step 604: If the target user and the user are the same, and the business to be changed is the same as the target business, update the cached preloaded data according to the changed data to obtain new preloaded data.

[0118] For example, the event characteristic information is compared and analyzed with the preloaded data to determine whether the preloaded data contains the identifier of the target user and whether it contains the business type corresponding to the business to be changed. For example, take customer A's account deposit business as an example. If customer A makes a deposit of 1,000 yuan at the bank, then the target user is determined to be customer A, the business to be changed is the account deposit balance, and the data to be changed is the deposited 1,000 yuan.

[0119] If the target user is the same as the user and the business to be changed is the same as the target business, then the preloaded data is updated based on the changed data. The update includes adding, reducing, and deleting.

[0120] If either the user identifier or the business logic is different, then there is no need to update the preloaded data.

[0121] In this embodiment, the target user, the service to be changed, and the changed data are identified based on the newly added event information, providing a reference for updating the preloaded data. Furthermore, when the target user is the same as the current user and the service to be changed is the same as the target service, updating the cached preloaded data based on the changed data ensures the real-time performance and accuracy of the data.

[0122] In one embodiment, such as Figure 7 As shown, the method also includes:

[0123] Step 702: Obtain the user query request and parse the user query request to obtain request feature information; the request feature information includes the target query user, the target query business, and the data query conditions.

[0124] For example, when a user initiates a query request, the system receives the request and begins parsing it. Based on the account information or device information in the query request, the system identifies the user who needs to query data, i.e., the target user. Then, the system performs business type analysis on the information contained in the query request to clarify the business type to which the user needs to query data, i.e., the target query business. Simultaneously, it performs keyword extraction and other operations on the information in the query request to determine the data query conditions, such as the time period and the numerical range to be queried.

[0125] Step 704: If the target query user is the same as the user and the target query business is the same as the target business, filter the target query data that matches the data query conditions from the preloaded data.

[0126] For example, the target query user is matched with each user in the preloaded data to determine if any user in the preloaded data is the same as the target query user. Furthermore, the target query business is matched with each business in the preloaded data to determine if any business in the preloaded data is the same as the target query business.

[0127] When there is a target user and a target query business, the system extracts data that meets the query conditions from the pre-loaded data and uses it as the target query data, based on data query conditions such as the query time range and specific query conditions (such as the transaction amount range). For example, if a user wants to query transaction records from October 1st to October 31st, 2023, with a transaction amount greater than 1 million, the system will filter out data that meets the time range and amount conditions from the pre-loaded transaction record data and use it as the target query data.

[0128] If neither the target user nor the target query business exists in the preloaded data, then data matching the request characteristics needs to be extracted from the underlying database.

[0129] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0130] Based on the same inventive concept, this application also provides a data caching device for implementing the data caching method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more data caching device embodiments provided below can be found in the limitations of the data caching method described above, and will not be repeated here.

[0131] In one exemplary embodiment, such as Figure 8 As shown, a data caching device is provided, including: a data analysis module 802, a strategy generation module 804, and a preloading processing module 806, wherein:

[0132] The data analysis module 802 is used to analyze the historical query data of each user to obtain the user's query characteristics for the target business.

[0133] The strategy generation module 804 is used to generate data caching strategies for target businesses based on query characteristics.

[0134] The preload processing module 806 is used to preload the business data of the target business according to the data caching strategy, obtain the preloaded data, and cache the preloaded data.

[0135] In one embodiment, the data analysis unit is used to obtain the correspondence between the data types and query frequencies of historical query data for multiple time periods of the target business; determine the target query frequency based on the correspondence between the data types and query frequencies of each time period; the target query frequency includes query frequencies that are greater than a preset frequency; and determine the query characteristics as the target query frequency, the data type corresponding to the target query frequency, and the time period corresponding to the target query frequency.

[0136] In one embodiment, the strategy generation unit is used to determine the data query requirements for the time period corresponding to the target query frequency based on query characteristics; and to generate a data caching strategy based on the data query requirements.

[0137] In one embodiment, the preloading processing unit is used to determine the business data corresponding to the target query frequency in the business data of the target business when the current time is consistent with the cache time; and to mark the business data corresponding to the target query frequency using cache parameters to obtain preloaded data.

[0138] In one embodiment, the preloading processing unit is further configured to acquire new event information from the user and update the preloaded data based on the new event information to obtain new preloaded data.

[0139] In one embodiment, the preloading processing unit is further configured to parse the newly added event information to obtain event feature information; the event feature information includes the target user, the service to be changed, and the changed data; if the target user is the same as the user and the service to be changed is the same as the target service, the cached preloaded data is updated according to the changed data to obtain new preloaded data.

[0140] In one embodiment, a data caching module is used to acquire user query requests and parse them to obtain request feature information. The request feature information includes the target query user, the target query business, and the data query conditions. If the target query user is the same as the user and the target query business is the same as the target business, the module filters the target query data that matches the data query conditions from the preloaded data.

[0141] Each module in the aforementioned data caching device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0142] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores historical query data, preloaded data, business data, and new event information. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data caching method.

[0143] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0144] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0145] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0146] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0148] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0149] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0150] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data caching method, characterized in that, The method includes: For each user, analyze the user's historical query data to obtain the user's query characteristics for the target business; Generate a data caching strategy for the target business based on the query characteristics; According to the data caching strategy, the business data of the target business is preloaded to obtain the preloaded data, and the preloaded data is cached.

2. The method according to claim 1, characterized in that, The analysis of the user's historical query data to obtain the user's query characteristics for the target business includes: For the target business, obtain the correspondence between the data type and query frequency of the historical query data in each time period; Based on the correspondence between the data types and query frequencies of each time period, a target query frequency is determined; the target query frequency includes query frequencies that are greater than a preset frequency. The query features are determined to be the target query frequency, the data type corresponding to the target query frequency, and the time period corresponding to the target query frequency.

3. The method according to claim 2, characterized in that, The data caching strategy generated based on the query features includes: Based on the query characteristics, determine the data query requirements for the time period corresponding to the target query frequency; A data caching strategy is generated based on the aforementioned data query requirements.

4. The method according to claim 1, characterized in that, The data caching strategy includes caching time and caching parameters; the step of preloading the business data of the target service according to the data caching strategy, obtaining preloaded data, and caching the preloaded data includes: If the current time and the cache time are consistent, determine the business data corresponding to the target query frequency in the business data of the target business; The business data corresponding to the target query frequency is marked using the cache parameters to obtain the preloaded data.

5. The method according to claim 1, characterized in that, The method further includes: Obtain the user's new event information, and update the preloaded data based on the new event information to obtain new preloaded data.

6. The method according to claim 5, characterized in that, The step of updating the preloaded data based on the newly added event information to obtain new preloaded data includes: The newly added event information is parsed to obtain event feature information; the event feature information includes the target user, the service to be changed, and the changed data. If the target user is the same as the user and the service to be changed is the same as the target service, the cached preloaded data is updated according to the change data to obtain new preloaded data.

7. A data caching device, characterized in that, The device includes: The data analysis module is used to analyze the historical query data of each user to obtain the user's query characteristics for the target business. The strategy generation module is used to generate a data caching strategy for the target business based on the query features; The preloading processing module is used to preload the business data of the target business according to the data caching strategy, obtain the preloaded data, and cache the preloaded data.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.