Cache control method and device and related equipment

By receiving and analyzing the client's cache statistics and generating and sending control instructions, the problem of unable to effectively control the client's local cache in the prior art is solved, and dynamic control of cache usage and system performance are achieved.

CN119835233APending Publication Date: 2025-04-15BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411897690.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing technology cannot effectively control the local cache of the client, resulting in unreasonable cache use and affecting system performance.

Method used

By receiving cache statistics sent by the client, analyzing cache usage, generating control instructions and sending them to the client, dynamically controlling the local cache.

Benefits of technology

It realizes effective control of client local cache, ensures reasonable cache usage and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835233A_ABST
    Figure CN119835233A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cache control method and device and related equipment. The method comprises the following steps: receiving cache statistical information which is sent by a client and is generated based on a plurality of service applications; analyzing the cached statistical information to generate an analysis result; and generating a control instruction based on the analysis result, and sending the control instruction to the client, the control instruction being used for controlling the at least one cache based on the analysis result. According to the method, the cache statistical information sent by the client based on the proxy interface is received, so that the reasonability of the cache statistical information is analyzed, whether the use condition of at least one cache included in the cache statistical information is reasonable or not is judged, and the control instruction is correspondingly generated to control the client; the problem that the local cache of the client cannot be effectively controlled in the prior art is solved, and the effect of dynamically controlling the local cache is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a cache control method, device and related equipment. Background Art

[0002] In existing clients, local cache is used in many places to improve system performance. However, the amount of memory occupied by the cache, whether the cache is used reasonably, whether there is cache pollution due to the use of the cache, etc. are often black boxes for system developers, and there is no corresponding data. The server cannot accurately obtain the status of the client's local cache, and thus cannot effectively control the client's local cache. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a cache control method, device and related equipment to solve the problem in the prior art that the local cache of the client cannot be effectively controlled, and achieve the effect of dynamically controlling the local cache. The specific technical solution is as follows:

[0004] In a first aspect of the implementation of the present application, a cache control method is first provided, which is applied to a server, and the method includes:

[0005] Receiving cache statistics information generated based on multiple business applications and sent by a client, the cache statistics information including usage of at least one cache run by the client, the client being provided with a proxy port registered with the server, the proxy port being generated based on the multiple business applications and bound to the multiple business applications, and the proxy port being used to obtain the cache statistics information;

[0006] Analyze the cache statistical information to generate an analysis result, where the analysis result is used to indicate whether the usage ratio of each cache in the at least one cache is within a preset cache ratio range;

[0007] A control instruction is generated based on the analysis result, and the control instruction is sent to the client, where the control instruction is used to control the at least one cache based on the analysis result.

[0008] Optionally, the control instruction includes a close instruction, where the close instruction is used to instruct the client to release a first cache, where the first cache is any one of the at least one cache;

[0009] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0010] If the analysis result indicates that the usage ratio of the first cache is not within a preset cache ratio range, generating the closing instruction;

[0011] Sending the closing instruction to the client;

[0012] First feedback information generated by the client executing the close instruction is received, where the first feedback information is used to indicate whether the client successfully releases the first cache.

[0013] Optionally, the control instruction includes a temporary closing instruction, and the temporary closing instruction is used to instruct the client to suspend the second cache within a preset time period, and the second cache is any one of the at least one cache;

[0014] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0015] If the analysis result indicates that the second cache has been modified, generating the temporary closing instruction;

[0016] Sending the temporary closing instruction to the client;

[0017] Second feedback information generated by the client executing the closing instruction is received, where the second feedback information is used to indicate whether the client successfully suspends the second cache within the preset time period.

[0018] Optionally, the control instruction includes an adjustment instruction, where the adjustment instruction is used to instruct the client to adjust a target parameter of a third cache, where the third cache is any one of the at least one cache;

[0019] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0020] generating the adjustment instruction when the analysis result indicates that the difference between the target parameter of the third cache and the preset parameter exceeds a preset threshold;

[0021] Sending the adjustment instruction to the client;

[0022] Receive third feedback information generated by the client executing the adjustment instruction, where the third feedback information is used to indicate whether a difference between a target parameter of the third buffer in the client and a preset parameter is less than the preset threshold.

[0023] Optionally, before receiving cache statistics information generated based on multiple business applications and sent by the client, the method further includes:

[0024] Receive a registration request sent by the client, the registration request including the IP address and port information of the client, the port information being the port data of the proxy port, the registration request being a request by the client to the server to perform data analysis on the client;

