Cache preheating method and device, electronic equipment and storage medium

By obtaining cache access requests for business applications, the cache warm-up task is generated, and the target service node is cached and warmed up, solving the problem of the warm-up time of the new service node system being too long, and improving the overall performance and user experience of the application service.

CN120354023APending Publication Date: 2025-07-22THE PEOPLES BANK OF CHINA NAT CLEARING CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510521486.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

During the system warm-up process of adding new service nodes, the cache warm-up time caused by the existing technology is too long, which affects the overall performance of the application service and cannot meet the user's business needs.

Method used

By obtaining the cache access request of the business application to the current service node, a cache warm-up task is generated, and the target service node is cache warm-up to achieve cache preloading of the target service node.

Benefits of technology

It reduces the time required to cache and warm up the new service node system, and improves the overall performance and user experience of application services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354023A_ABST
    Figure CN120354023A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a cache preheating method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a cache access request sent to a current service node by a service application; generating a cache preheating task based on the cache access request; and performing cache preheating on the target service node based on the cache preheating task. According to the embodiment of the invention, the duration required for cache preheating of the system of the newly added service node can be reduced, and the overall service performance of the application service is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a cache preheating method, apparatus, electronic device, and storage medium. Background Art

[0002] Cache technology is an important means for various application services or software to improve service performance. In the normal mode, the configuration cache data of various application services is generally loaded during the startup process of the application service, and the cache data related to the business is generally loaded into the cache when the user accesses it for the first time. This process is also called the cache preheating of the system. This mode can improve the query efficiency of subsequent access queries, but the time required for the first access will increase. This is also the reason why most systems are slow to access when they are just started, and the overall response time will improve after the service for a period of time. However, in some scenarios where new application services need to be enabled, due to the too long system preheating time of the new application service, the overall service performance of the application service is poor and cannot meet the user's business needs. Summary of the Invention

[0003] An embodiment of the present invention provides a cache preheating method, which can reduce the time required for cache preheating of the system of newly added service nodes and improve the overall service performance of the application service.

[0004] In a first aspect, an embodiment of the present invention provides a cache preheating method, including:

[0005] Obtaining a cache access request sent by a business application to the current service node;

[0006] Generating a cache preheating task based on the cache access request; and

[0007] Performing cache preheating on a target service node based on the cache preheating task.

[0008] In a second aspect, an embodiment of the present invention provides a cache preheating apparatus, including:

[0009] A cache access request obtaining module, configured to obtain a cache access request sent by a business application to the current service node;

[0010] A cache preheating task generating module, configured to generate a cache preheating task based on the cache access request; and

[0011] A preheating module, configured to perform cache preheating on a target service node based on the cache preheating task.

[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the cache preheating method according to any one of the embodiments of the present invention when executing the program.

[0013] Fourthly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the cache preheating method described in any one of the embodiments of the present invention.

[0014] The cache preheating method, device, electronic device and storage medium provided by the embodiments of the present invention can preload the cache of the target service node by obtaining a cache access request sent by a service application to the current service node and generating a cache preheating task based on the cache access request, so as to reduce the time required for cache preheating of the system of the newly added service node when a new service node is enabled, improve the overall service performance of the application service, meet the user's needs and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0016] Figure 1 It is a flowchart of the cache preheating method provided by an embodiment of the present invention;

[0017] Figure 2 It is another flowchart of the cache preheating method provided by an embodiment of the present invention;

[0018] Figure 3 It is another flowchart of the cache preheating method provided by an embodiment of the present invention;

[0019] Figure 4 It is another flowchart of the cache preheating method provided by an embodiment of the present invention;

[0020] Figure 5 It is a structural diagram of the cache preheating device provided by an embodiment of the present invention;

[0021] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] To enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solution in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0024] Figure 1 FIG. is a schematic flowchart of a cache preheating method provided by an embodiment of the present invention. This embodiment is applicable to scenarios of primary and standby service node switching and / or new service node addition. This method can be executed by a cache preheating device provided by an embodiment of the present invention, and this device can be implemented in software and / or hardware. In a specific embodiment, this device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking this device integrated in an electronic device as an example. Refer to Figure 1 , and the method can specifically include the following steps:

[0025] Step 101, obtain a cache access request sent by a business application to the current service node. This step is conducive to generating a cache preheating task based on the cache access request.

[0026] Specifically, the above-mentioned current service node can be understood as an application service node that is currently providing services for a business application. Specifically, for example, the primary service node in a hot standby service node.

