Methods, apparatus, computer equipment and storage media for caching business data
By pre-caching frequently queried business data in the data service process, the problem of low query efficiency caused by dynamically adding caching functions to the network service system is solved, and fast data query is achieved.
Patent Information
- Application Number
- CN202211543120.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-12-02
AI Technical Summary
In existing technologies, dynamically adding caching functionality to network service systems takes time, resulting in low data query efficiency.
By obtaining historical query information, frequently queried business data is identified and marked. In response to the instructions of the data caching module, a caching module is added to the data service process, and the marked data is cached, and the query results are returned directly.
It improved the efficiency of business data retrieval and reduced query waiting time.
Smart Images

Figure CN115952194B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method, apparatus, computer device, and storage medium for caching business data. Background Technology
[0002] With the development of information network technology, various network services have been developed based on Java. To improve the efficiency of query interfaces, caching control functions are often provided. A caching control layer is added to the server to pre-fetch data and save it in storage. If the data queried by the user is in the cache, it is directly retrieved from the cache and returned to the user, thereby improving data query efficiency.
[0003] In related technologies, the way to trigger network services to implement caching functionality is by dynamically adding caching functionality to the service system based on a data query request sent by the user. The caching function then caches the data and returns the cached data as the query result to the user. However, dynamically adding caching functionality to the service system takes time, resulting in excessively long waiting times for data queries and thus impacting data query efficiency. Summary of the Invention
[0004] This application provides a method, apparatus, computer device, and storage medium for caching business data, which can improve the query efficiency of business data.
[0005] This application provides a method for caching business data, including:
[0006] Retrieve historical query information for banking business data from the query terminal within a historical time period;
[0007] Based on the historical query information, determine the historical business data queried within the historical time period in the banking business data, and the number of queries corresponding to each historical business data;
[0008] Historical business data that has been queried more than a preset number of times is marked to obtain marked business data;
[0009] In response to the instruction to add a data caching module, the data caching module is added to the data service process, and the marked business data is cached through the data caching module.
[0010] When a query request for the marked business data is received from the query client, the cached marked data is used as the query result, and the query result is returned to the query client.
[0011] Accordingly, embodiments of this application also provide a business data caching processing apparatus, including:
[0012] The first acquisition unit is used to acquire historical query information of the query terminal for data queries on banking business data within a historical time period;
[0013] The first determining unit is used to determine, based on the historical query information, the historical business data queried within the historical time period in the banking business data, and the number of queries corresponding to each historical business data.
[0014] The first marking unit is used to mark historical business data whose query count exceeds a preset number of queries, and obtain the marked business data.
[0015] An add unit is used to add the data caching module in the data service process in response to the add instruction of the data caching module, and to cache the marked business data through the data caching module;
[0016] The return unit is used to, when receiving a query request from the querying end for the marked business data, use the cached marked data as the query result and return the query result to the querying end.
[0017] In some embodiments, the first acquisition unit includes:
[0018] The acquisition subunit is used to acquire historical data query requests sent by each query terminal for the banking business data within the historical time period.
[0019] The first determining subunit is used to determine the business data identifier carried in each historical query request and obtain the historical query information.
[0020] In some embodiments, the first determining unit includes:
[0021] The second determining subunit is used to determine the business data corresponding to each business data identifier, and to obtain the historical business data queried within the historical time period in the banking business data.
[0022] The third determining subunit is used to determine the number of times each historical business data was queried within the historical time period, thereby obtaining the number of queries corresponding to the historical business data.
[0023] In some embodiments, the device further includes:
[0024] The second acquisition unit is used to acquire the business data type corresponding to each historical business data.
[0025] The second determining unit is used to determine the business data to be marked based on historical business data whose business data type conforms to a preset business data type.
[0026] The second marking unit is used to mark the service data to be marked, so as to obtain the marked service data.
[0027] In some embodiments, the first marking unit includes:
[0028] The comparison sub-unit is used to compare the number of queries for each historical business data with the preset number of queries, determine the historical business data whose number of queries is greater than the preset number of queries, and obtain the business data to be marked.
[0029] The first adding subunit is used to add a specified code to the service data identifier of the service data to be marked, so as to obtain the marked service data.
[0030] In some embodiments, the adding unit includes:
[0031] The second adding subunit is used to trigger an addition instruction to add the data cache module in the data service process when multiple data query requests are received from the query terminal for the same business data in the banking business data.
[0032] The third adding subunit is used to add the data caching module to the data service process according to the adding instruction, so that the data service process can implement the data caching function.
[0033] In some embodiments, the third added subunit is specifically used for:
[0034] A virtual machine object is created for the data service process based on the virtual machine, including a first method that provides data caching functionality;
[0035] A second method for determining the data caching function required in the data service process;
[0036] Obtain the target file package configured as a parameter of the first method, the target file package being used to modify the bytecode in the method;
[0037] The first method is invoked, and the bytecode of the second method is modified using the target file package in the first method, so that the data service process has a data caching function.
[0038] Accordingly, this application also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes a control method for any of the caching functions provided in this application.
[0039] Accordingly, this application also provides a storage medium that stores multiple instructions, which are adapted for loading by a processor to execute the above-described control method for cache functionality.
[0040] This application embodiment obtains historical query information of banking business data queries performed by the query terminal within a historical time period; determines the historical business data queried within the historical time period and the corresponding query count for each historical business data based on the historical query information; marks historical business data whose query count exceeds a preset query count to obtain marked business data; in response to the addition instruction of the data caching module, adds a data caching module to the data service process and caches the marked business data through the data caching module; when a query request for the marked business data is received from the query terminal, the cached marked data is used as the query result and the query result is returned to the query terminal. This improves the query efficiency of business data. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating a business data caching method provided in an embodiment of this application.
[0043] Figure 2 This is a structural block diagram of a business data caching processing device provided in an embodiment of this application.
[0044] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] This application provides a method, apparatus, storage medium, and computer device for caching business data. Specifically, the method for caching business data in this application can be executed by a computer device, which can be a server or similar device. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides 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.
[0047] For example, the computer device can be a server that can obtain historical query information of banking business data queries performed by the query client within a historical time period; determine the historical business data queried within the historical time period in the banking business data based on the historical query information, as well as the number of queries corresponding to each historical business data; mark the historical business data whose query count exceeds a preset number of queries to obtain marked business data; in response to the instruction to add a data caching module, add a data caching module in the data service process, and cache the marked business data through the data caching module; when a query request for marked business data is received from the query client, use the cached marked data as the query result, and return the query result to the query client.
[0048] To address the aforementioned issues, this application provides a method, apparatus, computer device, and storage medium for caching business data, which can improve the efficiency of business data retrieval.
[0049] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0050] This application provides a method for caching business data. This method can be executed by a terminal or a server. This application example illustrates the method for caching business data by a server.
[0051] Please see Figure 1 , Figure 1 This is a flowchart illustrating a business data caching method provided in an embodiment of this application. The specific flow of this business data caching method can be as follows:
[0052] 101. Obtain historical query information for banking business data within a historical time period.
[0053] The query client refers to the client that initiates a data query request; for example, this client can be a third-party application. Specifically, users can initiate data query requests through the client. Banking business data refers to business information related to all services offered by the bank to its customers.
[0054] The historical time period refers to a period of time prior to the current moment. For example, the historical time period can be the past week, the past month, or a past time period specified by the user. This solution does not impose any restrictions on this.
[0055] In some embodiments, to improve data query efficiency, the step "obtaining historical query information of the query terminal for banking business data within a historical time period" may include the following operations:
[0056] Retrieve historical data query requests sent by each query terminal for banking business data within a historical time period;
[0057] Identify the business data identifier carried in each historical query request to obtain historical query information.
[0058] Among them, historical data query requests refer to all data query requests sent by query terminals for banking business data within a historical time period.
[0059] For example, if the historical time period can be the past week, then the data query requests received within the past week include: the first data query request, the second data query request, and the third data query request sent by query client A, and the fourth data query request and the fifth data query request sent by query client B. Therefore, the historical data query requests can be determined as: the first data query request, the second data query request, the third data query request, the fourth data query request, and the fifth data query request.
[0060] Among them, the business data identifier refers to the identifier of the business data queried corresponding to the historical data query request.
[0061] In this embodiment, banking business data can be stored in a banking business database. This database stores various types of banking business data. To facilitate differentiation between different types of banking business data, a different identifier can be set for each piece of data. Specifically, there are several ways to set identifiers for banking business data; for example, the business name or the business number can be used as the identifier.
[0062] For example, historical data query requests may include: a first data query request, a second data query request, a third data query request, a fourth data query request, and a fifth data query request. Furthermore, the business data identifier carried in the first data query request can be a1; the business data identifier carried in the second data query request can be a2; the business data identifier carried in the third data query request can be a3; and the business data identifier carried in the fourth data query request can be a4. Therefore, the historical query information obtained may include a1, a2, a3, and a4.
[0063] 102. Based on historical query information, determine the historical business data queried within the historical time period in the banking business data, as well as the number of queries corresponding to each historical business data.
[0064] Historical business data refers to business data retrieved from banking business data by the query terminal within a historical time period.
[0065] In some embodiments, to facilitate quick querying of historical business data, the step "determining the historical business data queried within a historical time period in the banking business data based on historical query information, and the number of queries corresponding to each historical business data" may include the following operations:
[0066] Determine the business data corresponding to each business data identifier to obtain the historical business data queried within the historical time period in the banking business data.
[0067] Determine the number of times each historical business data was queried within a historical time period to obtain the corresponding query count for the historical business data.
[0068] Specifically, based on the business data identifiers included in the historical query information, the business data identifiers in the historical query information are matched with the business data identifiers of the banking business data in the banking business database. The banking business data that has the same business data identifier as the historical query information can be used as the historical business data to be queried.
[0069] For example, the banking business database may include banking business data such as: first business data, second business data, third business data, fourth business data, and fifth business data. The business data identifier set for the first business data could be a1, for the second business data a2, for the third business data a3, for the fourth business data a4, and for the fifth business data a5.
[0070] The business data identifiers in the historical query information can include: a1, a2, a3, and a4. By comparing these business data identifiers with the business data identifiers in the banking business database, it can be determined that business data identifier a1 corresponds to the first business data, business data identifier a2 corresponds to the second business data, business data identifier a3 corresponds to the third business data, and business data identifier a4 corresponds to the fourth business data. Therefore, the historical business data includes: first business data, second business data, third business data, and fourth business data.
[0071] Therefore, the business data identifiers corresponding to each historical data query request can be used as historical query information, including: a1, a2, a3, and a4. Thus, the business data queried by the querying end in a historical time period can be determined through the banking business data corresponding to a1, a2, a3, and a4. In other words, the historical query information can represent the business data queried by the querying end in a historical time period.
[0072] After identifying the historical business data to be queried, the number of times each historical business data was queried within the historical time period can be counted to obtain the corresponding query count for the historical business data.
[0073] For example, historical business data may include: first business data, second business data, third business data, and fourth business data. If the business data identifiers in the historical query information may include: a1, a2, a3, and a4, then the query count for each business data item can be determined to be 1. Alternatively, if the business data identifiers in the historical query information may include: a1, a2, a3, and a4, then the query count for the first business data can be determined to be 2, and the query counts for the third and fourth business data items can both be determined to be 1.
[0074] 103. Mark historical business data whose query count exceeds the preset query count to obtain marked business data.
[0075] In this embodiment, the query frequency of each banking business data is determined based on historical query information. The banking business data with higher query frequency is identified based on the query frequency and can be cached, thereby facilitating the next quick query of the banking business data with higher query frequency by the query terminal.
[0076] In some embodiments, to improve the speed of querying queried data, the step "marking historical business data whose query count exceeds a preset number of queries to obtain marked business data" may include the following operations:
[0077] Compare the number of queries for each historical business data with the preset number of queries to identify historical business data whose number of queries exceeds the preset number of queries, and obtain the business data to be marked.
[0078] Add a specified code to the business data identifier of the business data to be tagged to obtain the tagged business data.
[0079] For example, historical business data can include: first business data, second business data, third business data, and fourth business data. The first business data can be queried 10 times, the second business data 1 time, the third business data 6 times, and the fourth business data 2 times.
[0080] The preset number of queries can be 5. By comparing the number of queries corresponding to each historical business data with the preset number of queries, it can be determined that historical business data with a query count greater than the preset number of queries can include: the first business data and the third business data. Therefore, the business data to be marked can be: the first business data and the third business data. The business data to be marked is the banking business data with a high query frequency on the query end within the historical time period.
[0081] Furthermore, the tagging operation on the business data to be tagged can include various tagging methods. For example, a specified code can be added to the business data identifier of the data to be tagged. This specified code can be a pre-set code identifier, which can indicate that the business data needs to be cached.
[0082] Here, "marked business data" refers to business data that needs to be cached.
[0083] In some embodiments, a set of business data to be cached can be set. The business data in the set is the data that needs to be cached. Then, the business data to be encoded can be added to the set, indicating that the business data to be encoded is the business data that needs to be cached.
[0084] In some embodiments, to meet the data query needs of different query terminals, after the step of "determining the historical business data queried within the historical time period in the banking business data based on historical query information", the method may further include the following steps:
[0085] Obtain the business data type corresponding to each historical business data;
[0086] Based on historical business data whose business data types conform to the preset business data types, determine the business data to be marked;
[0087] The business data to be tagged is tagged to obtain the tagged business data.
[0088] In this embodiment of the application, the banking business database stores different types of banking business data.
[0089] The preset business data type can be a pre-defined special business data type, which can be a business data type that the user is interested in. Specifically, the business data type that the user is interested in can be determined based on the historical query information of the query terminal and used as the preset business data type.
[0090] For example, historical business data may include: first business data, second business data, third business data, and fourth business data. The first business data can be of type 1, the second business data can be of type 2, the third business data can be of type 3, and the fourth business data can be of type 4. If the preset business data type is type 1, then the business data whose data type matches the preset business data type is the first business data. The first business data can then be marked to obtain the marked business data. The method for marking the business data is described in the steps above.
[0091] 104. In response to the instruction to add a data caching module, add a data caching module to the data service process, and cache the marked business data through the data caching module.
[0092] In this embodiment, the instruction to add a data caching module instructs the addition of a data caching module in the data service process. The data caching module is used to implement data caching functionality. The triggering methods for the instruction to add the data caching module can include various approaches, such as being triggered by user actions or by a data query request sent from the query endpoint.
[0093] For example, when multiple data query requests simultaneously request the same business data, a data cache add instruction can be triggered. This instruction instructs the data service process to add a data cache module, enabling the data service process to implement data caching functionality. Triggering the data cache module add instruction based on data query requests is a more efficient approach.
[0094] In this embodiment, the data service process refers to the execution process of the business data service. The business data service can be used to operate on banking business data, and may include: access operations, read operations, modification operations, deletion operations, and write operations. Specifically, access operations can be used to access banking business data, read operations can be used to retrieve banking business data, modification operations can be used to modify banking business data, deletion operations can be used to delete banking business data, and write operations can be used to add new banking business data.
[0095] In this application embodiment, the data service can be a network service developed using an object-oriented computer programming language. A network service refers to a service-oriented software module that runs on a network and is based on a distributed program. The network service adopts common Internet standards such as HTTP (Hypertext Transfer Protocol) and XML (Extensible Markup Language), enabling users to access data on the network from different locations through different terminal devices.
[0096] Data caching refers to caching data in the banking business data system. It can be used to provide the data required for the operation of data business services. For example, if a data business service process needs to query certain data, it can retrieve the data from the cache without querying from the network, which can improve data access efficiency.
[0097] Specifically, for a data service process to implement data caching functionality, it needs to support caching. When a data service process has caching functionality, it can access the cached data.
[0098] In some embodiments, the step "in response to the data caching module addition instruction, add a data caching module in the data service process" may include the following operations:
[0099] When multiple data query requests are received from the query client for the same business data in the banking business data, an instruction to add a data caching module is triggered in the data service process;
[0100] Add a data caching module to the data service process according to the add instruction, so that the data service process can implement the data caching function.
[0101] Multiple data query requests can be sent from the same query client or different query clients within the same time period, targeting banking business data. Upon receiving multiple data query requests, an instruction to add a data caching module can be triggered in the data service process.
[0102] In some embodiments, the step "Add a data caching module in the data service process according to the addition instruction" may include the following operations:
[0103] A virtual machine object is created for the data service process based on the virtual machine, including a first method that provides data caching functionality;
[0104] A second method for determining the need for data caching functionality in the data service process;
[0105] Obtain the target file package that is configured as a parameter of the first method. The target file package is used to modify the bytecode in the method.
[0106] The first method is invoked, and the bytecode of the second method is modified through the target file package in the first method, so that the data service process has data caching function.
[0107] In this embodiment, the virtual machine can be the Virtual Machine that comes with Java, also known as the Java Virtual Machine. A virtual machine is an abstract computer that is implemented by simulating various computer functions on an actual computer.
[0108] Specifically, a virtual machine object is created for the data service process through the virtual machine to obtain the initial virtual machine object. Then, a first method is added to the initial virtual machine object. For example, the first method can be the loadAgent method, which can be used to provide data caching functionality.
[0109] The target file package refers to the JAR file used to implement JavaAgent caching control functionality. JAR is a platform-independent file format that combines multiple files into a single file. Users can bind multiple Java applets (small applications written in Java) and their required components into a JAR file. A JAR file is a Java Archive File, a document format for Java. JAR files are very similar to compressed files and can be considered file packages.
[0110] Specifically, the target file package is configured as a parameter of the first method in the target virtual object so that the first method can provide data caching functionality.
[0111] The second method refers to the method by which the data service process interacts with the caching system. There can be one or more second methods.
[0112] In some embodiments, in order to quickly determine the second method, determining the second method that requires data caching functionality in a data service process may include: obtaining interface configuration information of the data service process; determining at least one target interface that requires data caching functionality from multiple interfaces of the data service process based on the interface configuration information; and determining the second method based on the method of the target interface.
[0113] The interface configuration information refers to the external configuration file corresponding to the target virtual process. This external configuration file includes multiple interfaces and the interface information of each interface. The interfaces that need to be cached can be specified in advance in the external configuration file. For example, interfaces A and B can be specified as interfaces that need data caching function.
[0114] Specifically, obtain all interfaces of the data service process, match these interfaces with the interfaces that need to be cached as specified in the interface configuration information, take the interfaces that successfully match the interface configuration information as the target interfaces, and then obtain the methods corresponding to the target interfaces in the data service process to obtain the target methods.
[0115] For example, in the interface configuration information, the interfaces that need to be cached can be: Interface A and Interface B; to obtain all interfaces in the data service process, which can include: Interface A, Interface B, Interface C, etc., by comparing all interfaces in the data service process with the interfaces in the interface configuration information, the target interfaces in the data service process can be determined as: Interface A and Interface B. Then, the methods corresponding to Interface A and Interface B are obtained respectively to get the second method.
[0116] Bytecode is a binary file containing an executable program, consisting of a sequence of op code / data pairs; it is a type of intermediate code.
[0117] Specifically, the bytecode of the second method in the data service process can be adjusted through the target file package in the first method, so that the adjusted second method supports the data caching function, thereby enabling the data service process to have the data caching function.
[0118] Specifically, the first method of the target virtual object is called by the virtual machine, and the target file package in the first method is dynamically loaded into the second method of the target service process. Then, the bytecode in the second method is modified by the target file package to adjust the second method and obtain a second method that supports data caching function.
[0119] In some embodiments, to improve the efficiency of bytecode modification, modifying the bytecode of the second method through the target file package in the first method may include: obtaining a modification object through the target file package; adding the target bytecode to the bytecode in the second method based on the modification object, so that the second method can implement the data caching function.
[0120] Specifically, the modified object can be used to modify the bytecode of the target service process. This modified object can be a Java Instrumentation object. A Java Instrumentation refers to an agent program, independent of the application, used to monitor and assist applications running on the Java Virtual Machine. This monitoring and assistance includes, but is not limited to, obtaining the runtime state of the Java Virtual Machine and replacing and modifying class definitions.
[0121] The target bytecode refers to the bytecode that implements the caching function, such as functions for reading, writing, and modifying the cache.
[0122] Specifically, by using the target file package to modify the object and add target bytecode to the bytecode of the second method, the second method can support cache control functionality.
[0123] Furthermore, the tagged business data is cached through the data caching module in the data service process.
[0124] 105. When a query request for marked business data is received from the query client, the cached marked data is used as the query result, and the query result is returned to the query client.
[0125] Specifically, when a query request for the tagged business data is received again, there is no need to query the tagged business data from the banking business database. Instead, the cached target business data can be used as the query result of the data query request carrying the target data identification information, and then the result corresponding to the data query request can be sent to the query end. This allows for the rapid completion of the current query request for the tagged business data.
[0126] This application discloses a method for caching business data. The method includes: acquiring historical query information of banking business data queried by a query terminal within a historical time period; determining the historical business data queried within the historical time period and the number of queries corresponding to each historical business data based on the historical query information; marking historical business data whose query count exceeds a preset number of queries to obtain marked business data; adding a data caching module to the data service process in response to an instruction to add a data caching module, and caching the marked business data through the data caching module; and when a query request for the marked business data is received from a query terminal, using the cached marked data as the query result and returning the query result to the query terminal. This improves the efficiency of business data querying.
[0127] To facilitate better implementation of the business data caching method provided in this application embodiment, this application embodiment also provides a business data caching processing apparatus based on the above-described business data caching processing method. The meanings of the terms used are the same as in the above-described business data caching processing method, and specific implementation details can be found in the descriptions in the method embodiments.
[0128] Please see Figure 2 , Figure 2 A structural block diagram of a business data caching processing apparatus provided in this application embodiment, the apparatus comprising:
[0129] The first acquisition unit 301 is used to acquire historical query information of the query terminal for data query of banking business data within a historical time period;
[0130] The first determining unit 302 is used to determine, based on the historical query information, the historical business data queried within the historical time period in the banking business data, and the number of queries corresponding to each historical business data.
[0131] The first marking unit 303 is used to mark historical business data whose query count exceeds a preset query count to obtain marked business data.
[0132] Adding unit 304 is used to add the data caching module in the data service process in response to the data caching module addition instruction, and to cache the marked business data through the data caching module;
[0133] The return unit 305 is used to, when receiving a query request from the querying end for the marked business data, use the cached marked data as the query result and return the query result to the querying end.
[0134] In some embodiments, the first acquisition unit 301 may include:
[0135] The acquisition subunit is used to acquire historical data query requests sent by each query terminal for the banking business data within the historical time period.
[0136] The first determining subunit is used to determine the business data identifier carried in each historical query request and obtain the historical query information.
[0137] In some embodiments, the first determining unit 302 may include:
[0138] The second determining subunit is used to determine the business data corresponding to each business data identifier, and to obtain the historical business data queried within the historical time period in the banking business data.
[0139] The third determining subunit is used to determine the number of times each historical business data was queried within the historical time period, thereby obtaining the number of queries corresponding to the historical business data.
[0140] In some embodiments, the device may further include:
[0141] The second acquisition unit is used to acquire the business data type corresponding to each historical business data.
[0142] The second determining unit is used to determine the business data to be marked based on historical business data whose business data type conforms to a preset business data type.
[0143] The second marking unit is used to mark the service data to be marked, so as to obtain the marked service data.
[0144] In some embodiments, the first marking unit 303 may include:
[0145] The comparison sub-unit is used to compare the number of queries for each historical business data with the preset number of queries, determine the historical business data whose number of queries is greater than the preset number of queries, and obtain the business data to be marked.
[0146] The first adding subunit is used to add a specified code to the service data identifier of the service data to be marked, so as to obtain the marked service data.
[0147] In some embodiments, the adding unit 304 may include:
[0148] The second adding subunit is used to trigger an addition instruction to add the data cache module in the data service process when multiple data query requests are received from the query terminal for the same business data in the banking business data.
[0149] The third adding subunit is used to add the data caching module to the data service process according to the adding instruction, so that the data service process can implement the data caching function.
[0150] In some embodiments, the third added subunit can specifically be used for:
[0151] A virtual machine object is created for the data service process based on the virtual machine, including a first method that provides data caching functionality;
[0152] A second method for determining the data caching function required in the data service process;
[0153] Obtain the target file package configured as a parameter of the first method, the target file package being used to modify the bytecode in the method;
[0154] The first method is invoked, and the bytecode of the second method is modified using the target file package in the first method, so that the data service process has a data caching function.
[0155] This application discloses a business data caching processing device. A first acquisition unit 301 acquires historical query information from a query terminal within a historical time period for data queries on banking business data. A first determination unit 302 determines, based on the historical query information, the historical business data queried within the historical time period in the banking business data, and the number of queries corresponding to each historical business data. A first marking unit 303 marks historical business data whose query count exceeds a preset number of queries, obtaining marked business data. An adding unit 304, responding to an add instruction from a data caching module, adds the data caching module to the data service process and caches the marked business data through the data caching module. A returning unit 305, upon receiving a query request from the query terminal for the marked business data, uses the cached marked data as the query result and returns the query result to the query terminal. This improves the efficiency of business data querying.
[0156] Accordingly, embodiments of this application also provide a computer device, which can be a server. For example... Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 400 includes a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 and the memory 402 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0157] The processor 401 is the control center of the computer device 400. It connects various parts of the computer device 400 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it performs various functions of the computer device 400 and processes data, thereby monitoring the computer device 400 as a whole.
[0158] In this embodiment, the processor 401 in the computer device 400 loads the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 runs the applications stored in the memory 402 to achieve various functions:
[0159] Retrieve historical query information for banking business data from the query terminal within a historical time period;
[0160] Based on historical query information, determine the historical business data queried within the historical time period in the banking business data, as well as the number of queries corresponding to each historical business data.
[0161] Historical business data that has been queried more than a preset number of times is marked to obtain marked business data;
[0162] In response to the instruction to add a data caching module, a data caching module is added to the data service process, and the marked business data is cached through the data caching module;
[0163] When a query request for tagged business data is received from the query client, the cached tagged data is used as the query result, and the query result is returned to the query client.
[0164] This application's solution improves the efficiency of business data retrieval by acquiring historical query information from the query terminal within a historical time period. Based on this information, it identifies the historical business data queried within that time period and the corresponding query count for each data point. Historical business data with more than a preset query count are marked, resulting in marked business data. In response to a data caching module addition command, a data caching module is added to the data service process, and the marked business data is cached within this module. When a query request for the marked business data is received, the cached marked data is used as the query result, and the result is returned to the query terminal.
[0165] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0166] Optional, such as Figure 3 As shown, the computer device 400 also includes: a touch screen display 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch screen display 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407. Those skilled in the art will understand that... Figure 3 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0167] The touch display screen 403 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 403 may include a display panel and a touch panel. The display panel can be used to display messages input by the user or messages provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives the touch message from the touch detection device, converts it into touch point coordinates, and sends it to the processor 401. It can also receive and execute commands from the processor 401. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 401 to determine the type of touch event. Subsequently, the processor 401 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 403 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 403 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 403 can also be used as part of the input unit 406 to achieve input functions.
[0168] In this embodiment, a game application is executed by processor 401 to generate a graphical user interface (GUI) on touch display screen 403. The virtual scene on the GUI includes at least one skill control area, and the skill control area includes at least one skill control. The touch display screen 403 is used to present the GUI and receive operation commands generated by the user interacting with the GUI.
[0169] The radio frequency circuit 404 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0170] Audio circuitry 405 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 405 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 405, converted back into audio data, and then processed by processor 401 before being transmitted via radio frequency circuitry 404 to, for example, another computer device, or output to memory 402 for further processing. Audio circuitry 405 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0171] The input unit 406 can be used to receive input numbers, character messages or user characteristic messages (such as fingerprints, iris, facial messages, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0172] Power supply 407 is used to supply power to various components of computer device 400. Optionally, power supply 407 can be logically connected to processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 407 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0173] although Figure 3 As not shown in the diagram, computer equipment 400 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0174] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0175] As can be seen from the above, the computer device provided in this embodiment obtains historical query information of the query terminal for banking business data within a historical time period; determines the historical business data queried within the historical time period in the banking business data based on the historical query information, as well as the number of queries corresponding to each historical business data; marks the historical business data whose query count exceeds the preset number of queries to obtain marked business data; in response to the addition instruction of the data caching module, adds the data caching module in the data service process, and caches the marked business data through the data caching module; when a query request for the marked business data is received from the query terminal, the cached marked data is used as the query result, and the query result is returned to the query terminal.
[0176] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0177] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute steps in any of the business data caching methods provided in embodiments of this application. For example, the computer program can execute the following steps:
[0178] Retrieve historical query information for banking business data from the query terminal within a historical time period;
[0179] Based on historical query information, determine the historical business data queried within the historical time period in the banking business data, as well as the number of queries corresponding to each historical business data.
[0180] Historical business data that has been queried more than a preset number of times is marked to obtain marked business data;
[0181] In response to the instruction to add a data caching module, a data caching module is added to the data service process, and the marked business data is cached through the data caching module;
[0182] When a query request for tagged business data is received from the query client, the cached tagged data is used as the query result, and the query result is returned to the query client.
[0183] This application's solution improves the efficiency of business data retrieval by acquiring historical query information from the query terminal within a historical time period. Based on this information, it identifies the historical business data queried within that time period and the corresponding query count for each data point. Historical business data with more than a preset query count are marked, resulting in marked business data. In response to a data caching module addition command, a data caching module is added to the data service process, and the marked business data is cached within this module. When a query request for the marked business data is received, the cached marked data is used as the query result, and the result is returned to the query terminal.
[0184] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0185] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0186] Since the computer program stored in the storage medium can execute the steps in any of the business data caching methods provided in the embodiments of this application, the beneficial effects that any of the business data caching methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0187] The foregoing has provided a detailed description of a business data caching method, apparatus, storage medium, and computer device provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for caching business data, characterized in that, The method includes: Retrieve historical query information for banking business data from the query terminal within a historical time period; Based on the historical query information, determine the historical business data queried within the historical time period in the banking business data, and the number of queries corresponding to each historical business data; Historical business data that has been queried more than a preset number of times is marked to obtain marked business data; In response to the instruction to add a data caching module, the data caching module is added to the data service process, and the marked business data is cached through the data caching module. When a query request for the marked business data is received from the query client, the cached marked data is used as the query result and the query result is returned to the query client. The step of adding the data caching module in the data service process in response to the instruction to add the data caching module includes: When multiple data query requests are received from the query terminal for the same business data in the banking business data, an instruction to add the data caching module is triggered in the data service process; The data caching module is added to the data service process according to the addition instruction, so that the data service process can implement the data caching function; Adding the data caching module to the data service process according to the addition instruction includes: A virtual machine object is created for the data service process based on the virtual machine, including a first method that provides data caching functionality; A second method for determining the data caching function required in the data service process; the second method is a method for the data service process to interact with the caching system. Obtain the target file package configured as a parameter of the first method, the target file package being used to modify the bytecode in the method; The first method is invoked, and the bytecode of the second method is modified using the target file package in the first method, so that the data service process has a data caching function; The second method for determining the data caching function required in the data service process includes: obtaining interface configuration information of the data service process; determining at least one target interface requiring data caching function from multiple interfaces of the data service process based on the interface configuration information; and determining the second method based on the method of the target interface.
2. The method according to claim 1, characterized in that, The process of obtaining historical query information for banking business data within a historical time period includes: Obtain historical data query requests sent by each query terminal for the banking business data within the historical time period; The business data identifier carried in each historical query request is determined to obtain the historical query information.
3. The method according to claim 2, characterized in that, The step of determining the historical business data queried within the historical time period in the banking business data based on the historical query information, and the number of queries corresponding to each historical business data, includes: Determine the business data corresponding to each business data identifier to obtain the historical business data queried within the historical time period in the banking business data; Determine the number of times each historical business data was queried within the historical time period to obtain the query count corresponding to the historical business data.
4. The method according to claim 1, characterized in that, After determining the historical business data queried within the historical time period in the banking business data based on the historical query information, the method further includes: Obtain the business data type corresponding to each historical business data; Based on historical business data whose business data type conforms to the preset business data type, determine the business data to be marked; The business data to be labeled is labeled to obtain labeled business data.
5. The method according to claim 1, characterized in that, The step of marking historical business data whose query count exceeds a preset number to obtain marked business data includes: Compare the number of queries for each historical business data with the preset number of queries to identify historical business data whose number of queries exceeds the preset number of queries, and obtain the business data to be marked. A specified code is added to the service data identifier of the service data to be tagged to obtain the tagged service data.
6. A business data caching and processing device, characterized in that, The device includes: The first acquisition unit is used to acquire historical query information of the query terminal for data queries on banking business data within a historical time period; The first determining unit is used to determine, based on the historical query information, the historical business data queried within the historical time period in the banking business data, and the number of queries corresponding to each historical business data. The first marking unit is used to mark historical business data whose query count exceeds a preset number of queries, and obtain the marked business data. An add unit is used to add the data caching module in the data service process in response to the add instruction of the data caching module, and to cache the marked business data through the data caching module; The return unit is used to, when receiving a query request from the querying end for the marked business data, use the cached marked data as the query result and return the query result to the querying end; The adding unit includes: The second adding subunit is used to trigger an addition instruction to add the data cache module in the data service process when multiple data query requests are received from the query terminal for the same business data in the banking business data. The third adding subunit is used to add the data caching module to the data service process according to the adding instruction, so that the data service process can implement the data caching function; The third adding subunit is used for: A virtual machine object is created for the data service process based on the virtual machine, including a first method that provides data caching functionality; A second method for determining the data caching function required in the data service process; the second method is a method for the data service process to interact with the caching system. Obtain the target file package configured as a parameter of the first method, the target file package being used to modify the bytecode in the method; The first method is invoked, and the bytecode of the second method is modified using the target file package in the first method, so that the data service process has a data caching function; The second method for determining the data caching function required in the data service process includes: obtaining interface configuration information of the data service process; determining at least one target interface requiring data caching function from multiple interfaces of the data service process based on the interface configuration information; and determining the second method based on the method of the target interface.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein, When the processor executes the program, it implements the business data caching method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores multiple instructions, which are adapted for loading by a processor to execute the business data caching method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Business system operation method and device, system and readable storage medium
CN107908695A
