A risk early warning method and system for an information system

By deploying tracing units and call stack feature hash analysis in information systems, the problem of timely detection of memory leaks in information systems has been solved, enabling accurate tracing and early warning of memory leaks, improving the level of detection automation, and optimizing the utilization efficiency of operation and maintenance resources.

CN122132255APending Publication Date: 2026-06-02CHINA NAT INST OF STANDARDIZATION

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA NAT INST OF STANDARDIZATION
Filing Date
2026-01-09
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies make it difficult to detect and locate progressive memory leaks caused by minor defects in information systems in a timely manner. This makes it difficult for maintenance personnel to intervene effectively before a failure occurs, which may lead to service interruption due to resource exhaustion, affecting system reliability and business continuity.

Method used

By deploying a tracing unit at the business request processing entry point of the information system, a tracing identifier is generated, and sampling is performed during memory allocation calls to generate metadata records. Leakage points are checked asynchronously, and leakage indicator analysis and risk warning are performed using call stack feature hashing.

Benefits of technology

It enables accurate tracing and early warning of memory leaks, significantly improves the automation level of memory leak detection, shortens root cause analysis time, optimizes the input-output ratio of operation and maintenance resources, and meets the real-time and efficiency requirements of information systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132255A_ABST
    Figure CN122132255A_ABST
Patent Text Reader

Abstract

The application discloses a risk early warning method and system for an information system, and relates to the technical field of risk early warning. A tracking unit is arranged at a business request processing entrance of the information system, so that a tracking identifier of the business request is obtained; memory allocation call sampling is performed in a processing process of the business request, so that memory allocation call information is obtained; metadata records of the business request are generated; the metadata records are stored, so that a sampling metadata table of the information system is obtained; when it is identified that the business request ends, asynchronous release state checking processing is performed on the sampling metadata table, so that a leakage point set is obtained; the leakage point set is analyzed and processed, so that a leakage index value corresponding to a call stack characteristic hash is obtained; then, abnormality judgment processing is performed, so that a risk result corresponding to the call stack characteristic hash is obtained; and finally, the information system is subjected to risk early warning, so that the effectiveness of memory risk early warning management of the information system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of risk early warning, in particular to a risk early warning method and system for an information system. BACKGROUND

[0002] In the field of information system operation and management technology, with the continuous evolution of software architecture towards microservices and high concurrency processing, real-time and accurate monitoring of the internal running state of the information system has become a core technical link to ensure business continuity and improve service quality. As the core platform that carries modern business logic and data flow, the internal components of the information system interact complexly and resources are frequently dynamically allocated. In this context, a risk early warning method combining fine-grained data collection and intelligent analysis can build a more sensitive and in-depth perception network in the complex software system, thereby significantly improving the automation and intelligence level of operation and maintenance, and enhancing the internal accuracy of the information system and the reliability of service delivery.

[0003] In the current risk early warning technical field, only macro indicators at the system level, such as system overall memory usage and CPU load, are usually periodically collected and compared with pre-set fixed thresholds for alarm. Although this method can capture significant system-level resource depletion events, it has obvious shortcomings in dealing with gradual resource depletion caused by subtle defects, such as slow memory leaks. Such leaks have a very small impact on a single business request, and their signals are completely submerged in the massive normal performance fluctuation data, making the early warning mechanism based on macro thresholds and short-term statistics severely lagging, often triggering an alarm only when resource consumption approaches the physical limit, and failing to locate the specific leak code. This makes it difficult for operation and maintenance personnel to intervene effectively before the fault changes, and may also produce a large number of false alarms lacking direction due to unreasonable thresholds. Ultimately, the service may be interrupted due to unpredictable resource depletion, seriously affecting the reliability of the system and the continuity of the business. SUMMARY

[0004] To overcome the shortcomings of the prior art, the present application provides a risk early warning method and system for an information system, which can effectively solve the problems involved in the background technology.

[0005] To achieve the above purpose, the first aspect of the present application is implemented by the following technical solution: a risk early warning method for an information system, comprising deploying a tracking unit at the business request processing entrance of the information system, and generating a tracking identifier for a business request through the tracking unit to obtain the tracking identifier of the business request.

