Source return detection method and device for monitoring cache fault, equipment and storage medium

By listening to cache and database read operations, cache failures are dynamically identified and source-free prompts are sent, which solves the automatic identification and rapid response of cache failure handling in high concurrency scenarios, and improves system stability.

CN119512879AActive Publication Date: 2025-02-25GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411736960.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-02-25
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In high concurrency scenarios, the prior art lacks the mechanism of automatic identification and rapid response to handle cache failures, resulting in system performance degradation or service interruption.

Method used

By monitoring cache read operations and database read operations, using cache read operation monitoring algorithm and database read operation monitoring algorithm, dynamically monitor the call chain of the target interface, simulate returning non-existent cache operations, determine the return result to be recorded as cache keys to the call chain, and parse the database target table, judge the existence of the cache key, and send no return source prompt information.

Benefits of technology

It realizes automatic identification of no return source interface, quickly detects recovery capabilities in cache failures, and improves the stability of application in cache failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512879A_ABST
    Figure CN119512879A_ABST
Patent Text Reader

Abstract

The invention discloses a source return detection method, device and equipment for monitoring a cache fault and a storage medium, and the method comprises the steps: carrying out the dynamic monitoring of a read operation of a cache of a call chain through a target interface, and after the operation of the read cache is simulated and returned to be inexistent, monitoring an expected return value of an algorithm according to the read operation of the cache; determining and returning a result of the cache read operation monitoring algorithm, recording the result as a cache key to the call chain, dynamically monitoring the database read operation, if the cache key exists in the call chain, analyzing and recording the target table, and when monitoring of the call chain of the interface is finished, obtaining all recorded data; and if the non-null cache key exists and the table in the database does not exist, sending prompt information that the target interface does not return to the source. Therefore, by monitoring the read operation of the cache and the read operation of the database, the non-back-to-source interface is automatically identified, and whether the cache has the quick recovery capability or not when the cache breaks down is quickly detected, so that the application stability when the cache breaks down is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cache technology, and more specifically, to a method, device, equipment and storage medium for detecting a source failure of a monitoring cache. Background Art

[0002] In high-concurrency scenarios, cache is widely used. Caching can effectively improve the response speed and performance of the system and reduce the pressure on the database. However, there is a key problem in the current use of cache.

[0003] When a cache fails, whether the system has the ability to recover quickly is still an unknown area. For applications in high-concurrency scenarios, cache stability is crucial. If the cache fails and cannot be recovered quickly, it may cause a sharp decline in system performance or even service interruption.

[0004] Currently, although some manual methods can be used to troubleshoot and handle cache failures, there is a lack of an automatic identification and rapid response mechanism. For example, for non-back-source interfaces and frequently called interfaces, cache failures may have a greater impact on the system, but there is currently a lack of effective means to automatically identify these key interfaces and encourage R&D personnel to focus on and optimize them.

[0005] In summary, in high-concurrency scenarios, there is an urgent need for a method that can automatically identify key interfaces and quickly promote optimization when cache failures occur, so as to improve the stability of applications when cache failures occur. Summary of the invention

[0006] In view of the above problems, the present application provides a method, device, equipment and storage medium for back-to-source detection of monitoring cache failures to improve the stability of applications when cache failures occur.

[0007] In order to achieve the above objectives, the specific plan is proposed as follows:

[0008] A method for detecting a source failure of a monitoring cache includes:

[0009] Using the cache read operation monitoring algorithm, the cache read operation of its call chain is dynamically monitored through the target interface;

[0010] After simulating the read operation of the cache to return non-existence, determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm;

[0011] Using the result of the cache read operation monitoring algorithm as a cache key, and recording it in the call chain;

[0012] Using a database read operation monitoring algorithm, dynamically monitor the read operation of the database of its call chain through the target interface, and when monitoring that a read operation is performed on the target table in the database, determine whether the cache key exists in the call chain;

[0013] If yes, parse and record the target table to the call chain;

