Application performance data acquisition method and device, equipment, medium and program product
By introducing multi-level and adaptive acquisition strategies into the application performance data acquisition method, the problem of fault location difficulties caused by fixed acquisition strategies in the prior art is solved, and more efficient data acquisition and fault location are achieved.
Patent Information
- Application Number
- CN202411849823.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-28
AI Technical Summary
The application performance data acquisition method in the prior art always maintains a fixed acquisition strategy throughout the program operation cycle, resulting in a lack of more detailed data support when an application fails, resulting in difficulty in fault location.
Through multi-level and adaptive acquisition strategies, the performance data of the target application is collected first according to the pre-set first acquisition strategy to detect whether an abnormality occurs. If an abnormality occurs, a higher level strategy is selected among the multiple acquisition levels policies as the second acquisition strategy to perform more detailed data acquisition.
It realizes that when an application abnormality occurs, automatically adjusts the acquisition strategy, improves data acquisition accuracy, reduces the difficulty of fault location, and improves application transaction performance and fault location efficiency.
Smart Images

Figure CN119718866A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to an application performance data collection method, device, equipment, medium and program product. Background Art
[0002] During operation, applications rely on basic environments such as infrastructure, operating systems, and operating frameworks, and will generate various application performance-related data as business transactions proceed, such as CPU usage, memory usage, thread status, etc. By integrating and deploying application performance monitoring programs in the operating system and operating framework where the application is located, or directly in the application, real-time or scheduled sampling monitoring of the application's operating status can be achieved, thereby achieving real-time monitoring of the application's operating health status, and locating the application failure by analyzing the collected application performance data when the application fails.
[0003] The application performance data collection methods in the prior art usually always use a unified monitoring data collection standard for data collection, that is, a fixed application performance data collection strategy is always maintained throughout the entire program operation cycle, and only when the application fails, more detailed data collection is manually triggered. Using the existing application performance data collection methods, if the data collection accuracy set by the collection strategy is high, it will have an impact on business transactions; if the data collection accuracy set by the collection strategy is low, when the application fails or has performance problems, it will be difficult to locate the fault due to the lack of more detailed data support. Summary of the invention
[0004] The present application provides an application performance data collection method, device, equipment, medium and program product, which can solve the problems affecting application transaction performance and fault location through multi-level and adaptive collection strategies.
[0005] In a first aspect, an embodiment of the present application provides a method for collecting application performance data, the method comprising:
[0006] Collecting performance data of a target application according to a preset first collection strategy to obtain first performance data of the target application;
[0007] Detecting whether an abnormality occurs in the target application according to the first performance data;
[0008] If an abnormality is detected in the target application according to the first performance data, a collection strategy is selected from a plurality of collection levels as a second collection strategy; wherein the level of the second collection strategy is higher than the level of the first collection strategy; and the higher the level of the collection strategy, the higher the collection accuracy;
[0009] The performance data of the target application is collected according to the second collection strategy to obtain second performance data of the target application.
[0010] In a second aspect, an embodiment of the present application further provides an application performance data collection device, the device comprising: a first collection module, an anomaly detection module, a strategy selection module, and a second collection module; wherein:
[0011] The first collection module is used to collect the performance data of the target application according to a preset first collection strategy to obtain the first performance data of the target application;
[0012] The anomaly detection module is used to detect whether an anomaly occurs in the target application according to the first performance data;
[0013] The strategy selection module is used to select a collection strategy from a plurality of collection levels as a second collection strategy if an abnormality is detected in the target application according to the first performance data; wherein the level of the second collection strategy is higher than the level of the first collection strategy; and the higher the level of the collection strategy, the higher its collection accuracy;
[0014] The second collection module is used to collect the performance data of the target application according to the second collection strategy to obtain second performance data of the target application.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0016] one or more processors;
[0017] a memory for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the application performance data collection method described in any embodiment of the present application.
[0019] In a fourth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the application performance data collection method described in any embodiment of the present application is implemented.
[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements an application performance data collection method as described in any one of the embodiments of the present invention.
[0021] The embodiment of the present application proposes an application performance data collection method, device, equipment, medium and program product, which first collects the performance data of the target application according to a first collection strategy to obtain the first performance data of the target application; then detects whether the target application is abnormal according to the first performance data; if the target application is detected to be abnormal according to the first performance data, a collection strategy is selected as the second collection strategy from the collection strategies of multiple collection levels; and then collects the performance data of the target application according to the second collection strategy to obtain the second performance data of the target application. That is to say, in the technical solution of the present application, the currently used collection strategy can be adaptively adjusted in the multi-level collection strategy. If the target application is detected to be abnormal, the first collection strategy is automatically adjusted to the second collection strategy. In the prior art, a fixed application performance data collection strategy is always maintained throughout the entire program operation cycle, and only when the application fails, more detailed data collection is manually triggered. Therefore, compared with the prior art, the application performance data collection method, device, equipment, medium and program product proposed in the embodiments of the present application can solve the problems that affect application transaction performance and fault location through multi-level and adaptive collection strategies; moreover, the technical solution of the embodiments of the present application is simple and convenient to implement, easy to popularize, and has a wider scope of application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of an application performance data collection method provided in an embodiment of the present application;
[0023] Figure 2 A flowchart of an application performance data collection method provided by another embodiment of the present application;
[0024] Figure 3 A flowchart of an application performance data collection method provided in yet another embodiment of the present application;
[0025] Figure 4 A schematic diagram of the structure of an application performance data collection device provided in one embodiment of the present application;
[0026] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0027] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0028] Figure 1This is a flow chart of an application performance data collection method provided by an embodiment of the present application. The method can be executed by an application performance data collection device or electronic device. The device or electronic device can be implemented by software and / or hardware. The device or electronic device can be integrated in any intelligent device with network communication function. Figure 1 As shown, the application performance data collection method may include the following steps:
[0029] S101. Collect performance data of a target application according to a preset first collection strategy to obtain first performance data of the target application.
[0030] The application program in the embodiments of the present application refers to computer software designed to solve specific user needs or perform certain tasks. It is a program that runs on the operating system and is designed to help users complete a variety of tasks ranging from entertainment, education to business. The application program can be installed on a variety of devices, including personal computers, smartphones, tablet computers and other smart devices. The target application program in the embodiments of the present application can refer to one application program or multiple applications.
[0031] The data collection strategy in the embodiment of the present application can effectively collect, process and analyze indicators related to application performance to ensure that the application can run stably and efficiently under various conditions. The specific content of the data collection strategy may include: 1) Identifying key performance indicators that are critical to application performance, such as response time, throughput, error rate, CPU usage, memory usage, etc.; 2) Setting reasonable performance thresholds based on business needs and user expectations.
[0032] S102. Detect whether an abnormality occurs in the target application according to the first performance data; if so, execute S103; otherwise, execute S101.
[0033] In a specific embodiment of the present application, after obtaining the first performance data of the target application, a variety of methods can be used to detect whether an abnormality occurs in the target application. For example, if any first performance data exceeds its corresponding normal working threshold, it can be determined that an abnormality occurs in the target application; if each first performance data does not exceed its corresponding normal working threshold, it can be determined that no abnormality occurs in the target application. By detecting whether an abnormality occurs in the target application in real time, potential problems can be discovered and resolved in a timely manner, the frequency of system failures can be reduced, and the application can be ensured to run continuously and stably.
[0034] S103. Select a collection strategy from collection strategies of multiple collection levels as a second collection strategy; wherein the level of the second collection strategy is higher than the level of the first collection strategy; the higher the level of the collection strategy, the higher its collection accuracy.
[0035] In the specific embodiment of the present application, multiple collection strategies of collection levels can be pre-set; wherein, the higher the level of the collection strategy, the higher the collection accuracy. Therefore, in different scenarios and requirements, you can flexibly select a suitable collection strategy to ensure that it can meet immediate needs and avoid unnecessary waste of resources.
[0036] In one embodiment, three collection strategies of collection levels can be pre-set, namely: low level, medium level and high level; among them, the low-level collection strategy can provide basic health checks to ensure the normal operation of the application; its collection content may include: 1) key performance indicators, such as response time, error rate, and throughput. 2) System resource usage, including CPU, memory, disk I / O, and network bandwidth. In addition, the medium-level collection strategy can help users understand the system behavior more deeply and support daily performance optimization; its collection content may include: 1) Add more performance details on the basis of basic monitoring, such as database query time, API call delay, page loading time distribution, etc. 2) User session information, including user operation path and key interaction points. In addition, the high-level collection strategy can help users perform in-depth problem diagnosis and performance optimization, which is suitable for specific events or problem investigations; its collection content may include: 1) Complete request logs, including HTTP header information, request body, and response body. 2) Distributed tracing data, recording the request path and processing time across services. 3) State snapshots within the application, such as object pool size, thread status, etc.
[0037] S104: Collect performance data of the target application according to the second collection strategy to obtain second performance data of the target application.
[0038] In a specific embodiment of the present application, different collection strategies may correspond to different collection accuracy. For example, the collection accuracy of the second collection strategy is higher than the collection accuracy of the first collection strategy. When an exception occurs in the target application, the use of a high-precision collection strategy can at least bring the following benefits: 1) A high-precision data collection strategy can provide more detailed logging and distributed tracing information, so that the specific location and cause of the problem can be quickly identified. 2) Rich data makes the troubleshooting process more direct and reduces the time for guesswork and trial and error. Accurate data can reduce the possibility of erroneous analysis and ensure that the measures taken are targeted at the real root cause of the problem. 3) High-precision data collection strategies and real-time monitoring functions can be notified at the first time a failure occurs and take immediate action. Problems can be solved quickly and accurately, minimizing the impact on users and reducing potential losses to applications.
[0039] The application performance data collection method proposed in the embodiment of the present application first collects the performance data of the target application according to the first collection strategy to obtain the first performance data of the target application; then detects whether the target application is abnormal according to the first performance data; if the target application is detected to be abnormal according to the first performance data, a collection strategy is selected from the collection strategies of multiple collection levels as the second collection strategy; and then the performance data of the target application is collected according to the second collection strategy to obtain the second performance data of the target application. That is to say, in the technical solution of the present application, the currently used collection strategy can be adaptively adjusted in the multi-level collection strategy. If the target application is detected to be abnormal, the first collection strategy is automatically adjusted to the second collection strategy. In the prior art, a fixed application performance data collection strategy is always maintained throughout the entire program operation cycle, and only when the application fails, more detailed data collection is manually triggered. Therefore, compared with the prior art, the application performance data collection method proposed in the embodiment of the present application can solve the problems affecting application transaction performance and fault location through multi-level and adaptive collection strategies; and the technical solution of the embodiment of the present application is simple and convenient to implement, easy to popularize, and has a wider range of applications.
[0040] Figure 2 This is a flow chart of an application performance data collection method provided by another embodiment of the present application. Based on the above technical solution, it is further optimized and expanded, and can be combined with the above optional implementation methods. Figure 2 As shown, the application performance data collection method may include the following steps:
[0041] S201. Collect performance data of a target application according to a preset first collection strategy to obtain first performance data of the target application.
[0042] The first collection strategy in the embodiment of the present application may be a default collection strategy. The collection frequency and collection parameters may be pre-configured in the default collection strategy; wherein the collection parameters may include but are not limited to at least one of the following: response time, throughput, error rate, resource utilization, database performance, cache hit rate, number of concurrent users, log information, front-end performance indicators, etc.
[0043] S202. Detect whether an abnormality occurs in the target application according to the first performance data; if so, execute S203; otherwise, execute S201.
[0044] In one embodiment, if any first performance data exceeds its corresponding normal operating threshold, it can be determined that an abnormality has occurred in the target application; if each first performance data does not exceed its corresponding normal operating threshold, it can be determined that no abnormality has occurred in the target application.
[0045] In one embodiment, the first performance data may be input into a pre-built machine learning model, and the machine learning model may be used to determine whether an abnormality occurs in the target application. This method can not only automatically identify abnormal situations, but also improve detection accuracy through continuous learning.
[0046] In one embodiment, a performance statistical curve of the target application can also be constructed based on the first performance data; and then, whether an abnormality occurs in the target application can be determined based on the performance statistical curve. Specifically, when constructing the performance statistical curve of the target application, the statistical value of the target application in the current time window can be calculated first, and then the performance statistical curve can be constructed based on the statistical value; wherein the statistical value can include: mean value, percentile and standard deviation. This method can not only improve the speed and accuracy of problem detection, but also provide valuable insight opportunities for system optimization.
[0047] S203: Determine the severity of the abnormality of the target application program according to the first performance data.
[0048] In a specific embodiment of the present application, severity level standards may be predefined, including: minor, moderate, severe, urgent, etc. Each level may have a specific form of expression and impact description based on the following factors: user impact, business impact, duration, and recovery difficulty. For example, an increase in response time from a few seconds to tens of seconds, or an increase in error rate from occasional to frequent occurrence, may be a signal of an aggravated anomaly.
[0049] S204. Select a collection strategy from a plurality of collection level collection strategies as a second collection strategy according to the severity of the abnormality of the target application; wherein the level of the second collection strategy is higher than the level of the first collection strategy; and the higher the level of the collection strategy, the higher its collection accuracy.
[0050] In this step, if the severity of the abnormality of the target application is low, a collection strategy with a lower collection level can be selected from multiple collection strategies as the second collection strategy; if the severity of the abnormality of the target application is high, a collection strategy with a higher collection level can be selected from multiple collection strategies as the second collection strategy. The collection strategy selected in this way can be more suitable for the current situation of the target application, thereby improving the speed and accuracy of problem detection.
[0051] S205: Collect performance data of the target application according to the second collection strategy to obtain second performance data of the target application.
[0052] The application performance data collection method proposed in the embodiment of the present application first collects the performance data of the target application according to the first collection strategy to obtain the first performance data of the target application; then detects whether the target application is abnormal according to the first performance data; if the target application is detected to be abnormal according to the first performance data, a collection strategy is selected from the collection strategies of multiple collection levels as the second collection strategy; and then the performance data of the target application is collected according to the second collection strategy to obtain the second performance data of the target application. That is to say, in the technical solution of the present application, the currently used collection strategy can be adaptively adjusted in the multi-level collection strategy. If the target application is detected to be abnormal, the first collection strategy is automatically adjusted to the second collection strategy. In the prior art, a fixed application performance data collection strategy is always maintained throughout the entire program operation cycle, and only when the application fails, more detailed data collection is manually triggered. Therefore, compared with the prior art, the application performance data collection method proposed in the embodiment of the present application can solve the problems affecting application transaction performance and fault location through multi-level and adaptive collection strategies; and the technical solution of the embodiment of the present application is simple and convenient to implement, easy to popularize, and has a wider range of applications.
[0053] Figure 3 A flowchart of an application performance data collection method provided in another embodiment of the present application is provided. The above technical solution is further optimized and expanded, and can be combined with the above optional implementation methods. Figure 3 As shown, the application performance data collection method may include the following steps:
[0054] S301. Collect performance data of a target application according to a preset first collection strategy to obtain first performance data of the target application.
[0055] In this step, the performance data of the target application can be collected at a low-frequency collection frequency; or, the performance data within a first range of the target application can be collected; wherein the low-frequency collection frequency is a collection frequency lower than a predetermined frequency threshold; the performance data within the first range is the key performance data of the target application.
[0056] S302. Detect whether an abnormality occurs in the target application according to the first performance data; if so, execute S303; otherwise, execute S301.
[0057] S303. Select a collection strategy from collection strategies of multiple collection levels as a second collection strategy; wherein the level of the second collection strategy is higher than the level of the first collection strategy; the higher the level of the collection strategy, the higher its collection accuracy.
[0058] In this step, the severity of the abnormality of the target application can be determined based on the first performance data; then, based on the severity of the abnormality of the target application, a collection strategy is selected from the collection strategies of multiple collection levels as the second collection strategy. Specifically, in the case of minor or moderate abnormalities, the use of a lower-level collection strategy can reduce the occupation of system resources (such as CPU, memory, disk I / O and network bandwidth), thereby ensuring that the system can continue to operate normally without being dragged down by additional monitoring burdens; for serious or urgent abnormalities, switching to a high-level collection strategy can ensure that as much relevant information as possible is collected, providing sufficient data support for rapid diagnosis and resolution of the problem.
[0059] S304: Collect performance data of the target application according to the second collection strategy to obtain second performance data of the target application.
[0060] In this step, the performance data of the target application can be collected at a high-frequency collection frequency; or, the performance data within the second range of the target application can be collected; wherein the high-frequency collection frequency is a collection frequency higher than a predetermined frequency threshold; the performance data within the second range is the key performance data and non-key performance data of the target application.
[0061] S305. Detect whether the target application has returned to normal based on the second performance data; if so, execute S301; otherwise, execute S303.
[0062] In a specific embodiment of the present application, if it is detected based on the second performance data that the target application has returned to normal, the performance data of the target application continues to be collected according to the first collection strategy to obtain the first performance data of the target application.
[0063] In one embodiment, if any second performance data exceeds its corresponding normal working threshold, it can be determined that the target application has not returned to normal; if each second performance data does not exceed its corresponding normal working threshold, it can be determined that the target application has returned to normal.
[0064] In one embodiment, the second performance data can also be input into a pre-built machine learning model to determine whether the target application has returned to normal. This method can not only automatically identify abnormal situations, but also improve detection accuracy through continuous learning.
[0065] In one embodiment, a performance statistical curve of the target application can also be constructed based on the second performance data; and then, whether the target application has returned to normal can be determined based on the performance statistical curve. Specifically, when constructing the performance statistical curve of the target application, the statistical value of the target application in the current time window can be calculated first, and then the performance statistical curve can be constructed based on the statistical value; wherein the statistical value can include: mean value, percentile and standard deviation. This method can not only improve the speed and accuracy of problem detection, but also provide valuable insight opportunities for system optimization.
[0066] The application performance data collection method proposed in the embodiment of the present application first collects the performance data of the target application according to the first collection strategy to obtain the first performance data of the target application; then detects whether the target application is abnormal according to the first performance data; if the target application is detected to be abnormal according to the first performance data, a collection strategy is selected from the collection strategies of multiple collection levels as the second collection strategy; and then the performance data of the target application is collected according to the second collection strategy to obtain the second performance data of the target application. That is to say, in the technical solution of the present application, the currently used collection strategy can be adaptively adjusted in the multi-level collection strategy. If the target application is detected to be abnormal, the first collection strategy is automatically adjusted to the second collection strategy. In the prior art, a fixed application performance data collection strategy is always maintained throughout the entire program operation cycle, and only when the application fails, more detailed data collection is manually triggered. Therefore, compared with the prior art, the application performance data collection method proposed in the embodiment of the present application can solve the problems affecting application transaction performance and fault location through multi-level and adaptive collection strategies; and the technical solution of the embodiment of the present application is simple and convenient to implement, easy to popularize, and has a wider range of applications.
[0067] Figure 4 This is a schematic diagram of the structure of an application performance data collection device provided in an embodiment of the present application. Figure 4 As shown, the application performance data collection device includes: a first collection module 401, an anomaly detection module 402, a strategy selection module 403 and a second collection module 404; wherein,
[0068] The first collection module 401 is used to collect the performance data of the target application according to a preset first collection strategy to obtain the first performance data of the target application;
[0069] The anomaly detection module 402 is used to detect whether an anomaly occurs in the target application according to the first performance data;
[0070] The strategy selection module 403 is used to select a collection strategy from a plurality of collection levels as a second collection strategy if an abnormality is detected in the target application according to the first performance data; wherein the level of the second collection strategy is higher than the level of the first collection strategy; the higher the level of the collection strategy, the higher the collection accuracy;
[0071] The second collection module 404 is used to collect the performance data of the target application according to the second collection strategy to obtain second performance data of the target application.
[0072] The above-mentioned application performance data collection device can execute the method provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the application performance data collection method provided by any embodiment of the present application.
[0073] An embodiment of the present invention also provides a computer program product.
[0074] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer program products, which can include one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0075] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 5 , Figure 5 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0076] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0077] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0078] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0079] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in the memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 46 generally perform the functions and / or methods of the embodiments described herein.
[0080] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0081] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing an application performance data collection method provided in an embodiment of the present invention: collecting the performance data of the target application according to a preset first collection strategy to obtain the first performance data of the target application; detecting whether the target application has an abnormality according to the first performance data; if the target application is detected to have an abnormality according to the first performance data, selecting a collection strategy from collection strategies of multiple collection levels as a second collection strategy; wherein the level of the second collection strategy is higher than the level of the first collection strategy; the higher the level of the collection strategy, the higher the collection accuracy; collecting the performance data of the target application according to the second collection strategy to obtain the second performance data of the target application.
[0082] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, an application performance data collection method as provided in all embodiments of the present invention is implemented: collecting performance data of a target application according to a preset first collection strategy to obtain first performance data of the target application; detecting whether an abnormality occurs in the target application according to the first performance data; if an abnormality occurs in the target application according to the first performance data, selecting a collection strategy from collection strategies of multiple collection levels as a second collection strategy; wherein the level of the second collection strategy is higher than the level of the first collection strategy; the higher the level of the collection strategy, the higher its collection accuracy; collecting performance data of the target application according to the second collection strategy to obtain second performance data of the target application. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device or device of electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, 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 that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0083] 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-executing electronic device, apparatus, or device.
[0084] The program code embodied on the computer readable 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.
[0085] Computer program code for performing the operations of the present invention may 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" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0086] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments 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 invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for collecting application performance data, characterized in that: The method comprises: Collecting performance data of a target application according to a preset first collection strategy to obtain first performance data of the target application; Detecting whether an abnormality occurs in the target application according to the first performance data; If an abnormality is detected in the target application according to the first performance data, a collection strategy is selected from a plurality of collection levels as a second collection strategy; wherein the level of the second collection strategy is higher than the level of the first collection strategy; and the higher the level of the collection strategy, the higher the collection accuracy; The performance data of the target application is collected according to the second collection strategy to obtain second performance data of the target application.
2. The method according to claim 1, characterized in that: A collection strategy is selected from collection strategies of multiple collection levels as a second collection strategy, including: Determining the severity of the abnormality of the target application according to the first performance data; According to the severity of the abnormality of the target application, a collection strategy is selected from collection strategies of multiple collection levels as the second collection strategy.
3. The method according to claim 1, characterized in that The method further comprises: detecting whether the target application has returned to normal according to the second performance data; If it is detected according to the second performance data that the target application has returned to normal, the performance data of the target application is collected according to the first collection strategy to obtain the first performance data of the target application.
4. The method according to claim 1, characterized in that: The performance data of the target application is collected according to a preset first collection strategy, including: The performance data of the target application is collected at a low-frequency collection frequency; or, the performance data within a first range of the target application is collected; wherein the low-frequency collection frequency is a collection frequency lower than a predetermined frequency threshold; and the performance data within the first range is key performance data of the target application.
5. The method according to claim 1, characterized in that Collecting the performance data of the target application according to a preset second collection strategy includes: The performance data of the target application is collected at a high-frequency collection frequency; or, the performance data within a second range of the target application is collected; wherein the high-frequency collection frequency is a collection frequency higher than a predetermined frequency threshold; and the performance data within the second range is the key performance data and non-key performance data of the target application.
6. The method according to claim 1, characterized in that Detecting whether an abnormality occurs in the target application according to the first performance data includes: If any of the first performance data exceeds its corresponding normal working threshold, it is determined that the target application has an abnormality; if all of the first performance data do not exceed their corresponding normal working threshold, it is determined that the target application has no abnormality; Alternatively, the first performance data is input into a pre-built machine learning model, and the machine learning model is used to determine whether an abnormality occurs in the target application; Alternatively, a performance statistical curve of the target application is constructed based on the first performance data; and whether an abnormality occurs in the target application is determined according to the performance statistical curve.
7. An application performance data collection device, characterized in that: The device comprises: a first acquisition module, an anomaly detection module, a strategy selection module and a second acquisition module; wherein, The first collection module is used to collect the performance data of the target application according to a preset first collection strategy to obtain the first performance data of the target application; The anomaly detection module is used to detect whether an anomaly occurs in the target application according to the first performance data; The strategy selection module is used to select a collection strategy from a plurality of collection levels as a second collection strategy if an abnormality is detected in the target application according to the first performance data; wherein the level of the second collection strategy is higher than the level of the first collection strategy; and the higher the level of the collection strategy, the higher its collection accuracy; The second collection module is used to collect the performance data of the target application according to the second collection strategy to obtain second performance data of the target application.
8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the application performance data collection method as described in any one of claims 1 to 6.
9. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the application performance data collection method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the application performance data collection method according to any one of claims 1 to 6.