[0025] Verifying the IP address and the port information to generate verification information;

[0026] In a case where the verification information indicates that the IP address and the port information are safe, a communication connection is established with the client.

[0027] Optionally, the receiving cache statistics information generated based on multiple business applications and sent by the client includes:

[0028] receiving, at a preset time point, target encrypted data sent by the client, the target encrypted data being data obtained by the client encrypting the usage of the at least one cache according to a preset encryption algorithm;

[0029] The target encrypted data is decrypted based on the preset encryption algorithm to obtain the cache statistical information generated based on the multiple business applications.

[0030] In a second aspect, a cache control method is provided, which is applied to a client, and the method includes:

[0031] Generate cache statistics information generated by multiple business applications based on a proxy port, the cache statistics information including usage of at least one cache run by the client, the proxy port is generated based on the multiple business applications and is bound to the multiple business applications;

[0032] Sending the cache statistics information to a server;

[0033] A control instruction generated by the server through analysis of the cache statistical information is received, where the control instruction is used to control the at least one cache.

[0034] In a third aspect, a cache control device is provided, which is applied to a server, and the device includes:

[0035] A first receiving module is used to receive cache statistics information generated based on multiple business applications and sent by a client, wherein the cache statistics information includes usage of at least one cache running on the client, and the client is provided with a proxy port registered with the server, wherein the proxy port is generated based on the multiple business applications and bound to the multiple business applications, and the proxy port is used to obtain the cache statistics information;

[0036] A first generating module, configured to analyze the cache statistical information and generate an analysis result, wherein the analysis result is used to indicate whether the usage ratio of each cache in the at least one cache is within a preset cache ratio range;

[0037] A first sending module is used to generate a control instruction based on the analysis result and send the control instruction to the client, where the control instruction is used to control the at least one cache based on the analysis result.

[0038] In a fourth aspect, a cache control device is provided, which is applied to a client, and the device includes:

[0039] A second generating module is used to generate cache statistics information generated by multiple business applications based on a proxy port, wherein the cache statistics information includes usage of at least one cache running on the client, and the proxy port is generated based on the multiple business applications and is bound to the multiple business applications;

[0040] A second sending module, used for sending the cache statistical information to the server;

[0041] The second receiving module is used to receive a control instruction generated by the server through analyzing the cache statistical information, where the control instruction is used to control the at least one cache.

[0042] In the fifth aspect of the embodiments of the present application, an electronic device is also provided, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the cache control method as described in any one of the first aspects.

[0043] In the sixth aspect of the embodiments of the present application, a computer-readable storage medium is further provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the cache control method as described in any one of the first aspects are implemented.

[0044] In a seventh aspect of the embodiments of the present application, the embodiments of the present application further provide a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the cache control method as described in any one of the first aspects.

[0045] The embodiment of the present application provides a cache control method, device and related equipment, the method comprising: receiving cache statistics information generated based on multiple business applications sent by a client, the cache statistics information including the usage of at least one cache run by the client, the client is provided with a proxy port registered to the server, the proxy port is generated based on the multiple business applications and bound to the multiple business applications, and the proxy port is used to obtain the cache statistics information; analyzing the cache statistics information to generate an analysis result, the analysis result is used to indicate whether the usage ratio of each cache in the at least one cache is within the range of the preset cache ratio; generating a control instruction based on the analysis result, and sending the control instruction to the client, the control instruction is used to control the at least one cache based on the analysis result. The present application receives the cache statistics information sent by the client based on the proxy interface, thereby performing a rationality analysis on the cache statistics information, judging whether the usage of at least one cache included in the cache statistics information is reasonable, and then generating a corresponding control instruction to control the client, so as to solve the problem of the inability to effectively control the local cache of the client in the prior art, and achieve the effect of dynamically controlling the local cache. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0047] Figure 1 This is one of the flow charts of the cache control method in the embodiment of the present application;

[0048] Figure 2 This is a schematic diagram of the interaction between the server and the client in the embodiment of the present application;

[0049] Figure 3 This is the second flow chart of the cache control method in the embodiment of the present application;

[0050] Figure 4 This is one of the structural diagrams of the cache control device in the embodiment of the present application;

[0051] Figure 5 This is the second structural diagram of the cache control device in the embodiment of the present application;