[0014] When the call chain of the target interface ends monitoring, all recorded data in the call chain are obtained;

[0015] If there is a non-empty cache key in the record data and the table does not exist in the database, a prompt message indicating that the target interface has no return source is sent to the management terminal.

[0016] Optionally, determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm includes:

[0017] If the expected return value of the cache read operation monitoring algorithm is an integer, the result of the cache read operation monitoring algorithm is 0;

[0018] If the expected return value of the cache read operation monitoring algorithm is not an integer, the result returned by the cache read operation monitoring algorithm is empty.

[0019] Optionally, when the call chain of the target interface ends monitoring, all recorded data in the call chain is obtained, including:

[0020] When the call chain of the target interface ends monitoring, it is determined whether there is record data in the call chain. If so, all record data in the call chain are obtained.

[0021] Optionally, the cache read operation monitoring algorithm includes one or more of a redis.clients.jedis.Connection.sendCommand algorithm, a getBulkReply algorithm, a getMultiBulkReply algorithm, and a getIntegerReply algorithm.

[0022] A back-to-source detection device for monitoring cache failures, comprising:

[0023] A cache read operation monitoring unit, used to dynamically monitor the cache read operation of its call chain through a target interface using a cache read operation monitoring algorithm;

[0024] A cache monitoring return unit, used for determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm after simulating the return of the operation of reading the cache as non-existent;

[0025] A cache key recording unit, configured to use the result of the cache read operation monitoring algorithm as a cache key and record it in the call chain;

[0026] A cache key existence judgment unit is used to dynamically monitor the read operation of the database of its call chain through the target interface by using a database read operation monitoring algorithm, and when it is monitored that the target table in the database is executed with a read operation, it is judged whether the cache key exists in the call chain, and if so, the parsing record unit is executed;

[0027] The parsing and recording unit is used to parse and record the target table to the call chain;

[0028] A record data acquisition unit, used for acquiring all record data in the call chain after the call chain of the target interface ends monitoring;

[0029] The prompt information sending unit is used to send a prompt information that the target interface has no return source to the management terminal if there is a non-empty cache key in the record data and there is no table in the database.

[0030] Optionally, the cache monitoring return unit includes:

[0031] An integer result returning unit, used for returning the result of the cache read operation monitoring algorithm as 0 if the expected return value of the cache read operation monitoring algorithm is an integer;

[0032] The non-integer result returning unit is used to return the result of the cache read operation monitoring algorithm as null if the expected return value of the cache read operation monitoring algorithm is not an integer.

[0033] Optionally, the record data acquisition unit includes:

[0034] The record data acquisition subunit is used to determine whether there is record data in the call chain after the call chain of the target interface ends monitoring, and if so, to acquire all record data in the call chain.

[0035] Optionally, the cache read operation monitoring algorithm includes one or more of a redis.clients.jedis.Connection.sendCommand algorithm, a getBulkReply algorithm, a getMultiBulkReply algorithm, and a getIntegerReply algorithm.

[0036] A back-to-source detection device for monitoring cache failures, comprising a memory and a processor;

[0037] The memory is used to store programs;

[0038] The processor is used to execute the program to implement the various steps of the method for detecting a source return of a snoop cache failure as described above.

[0039] A storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting a source return of a snoop cache failure are implemented.

[0040] By means of the above technical scheme, the present application utilizes a cache read operation monitoring algorithm to dynamically monitor the cache read operation of its call chain through the target interface. After simulating the return of the read cache operation as non-existent, the result of the cache read operation monitoring algorithm is determined according to the expected return value of the cache read operation monitoring algorithm. The result of the cache read operation monitoring algorithm is used as the cache key and recorded in the call chain. The database read operation monitoring algorithm is utilized to dynamically monitor the database read operation of its call chain through the target interface. When the read operation is performed on the target table in the database, if there is a cache key in the call chain, the target table is parsed and recorded in the call chain. When the call chain of the interface ends the monitoring, all the recorded data in the call chain are obtained. If there is a non-empty cache key in the recorded data and the table in the database does not exist, a prompt message indicating that the target interface has no return source is sent to the management terminal. It can be seen that by monitoring the cache read operation and the database read operation, the non-return source interface is automatically identified, and the cache is quickly detected to determine whether it has the ability to recover quickly when a failure occurs, thereby improving the stability of the application when the cache fails. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0042] Figure 1 A schematic diagram of a flow chart for implementing source detection of a snoop cache failure provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of the structure of a device for implementing back-to-source detection of a snoop cache failure provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of the structure of a device for implementing back-to-source detection of a monitoring cache failure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] 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 only 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.