[0027] Optionally, the above cache access request includes: a data access request for accessing local cache data in the application service layer, database cache data in the data layer, and / or middleware cache data in the middleware layer of the current service node. It can be understood that most fully functional application services generally include an application service layer and a database layer. Application services developed based on a microservices architecture with multi-node deployment generally also include a middleware layer. Making a cache access request to at least one of the application service layer, database layer, and middleware layer to obtain corresponding cached data, and further preheating the target node's cache data can reduce the time required for cache preheating of the system of the newly added service node.

[0028] Optionally, the cache data in the above application service layer includes: configuration data, parameter data, basic user information, and / or business data frequently queried.

[0029] Optionally, the cache data in the above database layer includes: SQL (Structured Query Language) statements frequently executed, compiled SQL statements, and / or SQL result sets frequently queried.

[0030] Optionally, the middleware layer cache data includes user login authentication information and / or business data cached to improve performance.

[0031] Optionally, the process of obtaining the cache access request sent by the business application to the current service node includes: obtaining the corresponding cache access request in real time when the business application sends a cache access request to the current service node.

[0032] Specifically, step 101 can be executed by the current service node or by an application preheating service node independent of the current service node.

[0033] Optionally, when step 101 is executed by the above application preheating service node, the process of obtaining the cache access request sent by the business application to the current service node includes: obtaining the cache access request from the location where the cache access request sent by the business application to the current service node is stored.

[0034] Specifically, the above cache access request can be collected by a cache access request collection tool integrated in the current service node and then output to the corresponding storage location.

[0035] Optionally, the process of obtaining the corresponding cache access request from the location where the cache access request sent by the business application to the current service node is stored includes: obtaining the above cache access request from the corresponding storage location based on the cache preheating period of the business application.

[0036] Optionally, the process of obtaining the corresponding cache access request from the location storing the cache access request sent by the business application to the current service node includes: when the resource utilization rate of the current service node is not less than a preset ratio, generating a cache warm-up task based on the cache access request.

[0037] Step 102, generating a cache warm-up task based on the cache access request. This step can facilitate cache warm-up of the target service node based on the cache warm-up task.

[0038] Specifically, step 102 can be executed by the current service node or by the aforementioned application warm-up service node.

[0039] Optionally, the process of generating a cache warm-up task based on the cache access request includes: when the resource utilization rate of the current service node is not less than a preset ratio, generating a cache warm-up task based on the cache access request.

[0040] Specifically, the aforementioned preset ratio can be set based on empirical data, for example, it can be set to 60%-80%.

[0041] Specifically, a cache warm-up task can be generated based on the cache access request when the resource utilization rate of the current service node is not less than the preset ratio and the resource utilization rate of the current service node is still increasing.

[0042] In a specific example, the current service node is 2 primary service nodes of a primary / backup mode common basic service, and 1 backup service node is deployed for this common basic service. The backup service node will be automatically enabled after the resource usage of the common basic service exceeds 80% on each primary service node. Then, when the resource usage of each primary service node is not less than 60%, a cache warm-up task is generated based on the cache access request.

[0043] Specifically, a cache warm-up task can also be generated in real time based on the aforementioned cache access request.

[0044] Optionally, the process of generating a cache warm-up task based on the cache access request includes: replacing the network address in the cache access request with the network address of the target service node to obtain the aforementioned cache warm-up task.

[0045] Step 103, performing cache warm-up on the target service node based on the cache warm-up task. Based on steps 101 and 102, this step can realize preloading of the target service node cache by obtaining the cache access request sent by the business application to the current service node and generating a cache warm-up task based on the cache access request to perform cache warm-up on the target service node, so as to reduce the time required for cache warm-up of the system of the newly added service node when enabling a new service node, improve the overall service performance of the application service, meet user requirements, and improve user experience.

[0046] Specifically, step 103 can be executed by the current service node or by the aforementioned application warm-up service node.

[0047] Optionally, the process of preheating the cache of the target service node based on the cache warm-up task includes: sending the cache warm-up task to the target service node to request access to the cache data of the target service node.

[0048] Optionally, the above-mentioned target service node includes: a standby service node in the hot standby service node, and / or a newly added service node.

[0049] Specifically, in the scenario of switching between the primary and standby service nodes and the scenario of a sharp increase in user traffic requiring rapid expansion of newly added service nodes, the system warm-up duration of the standby service and the newly added service nodes directly affects the overall service performance of the application service. Therefore, preheating the cache of the standby service node and the newly added service node based on the cache warm-up task corresponding to the cache access request of the current service node can help reduce the time required for preheating the cache of the corresponding service node system.

[0050] The following further introduces the cache warm-up method provided by the embodiments of the present invention.

