Application abnormality warning method, device, electronic device and storage medium
By rank sum checking the abnormal operation rate of the target application before and after the version update, the problem of inaccurate early warning information in the existing technology is solved, more accurate early warning is achieved, unnecessary development work is avoided, and user experience is improved.
Patent Information
- Application Number
- CN202211379699.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-11-04
AI Technical Summary
In the prior art, when the application program is not stable after it is updated, the accuracy of the warning information is low, resulting in unnecessary additional development work by the application manufacturer and affecting the user experience.
Rank sum test is performed by obtaining the abnormal run rate of multiple sampling periods before and after the target application is updated. If there is no significant difference in the test results, no warning information will be generated. The optional embodiments also include steps such as similarity comparison and power reduction arrangement to further determine whether to generate early warning information.
It improves the accuracy of early warning information, avoids unnecessary inspections and modifications, saves manpower and material resources, and ensures optimization of user experience.
Smart Images

Figure CN115801537B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of application update warning technology. Specifically, the present application relates to an application abnormality warning method, device, electronic device and storage medium. Background Art
[0002] At present, after the application in electronic devices such as mobile terminals is updated, it is easy to experience unstable operation such as flash back, crash, freeze, no response, frozen screen, etc. during operation. The reasons for the unstable operation of the application after the update are relatively complex. It may be a development defect of the application itself, or it may be a problem not caused by the application itself, such as a large number of applications running on the electronic device in a certain period of time, the processes of each application interfere with each other, or the electronic device is interfered with by some external factors in a certain period of time. If the unstable operation of the application is caused by problems other than the application itself, it is often unnecessary to check and modify the application. However, in the prior art, as long as the application is unstable after the update, an early warning information is generally generated and reported. The accuracy of the early warning information is low, which causes the application manufacturer to incur unnecessary additional development work, and may also affect the user experience of the application due to unnecessary or even incorrect additional development. Summary of the invention
[0003] The embodiment of the present application provides a warning method, device, electronic device and storage medium for application abnormality, which can solve the problem of inaccurate warning information. The technical solution is as follows:
[0004] According to one aspect of an embodiment of the present application, a method for early warning of application abnormality is provided, the method comprising:
[0005] Obtaining abnormal operation rates of a target application in a plurality of sampling periods, wherein the plurality of sampling periods include at least one first period before a version update of the target application and at least one second period after the version update;
[0006] A rank sum test is performed on the abnormal operation rate of the target application in the first time period and the abnormal operation rate in the second time period. If there is no significant difference in the test results, no warning information is generated.
[0007] As an optional embodiment, the step of obtaining the abnormal operation rate of the target application in multiple sampling periods also includes:
[0008] Obtaining abnormal operation rates of multiple reference applications during the multiple sampling periods;
[0009] The distribution of abnormal operation rates of the target application and the reference applications are compared for similarity. If the comparison result is a probability distribution that obeys the same parameters, no warning information is generated; if the comparison result is a probability distribution that does not obey the same parameters, and the abnormal operation rate of the target application in multiple sampling time periods is greater than the abnormal operation rate of the reference applications in the multiple sampling time periods as represented by statistics, then a warning information is generated.
[0010] As an optional embodiment, the abnormal operation rate of the target application in the first time period and the abnormal operation rate of the second time period are subjected to a rank sum test, and then the method further includes:
[0011] If there is a significant difference in the test results, the abnormal operation rates of the target application in the at least one second time period are arranged in descending order according to the values of the abnormal operation rates, a first preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to the respective abnormal operation rates are formed into a first set;
[0012] Obtaining the number of running applications of all applications in the at least one second time period, and arranging the number of running applications of all applications in the at least one second time period in descending order according to the number of running applications of all applications, selecting the first preset number of running applications in descending order, and forming a second set of second time periods corresponding to the respective running numbers;
[0013] determining the same second time period in the first set and the second set to form a third set;
[0014] Determine an overlap rate and a reference application, wherein the overlap rate is used to indicate the ratio of the number of the second time period in the third set to the first preset number, and the reference application is an application that meets a weak association condition with the target application;
[0015] If the overlap rate exceeds a preset threshold and the control application has an operational abnormality in a third time period of the second preset number, the warning information is not generated, and the third time period is a time period in the third set.
[0016] As an optional embodiment, the method further includes:
[0017] According to the numerical values of the abnormal operation rates, the abnormal operation rates of the target application in the at least one second time period are arranged in descending order, a third preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to the respective abnormal operation rates are formed into a fourth set;
[0018] Performing a rank sum test on the abnormal operation rate of the target application in the second period of the fourth set and the abnormal operation rate of the control application in the second period of the fourth set, and if the test result shows that there is no significant difference, then not generating the warning information;
[0019] If the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set cannot be rank-sum tested, the warning information is generated.
[0020] As an optional embodiment, the method further includes:
[0021] If the test result shows that there is a significant difference, the distribution of the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set will be compared for similarity. If the comparison result is a probability distribution that obeys the same parameters, the warning information will not be generated.
[0022] As an optional embodiment, the method further includes:
[0023] If the overlap rate does not exceed the preset threshold or the overlap rate exceeds the preset threshold and there is no operation abnormality of the control application in the third time period of the second preset number, and the comparison result of the similarity comparison is a probability distribution that does not obey the same parameters and the abnormal operation rate of the target application in the second time period in the fourth set is greater than the abnormal operation rate of the control application in the second time period in the fourth set, the warning information is generated.
[0024] As an optional embodiment, the method further includes:
[0025] According to the numerical values of the abnormal operation rates, the abnormal operation rates of the target application in the at least one second time period are arranged in descending order, a third preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to the respective abnormal operation rates are formed into a fourth set;
[0026] A rank sum test is performed on the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set. If the test result shows that there is no significant difference, the warning information is not generated; the control application is an application that meets a weak correlation condition with the target application.
[0027] According to another aspect of an embodiment of the present application, a warning device for application abnormality is provided, the device comprising:
[0028] An acquisition module, used to obtain the abnormal operation rate of the target application in multiple sampling periods, wherein the multiple sampling periods include at least one first period before the version of the target application is updated and at least one second period after the version is updated;
[0029] The operation module is used to perform a rank sum test on the abnormal operation rate of the target application in the first time period and the abnormal operation rate in the second time period, and when there is no significant difference in the test results, the operation module does not generate warning information.
[0030] According to another aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned application abnormality early warning method.
[0031] According to another aspect of the embodiments of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for early warning of application program abnormality are implemented.
[0032] The beneficial effect of the technical solution provided in the embodiment of the present application is: a rank sum test is performed on the abnormal operation rate before the target application version is updated and the abnormal operation rate after the version is updated. If there is no significant difference in the test results, it means that the unstable operation of the target application after the update is caused by factors other than the target application itself, and has nothing to do with the target application itself, so there is no need to generate early warning information, which ensures the accuracy of the early warning information and avoids unnecessary inspection and modification of the target application and waste of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0034] Figure 1 A schematic diagram of the system architecture of a method for realizing an early warning of application program anomalies provided in an embodiment of the present application;
[0035] Figure 2 A flowchart of an early warning method for application abnormality provided in an embodiment of the present application;
[0036] Figure 3 A data graph of abnormal operation rates of target applications and the number of operations of all applications in a plurality of second time periods provided in an embodiment of the present application;
[0037] Figure 4 According to the abnormal operation rate provided in the embodiment of the present application Figure 3 A data graph with descending power arrangement;
[0038] Figure 5 According to the number of running applications of all applications provided in the embodiment of the present application Figure 3 A data graph with descending power arrangement;
[0039] Figure 6 A schematic diagram of the structure of an early warning device for application abnormality provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of the structure of an electronic device for implementing an early warning method for application program anomalies provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0042] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "an" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we call an element "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here may include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".
[0043] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0044] The application abnormality warning method, device, electronic device, storage medium and computer program product provided in this application are intended to solve the above technical problems in the prior art.
[0045] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0046] Figure 1 A schematic diagram of the system architecture for implementing an early warning method for application program anomalies provided in an embodiment of the present application, wherein the system includes a terminal 110 and a server 120.
[0047] The terminal 110 installs and runs the application 111. When the terminal 110 runs the application 111, the user interface of the application 111 is displayed on the screen of the terminal 110. The application 111 may be a shopping program, a food delivery service program, a multimedia entertainment program, a social communication program, and the like.
[0048] Terminal 110 is a terminal used by user 112. Usually, application 111 responds to a user's click or other operation, triggering terminal 110 to obtain content information corresponding to the user's current operation from the database of server 120. Server 120 returns the above content information to terminal 110 for display by terminal 110.
[0049] Optionally, the terminal 110 may generally refer to one of a plurality of terminals, and this embodiment is only illustrated by taking the terminal 110 as an example. The device type of the terminal 110 may include at least one of: a smart phone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, and a desktop computer.
[0050] Figure 1 Only one terminal 110 is shown, but in different embodiments, there are multiple other terminals that can access the server 120. Optionally, there are one or more terminals 110 corresponding to the developer, and the development and editing functions of the application 111 can be performed on the terminal 110. The developer can edit and update the code or document of the application 111 on the terminal 110, and transmit the updated application installation package to the server 120 through a wired or wireless network. The terminal 110 can download the application installation package from the server 120 to update the application 111.
[0051] The first terminal 110 and other terminals are connected to the server 120 via a wireless network or a wired network.
[0052] Server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (CDN) and big data and artificial intelligence platforms.
[0053] The present application provides a method for updating an early warning, such as Figure 2 As shown, the method includes:
[0054] S100: Obtain abnormal operation rates of a target application in multiple sampling periods, where the multiple sampling periods include at least one first period before a version update and at least one second period after the version update of the target application.
[0055] Among them, the sampling period can be the division of the reference sampling period by the terminal starting from the pre-specified starting sampling time T0. Exemplarily, the sampling periods of the target application are (T0, T0+Δt), (T0+Δt, T0+Δt*2), (T0+Δt*2, T0+Δt*3), (T0+Δt*3, T0+Δt*4), (T0+Δt*4, T0+Δt*5), (T0+Δt*5, T0+Δt*6), where Δt is a preset value, which is the duration of each reference sampling period, and the size of Δt can be determined according to the actual situation. The setting is not specifically limited in this embodiment; if the target application is updated at T0+Δt*3, then (T0, T0+Δt), (T0+Δt, T0+Δt*2), (T0+Δt*2, T0+Δt*3) are all the first moment, and (T0+Δt*3, T0+Δt*4), (T0+Δt*4, T0+Δt*5), (T0+Δt*5, T0+Δt*6) are all the second moment.
[0056] It can be understood that the abnormal operation rate refers to the ratio of the number of abnormal operation states of the target application in the current sampling period to the total number of operation states. The abnormal operation state includes at least one of the following situations when the target application crashes, crashes, freezes, is unresponsive, freezes, or other predefined abnormal operation states. Usually, the operating system of the terminal can determine the process corresponding to each application. The operating system can determine whether the target application is in an abnormal operation state based on the operation status of each process, and record the specific time point when the target application changes from a normal operation state to an abnormal operation state. The relevant methods are prior art and will not be repeated in the embodiments of this application. Running a target application once refers to starting the target application and closing the target application. Usually, the target application is started based on operations such as user clicks, and can be normally closed based on operations such as user sliding after the user finishes using it. It may also be forcibly closed by the user or the operating system of the terminal due to being in an abnormal operation state. Continuing with the previous example, during the sampling period of (T0, T0+Δt), the total number of target application runs is 40 times, and the number of abnormal operation states of the target application is 3 times, that is, there are 3 points in time during the sampling period when the target application changes from a normal operation state to an abnormal operation state. The abnormal operation rate during the sampling period is 3÷40=0.075.
[0057] It should be explained that if the target application is never running during a sampling period, it is deemed that there is no abnormal operation rate data of the target application during the sampling period, and the sampling period will not be included in the subsequent data analysis; if the target application continues to run during multiple sampling periods, each of the above sampling periods needs to be included in the subsequent data analysis of the abnormal operation rate of the target application. For each sampling period, as long as the period of a certain operation of the target application, that is, the period from the start of the target application to the shutdown of the target application, overlaps with the sampling period, it is deemed that the target application runs once during the sampling period, and it is not required that the startup time or shutdown time of the target application must be within the sampling period.
[0058] S101, performing a rank sum test on the abnormal operation rate of the target application in the first period and the abnormal operation rate in the second period. If there is no significant difference in the test results, no warning information is generated.
[0059] It is understandable that, considering that it is difficult to know the probability distribution of the abnormal operation rate of the target application in practice, non-parametric statistical methods, such as the Wilcoxon rank sum test of two independent samples, are used to perform statistical difference analysis on the abnormal operation rate of the target application before and after the version update. The critical P value used in the rank sum test to determine whether there is a significant difference can be set to common values such as 0.05 and 0.01 according to the actual situation of the abnormal operation rate data. Since the version update event has a greater impact on the target application, it is reasonable to regard the abnormal operation rate of the target application before and after the version update as independent samples.
[0060] It is understandable that if there is no significant difference in the rank sum test results of the abnormal operation rate before and after the target application version is updated, it means that the unstable operation of the target application after the update is caused by factors other than the target application itself and has nothing to do with the target application itself. Therefore, there is no need to generate early warning information, which ensures the accuracy of the early warning information and avoids unnecessary inspection and modification of the target application and waste of manpower and material resources.
[0061] Based on the above embodiments, as an optional embodiment, obtaining the abnormal operation rate of the target application in multiple sampling periods also includes:
[0062] Obtain abnormal operation rates of multiple reference applications in multiple sampling periods;
[0063] The distribution of abnormal operation rates of the target application and each reference application is compared for similarity. If the comparison result is a probability distribution that obeys the same parameters, no warning information is generated; if the comparison result is a probability distribution that does not obey the same parameters, and the abnormal operation rate of the target application in multiple sampling periods is greater than the abnormal operation rate of each reference application in multiple sampling periods as represented by statistics, then a warning information is generated.
[0064] The multiple reference applications may be selected from all other applications in the terminal except the target application, or may be selected from other applications in the terminal that are related to the target application. For example, if the target application is a shopping application, the reference application may be selected from a payment application and other shopping applications except the target application.
[0065] It should be understood that the probability distribution of the same parameters mentioned in the embodiments of the present application requires not only the same type of probability distribution, but also the same or substantially the same (i.e. very close, with very small differences) main parameters corresponding to the probability distribution. For example, the main parameters corresponding to the normal distribution are the mean μ of the random variable and the variance σ of the random variable.2 , if two sets of data obey the normal distribution with the same parameters, then both sets of data are required to obey the normal distribution, and the means and variances of the two sets of data are the same or basically the same.
[0066] It is understandable that although the probability distributions of the abnormal operation rates of the target application and the abnormal operation rates of the reference application are difficult to know, there are some methods (including empirical methods) that can compare and determine whether the two types of data obey the probability distribution of the same parameters. For example, the similarity of the data lines corresponding to the abnormal operation rates of the target application and the reference applications can be compared and combined with statistics such as the mean or median of the abnormal operation rates to determine whether the target application and the reference applications obey the probability distribution of the same parameters. The accuracy of the above judgment method is greatly affected by the specific scenario. If it is not possible to reliably determine that the two types of data obey the probability distribution of the same parameters, it should usually be determined that the two types of data do not obey the probability distribution of the same parameters.
[0067] If the comparison result is a probability distribution that obeys the same parameters, it means that the unstable operation of the target application after the update is caused by factors other than the target application itself, and has nothing to do with the target application itself, so there is no need to generate warning information, which ensures the accuracy of the warning information and avoids unnecessary inspection and modification of the target application, thereby wasting manpower and material resources. As for the specific reasons for the unstable operation of the target application after the update, whether it is due to the failure of the terminal's hardware or operating system or interference from some external factors, it can be further investigated using existing technical means, and the embodiments of this application will not be repeated.
[0068] If the comparison result is a probability distribution that does not obey the same parameters, and the abnormal operation rate of the target application in multiple sampling periods is statistically greater than the abnormal operation rate of each reference application in multiple sampling periods, an early warning message is generated. This situation means that the unstable operation of the target application after the update is caused by the target application itself, and the target application needs to be checked, modified, or even redeveloped. Considering that there may be a certain error in the comparison results of whether they obey the same probability distribution, an early warning message is usually generated only when the abnormal operation rate of the target application in multiple sampling periods is statistically greater than the abnormal operation rate of any reference application in multiple sampling periods, in order to avoid misjudgment.
[0069] Among them, statistics can include the mean, median, mode and variance of abnormal operation rate, among which the mean and median are more commonly used. Using statistics to represent multiple data can first convert them into one data and then compare the numerical values.
[0070] Similarly, if the comparison result is a probability distribution that does not obey the same parameters, but the abnormal operation rate of the target application in multiple sampling periods is not greater than the abnormal operation rate of each reference application in multiple sampling periods, then no warning information is generated. Usually, if the abnormal operation rate of the target application in multiple sampling periods is not greater than the abnormal operation rate of a reference application in multiple sampling periods, then no warning information is generated to avoid misjudgment.
[0071] Based on the above embodiments, as an optional embodiment, a rank sum test is performed on the abnormal operation rate of the target application in the first period and the abnormal operation rate in the second period, and then the following is further included:
[0072] S200. If there is a significant difference in the test results, the abnormal operation rates of the target application in at least one second time period are arranged in descending order according to the numerical values of the abnormal operation rates, and a first preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to each abnormal operation rate are formed into a first set.
[0073] The significant difference in the test results may be that the P value of the test results is less than 0.05. The first preset number can be adjusted according to actual conditions, and this embodiment does not impose any specific restrictions. Figure 3 As shown, it exemplarily shows a data graph of the abnormal operation rate of the target application and the number of operations of all applications in multiple second time periods, and is arranged in descending order according to the numerical value of the abnormal operation rate, that is, Figure 4 As shown, it exemplarily shows the Figure 3 For the data graph arranged in descending power, if the first preset number is 5, the first set includes (T0+Δt*4, T0+Δt*5), (T0+Δt*6, T0+Δt*7), (T0, T0+Δt), (T0+Δt, T0+Δt*2) and (T0+Δt*5, T0+Δt*6).
[0074] S201. Obtain the running numbers of all applications in at least one second time period, arrange the running numbers of all applications in at least one second time period in descending order according to the running numbers of all applications, select the running numbers of a first preset number in order from large to small, and form a second set of second time periods corresponding to each running number.
[0075] Continuing with the previous example, we sort all applications in descending order according to the number of applications running, as follows: Figure 5 As shown, it exemplarily shows the number of running applications according to the Figure 3The data graph is arranged in descending power, that is, when the first preset number is 5, the second set includes (T0+Δt*5, T0+Δt*6), (T0+Δt*4, T0+Δt*5), (T0+Δt*2, T0+Δt*3), (T0+Δt*7, T0+Δt*8) and (T0+Δt, T0+Δt*2).
[0076] S202: Determine the same second time period in the first set and the second set to form a third set.
[0077] Continuing with the previous example, the third set includes (T0+Δt*5, T0+Δt*6), (T0+Δt*4, T0+Δt*5) and (T0+Δt, T0+Δt*2).
[0078] S203, determining the overlap rate and the reference application, where the overlap rate is used to indicate the ratio of the number of the second time period in the third set to the first preset number, and the reference application is an application that meets a weak association condition with the target application.
[0079] It should be understood that the weak association condition usually refers to the absence of an operational dependency between the control application and the target application. For example, the target application must be started before the control application can be started, and the control application and the target application cannot be from the same manufacturer (for example, WeChat and QQ belong to the same manufacturer) or applications with similar functions (for example, JD.com and Taobao have similar functions). Other weak association conditions can be added according to actual conditions, and this embodiment does not impose specific restrictions. Usually, the operating system of the terminal can grasp the relevant information of each application (the service or application, manufacturer, function, etc. required to start the application), and the operating system can determine the application that meets the weak association condition with the target application through a simple search as the control application. Continuing with the previous example, the third set has three second time periods, that is, the overlap rate is 3÷5=0.6.
[0080] S204: If the overlap rate exceeds a preset threshold and a control application has an operational abnormality in a third time period of the second preset number, no warning information is generated, and the third time period is a time period in the third set.
[0081] It is understandable that if the overlap rate exceeds the preset threshold, and there is a control application that runs abnormally in the third time period of the second preset number, it can be explained that the abnormal running state of the target application is caused by the non-target application itself.
[0082] For example, if too many applications are running on the terminal within a certain period of time, it is easy to cause the CPU of the terminal to overheat, thereby affecting the stable operation of the application during the current period and even the subsequent period of time, which is irrelevant to the target application itself, so there is no need to generate warning information, ensuring the accuracy of the warning information. Among them, the preset threshold and the second preset number can be adjusted according to actual conditions, and this embodiment does not make specific restrictions. For example, the second preset number can be 1 or an integer greater than 1.
[0083] Based on the above embodiments, as an optional embodiment, the early warning method for application abnormality also includes:
[0084] S300, according to the numerical values of the abnormal operation rates, the abnormal operation rates of the target application in at least one second time period are arranged in descending order, a third preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to the respective abnormal operation rates are formed into a fourth set;
[0085] S301. Perform a rank sum test on the abnormal operation rate of the target application in the second period in the fourth set and the abnormal operation rate of the control application in the second period in the fourth set. If the test result shows that there is no significant difference, no warning information is generated.
[0086] The third preset number can be adjusted according to actual conditions, and this embodiment does not impose any specific limitation.
[0087] It is understandable that a rank sum test is performed on the abnormal operation rate of the target application version after the update and the abnormal operation rate of the control application in each second period in the fourth set. If there is no significant difference in the test results, it means that the unstable operation of the target application after the update is caused by factors other than the target application, so there is no need to generate warning information, ensuring the accuracy of the warning information. The specific rank sum test method, for example, can use a multi-independent sample Kruskal-Wallis rank sum test, which is not limited in this embodiment.
[0088] S302: If the abnormal operation rate of the target application in the second period in the fourth set and the abnormal operation rate of the control application in the second period in the fourth set cannot be rank-sum tested, then a warning message is generated.
[0089] It should be explained that in practice there may be scenarios where the rank sum test cannot be performed. For example, no matter how the third preset number is adjusted, there is no abnormal operation rate data of the control application in the fourth set, or there is too little abnormal operation rate data of the control application, which may lead to an inaccurate test result of the rank sum test. In these scenarios, there is no corresponding evidence to support the conclusion that "the unstable operation of the target application after the update is caused by factors other than the target application", and generally a warning message should be generated and reported.
[0090] Based on the above embodiments, as an optional embodiment, the early warning method for application abnormality also includes:
[0091] S303. If the test result shows that there is a significant difference, the distribution of the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set are compared for similarity. If the comparison result is a probability distribution that obeys the same parameters, no warning information is generated.
[0092] Similarly, although there is a significant difference in the test results, if it can be determined that the abnormal operation rate of the target application in the second period of the fourth set and the abnormal operation rate of the control application in the second period of the fourth set follow the probability distribution of the same parameters, it also shows that the unstable operation of the target application after the update is not related to the target application itself, so there is no need to generate warning information, ensuring the accuracy of the warning information. Since the rank sum test is a non-parametric statistical method, it may not be accurate enough in some scenarios. If the result of the rank sum test shows a significant difference, but other methods with higher accuracy can overturn the result of the rank sum test, the conclusion of other methods with higher accuracy should usually be adopted.
[0093] It should be explained that in the early warning method for application abnormalities, in one embodiment, step S101 may be executed first, then steps S201 to S204, and then steps S300 to S303; in another embodiment, step S101 may be executed first, then steps S300 to S303, and then steps S201 to S204. This embodiment does not impose any specific restrictions on this.
[0094] It should be explained that if step S101 is executed first and then steps S300 to S303 are executed, then in step S301, if the situation occurs that "the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set cannot be rank-sum tested", the processing method is not to directly generate an early warning message, but to jump to step S201. If the conclusion of "no early warning message will be generated" is not reached after steps S201 to S204 are executed, an early warning message is generated and reported.
[0095] On the basis of the above embodiments, as an optional embodiment, the early warning method for application abnormality also includes: if the overlap rate does not exceed the preset threshold or the overlap rate exceeds the preset threshold and there is no operation abnormality in the control application in the third time period of the second preset number, and the comparison result of the similarity comparison is a probability distribution that does not obey the same parameters and the abnormal operation rate of the target application in the second time period in the fourth set is greater than the abnormal operation rate of the control application in the second time period in the fourth set as represented by statistics, then a warning message is generated.
[0096] It can be understood that in the scenario where step S101 is first executed, then steps S201 to S204 are executed, and then steps S300 to S303 are executed, if after executing steps S201 to S204 it is found that the overlap rate does not exceed the preset threshold or the overlap rate exceeds the preset threshold and there is no operation abnormality in the control application in the third time period of the second preset number, and after executing steps S300 to S303 it is found that the comparison result of the similarity comparison does not obey the probability distribution of the same parameters and the abnormal operation rate of the target application in the second time period in the fourth set is greater than the abnormal operation rate of the control application in the second time period in the fourth set, then there is a high possibility that the abnormal operation state of the target application is caused by the target application itself, and the target application needs to be checked and modified.
[0097] The present application embodiment provides an early warning device for application abnormality, such as Figure 6 As shown, the early warning device for application abnormality may include: an acquisition module 601 and an operation module 602, wherein the acquisition module 601 is used to obtain the abnormal operation rate of the target application in multiple sampling periods, and the multiple sampling periods include at least one first period before the version update of the target application and at least one second period after the version update; the operation module 602 is used to perform a rank sum test on the abnormal operation rate of the first period and the abnormal operation rate of the second period of the target application, and when there is no significant difference in the test results, the operation module 602 does not generate early warning information.
[0098] Based on the above embodiments, as an optional embodiment, the obtaining module obtains the abnormal operation rate of the target application in multiple sampling periods, and is previously used to obtain the abnormal operation rate of multiple reference applications in multiple sampling periods;
[0099] The operation module is also used to compare the distribution of abnormal operation rates of the target application and each reference application for similarity. If the comparison result is a probability distribution that obeys the same parameters, no warning information is generated; if the comparison result is a probability distribution that does not obey the same parameters and the abnormal operation rate of the target application in multiple sampling periods is greater than the abnormal operation rate of each reference application in multiple sampling periods as represented by statistics, the operation module generates a warning information.
[0100] On the basis of the above embodiments, as an optional embodiment, the operation module is used to perform a rank sum test on the abnormal operation rate of the first time period and the abnormal operation rate of the second time period of the target application, and after the test results show a significant difference, the acquisition module is also used to perform descending power arrangement of the abnormal operation rate of the target application in at least one second time period according to the numerical value of the abnormal operation rate, select a first preset number of abnormal operation rates in order from large to small, and form a first set of second time periods corresponding to each abnormal operation rate;
[0101] Obtaining the number of running applications of all applications in at least one second time period, and arranging the number of running applications of all applications in at least one second time period in descending order according to the number of running applications of all applications, selecting the number of running applications of a first preset number in order from large to small, and forming a second set of second time periods corresponding to the respective number of running applications;
[0102] determining the same second time period in the first set and the second set to form a third set;
[0103] The operation module is used to determine the overlap rate and the control application. The overlap rate is used to indicate the ratio of the number of second time periods in the third set to the first preset number. The control application is an application that meets the weak association condition with the target application. If the overlap rate exceeds the preset threshold and there is an operation abnormality in the third time period of the second preset number of the control application, the operation module does not generate warning information. The third time period is a time period in the third set.
[0104] Based on the above embodiments, as an optional embodiment, the obtaining module is further used to arrange the abnormal operation rates of the target application in at least one second time period in descending order according to the numerical values of the abnormal operation rates, select a third preset number of abnormal operation rates in descending order, and form a fourth set of second time periods corresponding to the respective abnormal operation rates;
[0105] The operation module is further used to perform a rank sum test on the abnormal operation rate of the target application in the second period in the fourth set and the abnormal operation rate of the control application in the second period in the fourth set. If the test result shows that there is no significant difference, the operation module does not generate warning information;
[0106] If the abnormal operation rate of the target application in the second period in the fourth set and the abnormal operation rate of the control application in the second period in the fourth set cannot be rank-sum tested, a warning message is generated.
[0107] On the basis of the above embodiments, as an optional embodiment, the operation module is also used to compare the distribution of the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set for similarity if the test result shows that there is a significant difference; if the comparison result is a probability distribution that obeys the same parameters, the operation module does not generate warning information.
[0108] On the basis of the above embodiments, as an optional embodiment, the operation module is also used to generate a warning message if the overlap rate does not exceed the preset threshold or the overlap rate exceeds the preset threshold and there is no operation abnormality in the control application in the third time period of the second preset number, and the comparison result of the similarity comparison is a probability distribution that does not obey the same parameters and the abnormal operation rate of the target application in the second time period in the fourth set is greater than the abnormal operation rate of the control application in the second time period in the fourth set as represented by a statistical quantity.
[0109] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0110] An electronic device is provided in an embodiment of the present application, including a memory, a processor and a computer program stored in the memory. The processor executes the above-mentioned computer program to implement the steps of the early warning method for application abnormalities. Compared with the related art, it can achieve: a rank sum test is performed on the abnormal operation rate of the target application before the version is updated and the abnormal operation rate after the version is updated. If there is no significant difference in the test results, it means that the unstable operation of the target application after the update is caused by factors other than the target application itself, and has nothing to do with the target application itself. Therefore, there is no need to generate early warning information, which ensures the accuracy of the early warning information and avoids unnecessary inspection and modification of the target application and waste of manpower and material resources.
[0111] In an alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0112] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0113] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0114] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0115] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
[0116] An embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0117] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0118] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
[0119] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0120] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A warning method for application abnormality, characterized in that: include: Obtaining abnormal operation rates of a target application in a plurality of sampling periods, wherein the plurality of sampling periods include at least one first period before a version update of the target application and at least one second period after the version update; Performing a rank sum test on the abnormal operation rate of the target application in the first period and the abnormal operation rate in the second period, and if there is no significant difference in the test results, no warning information is generated; The step of obtaining the abnormal operation rate of the target application in multiple sampling periods also includes: Obtaining abnormal operation rates of multiple reference applications during the multiple sampling periods; The distribution of abnormal operation rates of the target application and the reference applications are compared for similarity. If the comparison result is a probability distribution that obeys the same parameters, no warning information is generated; if the comparison result is a probability distribution that does not obey the same parameters, and the abnormal operation rate of the target application in multiple sampling time periods is greater than the abnormal operation rate of the reference applications in the multiple sampling time periods as represented by statistics, then a warning information is generated.
2. The method for early warning of application abnormality according to claim 1, characterized in that: The step of performing a rank sum test on the abnormal operation rate of the target application program in the first time period and the abnormal operation rate of the target application program in the second time period further includes: If there is a significant difference in the test results, the abnormal operation rates of the target application in the at least one second time period are arranged in descending order according to the values of the abnormal operation rates, a first preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to the respective abnormal operation rates are formed into a first set; Obtaining the number of running applications of all applications in the at least one second time period, and arranging the number of running applications of all applications in the at least one second time period in descending order according to the number of running applications of all applications, selecting the first preset number of running applications in descending order, and forming a second set of second time periods corresponding to the respective running numbers; determining the same second time period in the first set and the second set to form a third set; Determine an overlap rate and a reference application, wherein the overlap rate is used to indicate the ratio of the number of the second time period in the third set to the first preset number, and the reference application is an application that meets a weak association condition with the target application; If the overlap rate exceeds a preset threshold and the control application has an operational abnormality in a third time period of the second preset number, the warning information is not generated, and the third time period is a time period in the third set.
3. The method for early warning of application abnormality according to claim 2, characterized in that: Also includes: According to the numerical values of the abnormal operation rates, the abnormal operation rates of the target application in the at least one second time period are arranged in descending order, a third preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to the respective abnormal operation rates are formed into a fourth set; Performing a rank sum test on the abnormal operation rate of the target application in the second period of the fourth set and the abnormal operation rate of the control application in the second period of the fourth set, and if the test result shows that there is no significant difference, then not generating the warning information; If the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set cannot be rank-sum tested, the warning information is generated.
4. The method for early warning of application abnormality according to claim 3, characterized in that: Also includes: If the test result shows that there is a significant difference, the distribution of the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set will be compared for similarity. If the comparison result is a probability distribution that obeys the same parameters, the warning information will not be generated.
5. The method for early warning of application abnormality according to claim 4, characterized in that: Also includes: If the overlap rate does not exceed the preset threshold or the overlap rate exceeds the preset threshold and there is no operation abnormality of the control application in the third time period of the second preset number, and the comparison result of the similarity comparison is a probability distribution that does not obey the same parameters and the abnormal operation rate of the target application in the second time period in the fourth set is greater than the abnormal operation rate of the control application in the second time period in the fourth set, the warning information is generated.
6. The method for early warning of application abnormality according to claim 1, characterized in that: Also includes: According to the numerical values of the abnormal operation rates, the abnormal operation rates of the target application in the at least one second time period are arranged in descending order, a third preset number of abnormal operation rates are selected in order from large to small, and the second time periods corresponding to the respective abnormal operation rates are formed into a fourth set; A rank sum test is performed on the abnormal operation rate of the target application in the second time period in the fourth set and the abnormal operation rate of the control application in the second time period in the fourth set. If the test result shows that there is no significant difference, the warning information is not generated; the control application is an application that meets a weak correlation condition with the target application.
7. An early warning device for application abnormality, characterized in that: include: An acquisition module, used to obtain the abnormal operation rate of the target application in multiple sampling periods, wherein the multiple sampling periods include at least one first period before the version of the target application is updated and at least one second period after the version is updated; A calculation module, used for performing a rank sum test on the abnormal operation rate of the target application in the first time period and the abnormal operation rate in the second time period, and when there is no significant difference in the test results, the calculation module does not generate warning information; The step of obtaining the abnormal operation rate of the target application in multiple sampling periods also includes: Obtaining abnormal operation rates of multiple reference applications during the multiple sampling periods; The distribution of abnormal operation rates of the target application and the reference applications are compared for similarity. If the comparison result is a probability distribution that obeys the same parameters, no warning information is generated; if the comparison result is a probability distribution that does not obey the same parameters, and the abnormal operation rate of the target application in multiple sampling time periods is greater than the abnormal operation rate of the reference applications in the multiple sampling time periods as represented by statistics, then a warning information is generated.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method for early warning of application abnormality according to any one of claims 1 to 6.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for early warning of application abnormality described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for determining normal operation after software upgrading
CN110059013A
Application program exception occurrence rate statistical method and device and electronic equipment
CN113918434A