[0046] The present application solution can be implemented based on a terminal with data processing capabilities, and the terminal can be applied to a computer, a server, a cloud, etc.

[0047] Next, combine Figure 1 The method for detecting a snoop cache failure back to the source of the present application may include the following steps:

[0048] Step S110: Using the cache read operation monitoring algorithm, dynamically monitor the cache read operation of its call chain through the target interface.

[0049] Specifically, the jvm-sandbox plug-in may be used to dynamically monitor the read cache operation of the call chain of the target interface through the target interface.

[0050] Among them, the algorithm used to monitor the read cache operation may be a cache read operation monitoring algorithm, which may specifically include redis.clients.jedis.Connection.sendCommand algorithm, getBulkReply algorithm, getMultiBulkReply algorithm, getIntegerReply algorithm and other algorithms.

[0051] Step S120: after simulating the read operation of the cache to return non-existence, determine to return the result of the cache read operation monitoring algorithm according to the expected return value of the cache read operation monitoring algorithm.

[0052] Specifically, the cache operation mock can be returned as non-existent, and then the expected return value of the cache read operation monitoring algorithm can be obtained. If the expected return value is an integer, it can indicate that the cache has failed, and if the expected return value is not an integer, it can indicate that the cache has not failed.

[0053] Step S130: Use the result of the cache read operation monitoring algorithm as a cache key and record it in the call chain.

[0054] Among them, the cache key corresponds to the result returned by the monitoring algorithm. The result returned by the monitoring algorithm can be empty, so the content corresponding to the cache key is empty. Then, when the cache key with empty content is recorded in the call chain, the recorded cache key content is empty.

[0055] Step S140, monitor the database read operation, and determine whether there is a cache key in the call chain. If so, execute step S150.

[0056] Specifically, a database read operation monitoring algorithm can be used to dynamically monitor the read operation of the database of its call chain through the target interface, and when it is monitored that the target table in the database is executed a read operation, it is determined whether the cache key exists in the call chain, and if so, step S150 is executed.

[0057] The algorithm used to monitor the read operation of the database may be a database read operation monitoring algorithm, and specifically may include the org.apache.ibatis.mapping.MappedStatement.getBoundSql algorithm.

[0058] It is understandable that by monitoring the database read operation, it is possible to analyze whether the application has the ability to quickly recover when a cache failure occurs. If it is possible to monitor that a table in the database is being read, it can be shown that the database read operation is not empty, which means that the application has the ability to quickly recover when a cache failure occurs.

[0059] Furthermore, if the cache key does not exist in the call chain, there may be a problem in the process of dynamically monitoring the cache read operation, and the process may return to step S110 to continue dynamically monitoring the cache read operation.

[0060] Step S150: parse and record the target table to the call chain.

[0061] It is understandable that when it is monitored that a read operation is performed on the target table in the database and a cache key already exists in the call chain, the table name of the target table can be parsed and recorded in the call chain.

[0062] Step S160: After the call chain of the target interface ends monitoring, all record data in the call chain is obtained.

[0063] Specifically, all the record data in the call chain can be obtained by returning the result from the target interface after the call chain of the target interface ends.

[0064] Furthermore, after all the recorded data are obtained, they can be transmitted to the task analysis center so that the task analysis center can analyze the operation details of the cache and the database.

[0065] Step S170: If there is a non-empty cache key in the recorded data and the table does not exist in the database, a prompt message indicating that the target interface has no return source is sent to the management terminal.