[0006] Memory allocation call sampling is performed in the processing of the business request to obtain memory allocation call information of the business request in the information system, and metadata records of the business request are generated, the metadata records of the business request including a tracking identifier of the business request, memory allocation call information and a call stack feature hash.

[0007] The metadata records of the business request in the information system are stored to obtain a sampling metadata table of the information system.

[0008] When the end of the business request is identified, asynchronous release state checking processing is performed on the sampling metadata table of the information system to obtain a leakage point set of the information system.

[0009] The leakage point set of the information system in a preset time window is analyzed and processed to obtain a leakage indicator value corresponding to the call stack feature hash of the information system, the leakage indicator value corresponding to the call stack feature hash of the information system is subjected to abnormality determination processing, a risk result corresponding to the call stack feature hash of the information system is obtained, and the information system is subjected to risk early warning.

[0010] Further, the memory allocation call sampling in the processing of the business request specifically includes: when the business request performs memory allocation call, the memory allocation value of the business request is collected, and the sampling frequency is adjusted.

[0011] In the processing of the business request, memory allocation call sampling is performed at the adjusted sampling frequency to obtain memory allocation call information of the business request in the information system and a call stack feature hash, the memory allocation call information including a memory allocation address and a memory allocation value.

[0012] Further, the adjustment of the sampling frequency specifically includes: comparing the memory allocation value of the business request with a set memory allocation threshold value, if the memory allocation value of the business request is less than or equal to the set memory allocation threshold value, the memory allocation call sampling is continued at the current sampling frequency, and if the memory allocation value of the business request is greater than the set memory allocation threshold value, the current sampling frequency is added by a set sampling frequency supplement value to obtain a sampling frequency target value, and the memory allocation call sampling is performed at the sampling frequency target value.

[0013] Further, the asynchronous release state checking processing on the sampling metadata table of the information system specifically includes: when the end of the business request is identified, a background checking task is triggered, and the background checking task reads the tracking identifier of the business request from the memory storage of the current thread.

[0014] Based on the trace identifier of the business request, a query is performed in the sampled metadata table of the information system to obtain the metadata records of all business requests containing the trace identifier. For each obtained metadata record of the business request, a memory status verification operation is performed.

[0015] Furthermore, the specific process of performing the memory status verification operation is as follows: The memory status verification operation calls the debugging interface provided by the memory allocator to confirm whether the memory block pointed to by the memory allocation address recorded in the metadata record of the business request is still marked as allocated. If it is confirmed that the memory block is still marked as allocated, the metadata record of the business request is marked as a leakage point of the information system, and all marked metadata records are collected to form a leakage point set of the information system. If it is confirmed that the memory block has been marked as released, no marking is performed.

[0016] Furthermore, the analysis and processing of the set of leakage points of information systems within the preset time window is specifically carried out by setting a preset time window of fixed length and collecting the set of leakage points of all information systems within the preset time window.

[0017] Based on the call stack feature hash in the metadata record of the business request, the leak points in the information system's leak point set are classified and aggregated. For leak points with the same call stack feature hash, the number of times the leak point corresponding to the call stack feature hash appears is counted.

[0018] The frequency of leaks corresponding to call stack feature hashes is obtained by dividing the number of times the leak point appears by the number of times the memory allocation call corresponding to the call stack feature hash is sampled within the preset time window.

[0019] For leak points with the same call stack feature hash, the memory allocation values ​​in the metadata records corresponding to the leak points are added together to obtain the total amount of leaked memory corresponding to the call stack feature hash.

[0020] Furthermore, the specific process for obtaining the leakage index value corresponding to the call stack feature hash of the information system is as follows: the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system are comprehensively processed to obtain the leakage index value corresponding to the call stack feature hash of the information system. The leakage index value corresponding to the call stack feature hash of the information system represents the quantification result of the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system, which together quantify the severity of memory leakage risk of the code path corresponding to the call stack.

[0021] Furthermore, the abnormal judgment processing of the leakage index value corresponding to the call stack feature hash of the information system is as follows: the risk result corresponding to the call stack feature hash of the information system includes risky and risk-free.

[0022] The leakage indicator value corresponding to the call stack feature hash of the information system is compared with the preset leakage indicator threshold. If the leakage indicator value corresponding to the call stack feature hash of the information system is higher than the preset leakage indicator threshold, the risk result corresponding to the call stack feature hash of the information system is marked as risky; otherwise, the risk result corresponding to the call stack feature hash of the information system is marked as risk-free.

