Application program exception determination method and device, medium, equipment and program product

By determining the target average load of the system in the historical time period when an exception occurs in the application, the problem of difficulty in determining the cause of the exception quickly and accurately in the existing technology is solved, and accurate analysis of the cause of the application abnormality in the high response speed scenario is achieved. Improve user experience and optimization efficiency.

CN119127549APending Publication Date: 2024-12-13BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411224411.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the event of a stuttering or unresponsive application, it is difficult for the prior art to quickly and accurately determine the cause of the abnormality, resulting in a decrease in user experience and a decrease in user retention.

Method used

When an exception occurs in an application, determine the target average load of the system in the historical time period, and determine the cause of the abnormality based on the load, and use the preset conditions between the historical time point and the target time point to accurately reflect the system when the application is abnormal. Average load.

Benefits of technology

In high-response scenarios, accurately determining the cause of application abnormalities improves the efficiency and user experience of application optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127549A_ABST
    Figure CN119127549A_ABST
Patent Text Reader

Abstract

The invention relates to an exception determination method and device of an application program, a medium, equipment and a program product, and relates to the technical field of computers, and the method comprises the steps of determining a target average load of a system in a historical time period under the condition that the application program is abnormal, and determining an exception reason of the application program according to the target average load. According to the method and the device, the average load of the system when the application program is abnormal can be reflected through the target average load of the historical time period adjacent to the target time point where the abnormality occurs, so that the reason for the abnormality of the application program is accurately determined in a scene with high response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a method, apparatus, medium, device, and program product for determining an abnormality of an application program. Background Art

[0002] Applications often freeze or become unresponsive, which has a significant impact on users and reduces the user retention rate of applications. Therefore, applications need to be optimized to provide users with a better user experience. When an application is abnormal, it is necessary to promptly detect the relevant data when the application is abnormal, so as to determine the cause of the abnormality and then optimize the application based on the cause of the abnormality. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a method for determining an abnormality of an application program, comprising: In the event of an exception in the application, determining a target average load of the system in a historical time period, wherein the historical time period is a time period between a historical time point and a target time point where the exception occurs, and a preset condition is satisfied between the historical time point and the target time point; The abnormal reason of the application program is determined according to the target average load.

[0005] In a second aspect, the present disclosure provides a device for determining an abnormality of an application program, comprising: A first determination module is configured to determine a target average load of the system in a historical time period when an exception occurs in the application program, wherein the historical time period is a time period between a historical time point and a target time point when the exception occurs, and a preset condition is satisfied between the historical time point and the target time point; The second determination module is configured to determine the abnormal cause of the application program according to the target average load.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] Based on the above technical solution, by determining the target average load of the system in the historical time period when an application exception occurs, and determining the cause of the application exception based on the target average load, the target average load of the historical time period near the target time point where the exception occurs can be used to reflect the average load of the system when the application exception occurs, thereby accurately determining the cause of the application exception in a high response speed scenario.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 The present invention is a flowchart of a method for determining an abnormality of an application program according to some embodiments.

[0012] Figure 2 is a schematic diagram showing target time points and historical time points according to some embodiments.

[0013] Figure 3 yes Figure 1 A detailed flow chart of step 110 is shown.

[0014] Figure 4 The figure is a schematic diagram of the structure of a device for determining an abnormality of an application program according to an exemplary embodiment.

[0015] Figure 5 It is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0018] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0022] Figure 1 FIG. 1 is a flowchart of a method for determining an abnormality of an application program according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides a method for determining an abnormality of an application program, which can be executed by an electronic device, and specifically can be executed by an abnormality determination device for an application program, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.

[0023] In step 110, when an exception occurs in the application program, a target average load of the system in a historical time period is determined.

[0024] Here, the system's load average is an indicator to measure system performance, which indicates the average number of tasks that the system needs to process within a specific time window.

[0025] For example, in Linux systems, the loads value is used to represent the average load of the system. The system calculates the total number of tasks running and waiting to be executed on each CPU (Central Processing Unit) in the system every 5 seconds, and uses the total number to calculate the average value of 1 minute, 5 minutes, and 15 minutes, and records it in the Loads[3] array. The Loads[3] array includes Loads[0], Loads[1], and Loads[2]. Loads[0] represents the average load of 1 minute, Loads[1] represents the average load of 5 minutes, and Loads[2] represents the average load of 15 minutes.