[0052] Figure 6 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0055] In addition, the terms "first", "second", etc. may be used in this article to describe various directions, actions, steps or elements, etc., but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element. For example, without departing from the scope of the present application, a first order request may be referred to as a second order request, and similarly, a second order request may be referred to as a first order request. Both the first order request and the second order request are order requests, but they are not the same order request. The terms "first", "second", etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0056] The present application embodiment provides a cache control method, and the method of the present embodiment can be executed by a server, such as Figure 1 As shown, the method includes:

[0057] Step 101: Receive cache statistical information generated based on multiple business applications and sent by a client, wherein the cache statistical information includes usage of at least one cache run by the client, and the client is provided with a proxy port registered with the server, wherein the proxy port is generated based on the multiple business applications and bound to the multiple business applications, and the proxy port is used to obtain the cache statistical information.

[0058] In this embodiment, if Figure 2 As shown, Figure 2Schematic diagram of the interaction between the client and the server in this embodiment, wherein the client and the server perform data interaction, the client in this application includes a business application, and the business application can be various types of management software, management tools, development tools, etc., which are not specifically limited in this embodiment. The server in this embodiment includes a cache monitoring and management system, and the cache monitoring and management system can perform rationality analysis on the received cache statistical information.

[0059] Specifically, the cache statistics include at least one cache usage. In this embodiment, the cache is described by taking the local cache as an example. Generally, multiple local caches are executed in the client. The local cache is a storage mechanism used to temporarily save data in the application to reduce repeated data requests and improve access speed. It is usually implemented in the memory of the user device, server or application, and can quickly access commonly used data and reduce latency and bandwidth consumption.

[0060] In this embodiment, the client is provided with an agent port for obtaining cache statistics, wherein the agent port refers to the port number listened by the agent server when the agent server is used in the network. Through this port, the client can send a request to the agent server, and the agent server forwards the request to the target server and returns the response to the client. The agent port plays an important role in network communication, especially when access is required through an agent. It should be noted that in this embodiment, multiple business applications are bound to the agent port, that is, the agent port is generated according to multiple business applications and is used to obtain cache statistics of the business applications.

[0061] Step 102: Analyze the cache statistical information to generate an analysis result, where the analysis result is used to indicate whether the usage ratio of each cache in the at least one cache is within a preset cache ratio range.

[0062] In this embodiment, after receiving the cache statistical information on the server side, a rationality analysis is performed on the cache statistical information. Specifically, the rationality analysis refers to analyzing the usage of each cache, such as the resource occupancy, hit rate, average processing time, etc. corresponding to each cache.

[0063] It should be noted that in this embodiment, the server can simultaneously obtain cache statistical information sent by multiple clients, so that when analyzing the cache statistical information, the situations of multiple clients can be comprehensively considered and analyzed through preset values ​​or average values. In this way, the accuracy of the analysis of the client's cache usage can be ensured.

[0064] After the analysis is completed, an analysis result is generated, which includes whether the usage of each cache in at least one cache is reasonable. For example, the usage of cache A is normal, the usage of cache B is abnormal, the usage of cache C is normal, and so on. Specifically, the preset cache ratio is the normal usage of each cache, and the usage ratio of each cache can be compared with the preset cache ratio to determine whether the usage of the cache is normal. It should be noted that in this embodiment, the preset cache ratio can be a range, and the specific value can be limited according to the actual situation, which is not specifically limited in this embodiment.

[0065] Step 103: Generate a control instruction based on the analysis result, and send the control instruction to the client, where the control instruction is used to control the at least one cache based on the analysis result.

[0066] In this embodiment, a control instruction is generated based on the generated analysis results, and the control instruction is used to instruct the client to control at least one of the caches. For example, as shown in the above analysis results, the client adjusts cache B after receiving the control instruction. The specific adjustment means may be suspending the cache, closing the cache, or adjusting the cache parameters, etc., which are not specifically limited in this embodiment.

[0067] The present application receives cache statistical information sent by the client based on the proxy interface, thereby performing a rationality analysis on the cache statistical information, determining whether the usage of at least one cache included in the cache statistical information is reasonable, and then generating corresponding control instructions to control the client, so as to solve the problem in the prior art that the local cache of the client cannot be effectively controlled, and achieves the effect of dynamically controlling the local cache.

[0068] In some feasible implementations, optionally, the control instruction includes a close instruction, and the close instruction is used to instruct the client to release a first cache, where the first cache is any one of the at least one cache;