[0051] Optionally, as Figure 2 shown, the cache warm-up method provided by the embodiments of the present invention includes the following steps:

[0052] Step 201, mark the interface code that the business application needs to call to access the cache data of the current service node as cache access code.

[0053] Optionally, the process of marking the interface code that the business application needs to call to access the cache data of the current service node as cache access code includes: based on aspect-oriented programming technology, mark the interface code that the business application needs to call to access the cache data of the current service node as cache access code.

[0054] Specifically, other methods in the prior art can also be used to mark the interface code that the business application needs to call to access the cache data of the current service node as cache access code.

[0055] In an optional specific example, the process of marking the interface code that the business application needs to call to access the cache data of the current service node as cache access code based on aspect-oriented programming technology (Spect Oriented Programming, AOP) can be implemented by a cache access request collection tool integrated in the current service node.

[0056] In an actual application scenario, after completing the development of all functions of the current service node, the code points for the current service node to load local cache data, middleware cache data, and database cache data and the interfaces for calling the code can be confirmed, and the above cache access request collection tool can be introduced into the current service node.

[0057] Optionally, the process of marking the interface code that the business application needs to call to access the cache data of the current service node as cache access code based on aspect-oriented programming technology includes: using the cache access request collection tool based on aspect-oriented programming technology to add annotations defined by the cache access request collection tool at the interface code where the business application code will gradually call to execute the local cache loading and middleware cache loading, and at the interface code where the business application gradually calls to execute the high-frequency SQL or performance bottleneck SQL for database access.

[0058] Specifically, for example, after annotating the interface code "queryInfo(){}", the code at the corresponding position is obtained as "@collecturl public void queryInfo(){}".

[0059] Optionally, the process of marking the interface code that the business application needs to call to access the cache data of the current service node as cache access code based on aspect-oriented programming technology includes: using the cache access request collection tool to configure the corresponding interface code in the configuration file based on aspect-oriented programming technology.

[0060] Specifically, for example, for the interface code "queryInfo(){}", it can be configured in the configuration file in the following format: "collectURLList=ClassA.queryInfo".

[0061] Step 202, collect the data access requests for calling the cache access code to obtain cache access requests.

[0062] In an actual application scenario, after the current service node is started, the above cache access request collection tool automatically starts a thread to collect the data access requests for calling the cache access code based on a pre-defined information collection format to obtain the above cache access requests.

[0063] Specifically, the above information collection format can be, for example:

[0064] [Cache type LocalCache / RedisCache / DBCache|Interface information|Full URL request|User identification information|Collection time]

[0065] Step 203, generate cache warm-up tasks based on the cache access requests.

[0066] Step 204, perform cache warm-up on the target service node based on the cache warm-up task.

[0067] The embodiments of the present invention can conveniently and efficiently collect cache access requests without affecting the business of the current service node.

[0068] Next, the cache warm-up method provided by the embodiments of the present invention is further introduced.

[0069] Optionally, as Figure 3 shown, the cache warm-up method provided by the embodiments of the present invention includes the following steps:

[0070] Step 301, obtain a cache access request sent by a business application to the current service node.

[0071] Step 302, output the cache access request to the access request storage location.

[0072] Optionally, the process of outputting the cache access request to the access request storage location includes: outputting the cache access request to a pre-determined request storage location through the aforementioned cache access request collection tool.

[0073] Specifically, the aforementioned request storage location can be a shared file, a database, or a message queue.

[0074] Step 303, read cache access requests from the access request storage location based on the cache warm-up period corresponding to the business application, and generate a cache warm-up task based on the read cache access requests.

[0075] Specifically, before step 303, the acquisition method of the cache access request can be configured, specifically, the location for obtaining the cache access request and the aforementioned cache warm-up period can be configured.

[0076] Optionally, the process of configuring the location for obtaining the cache access request includes: configuring the IP address and port of the message queue where the cache access request is located; configuring the address of the shared file where the cache access request is located; or configuring the IP address, port, and table name of the database where the cache access request is located.

[0077] Specifically, before step 303, the target service node information can also be configured, specifically including the IP address and port of the target service node.

[0078] Optionally, the aforementioned target service node information can also include authentication information pre-negotiated with the target service node.

[0079] Specifically, before step 303, the generation of the cache warm-up task and the cache warm-up task distribution thread can also be configured.

[0080] Optionally, the process of reading the cache access request from the storage location of the access request in the cache warm-up period corresponding to the business application includes:

[0081] After the end of the previous cache warm-up period, read the above-mentioned cache access request for the most recent period from the storage location of the access request.