[0026] Application exceptions are largely caused by the shortage of system resources (such as CPU resources, memory resources, etc.) of electronic devices.

[0027] For example, when there are multiple tasks waiting to be scheduled at the same time, when the number of tasks is much larger than the number of CPU cores, a large number of tasks will be queued in the CPU's run queue, resulting in insufficient CPU run time for the tasks, causing slow execution of the tasks, which will cause the application to malfunction, manifested as application freezes or becomes unresponsive.

[0028] When an application has abnormal behavior (such as freezing or no response), it can be determined that the application is abnormal. For example, the system can send an event to the application, and if the event times out and no response is obtained, it can be determined that the application is abnormal.

[0029] Accordingly, when an exception occurs in the application, the target average load of the system in the historical time period is determined through the application.

[0030] The historical time period is the time period between the historical time point and the target time point where the exception occurs, and the historical time point and the target time point meet the preset conditions. In the embodiment of the present disclosure, the target duration corresponding to the historical time period is smaller than the time window used by the system to calculate the average load, so as to accurately reflect the average load of the system when the application program has an exception through the average load of a smaller time period. For example, the time window used by the system to calculate the average load is 1 minute, and the target duration corresponding to the historical time period is less than 1 minute.

[0031] The target time point is the time point when the application exception occurs. The historical time point refers to the time point before the target time point. For example, if the target time point is 14:43:17, the historical time point can be 14:43:13, and accordingly, the historical time period is the time period from 14:43:13 to 14:43:17.

[0032] It should be noted that, in the embodiment of the present disclosure, the historical time point and the target time point satisfy a preset condition. Exemplarily, satisfying the preset condition between the historical time point and the target time point may mean that the time interval between the historical time point and the target time point is within a preset time range.

[0033] That is to say, the historical time period takes the target time point as the upper limit and the historical time point as the lower limit. The historical time period can be understood as a time period adjacent to the target time point.

[0034] It is worth noting that for electronic devices with fast response speeds, many application exceptions are not necessarily caused by long-term accumulation, but by high loads that appear in a short period of time. In this regard, if the average load recorded by the Loads[3] array is used, it cannot accurately describe the current system status.

[0035] For example, for the system's 1-minute average load, if the system has only 4 tasks running or waiting to be executed in the first 55 seconds, but the tasks increase to 20 in the next 5 seconds, the load at this time should be 20, but the system's 1-minute average load is actually (55 / 5*4+20) / 12=5.33.

[0036] Obviously, in a high-response scenario, the average load calculation method corresponding to the Loads[3] array cannot accurately describe the average load of the system during abnormal periods. Moreover, as the time interval corresponding to the time window used becomes longer, its accuracy will decrease.

[0037] Therefore, in the embodiment of the present disclosure, the average load of the system is represented by the target average load of the system in the historical time period, which can accurately describe the average load of the system when an exception occurs in the application program.

[0038] In step 120, the abnormal cause of the application is determined according to the target average load.

[0039] Here, the target average load may be used as the cause of the exception that causes the application program to be abnormal, so that the application program developer can optimize the application program according to the cause of the exception.

[0040] Exemplarily, the target average load may be reported to a server of the application program, so that a developer of the application program can determine the cause of the abnormality of the application program according to the target average load.

[0041] Therefore, by determining the target average load of the system in the historical time period when an application exception occurs, and determining the cause of the application exception based on the target average load, the target average load of the historical time period near the target time point when the exception occurred can be used to reflect the average load of the system when the application exception occurs, thereby accurately determining the cause of the application exception in a high response speed scenario.

[0042] In some feasible implementations, the average load of the system may be read periodically, and according to the first time point and preset conditions, the historical time point may be determined from the time points corresponding to the read average load of the system.

[0043] Here, the average load of the system can be read periodically by the application. For example, a timer can be set to wake up the application to read the average load of the system once at a certain time interval. For example, if the time interval of the timer is set to N seconds, the average load of the system can be read 60 / N times within one minute.

[0044] It should be noted that the time interval of each cycle can be set according to actual conditions. For example, the time interval of each cycle can be set to 3 seconds, or can be set to other values.