[0066] It is understandable that a non-empty cache key may indicate a cache failure, and the absence of a table in the database may indicate that the database read operation is empty. In this case, the target interface may have no return source. At this time, a prompt message indicating that the target interface has no return source may be sent to the management terminal for the relevant person in charge to confirm and rectify.

[0067] The back-to-source detection method for monitoring cache failure provided in this embodiment uses a cache read operation monitoring algorithm to dynamically monitor the cache read operation of its call chain through the target interface. After simulating the return of the read cache operation as non-existent, the result of the cache read operation monitoring algorithm is determined according to the expected return value of the cache read operation monitoring algorithm. The result of the cache read operation monitoring algorithm is used as the cache key and recorded in the call chain. The database read operation monitoring algorithm is used to dynamically monitor the database read operation of its call chain through the target interface. When the target table in the database is monitored to be read, if there is a cache key in the call chain, if so, the target table is parsed and recorded in the call chain. When the call chain of the interface ends the monitoring, all the recorded data in the call chain are obtained. If there is a non-empty cache key in the recorded data and the table in the database does not exist, a prompt message that the target interface has no back-to-source is sent to the management terminal. It can be seen that by monitoring the cache read operation and the database read operation, the back-to-source interface is automatically identified, and whether the cache has the ability to recover quickly when a failure occurs is quickly detected, thereby improving the stability of the application when the cache fails.

[0068] In some embodiments of the present application, the process of determining to return the result of the cache read operation monitoring algorithm according to the expected return value of the cache read operation monitoring algorithm mentioned in the above embodiment is introduced, and the process may include the following two cases:

[0069] First, if the expected return value of the cache read operation monitoring algorithm is an integer, the result returned by the cache read operation monitoring algorithm is 0.

[0070] It is understandable that the return value expected by the cache read operation monitoring algorithm is an integer, which can indicate a cache failure of the call chain of the target interface. In addition to 0, other values ​​can be used to indicate the cache failure of the call chain of the target interface.

[0071] Second, if the expected return value of the cache read operation monitoring algorithm is not an integer, the result returned by the cache read operation monitoring algorithm is empty.

[0072] It is understandable that the return result of the cache read operation monitoring algorithm is empty, which may indicate that the cache of the application may not fail.

[0073] The method for detecting the source return of a monitoring cache failure provided in this embodiment returns the result of the cache read operation monitoring algorithm as 0 when the expected return value of the cache read operation monitoring algorithm is an integer, and returns the result of the cache read operation monitoring algorithm as empty when the expected return value of the cache read operation monitoring algorithm is not an integer, and uses this as a sign of whether a cache failure occurs, so that it is easier to analyze in subsequent task analysis to better identify parameters.

[0074] In some embodiments of the present application, the above step S160, when the call chain of the target interface ends monitoring, the process of obtaining all the recorded data in the call chain is further introduced, and the process may include:

[0075] S1. After the call chain of the target interface ends monitoring, determine whether there is record data in the call chain. If so, execute S2.

[0076] Specifically, if no data is recorded in the call chain, there may be a problem in the process of cache dynamic monitoring or database dynamic monitoring, so it is possible to return to step S110 to dynamically monitor the cache read operation again.

[0077] S2. Obtain all record data in the call chain.

[0078] The following describes an apparatus for implementing back-to-source detection of a snoop cache failure provided in an embodiment of the present application. The apparatus for implementing back-to-source detection of a snoop cache failure described below and the method for implementing back-to-source detection of a snoop cache failure described above can refer to each other.

[0079] See also Figure 2 , Figure 2 A schematic diagram of the structure of a device for implementing back-to-source detection of a monitoring cache failure disclosed in an embodiment of the present application.

[0080] like Figure 2 As shown, the device may include:

[0081] The cache read operation monitoring unit 11 is used to dynamically monitor the cache read operation of its call chain through the target interface using the cache read operation monitoring algorithm;