[0069] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0070] If the analysis result indicates that the usage ratio of the first cache is not within a preset cache ratio range, generating the closing instruction;

[0071] Sending the closing instruction to the client;

[0072] First feedback information generated by the client executing the close instruction is received, where the first feedback information is used to indicate whether the client successfully releases the first cache.

[0073] It is important to note that freeing the cache refers to clearing or deleting the data stored in the cache to make room for new data or to ensure that the data is updated. The cache can be stored in a variety of places, such as the browser, operating system, application, or database. The process of freeing the cache can help solve performance problems, free up storage space, or ensure that users get the latest data.

[0074] The first feedback information is generated after the client executes the close instruction. Specifically, the first feedback information is used to indicate whether the client has successfully released the first cache. If the release is successful, the server does not need to continue to monitor the first cache. If the release fails, the server will continue to remind the client to release the first cache or send a warning message to warn the client, thereby ensuring that the local caches run by the client are used reasonably, thereby ensuring the stability of the client operation.

[0075] Optionally, the control instruction includes a temporary closing instruction, and the temporary closing instruction is used to instruct the client to suspend the second cache within a preset time period, and the second cache is any one of the at least one cache;

[0076] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0077] If the analysis result indicates that the second cache has been modified, generating the temporary closing instruction;

[0078] Sending the temporary closing instruction to the client;

[0079] Second feedback information generated by the client executing the closing instruction is received, where the second feedback information is used to indicate whether the client successfully suspends the second cache within the preset time period.

[0080] It is necessary to further explain that cache suspension refers to temporarily stopping the use or access of data in the cache under certain conditions, that is, suspending the cache. This mechanism can be used in a variety of scenarios to ensure data accuracy, consistency or other business requirements. By properly managing the state of the cache, the application can improve flexibility and optimize the user experience.

[0081] After the client executes the temporary close instruction, the second feedback information is generated. Specifically, the second feedback information is used to indicate whether the client has successfully suspended the second cache. If the suspension is successful, the server does not need to continue to monitor the second cache. If the suspension fails, the server will continue to remind the client to suspend the second cache or send a warning message to warn the client, thereby ensuring that the local caches run by the client are used reasonably, thereby ensuring the stability of the client operation.

[0082] Optionally, the control instruction includes an adjustment instruction, where the adjustment instruction is used to instruct the client to adjust a target parameter of a third cache, where the third cache is any one of the at least one cache;

[0083] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0084] generating the adjustment instruction when the analysis result indicates that the difference between the target parameter of the third cache and the preset parameter exceeds a preset threshold;

[0085] Sending the adjustment instruction to the client;

[0086] Receive third feedback information generated by the client executing the adjustment instruction, where the third feedback information is used to indicate whether a difference between a target parameter of the third buffer in the client and a preset parameter is less than the preset threshold.

[0087] In this embodiment, the control instruction also includes an adjustment instruction, which is used to instruct the client to adjust the parameters of the third cache within a preset time period. Specifically, when the analysis result indicates that the parameters of the third cache need to be adjusted, the adjustment instruction is generated based on the third cache. After the client receives the adjustment instruction, it adjusts the relevant parameters in the third cache according to the adjustment instruction.

[0088] It should be further explained that adjusting cache parameters refers to adjusting unreasonable cache parameter settings, such as expiration time, maxSize, etc., which is not specifically limited in this embodiment.

[0089] The third feedback information is generated after the client executes the adjustment instruction. Specifically, the third feedback information is used to indicate whether the client has successfully adjusted the parameters of the third cache. If the adjustment is successful, the server does not need to continue to monitor the third cache. If the adjustment fails, the server will continue to remind the client to continue updating, thereby ensuring that the local cache run by the client is used reasonably, thereby ensuring the stability of the client operation.

[0090] Optionally, before receiving cache statistics information generated based on multiple business applications and sent by the client, the method further includes:

[0091] Receive a registration request sent by the client, the registration request including the IP address and port information of the client, the port information being the port data of the proxy port, the registration request being a request by the client to the server to perform data analysis on the client;

[0092] Verifying the IP address and the port information to generate verification information;

[0093] In a case where the verification information indicates that the IP address and the port information are safe, a communication connection is established with the client.

[0094] In this embodiment, before the server and the client interact with each other, there is a registration process between the client and the server, and the client registers with the server. Specifically, the client generates a registration request, which includes the IP address and port information of the client, and verifies the IP address and port information to generate verification information. Specifically, the verification information is used to indicate whether the IP address and port information meet the requirements or are safe. Specifically, when the IP address and port information are safe and meet the requirements, the server and the client establish a communication connection.