[0082] Specifically, the above cache warm-up period can be determined based on the business characteristics of the business application. For example, in an actual application scenario, when the business application usually accesses all cache data of the current service node within a week, set the above cache warm-up period to one week.

[0083] In a specific example, monitor the message queue where the cache access request is located, and after the message queue receives a message, read the cache access request from the corresponding message queue, and generate a cache warm-up task based on the read cache access request.

[0084] Specifically, the above cache warm-up period can also be determined based on the cache cleaning policy of the target service node.

[0085] Step 304, perform cache warm-up on the target service node based on the cache warm-up task.

[0086] In the embodiment of the present invention, by reading the cache access request and performing cache warm-up on the target service node according to the cache warm-up period corresponding to the business application, rather than performing real-time warm-up on the target service node according to the corresponding cache access request, it is possible to achieve preloading of the target service node cache on the premise of avoiding waste of resources.

[0087] Next, the cache warm-up method provided by the embodiment of the present invention will be further introduced.

[0088] Optionally, as Figure 4 shown, that is Figure 1 step 102 in

[0089] Step 1021, replace the network address in the cache access request with the network address of the target service node to obtain a cache warm-up request.

[0090] It can be understood that generally, the cache access request includes: the network address of the current service node + parameters; then the above cache warm-up request includes: the network address of the target service node + parameters.

[0091] Step 1022, add the network address and authentication information of the target service node to the cache warm-up request to obtain a cache warm-up task.

[0092] Specifically, the above cache warm-up task may include: cache warm-up request + authentication information + network address of the target service node.

[0093] Specifically, the above authentication information may be encrypted information negotiated with the target service node in advance, etc.

[0094] Optionally, the process of preheating the cache of the target service node based on the cache preheating task includes: sending the cache preheating task to the target service node through the network address of the target service node, so that the target service node performs a legality authentication on the cache preheating task based on the authentication information, and obtains a cache preheating request after the authentication is passed, and loads corresponding cache data based on the cache preheating request.

[0095] Specifically, by adding authentication information to the cache preheating request in the embodiments of the present invention, the target service node can perform a legality authentication on the cache preheating request to avoid the target service node from being illegally attacked.

[0096] Figure 5 It is a structural diagram of a cache preheating device provided by an embodiment of the present invention. This device is applicable to execute the cache preheating method provided by the embodiment of the present invention. As Figure 5 shown, the device may specifically include:

[0097] A cache access request acquisition module 501, configured to acquire a cache access request sent by a service application to the current service node, which is beneficial to generating a cache preheating task based on the cache access request.

[0098] Specifically, the cache access request acquisition module 501 may be integrated in the current service node or in an application preheating service node independent of the current service node.

[0099] A cache preheating task generation module 502, configured to generate a cache preheating task based on the cache access request, which is beneficial to preheating the cache of the target service node based on the cache preheating task.

[0100] Specifically, the above cache preheating task generation module 502 may be integrated in the current service node or in an application preheating service node independent of the current service node.

[0101] Optionally, the above cache preheating task generation module 502 can specifically be configured to generate a cache preheating task based on the cache access request when the resource utilization rate of the current service node is not less than a preset ratio.

[0102] Optionally, the above cache preheating task generation module 502 can specifically be configured to replace the network address in the cache access request with the network address of the target service node to obtain a cache preheating request; and add the network address and authentication information of the target service node to the cache preheating request to obtain a cache preheating task.

[0103] The preheating module 503 is used to perform cache preheating on the target service node based on the cache preheating task. Combining modules 501 and 502, it can obtain the cache access requests sent by the business application to the current service node, and generate cache preheating tasks based on the cache access requests to perform cache preheating on the target service node, enabling the preloading of the target service node's cache. This helps reduce the time required for cache preheating of the new service node system when enabling a new service node, improving the overall service performance of the application service to meet user needs and enhance the user experience.

[0104] Specifically, the above-mentioned preheating module 503 can be integrated into the current service node or into an application preheating service node independent of the current service node.

[0105] Optionally, the above-mentioned preheating module 503 can specifically be used to send the cache preheating task to the target service node through the network address of the target service node, so that the target service node performs a legality authentication on the cache preheating task based on the authentication information, and obtains the cache preheating request after the authentication passes, and loads the corresponding cache data based on the cache preheating request.

[0106] Optionally, the cache preheating device provided by the embodiment of the present invention further includes: a cache access code marking module, which is used to mark the interface code that the business application needs to call to access the cache data of the current service node as cache access code before obtaining the cache access request sent by the business application to the current service node.

[0107] Optionally, the above-mentioned cache access code marking module can specifically be used to mark the interface code that the business application needs to call to access the cache data of the current service node as cache access code based on the aspect-oriented programming technology.