[0082] A cache monitoring return unit 12, configured to determine to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm after simulating the return of the cache read operation as non-existent;

[0083] A cache key recording unit 13, configured to use the result of the cache read operation monitoring algorithm as a cache key and record it in the call chain;

[0084] The cache key existence judgment unit 14 is used to use the database read operation monitoring algorithm to dynamically monitor the read operation of the database of its call chain through the target interface, and when it is monitored that the target table in the database is executed with a read operation, it is judged whether the cache key exists in the call chain, and if so, the parsing recording unit 15 is executed;

[0085] The parsing and recording unit 15 is used to parse and record the target table to the call chain;

[0086] The record data acquisition unit 16 is used to acquire all the record data in the call chain after the call chain of the target interface ends monitoring;

[0087] The prompt information sending unit 17 is used to send a prompt information that the target interface has no return source to the management terminal if there is a non-empty cache key in the record data and there is no table in the database.

[0088] Optionally, the cache monitoring return unit includes:

[0089] An integer result returning unit, used for returning the result of the cache read operation monitoring algorithm as 0 if the expected return value of the cache read operation monitoring algorithm is an integer;

[0090] The non-integer result returning unit is used to return the result of the cache read operation monitoring algorithm as null if the expected return value of the cache read operation monitoring algorithm is not an integer.

[0091] Optionally, the record data acquisition unit includes:

[0092] The record data acquisition subunit is used to determine whether there is record data in the call chain after the call chain of the target interface ends monitoring, and if so, to acquire all record data in the call chain.

[0093] Optionally, the cache read operation monitoring algorithm includes one or more of a redis.clients.jedis.Connection.sendCommand algorithm, a getBulkReply algorithm, a getMultiBulkReply algorithm, and a getIntegerReply algorithm.

[0094] The device for monitoring cache failure back-to-source detection provided in the embodiment of the present application can be applied to devices for monitoring cache failure back-to-source detection, such as terminals: mobile phones, computers, etc. Optionally, Figure 3 The hardware structure diagram of the device for monitoring cache failure back to source detection is shown, referring to Figure 3, the hardware structure of the device for monitoring cache failure back-to-source detection may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0095] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0096] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0097] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;

[0098] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0099] Using the cache read operation monitoring algorithm, the cache read operation of its call chain is dynamically monitored through the target interface;

[0100] After simulating the read operation of the cache to return non-existence, determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm;

[0101] Using the result of the cache read operation monitoring algorithm as a cache key, and recording it in the call chain;

[0102] Using a database read operation monitoring algorithm, dynamically monitor the read operation of the database of its call chain through the target interface, and when monitoring that a read operation is performed on the target table in the database, determine whether the cache key exists in the call chain;

[0103] If yes, parse and record the target table to the call chain;

[0104] When the call chain of the target interface ends monitoring, all recorded data in the call chain are obtained;

[0105] If there is a non-empty cache key in the record data and the table does not exist in the database, a prompt message indicating that the target interface has no return source is sent to the management terminal.

[0106] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0107] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0108] Using the cache read operation monitoring algorithm, the cache read operation of its call chain is dynamically monitored through the target interface;

[0109] After simulating the read operation of the cache to return non-existence, determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm;

[0110] Using the result of the cache read operation monitoring algorithm as a cache key, and recording it in the call chain;

[0111] Using a database read operation monitoring algorithm, dynamically monitor the read operation of the database of its call chain through the target interface, and when monitoring that a read operation is performed on the target table in the database, determine whether the cache key exists in the call chain;

[0112] If yes, parse and record the target table to the call chain;

[0113] When the call chain of the target interface ends monitoring, all recorded data in the call chain are obtained;

[0114] If there is a non-empty cache key in the record data and the table does not exist in the database, a prompt message indicating that the target interface has no return source is sent to the management terminal.