[0023] Furthermore, the specific process of providing risk warnings for the information system is as follows: if the risk result corresponding to the call stack feature hash of the information system is marked as risky, then a risk warning is issued to the information system, and the risk warning information is sent to the management personnel for warning; if the risk result corresponding to the call stack feature hash of the information system is marked as risk-free, then no risk warning is issued to the information system.

[0024] A second aspect of the present invention provides a risk warning system for an information system, comprising: a tracking identifier module, configured to deploy a tracking unit at the business request processing entry point of the information system, and generate a tracking identifier for the business request through the tracking unit, thereby obtaining the tracking identifier of the business request.

[0025] The data recording module is used to sample memory allocation calls during the processing of business requests, obtain memory allocation call information of business requests in the information system, and then generate metadata records of business requests. The metadata records of business requests include the trace identifier of the business request, memory allocation call information, and call stack feature hash.

[0026] The data storage module is used to store the metadata records of business requests in the information system, and obtain the sampled metadata table of the information system.

[0027] The verification and processing module is used to asynchronously release the status of the sampled metadata table of the information system when the business request is identified as ending, so as to obtain the set of leakage points of the information system.

[0028] The risk warning module is used to analyze and process the set of leakage points of the information system within a preset time window, obtain the leakage index value corresponding to the call stack feature hash of the information system, perform anomaly judgment processing on the leakage index value corresponding to the call stack feature hash of the information system, obtain the risk result corresponding to the call stack feature hash of the information system, and then provide risk warning for the information system.

[0029] The present invention has the following beneficial effects:

[0030] (1) This invention uses a dual association system of tracking identifiers and call stack feature hashes to accurately bind tiny, single-request memory allocation failure events to specific source code files and line numbers. This enables the system to capture continuously generated micro-leakage signals and issue warnings in the precise form of code lines and business requests, thus achieving accurate tracing and early warning of memory leak risks.

[0031] (2) This invention accurately locates the source of leakage to specific code files and line numbers by calling stack feature hash, and uses tracking identifiers to associate it with specific business, realizing a leap from vague alarms of insufficient system memory to accurate diagnosis of a specific type of leakage in a certain line of code of a certain business interface. This shortens the root cause analysis time from traditional day-level experience-based investigation to minute-level automated location. Furthermore, by comprehensively analyzing the frequency and total amount of leakage, the risk level is automatically classified, guiding maintenance personnel to prioritize the issues that pose the greatest threat to system stability, greatly optimizing the input-output ratio of maintenance resources.

[0032] (3) By sampling memory allocation calls and analyzing call stack features during the processing of business requests, this invention makes the monitoring and location of memory leaks no longer dependent on manual inspection and overly rough statistical data, thereby significantly improving the automation level of memory leak detection. The low overhead of the entire system enables it to be applied in production environments, reducing the performance degradation caused by traditional detection methods and meeting the dual requirements of real-time and high efficiency of information systems. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0034] Figure 2 This is a schematic diagram of the system module connections of the present invention. Detailed Implementation

[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] Please see Figure 1 As shown, the first aspect of the present invention provides a technical solution: a risk warning method for an information system, comprising deploying a tracking unit at the business request processing entry point of the information system, generating a tracking identifier for the business request through the tracking unit, thereby obtaining the tracking identifier of the business request.

[0037] It should be added that the tracking unit is a software interception component deployed at the business request processing entry point of the information system. Its function is to generate and inject a unique tracking identifier for each business request and bind the identifier to the processing context of the business request to ensure that it can be accessed and associated by subsequent sampling and verification stages throughout the entire life cycle of the business request.

[0038] During the processing of business requests, memory allocation call sampling is performed to obtain the memory allocation call information of business requests in the information system, and then the metadata record of the business request is generated. The metadata record of the business request includes the trace identifier of the business request, memory allocation call information, and call stack feature hash.

[0039] The metadata records of business requests in the information system are stored to obtain the sampled metadata table of the information system.

[0040] Upon identifying the end of a business request, an asynchronous release status check is performed on the sampled metadata table of the information system to obtain a set of leakage points in the information system.