[0095] It should be noted that, specifically, the server is connected to the server through the proxy port set on the client. Through this port, the client can send a request to the proxy server, and the proxy server forwards it, thereby improving the communication efficiency between the server and the client.

[0096] Optionally, the receiving cache statistics information generated based on multiple business applications and sent by the client includes:

[0097] receiving, at a preset time point, target encrypted data sent by the client, the target encrypted data being data obtained by the client encrypting the usage of the at least one cache according to a preset encryption algorithm;

[0098] The target encrypted data is decrypted based on the preset encryption algorithm to obtain the cache statistical information generated based on the multiple business applications.

[0099] In this embodiment, when receiving cache statistics information sent by the client, it will be received at a preset time point, specifically, it can be set to receive the target encrypted data sent by the client once every 1 minute, every 10 minutes, etc. The target encrypted data is data obtained by encrypting at least one cache usage using a preset encryption algorithm.

[0100] It should be noted that an encryption algorithm is a mathematical algorithm that converts plaintext (readable data) into ciphertext (unreadable data) to protect the confidentiality and integrity of data. Encryption algorithms are widely used in fields such as data transmission, storage, and identity authentication. According to their working principles and the types of keys used, encryption algorithms can be divided into two categories: symmetric encryption and asymmetric encryption.

[0101] After the server receives the target encrypted data, it decrypts the target encrypted data according to the preset encryption algorithm to obtain cache statistical information, thereby ensuring the security of message transmission between the server and the client.

[0102] The present application receives cache statistical information sent by the client based on the proxy interface, thereby performing a rationality analysis on the cache statistical information, determining whether the usage of at least one cache included in the cache statistical information is reasonable, and then generating corresponding control instructions to control the client, so as to solve the problem in the prior art that the local cache of the client cannot be effectively controlled, and achieves the effect of dynamically controlling the local cache.

[0103] The present application embodiment provides a cache control method, and the method of the present embodiment can be executed by a client, such as Figure 3 As shown, the method includes:

[0104] Step 301: Generate cache statistics information generated by multiple business applications based on a proxy port, wherein the cache statistics information includes usage of at least one cache running on the client, and the proxy port is generated based on the multiple business applications and bound to the multiple business applications.

[0105] Step 302: Send the cache statistics information to the server.

[0106] Step 303: Receive a control instruction generated by the server after analyzing the cache statistical information, where the control instruction is used to control the at least one cache.

[0107] The present application receives cache statistical information sent by the client based on the proxy interface, thereby performing a rationality analysis on the cache statistical information, determining whether the usage of at least one cache included in the cache statistical information is reasonable, and then generating corresponding control instructions to control the client, so as to solve the problem in the prior art that the local cache of the client cannot be effectively controlled, and achieves the effect of dynamically controlling the local cache.

[0108] like Figure 4 As shown, the embodiment of the present application also provides a cache control device, such as Figure 4 As shown, applied to a server, the cache control device 400 includes:

[0109] A first receiving module 410 is configured to receive cache statistics information sent by a client, wherein the cache statistics information includes usage of at least one cache running on the client, and the client is provided with a proxy port for obtaining the cache statistics information;

[0110] A first generating module 420 is configured to receive cache statistics information generated based on multiple business applications and sent by a client, wherein the cache statistics information includes usage of at least one cache running on the client, and the client is provided with a proxy port registered with the server, wherein the proxy port is generated based on the multiple business applications and bound to the multiple business applications, and the proxy port is used to obtain the cache statistics information;

[0111] The first sending module 430 is configured to generate a control instruction based on the analysis result, and send the control instruction to the client, wherein the control instruction is used to control the at least one cache based on the analysis result.

[0112] Optionally, the control instruction includes a close instruction, where the close instruction is used to instruct the client to release a first cache, where the first cache is any one of the at least one cache;

[0113] The first sending module 430 includes:

[0114] A first generating submodule, configured to generate the closing instruction when the analysis result indicates that the usage ratio of the first cache is not within a range of a preset cache ratio;

[0115] A first sending submodule, used for sending the closing instruction to the client;

[0116] A first receiving submodule is configured to receive first feedback information generated by the client executing the closing instruction, where the first feedback information is used to indicate whether the client has successfully released the first cache.