[0045] The average load of the system read by the application refers to the average load of the system at the current time point corresponding to the read action. The average load of the system read by the application can be the average load corresponding to the above Loads[0], Loads[1], and Loads[2]. Taking the reading of Loads[0] as an example, the average load of the system read each time refers to the average load of the system within 1 minute at the current read time point.

[0046] It should be understood that, in general, applications do not have the authority to calculate the average load of the system. Therefore, the average load of the system periodically read by the application can be the average load calculated by the system. When the application needs to obtain the current average load of the system, it can obtain the value in the Loads[3] array through the sysinfo() system call function, so that the application can read the average load of the system.

[0047] Exemplarily, the size of the time interval for periodically reading the average load of the system is inversely proportional to the size of the real-time system resources of the system.

[0048] The real-time system resources of the system may refer to the real-time CPU resources, real-time memory resources, etc. of the system. That is to say, the time interval for reading the average load of the system each time changes with the dynamic changes of the real-time system resources. The larger the real-time system resources, the shorter the time interval, and the smaller the real-time system resources, the longer the time interval.

[0049] It is worth noting that the smaller the time interval, the denser the cycle of reading the average load of the system, and accordingly, the more accurate the target average load will be. However, the denser the cycle of reading the average load of the system, the more performance and power consumption will be lost. By dynamically adjusting the time interval through real-time system resources, when the real-time system resources are sufficient, the time interval can be shortened to improve the accuracy of calculating the target average load. When the real-time system resources are tight, the time interval can be increased to avoid excessive occupation of system resources.

[0050] In the embodiment of the present disclosure, the preset condition is used to determine the historical time point from each time point periodically read, so that the historical time period composed of the historical time point and the target time point is a time period close to the target time point.

[0051] By using the preset condition, a time point that meets the preset condition is selected from the time points before the target time point as the historical time point. Accordingly, the average load of the system read by the application corresponding to the historical time point is the corresponding second average load.

[0052] That is to say, in the above embodiment, a historical time point can be determined among the time points before the target time point through the preset conditions and the target time point.

[0053] In some embodiments, the preset condition is that the historical time point is closest to the target time point, and the historical time point makes the target duration corresponding to the historical time period within a preset time range.

[0054] Among them, the historical time point determined in the embodiment of the present disclosure can be the time point that is closest to the target time point among all the time points corresponding to the average load read periodically and can make the target duration of the historical time period within the preset time range.

[0055] That is, the historical time point is the first time point among all the time points corresponding to the average load read periodically that can make the target duration corresponding to the historical time period fall within the preset time range.

[0056] Exemplarily, the preset time range may be (3, 6] seconds. Of course, the value of the preset time range may also be set according to the actual usage scenario.

[0057] Figure 2FIG. 1 is a schematic diagram showing target time points and historical time points according to some embodiments. Figure 2 As shown, the target time point 201 is the time point corresponding to the average load of the reading system in a specific time window when an exception occurs in the application. The first time point 202 and the second time point 203 are the time points when the application periodically reads the average load of the system. Assuming that the target duration between the first time point 202 and the target time point 201 is within the preset time range, the first time point 202 is the determined historical time point. Assuming that the target duration between the first time point 202 and the target time point 201 is within the preset time range and the target duration between the second time point 203 and the target time point 201 is within the preset time range, since the second time point 203 is closest to the target time point 201, the second time point 203 is the target time point.

[0058] That is to say, by setting the value of the preset time range, the first time point 202 or the second time point 203 can be selected as the historical time point, or a time point other than the first time point 202 and the second time point 203 can be selected as the historical time point. The value of the preset time range can be set according to actual needs.

[0059] Through the above preset conditions, a historical time point can be determined from all time points when the average load of the system is periodically read, so that the target average load corresponding to the historical time period composed of the historical time points and the target time points can accurately reflect the average load of the system when an abnormality occurs in the application.

[0060] Therefore, through the above implementation, by periodically reading the average load of the system and determining the historical time point through the time point of the read average load, the average load of the system in the historical time period corresponding to the application exception can be accurately obtained, thereby accurately analyzing the cause of the application exception.

[0061] Figure 3 yes Figure 1 Detailed flow chart of step 110 is shown in FIG. Figure 3 As shown, in some possible implementations, step 110 may include the following steps.