[0041] The system analyzes and processes the set of leakage points of the information system within a preset time window to obtain the leakage index value corresponding to the call stack feature hash of the information system. It then performs anomaly judgment processing on the leakage index value corresponding to the call stack feature hash of the information system to obtain the risk result corresponding to the call stack feature hash of the information system, and then provides risk warning for the information system.

[0042] Specifically, memory allocation call sampling is performed during the processing of business requests. The process is as follows: when a business request makes a memory allocation call, the memory allocation value of the business request is collected, and the sampling frequency is adjusted. By dynamically adjusting the monitoring intensity according to the memory allocation scale, the utilization efficiency of monitoring resources is optimized, ensuring that higher attention is paid to large-capacity memory allocation behavior, thereby balancing the detection coverage and system performance overhead.

[0043] It should be explained that the memory allocation value of a business request reflects the size of the memory capacity requested by the memory allocation function call during the processing of that business request. This memory allocation value is obtained directly by calling the memory allocator.

[0044] During the processing of business requests, memory allocation calls are sampled at an adjusted sampling frequency to obtain memory allocation call information and call stack feature hash of business requests in the information system. The memory allocation call information includes memory allocation address and memory allocation value.

[0045] It should be noted that the memory allocation address of the business request reflects the starting position of the memory block obtained by the memory allocation call in the process of the business request in the process of the memory allocation call. This memory allocation address is obtained directly by calling the memory allocator. The call stack feature hash of the business request represents the unique feature of the function call sequence on the program execution path at the time when the memory allocation call occurs in the process of the business request. This call stack feature hash is obtained directly by calling the memory allocator.

[0046] Specifically, the sampling frequency is adjusted as follows: the memory allocation value of the business request is compared with the set memory allocation threshold. If the memory allocation value of the business request is less than or equal to the set memory allocation threshold, the memory allocation call sampling continues at the current sampling frequency. If the memory allocation value of the business request is greater than the set memory allocation threshold, the current sampling frequency is added to the set sampling frequency supplement value to obtain the sampling frequency target value, and the memory allocation call sampling is performed at the sampling frequency target value.

[0047] Specifically, the sampling metadata table of the information system is subjected to asynchronous release status verification. The specific process is as follows: when the business request is identified as ending, a background verification task is triggered. The background verification task reads the tracking identifier of the business request from the memory storage of the current thread.

[0048] Based on the trace identifier of the business request, a query is performed in the sampled metadata table of the information system to obtain the metadata records of all business requests containing the trace identifier. For each obtained metadata record of the business request, a memory status verification operation is performed.

[0049] Specifically, the memory status verification operation is performed as follows: The memory status verification operation calls the debugging interface provided by the memory allocator to confirm whether the memory block pointed to by the memory allocation address recorded in the metadata record of the business request is still marked as allocated. If it is confirmed that the memory block is still marked as allocated, the metadata record of the business request is marked as a leakage point of the information system, and all marked metadata records are collected to form a leakage point set of the information system. If it is confirmed that the memory block has been marked as released, no marking is performed, which helps to accurately identify memory resources that have not been released after the business request logic ends.

[0050] Specifically, the process involves analyzing and processing the set of information system leakage points within a preset time window. The specific process is as follows: set a preset time window of fixed length and collect the set of leakage points of all information systems within the preset time window.

[0051] Based on the call stack feature hash in the metadata record of the business request, the leak points in the information system's leak point set are classified and aggregated. For leak points with the same call stack feature hash, the number of times the leak point corresponding to the call stack feature hash appears is counted. This helps to merge scattered leak events belonging to the same code segment, thus highlighting the leak problem of that code path.

[0052] The frequency of leaks corresponding to call stack feature hashes is obtained by dividing the number of times the leak point appears by the number of times the memory allocation call corresponding to the call stack feature hash is sampled within the preset time window.

[0053] For leak points with the same call stack feature hash, the memory allocation values ​​in the metadata records corresponding to the leak points are added together to obtain the total amount of leaked memory corresponding to the call stack feature hash.

[0054] Specifically, the leakage index value corresponding to the call stack feature hash of the information system is obtained. The specific process is as follows: the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system are comprehensively processed to obtain the leakage index value corresponding to the call stack feature hash of the information system. The leakage index value corresponding to the call stack feature hash of the information system represents the quantification result of the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system, which together quantify the severity of memory leakage risk of the code path corresponding to the call stack.