[0117] Optionally, the control instruction includes a temporary closing instruction, and the temporary closing instruction is used to instruct the client to suspend the second cache within a preset time period, and the second cache is any one of the at least one cache;

[0118] The first sending module 430 includes:

[0119] A second generating submodule, configured to generate the temporary closing instruction when the analysis result indicates that the second cache has been modified;

[0120] A second sending submodule, used for sending the temporary closing instruction to the client;

[0121] The second receiving submodule is configured to receive second feedback information generated by the client executing the closing instruction, wherein the second feedback information is used to indicate whether the client successfully suspends the second cache within the preset time period.

[0122] Optionally, the control instruction includes an adjustment instruction, where the adjustment instruction is used to instruct the client to adjust a target parameter of a third cache, where the third cache is any one of the at least one cache;

[0123] The first sending module 430 includes:

[0124] A third generating submodule, configured to generate the adjustment instruction when the analysis result indicates that the difference between the target parameter of the third cache and the preset parameter exceeds a preset threshold;

[0125] A third sending submodule, used for sending the adjustment instruction to the client;

[0126] The third receiving submodule is used to receive third feedback information generated by the client executing the adjustment instruction, wherein the third feedback information is used to indicate whether the difference between the target parameter of the third buffer in the client and the preset parameter is less than the preset threshold.

[0127] Optionally, also include:

[0128] A registration receiving module, used to receive a registration request sent by the client, wherein the registration request includes the IP address and port information of the client, the port information is the port data of the proxy port, and the registration request is a request by the client to the server to perform data analysis on the client;

[0129] A registration verification module, used to verify the IP address and the port information and generate verification information;

[0130] A communication module is used to establish a communication connection with the client when the verification information indicates that the IP address and the port information are safe.

[0131] Optionally, the first receiving module 410 includes:

[0132] A fourth receiving submodule is used to receive target encrypted data sent by the client at a preset time point, wherein the target encrypted data is data obtained by encrypting the usage of the at least one cache by the client according to a preset encryption algorithm;

[0133] The decryption submodule is used to decrypt the target encrypted data based on the preset encryption algorithm to obtain the cache statistical information generated based on the multiple business applications.

[0134] The present application receives cache statistical information sent by the client based on the proxy interface, thereby performing a rationality analysis on the cache statistical information, determining whether the usage of at least one cache included in the cache statistical information is reasonable, and then generating corresponding control instructions to control the client, so as to solve the problem in the prior art that the local cache of the client cannot be effectively controlled, and achieves the effect of dynamically controlling the local cache.

[0135] like Figure 5 As shown, the embodiment of the present application also provides a cache control device, which is applied to a client, such as Figure 5 As shown, the cache control device 500 includes:

[0136] A second generating module 510 is used to generate cache statistics information generated by multiple business applications based on a proxy port, wherein the cache statistics information includes usage of at least one cache running on the client, and the proxy port is generated based on the multiple business applications and is bound to the multiple business applications;

[0137] A second sending module 520, configured to send the cache statistical information to a server;

[0138] The second receiving module 530 is used to receive a control instruction generated by the server after analyzing the cache statistical information, where the control instruction is used to control the at least one cache.

[0139] The present application receives cache statistical information sent by the client based on the proxy interface, thereby performing a rationality analysis on the cache statistical information, determining whether the usage of at least one cache included in the cache statistical information is reasonable, and then generating corresponding control instructions to control the client, so as to solve the problem in the prior art that the local cache of the client cannot be effectively controlled, and achieves the effect of dynamically controlling the local cache.

[0140] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 600 includes a memory 610 and a processor 620. The number of the processor 620 in the electronic device 600 may be one or more. Figure 6 A processor 620 is taken as an example; the memory 610 and the processor 620 in the server can be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0141] The memory 610, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the member push method in the embodiment of the present application. The processor 620 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions and modules stored in the memory 610, thereby realizing the above-mentioned cache control method.

[0142] The processor 620 is used to run the computer program stored in the memory 610 to implement the following steps:

[0143] Receiving cache statistics information generated based on multiple business applications and sent by a client, the cache statistics information including usage of at least one cache run by the client, the client being provided with a proxy port registered with the server, the proxy port being generated based on the multiple business applications and bound to the multiple business applications, and the proxy port being used to obtain the cache statistics information;

[0144] Analyze the cache statistical information to generate an analysis result, where the analysis result is used to indicate whether the usage ratio of each cache in the at least one cache is within a preset cache ratio range;