[0062] In step 111, when an exception occurs in the application program, a first average load of the system at a target time point is determined, and a second average load of the system at a historical time point is determined.

[0063] Here, the first average load of the system at the target time point refers to the average load of the system read at the target time point when the application program has an exception. When the application program has an exception, the application program can obtain the value in the above-mentioned Loads[3] array through the sysinfo() system call function to read the first average load of the system.

[0064] The second average load of the system at a historical time point may be obtained through the above-mentioned periodic reading implementation.

[0065] In step 112, a target average load of the system in a historical time period is obtained according to the first average load and the second average load.

[0066] Here, after obtaining the first average load and the second average load, the target average load of the system in the historical time period is calculated by using the first average load and the second average load.

[0067] In some embodiments, the target average load may be determined based on the time window used by the system to calculate the average load, the first average load, the second average load, and the target duration corresponding to the historical time period.

[0068] The time window used by the system to calculate the average load refers to the time interval used by the system to calculate the average load. For example, for the above Loads[0], Loads[1], and Loads[2], the time window used to calculate the average load can be 1 minute, 5 minutes, or 15 minutes.

[0069] In some embodiments, a first total load of the system in a time window corresponding to a target time point can be determined based on a first average load and a time window; a second total load of the system in a time window corresponding to a historical time point can be determined based on a second average load and a time window; a third total load added to the system at a target duration can be determined based on the first total load and the second total load; a third average load corresponding to the system at the target duration can be determined based on the third total load and the target duration; and the target average load can be determined based on the second average load and the third average load.

[0070] Among them, the product between the first average load and the time window is the first total load of the system in the time window corresponding to the target time point, and the product between the second average load and the time window is the second total load of the system in the time window corresponding to the historical time point.

[0071] The third total load increased by the system under the target duration can be determined according to the difference between the first total load and the second total load. It should be understood that the third total load is actually understood as the total load increased by the system under the historical time period.

[0072] Then, the third average load of the system corresponding to the historical time period is calculated by the quotient between the third total load and the target duration. That is, the system increases the load at the rate of the third average load within the target duration corresponding to the historical time period.

[0073] Then, according to the sum of the second average load and the third average load, the real target average load of the system in the historical time period can be calculated.

[0074] Exemplarily, the target average load may be obtained by a preset calculation formula, which is:

[0075] in, is the target average load, is the second average load, is the first average load, M is the time window, T is the target duration, is the third average load.

[0076] It is worth noting that if Figure 2 As shown, the average load in a time window includes and Two parts, is the average load during the target duration, It is the average load in the time period (time window - target duration) before the historical time point.

[0077] Accordingly, , so the target average load is .

[0078] Taking the time window as 1 minute as an example, assuming , , the target duration is 5 seconds, then .

[0079] It can be seen that the average load of the application in the historical time period calculated by the embodiment of the present disclosure is 19.96, which is relative to the average load of 5.33 at the target time point calculated by the system. It can better reflect the explosive growth of the load of the application in a short period of time, thereby accurately describing the average load of the application in the historical time period where the abnormality occurred.

[0080] Therefore, through the above implementation, the average load of the system in the historical time period can be accurately calculated, thereby accurately describing the average load of the system in the historical time period when the application program is abnormal.

[0081] In some feasible implementations, the average load of the system can be read periodically, and in the event of an abnormality in the application, the first average load of the system at a target time point can be determined, and the second average load of the system at a historical time point can be determined from the periodically read average load of the system, and based on the first average load and the second average load, the target average load of the system in the historical time period can be obtained, and then based on the target average load, the cause of the abnormality in the application can be determined.

[0082] Figure 4 FIG. 1 is a schematic diagram of a structure of an abnormality determination device for an application program according to an exemplary embodiment. Figure 4 As shown, the embodiment of the present disclosure provides an abnormality determination device 400 for an application program, and the abnormality determination device 400 for the application program includes: The first determination module 401 is configured to determine the target average load of the system in a historical time period when an exception occurs in the application program, wherein the historical time period is a time period between a historical time point and a target time point when the exception occurs, and a preset condition is satisfied between the historical time point and the target time point; The second determination module 402 is configured to determine the abnormal reason of the application program according to the target average load.