[0055] In this embodiment, the leakage index value corresponding to the call stack feature hash of the information system can be obtained through the following analysis method, with the specific analysis conditions as follows:

[0056] ;

[0057] In the formula, This represents the leakage indicator value corresponding to the call stack feature hash of the information system. This indicates the frequency of leak points corresponding to the call stack feature hash of the information system. This represents the weighting factor corresponding to the set frequency of occurrence of a unit leak point. This represents the total amount of leaked memory corresponding to the call stack feature hash of the information system. This represents the weighting factor corresponding to the set total leaked memory per unit.

[0058] It should be added that, in this embodiment, the preset weighting factors corresponding to the frequency of occurrence of unit leakage points and the total amount of leakage memory per unit are obtained from the risk warning database.

[0059] It should be explained that the weighting factors corresponding to the frequency of occurrence of leakage points per unit and the total amount of leaked memory per unit are used to adjust the importance of the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system in the process of analyzing and obtaining leakage index values. For example, a mapping relationship between the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system and the weighting factors is set in the risk warning database. Through the pre-set mapping relationship, the weighting factors corresponding to the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system in real time can be obtained. By matching the frequency of occurrence of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system with the pre-set mapping relationship, the weighting factors corresponding to the frequency of occurrence of leakage points per unit and the total amount of leaked memory per unit are obtained.

[0060] In this implementation plan, there is a correlation between the frequency of leakage points corresponding to the call stack feature hash of the information system and the total amount of leaked memory; they are not independent entities. For example, although high-frequency, small memory leaks have a small impact on a single instance, they accumulate rapidly and cause significant long-term harm. On the other hand, low-frequency, large memory block leaks, although infrequent, can cause a significant impact on the memory pool on a single instance. By comprehensively analyzing the leakage index value corresponding to the call stack feature hash of the information system, we can quantitatively assess the sum of the immediate resource pressure and long-term cumulative risk caused by the memory leak in that code path. This helps operations and maintenance personnel to judge the urgency and potential impact of the problem, thereby formulating a clear priority remediation strategy, achieving optimal allocation of limited operations and maintenance resources, and prioritizing the handling of leakage points that pose the greatest threat to the overall stability of the system.

[0061] Specifically, the leakage indicator value corresponding to the call stack feature hash of the information system is subjected to anomaly judgment processing. The specific processing process is as follows: the risk result corresponding to the call stack feature hash of the information system includes risky and no risk.

[0062] The leakage indicator value corresponding to the call stack feature hash of the information system is compared with the preset leakage indicator threshold. If the leakage indicator value corresponding to the call stack feature hash of the information system is higher than the preset leakage indicator threshold, the risk result corresponding to the call stack feature hash of the information system is marked as risky; otherwise, the risk result corresponding to the call stack feature hash of the information system is marked as risk-free.

[0063] Specifically, the risk warning process for the information system is as follows: if the risk result corresponding to the call stack feature hash of the information system is marked as risky, then a risk warning is issued for the information system, and risk warning information containing the code location and leakage type corresponding to the call stack feature hash is generated and sent to the management personnel for warning. If the risk result corresponding to the call stack feature hash of the information system is marked as risk-free, then no risk warning is issued for the information system.

[0064] It should be added that risk warning information containing the code location and leakage type corresponding to the call stack feature hash is generated. Based on the call stack information mapping table stored in the risk warning database, the source code file path, function name, and line number corresponding to the call stack feature hash are parsed out and recorded as the code location corresponding to the call stack feature hash. Then, the frequency of leakage points and the total amount of leaked memory obtained from the call stack feature hash within a preset time window are read. The frequency of leakage points is compared with a preset high-frequency leakage frequency threshold, and the total amount of leaked memory is compared with a preset large memory leakage threshold. When the frequency of leakage points is greater than the high-frequency leakage frequency threshold and the total amount of leaked memory is less than the large memory leakage threshold, the leakage type is determined to be high-frequency. For small memory block leaks, when the frequency of the leak point is greater than the high-frequency leak frequency threshold and the total leaked memory amount is greater than or equal to the large memory leak amount threshold, the leak type is determined to be a high-frequency secondary large memory block leak. When the frequency of the leak point is less than or equal to the high-frequency leak frequency threshold and the total leaked memory amount is greater than or equal to the large memory leak amount threshold, the leak type is determined to be a low-frequency secondary large memory block leak. When the frequency of the leak point is less than or equal to the high-frequency leak frequency threshold and the total leaked memory amount is less than the large memory leak threshold, the leak type is determined to be a low-frequency secondary small memory block leak. The code location corresponding to the parsed call stack feature hash and the determined leak type are combined to generate the risk warning information containing the code location corresponding to the call stack feature hash and the leak type.