[0108] Optionally, the aforementioned cache access request acquisition module 501 can specifically be used to collect the data access requests that call the cache access code to obtain the cache access request.

[0109] Optionally, the cache preheating device provided by the embodiment of the present invention further includes a request storage module, which is used to output the cache access request to the access request storage location before generating the cache preheating task based on the cache access request.

[0110] Optionally, the aforementioned cache preheating task generation module 502 can specifically be used to read the cache access request from the access request storage location based on the cache preheating period corresponding to the business application, and generate the cache preheating task based on the read cache access request.

[0111] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described functional modules can refer to the corresponding process in the foregoing method embodiments and will not be elaborated here.

[0112] An embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the cache preheating method provided in any of the foregoing embodiments.

[0113] An embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored. When the program is executed by a processor, it implements the cache preheating method provided in any of the foregoing embodiments.

[0114] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the cache preheating method as described in any of the embodiments of the present invention when executed by a processor.

[0115] Next, refer to Figure 6 , which shows a schematic structural diagram of a computer system 600 of an electronic device suitable for implementing the embodiments of the present invention. Figure 6 The shown electronic device is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.

[0116] As Figure 6 shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage section 608 into the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.

[0117] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as required. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 610 as required so that a computer program read therefrom is installed into the storage section 608 as required.

[0118] Specifically, according to the embodiments disclosed by the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed by the present invention include a computer program product which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, the above-described functions defined in the system of the present invention are performed.

[0119] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and the combination of blocks in a block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0121] The modules and / or units involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules and / or units can also be provided in a processor. For example, it can be described as: a processor includes a cache access request acquisition module, a cache warm-up task generation module, and a warm-up module. Among them, the names of these modules do not constitute a limitation to the module itself in some cases.

[0122] As another aspect, the present invention also provides a computer-readable medium, which can be included in the device described in the above embodiments; or can exist alone without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the device is enabled to: acquire a cache access request sent by a service application to the current service node; generate a cache warm-up task based on the cache access request; and perform cache warm-up on a target service node based on the cache warm-up task.

[0123] The above specific embodiments do not limit the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A cache preheating method, characterized in that, Including: Obtaining a cache access request sent by a business application to the current service node; Generating a cache warm-up task based on the cache access request; And Performing cache warm-up on a target service node based on the cache warm-up task.

2. The cache warm-up method according to claim 1, wherein Before obtaining the cache access request sent by the business application to the current service node, the cache warm-up method further includes: Marking the interface code that the business application needs to call to access the cache data of the current service node as cache access code; The obtaining of the cache access request sent by the business application to the current service node includes: Collecting the data access requests that call the cache access code to obtain the cache access request.

3. The cache warm-up method according to claim 2, wherein The marking of the interface code that the business application needs to call to access the cache data of the current service node as cache access code includes: Based on aspect-oriented programming technology, marking the interface code that the business application needs to call to access the cache data of the current service node as cache access code.

4. The cache preheating method according to claim 1, wherein Before generating the cache warm-up task based on the cache access request, the cache warm-up method further includes: Outputting the cache access request to the access request storage location; The generating of the cache warm-up task based on the cache access request includes: Reading the cache access request from the access request storage location based on the cache warm-up period corresponding to the business application, and generating the cache warm-up task based on the read cache access request.

5. The cache preheating method according to claim 1, characterized in that, The generating of the cache warm-up task based on the cache access request includes: When the resource utilization rate of the current service node is not less than a preset ratio, generating a cache warm-up task based on the cache access request.

6. The cache preheating method according to claim 1, wherein The generating of the cache warm-up task based on the cache access request includes: Replacing the network address in the cache access request with the network address of the target service node to obtain a cache warm-up request; and Adding the network address and authentication information of the target service node to the cache warm-up request to obtain the cache warm-up task.

7. The cache warm-up method according to claim 6, characterized in that, The performing of cache warm-up on the target service node based on the cache warm-up task includes: Sending the cache warm-up task to the target service node through the network address of the target service node, so that the target service node performs legal authentication on the cache warm-up task based on the authentication information, and after the authentication is passed, obtains the cache warm-up request, and loads the corresponding cache data based on the cache warm-up request.

8. A cache preheating device, characterized in that, Including: A cache access request obtaining module, configured to obtain a cache access request sent by a business application to the current service node; A cache warm-up task generating module, configured to generate a cache warm-up task based on the cache access request; And A warm-up module, configured to perform cache warm-up on a target service node based on the cache warm-up task.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the cache warm-up method according to any one of claims 1 to 7.

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