[0115] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0116] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0117] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0118] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting a back-to-source fault in a monitoring cache, characterized in that: include: Using the cache read operation monitoring algorithm, the cache read operation of its call chain is dynamically monitored through the target interface; After simulating the read operation of the cache to return non-existence, determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm; Using the result of the cache read operation monitoring algorithm as a cache key, and recording it in the call chain; Using a database read operation monitoring algorithm, dynamically monitor the read operation of the database of its call chain through the target interface, and when monitoring that a read operation is performed on the target table in the database, determine whether the cache key exists in the call chain; If yes, parse and record the target table to the call chain; When the call chain of the target interface ends monitoring, all recorded data in the call chain are obtained; If there is a non-empty cache key in the record data and the table does not exist in the database, a prompt message indicating that the target interface has no return source is sent to the management terminal.

2. The method according to claim 1, characterized in that Determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm includes: If the expected return value of the cache read operation monitoring algorithm is an integer, the result of the cache read operation monitoring algorithm is 0; If the expected return value of the cache read operation monitoring algorithm is not an integer, the result returned by the cache read operation monitoring algorithm is empty.

3. The method according to claim 1, characterized in that: When the call chain of the target interface ends monitoring, all recorded data in the call chain is obtained, including: When the call chain of the target interface ends monitoring, it is determined whether there is record data in the call chain. If so, all record data in the call chain are obtained.

4. The method according to any one of claims 1 to 3, characterized in that: The cache read operation monitoring algorithm includes one or more of the redis.clients.jedis.Connection.sendCommand algorithm, the getBulkReply algorithm, the getMultiBulkReply algorithm and the getIntegerReply algorithm.

5. A device for detecting a back-to-source fault in a monitoring cache, characterized in that: include: A cache read operation monitoring unit, used to dynamically monitor the cache read operation of its call chain through a target interface using a cache read operation monitoring algorithm; A cache monitoring return unit, used for determining to return a result of the cache read operation monitoring algorithm according to an expected return value of the cache read operation monitoring algorithm after simulating the return of the operation of reading the cache as non-existent; A cache key recording unit, configured to use the result of the cache read operation monitoring algorithm as a cache key and record it in the call chain; A cache key existence judgment unit is used to dynamically monitor the read operation of the database of its call chain through the target interface by using a database read operation monitoring algorithm, and when it is monitored that the target table in the database is executed with a read operation, it is judged whether the cache key exists in the call chain, and if so, the parsing record unit is executed; The parsing and recording unit is used to parse and record the target table to the call chain; A record data acquisition unit, used for acquiring all record data in the call chain after the call chain of the target interface ends monitoring; The prompt information sending unit is used to send a prompt information that the target interface has no return source to the management terminal if there is a non-empty cache key in the record data and there is no table in the database.

6. The device according to claim 5, characterized in that The cache monitoring return unit includes: An integer result returning unit, used for returning the result of the cache read operation monitoring algorithm as 0 if the expected return value of the cache read operation monitoring algorithm is an integer; The non-integer result returning unit is used to return the result of the cache read operation monitoring algorithm as null if the expected return value of the cache read operation monitoring algorithm is not an integer.

7. The device according to claim 5, characterized in that The record data acquisition unit comprises: The record data acquisition subunit is used to determine whether there is record data in the call chain after the call chain of the target interface ends monitoring, and if so, to acquire all record data in the call chain.

8. The method according to any one of claims 5 to 7, characterized in that: The cache read operation monitoring algorithm includes one or more of the redis.clients.jedis.Connection.sendCommand algorithm, the getBulkReply algorithm, the getMultiBulkReply algorithm and the getIntegerReply algorithm.

9. A back-to-source detection device for monitoring cache failure, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the method for detecting a source return of a snoop cache failure as described in any one of claims 1 to 4.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method for detecting a snoop cache failure back to the source as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Data preparation method in test and system provided with the same

    CN102981947A

  • Cache comparison method and device

    CN110096296A

  • Distributed data service processing method, system and device and storage medium

    CN110633320A

  • Back-to-source method in content delivery network and related device

    CN112513830A

  • File searching method, device and equipment and readable storage medium

    CN117615013A