[0145] A control instruction is generated based on the analysis result, and the control instruction is sent to the client, where the control instruction is used to control the at least one cache based on the analysis result.

[0146] Optionally, the control instruction includes a close instruction, where the close instruction is used to instruct the client to release a first cache, where the first cache is any one of the at least one cache;

[0147] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0148] If the analysis result indicates that the usage ratio of the first cache is not within a preset cache ratio range, generating the closing instruction;

[0149] Sending the closing instruction to the client;

[0150] First feedback information generated by the client executing the close instruction is received, where the first feedback information is used to indicate whether the client successfully releases the first cache.

[0151] Optionally, the control instruction includes a temporary closing instruction, and the temporary closing instruction is used to instruct the client to suspend the second cache within a preset time period, and the second cache is any one of the at least one cache;

[0152] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0153] If the analysis result indicates that the second cache has been modified, generating the temporary closing instruction;

[0154] Sending the temporary closing instruction to the client;

[0155] Second feedback information generated by the client executing the closing instruction is received, where the second feedback information is used to indicate whether the client successfully suspends the second cache within the preset time period.

[0156] Optionally, the control instruction includes an adjustment instruction, where the adjustment instruction is used to instruct the client to adjust a target parameter of a third cache, where the third cache is any one of the at least one cache;

[0157] The generating a control instruction based on the analysis result and sending the control instruction to the client comprises:

[0158] generating the adjustment instruction when the analysis result indicates that the difference between the target parameter of the third cache and the preset parameter exceeds a preset threshold;

[0159] Sending the adjustment instruction to the client;

[0160] Receive third feedback information generated by the client executing the adjustment instruction, where the third feedback information is used to indicate whether a difference between a target parameter of the third buffer in the client and a preset parameter is less than the preset threshold.

[0161] Optionally, before receiving cache statistics information generated based on multiple business applications and sent by the client, the method further includes:

[0162] Receive a registration request sent by the client, the registration request including the IP address and port information of the client, the port information being the port data of the proxy port, the registration request being a request by the client to the server to perform data analysis on the client;

[0163] Verifying the IP address and the port information to generate verification information;

[0164] In a case where the verification information indicates that the IP address and the port information are safe, a communication connection is established with the client.

[0165] Optionally, the receiving cache statistics information generated based on multiple business applications and sent by the client includes:

[0166] receiving, at a preset time point, target encrypted data sent by the client, the target encrypted data being data obtained by the client encrypting the usage of the at least one cache according to a preset encryption algorithm;

[0167] The target encrypted data is decrypted based on the preset encryption algorithm to obtain the cache statistical information generated based on multiple business applications.

[0168] or

[0169] Generate cache statistics information generated by multiple business applications based on a proxy port, the cache statistics information including usage of at least one cache run by the client, the proxy port is generated based on the multiple business applications and is bound to the multiple business applications;

[0170] Sending the cache statistics information to a server;

[0171] A control instruction generated by the server through analysis of the cache statistical information is received, where the control instruction is used to control the at least one cache.

[0172] The present application receives cache statistical information sent by the client based on the proxy interface, thereby performing a rationality analysis on the cache statistical information, determining whether the usage of at least one cache included in the cache statistical information is reasonable, and then generating corresponding control instructions to control the client, so as to solve the problem in the prior art that the local cache of the client cannot be effectively controlled, and achieves the effect of dynamically controlling the local cache.

[0173] The computer-readable storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: 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 this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.

[0174] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0175] The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0176] Computer program code for performing the operation of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0177] An embodiment of the present application further provides a computer program product, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the various processes of the above-mentioned cache control method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0178] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A cache control method, characterized in that: Applied to a server, the method comprises: Receiving cache statistics information generated based on multiple business applications and sent by a client, the cache statistics information including usage of at least one cache run by the client, the client being provided with a proxy port registered with the server, the proxy port being generated based on the multiple business applications and bound to the multiple business applications, and the proxy port being used to obtain the cache statistics information; Analyze the cache statistical information to generate an analysis result, where the analysis result is used to indicate whether the usage ratio of each cache in the at least one cache is within a preset cache ratio range; A control instruction is generated based on the analysis result, and the control instruction is sent to the client, where the control instruction is used to control the at least one cache based on the analysis result.