[0065] A second aspect of the present invention provides a risk warning system for an information system, comprising: a tracking identifier module, configured to deploy a tracking unit at the business request processing entry point of the information system, and generate a tracking identifier for the business request through the tracking unit, thereby obtaining the tracking identifier of the business request.

[0066] The data recording module is used to sample memory allocation calls during the processing of business requests, obtain memory allocation call information of business requests in the information system, and then generate metadata records of business requests. The metadata records of business requests include the trace identifier of the business request, memory allocation call information, and call stack feature hash.

[0067] The data storage module is used to store the metadata records of business requests in the information system, and obtain the sampled metadata table of the information system.

[0068] The verification and processing module is used to asynchronously release the status of the sampled metadata table of the information system when the business request is identified as ending, so as to obtain the set of leakage points of the information system.

[0069] The risk warning module is used to analyze and process the set of leakage points of the information system within a preset time window, obtain the leakage index value corresponding to the call stack feature hash of the information system, perform anomaly judgment processing on the leakage index value corresponding to the call stack feature hash of the information system, obtain the risk result corresponding to the call stack feature hash of the information system, and then provide risk warning for the information system.

[0070] It should be noted that a risk warning method and system for information systems also includes a risk warning database, which stores memory allocation thresholds, sampling frequency supplementary values, fixed-length preset time windows, weight factors corresponding to the frequency of occurrence of unit leakage points, weight factors corresponding to the total amount of leaked memory per unit, leakage index thresholds, call stack information mapping tables, high-frequency leakage frequency thresholds, and large memory leakage thresholds obtained by analyzing historical data.

[0071] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0072] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.

Claims

1. A risk warning method for information systems, characterized in that, include: A tracing unit is deployed at the business request processing entry point of the information system. The tracing unit generates a tracing identifier for the business request, thereby obtaining the tracing identifier of the business request. During the processing of business requests, memory allocation call sampling is performed to obtain the memory allocation call information of business requests in the information system, and then the metadata record of the business request is generated. The metadata record of the business request includes the trace identifier of the business request, memory allocation call information, and call stack feature hash. The metadata records of business requests in the information system are stored to obtain the sampled metadata table of the information system; Upon identifying the end of a business request, an asynchronous release status check is performed on the sampled metadata table of the information system to obtain a set of leakage points in the information system. The system analyzes and processes the set of leakage points of the information system within a preset time window to obtain the leakage index value corresponding to the call stack feature hash of the information system. It then performs anomaly judgment processing on the leakage index value corresponding to the call stack feature hash of the information system to obtain the risk result corresponding to the call stack feature hash of the information system, and then provides risk warning for the information system.

2. The risk warning method for an information system according to claim 1, characterized in that: The specific process of sampling memory allocation calls during the processing of business requests is as follows: When a business request makes a memory allocation call, the memory allocation value of the business request is collected, and the sampling frequency is adjusted accordingly. During the processing of business requests, memory allocation calls are sampled at an adjusted sampling frequency to obtain memory allocation call information and call stack feature hash of business requests in the information system. The memory allocation call information includes memory allocation address and memory allocation value.

3. The risk warning method for an information system according to claim 2, characterized in that: The specific process for adjusting the sampling frequency is as follows: The memory allocation value of the business request is compared with the set memory allocation threshold. If the memory allocation value of the business request is less than or equal to the set memory allocation threshold, the memory allocation call sampling continues at the current sampling frequency. If the memory allocation value of the business request is greater than the set memory allocation threshold, the set sampling frequency supplement value is added to the current sampling frequency to obtain the sampling frequency target value, and the memory allocation call sampling is performed with the sampling frequency target value.