[0083] Optionally, the first determining module 401 is specifically configured to: In the event that an exception occurs in the application, determining a first average load of the system at the target time point, and determining a second average load of the system at the historical time point; A target average load of the system in the historical time period is obtained according to the first average load and the second average load.

[0084] Optionally, the first determining module 401 is specifically configured to: The target average load is determined according to the time window used by the system to calculate the average load, the first average load, the second average load, and the target duration corresponding to the historical time period.

[0085] Optionally, the first determining module 401 is specifically configured to: Determine, according to the first average load and the time window, a first total load of the system in the time window corresponding to the target time point; Determine, according to the second average load and the time window, a second total load of the system in the time window corresponding to the historical time point; Determining a third total load increased by the system under the target duration according to the first total load and the second total load; Determining, according to the third total load and the target duration, a third average load corresponding to the system under the target duration; The target average load is determined according to the second average load and the third average load.

[0086] Optionally, the application program abnormality determination device 400 further includes: A reading module, configured to periodically read the average load of the system; The fourth determination module is configured to determine the historical time point from the time points corresponding to the average load of the system read according to the first time point and the preset condition.

[0087] Optionally, the preset condition is that the historical time point is closest to the target time point, and the historical time point makes the target duration corresponding to the historical time period within a preset time range.

[0088] The logic of the method executed by each functional module in the above-mentioned application abnormality determination device 400 can refer to the part of the method related to the above-mentioned embodiment, and will not be repeated here.

[0089] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device (e.g., terminal device) 500 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0090] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0091] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0092] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0093] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0094] In some embodiments, the terminal devices and servers may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0095] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0096] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in the event of an exception in the application, determines the target average load of the system in a historical time period, wherein the historical time period is a time period between a historical time point and a target time point where the exception occurs, and a preset condition is satisfied between the historical time point and the target time point; and determines the cause of the exception of the application based on the target average load.

[0097] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, 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., through the Internet using an Internet service provider).

[0098] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0099] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0100] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.

[0102] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0103] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0104] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for determining an abnormality of an application program, It is characterized in that include: In the event of an exception in the application, determining a target average load of the system in a historical time period, wherein the historical time period is a time period between a historical time point and a target time point where the exception occurs, and a preset condition is satisfied between the historical time point and the target time point; The abnormal reason of the application program is determined according to the target average load.

2. The method according to claim 1, It is characterized in that The step of determining the target average load of the system in the historical time period when an application program is abnormal includes: In the event that an exception occurs in the application, determining a first average load of the system at the target time point, and determining a second average load of the system at the historical time point; A target average load of the system in the historical time period is obtained according to the first average load and the second average load.

3. The method according to claim 2, It is characterized in that The obtaining, according to the first average load and the second average load, a target average load of the system in the historical time period includes: The target average load is determined according to the time window used by the system to calculate the average load, the first average load, the second average load, and the target duration corresponding to the historical time period.

4. The method according to claim 3, It is characterized in that The determining the target average load according to the time window used by the system to calculate the average load, the first average load, the second average load, and the target duration corresponding to the historical time period includes: Determine, according to the first average load and the time window, a first total load of the system in the time window corresponding to the target time point; Determine, according to the second average load and the time window, a second total load of the system in the time window corresponding to the historical time point; Determining a third total load increased by the system under the target duration according to the first total load and the second total load; Determining, according to the third total load and the target duration, a third average load corresponding to the system under the target duration; The target average load is determined according to the second average load and the third average load.

5. The method according to any one of claims 1 to 4, It is characterized in that The historical time point is determined by the following steps: periodically reading the average load of the system; According to the first time point and the preset condition, the historical time point is determined from the time point corresponding to the read average load of the system.

6. The method according to claim 5, It is characterized in that The preset condition is that the historical time point is closest to the target time point, and the historical time point makes the target duration corresponding to the historical time period within a preset time range.

7. A device for determining abnormality of an application program, It is characterized in that include: A first determination module is configured to determine a target average load of the system in a historical time period when an exception occurs in the application program, wherein the historical time period is a time period between a historical time point and a target time point when the exception occurs, and a preset condition is satisfied between the historical time point and the target time point; The second determination module is configured to determine the abnormal cause of the application program according to the target average load.

8. A computer readable medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 6 are implemented.

9. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Database load dynamic management system

    CN120144413A