2. The method according to claim 1, characterized in that The control instruction includes a closing instruction, where the closing instruction is used to instruct the client to release a first cache, where the first cache is any one of the at least one cache; The generating a control instruction based on the analysis result and sending the control instruction to the client comprises: If the analysis result indicates that the usage ratio of the first cache is not within a range of a preset cache ratio, generating the closing instruction; Sending the closing instruction to the client; First feedback information generated by the client executing the close instruction is received, where the first feedback information is used to indicate whether the client successfully releases the first cache.

3. The method according to claim 1, characterized in that The control instruction includes a temporary closing instruction, and the temporary closing instruction is used to instruct the client to suspend the second cache within a preset time period, and the second cache is any one of the at least one cache; The generating a control instruction based on the analysis result and sending the control instruction to the client comprises: If the analysis result indicates that the second cache has been modified, generating the temporary closing instruction; Sending the temporary closing instruction to the client; Second feedback information generated by the client executing the closing instruction is received, where the second feedback information is used to indicate whether the client successfully suspends the second cache within the preset time period.

4. The method according to claim 1, characterized in that: The control instruction includes an adjustment instruction, where the adjustment instruction is used to instruct the client to adjust a target parameter of a third cache, where the third cache is any one of the at least one cache; The generating a control instruction based on the analysis result and sending the control instruction to the client comprises: generating the adjustment instruction when the analysis result indicates that the difference between the target parameter of the third cache and the preset parameter exceeds a preset threshold; Sending the adjustment instruction to the client; Receive third feedback information generated by the client executing the adjustment instruction, where the third feedback information is used to indicate whether a difference between a target parameter of the third buffer in the client and a preset parameter is less than the preset threshold.

5. The method according to any one of claims 1 to 4, characterized in that: Before receiving cache statistics information generated based on multiple business applications and sent by the client, the method further includes: Receive a registration request sent by the client, the registration request including the IP address and port information of the client, the port information being the port data of the proxy port, the registration request being a request by the client to the server to perform data analysis on the client; Verifying the IP address and the port information to generate verification information; In a case where the verification information indicates that the IP address and the port information are safe, a communication connection is established with the client.

6. The method according to claims 1 to 5, characterized in that The receiving cache statistics information generated based on multiple business applications and sent by the client includes: receiving, at a preset time point, target encrypted data sent by the client, the target encrypted data being data obtained by the client encrypting the usage of the at least one cache according to a preset encryption algorithm; The target encrypted data is decrypted based on the preset encryption algorithm to obtain the cache statistical information generated based on the multiple business applications.

7. A cache control method, characterized in that: Applied to a client, the method comprises: Generate cache statistics information generated by multiple business applications based on a proxy port, the cache statistics information including usage of at least one cache run by the client, the proxy port is generated based on the multiple business applications and is bound to the multiple business applications; Sending the cache statistics information to a server; A control instruction generated by the server through analysis of the cache statistical information is received, where the control instruction is used to control the at least one cache.

8. A cache control device, characterized in that: Applied to a server, the device comprises: A first receiving module is used to receive cache statistics information generated based on multiple business applications and sent by a client, wherein the cache statistics information includes usage of at least one cache running on the client, and the client is provided with a proxy port registered with the server, wherein the proxy port is generated based on the multiple business applications and bound to the multiple business applications, and the proxy port is used to obtain the cache statistics information; A first generating module, configured to analyze the cache statistical information and generate an analysis result, wherein the analysis result is used to indicate whether the usage ratio of each cache in the at least one cache is within a preset cache ratio range; A first sending module is used to generate a control instruction based on the analysis result and send the control instruction to the client, where the control instruction is used to control the at least one cache based on the analysis result.

9. A cache control device, characterized in that: Applied to a client, the device comprises: A second generating module is used to generate cache statistics information generated by multiple business applications based on a proxy port, wherein the cache statistics information includes usage of at least one cache running on the client, and the proxy port is generated based on the multiple business applications and is bound to the multiple business applications; A second sending module, used for sending the cache statistical information to the server; The second receiving module is used to receive a control instruction generated by the server through analyzing the cache statistical information, where the control instruction is used to control the at least one cache.

10. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the cache control method as claimed in any one of claims 1 to 7.

11. A computer-readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the cache control method according to any one of claims 1 to 7 are implemented.

12. A computer program product, characterized in that The computer program product is stored in a storage medium, and the computer program product is executed by at least one processor to implement the steps in the cache control method according to any one of claims 1 to 7.