4. The risk warning method for an information system according to claim 1, characterized in that: The asynchronous release status check process for the sampled metadata table of the information system is as follows: Upon detecting the end of a business request, a background verification task is triggered, which reads the trace identifier of the business request from the memory storage of the current thread. Based on the trace identifier of the business request, a query is performed in the sampled metadata table of the information system to obtain the metadata records of all business requests containing the trace identifier. For each obtained metadata record of the business request, a memory status verification operation is performed.

5. The risk warning method for an information system according to claim 4, characterized in that: The specific process of performing the memory state verification operation is as follows: The memory status verification operation calls the debugging interface provided by the memory allocator to confirm whether the memory block pointed to by the memory allocation address recorded in the metadata record of the business request is still marked as allocated. If it is confirmed that the memory block is still marked as allocated, the metadata record of the business request is marked as a leakage point of the information system, and all marked metadata records are collected to form a leakage point set of the information system. If it is confirmed that the memory block has been marked as released, no marking is performed.

6. The risk warning method for an information system according to claim 1, characterized in that: The specific process of analyzing and processing the set of information system leakage points within the preset time window is as follows: Set a preset time window of fixed length and collect a set of all information system leak points within the preset time window; Based on the call stack feature hash in the metadata record of the business request, the leak points in the information system's leak point set are classified and aggregated. For leak points with the same call stack feature hash, the number of times the leak point corresponding to the call stack feature hash appears is counted. Divide the number of times the leak point corresponding to the call stack feature hash appears by the total number of samplings of memory allocation calls corresponding to the call stack feature hash within the preset time window to obtain the frequency of the leak point corresponding to the call stack feature hash. For leak points with the same call stack feature hash, the memory allocation values ​​in the metadata records corresponding to the leak points are summed to obtain the total amount of leaked memory corresponding to the call stack feature hash.

7. The risk warning method for an information system according to claim 6, characterized in that: The specific process for obtaining the leakage indicator value corresponding to the call stack feature hash of the information system is as follows: The frequency of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system are comprehensively processed to obtain the leakage index value corresponding to the call stack feature hash of the information system. The leakage index value corresponding to the call stack feature hash of the information system represents the quantification result of the frequency of leakage points and the total amount of leaked memory corresponding to the call stack feature hash of the information system, which together quantify the severity of memory leakage risk of the code path corresponding to the call stack.

8. The risk warning method for an information system according to claim 7, characterized in that: The specific process for handling the anomaly detection of the leakage indicator value corresponding to the call stack feature hash of the information system is as follows: The risk results corresponding to the call stack feature hash of the information system include risky and risk-free; The leakage indicator value corresponding to the call stack feature hash of the information system is compared with the preset leakage indicator threshold. If the leakage indicator value corresponding to the call stack feature hash of the information system is higher than the preset leakage indicator threshold, the risk result corresponding to the call stack feature hash of the information system is marked as risky; otherwise, the risk result corresponding to the call stack feature hash of the information system is marked as risk-free.

9. The risk warning method for an information system according to claim 8, characterized in that: The specific process for providing risk warnings to information systems is as follows: If the risk result corresponding to the call stack feature hash of the information system is marked as risky, a risk warning will be issued to the information system and the risk warning information will be sent to the management personnel. If the risk result corresponding to the call stack feature hash of the information system is marked as risk-free, no risk warning will be issued to the information system.

10. A risk warning system for an information system, characterized in that, include: The tracking identifier module is used to deploy tracking units at the business request processing entry point of the information system. The tracking unit generates tracking identifiers for business requests, thereby obtaining the tracking identifiers of the business requests. The data recording module is used to sample memory allocation calls during the processing of business requests, obtain memory allocation call information of business requests in the information system, and then generate metadata records of business requests. The metadata records of business requests include the trace identifier of business requests, memory allocation call information, and call stack feature hash. The data storage module is used to store the metadata records of business requests in the information system, and obtain the sampled metadata table of the information system. The verification and processing module is used to perform asynchronous release status verification on the sampled metadata table of the information system when the business request is identified as ending, so as to obtain the set of leakage points of the information system. The risk warning module is used to analyze and process the set of leakage points of the information system within a preset time window, obtain the leakage index value corresponding to the call stack feature hash of the information system, perform anomaly judgment processing on the leakage index value corresponding to the call stack feature hash of the information system, obtain the risk result corresponding to the call stack feature hash of the information system, and then provide risk warning for the information system.