Application memory abnormity alarm method and device, equipment, storage medium and product

By obtaining the multi-dimensional memory data time series of application memory and using the target time point prediction model, we predict the time point when the memory area reaches the threshold in advance, and combined with abnormal data to alarm, the problem of untimely application memory exception alarm in the prior art is solved. Reduces the risk of memory problems.

CN119292879APending Publication Date: 2025-01-10CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411317967.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The prior art does not promptly alert when an application memory abnormality occurs, resulting in irreversible business impact.

Method used

By obtaining the time series of multi-dimensional memory data in the application memory, the prediction model predicts the time point when the memory area reaches the threshold based on the target time point prediction model, determines the target memory exception time point, and issues an exception alarm.

Benefits of technology

It realizes alarms before application memory exceptions, reserves emergency processing time for operation and maintenance, and reduces the probability of memory problems in production environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292879A_ABST
    Figure CN119292879A_ABST
Patent Text Reader

Abstract

The invention discloses an application memory exception alarm method and device, equipment, a storage medium and a product, and relates to the technical field of data processing, and the method comprises the steps: predicting a time point when each memory region reaches a memory region threshold according to a time sequence of multi-dimensional memory data based on each target time point prediction model; determining a target memory exception time point according to the time point when each memory region reaches the memory region threshold and the current time point; according to the target memory exception time point and the target memory exception data, performing exception alarm; by means of the mode, after the time sequence of the multi-dimensional memory data is obtained, analysis is conducted through the target time point prediction models, the time points when the memory areas reach the memory area threshold values are predicted, and after the target memory abnormal time points are determined, abnormal warning is conducted in combination with the target memory abnormal data. Therefore, alarm before the application memory is abnormal can be realized, emergency processing time is reserved for operation and maintenance, and the probability of occurrence of memory problems in a production environment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an application memory abnormality alarm method, device, equipment, storage medium and product. Background Art

[0002] As software services and their system architectures become increasingly complex, application systems are facing more and more performance risks, such as application memory anomalies, including but not limited to heap memory overflow, metaspace overflow, and application memory limit restart, etc., and the above application memory anomalies cannot be fully highlighted in short-term performance tests. Based on this, application memory anomaly alarms are particularly important. At present, the common method of application memory anomaly alarms is to issue an alarm only when the application memory has already shown abnormalities, which has already caused irreversible impact on the business. Therefore, the above method is not timely for application memory anomaly alarms.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide an application memory abnormality alarm method, device, equipment, storage medium and product, aiming to solve the technical problem of the prior art that application memory abnormality alarm is not timely.

[0005] To achieve the above purpose, the present application proposes an application memory abnormality alarm method, the method comprising:

[0006] Get the time series of multi-dimensional memory data of application memory;

[0007] Predicting the time point at which each memory area reaches the memory area threshold based on the time series of the multi-dimensional memory data based on each target time point prediction model;

[0008] Determine a target memory abnormality time point according to the time point at which each memory area reaches the memory area threshold and the current time point;

[0009] An abnormality alarm is issued according to the target memory abnormality time point and the target memory abnormality data.

[0010] In one embodiment, before the step of predicting the time point at which each memory area reaches the memory area threshold based on the time series of the multi-dimensional memory data based on each target time point prediction model, the step further includes:

[0011] Obtain the time series set and time point set of historical multi-dimensional memory data when the application memory is abnormal;

[0012] Preprocessing the time series set and the time point set respectively, and generating a historical sample training set according to the preprocessed time series set and the time point set;

[0013] Determining the dimension of the historical sample training set, and determining the current linear regression model according to the dimension of the historical sample training set;

[0014] The prediction model for each target time point is determined respectively according to the current linear regression model and the historical sample training set.

[0015] In one embodiment, the step of determining the prediction model of each target time point according to the current linear regression model and the historical sample training set includes:

[0016] Performing fitting processing on the historical sample training set based on the current linear regression model to obtain various regression models;

[0017] estimating regression coefficients based on a target least squares algorithm and the historical sample training set;

[0018] Determine the prediction model for each current time point respectively according to each regression model and the regression coefficient;

[0019] Testing the prediction models at each current time point respectively according to the historical sample test set;

[0020] When the current test results meet the preset test requirements, the prediction models for each target time point are determined respectively;

[0021] When the current test result does not meet the preset test requirements, the parameters of the current time point prediction model that does not meet the preset test requirements are adjusted, and the test is re-performed until the preset test requirements are met.

[0022] In one embodiment, the step of determining the target memory abnormality time point according to the time point at which each memory area reaches the memory area threshold and the current time point includes:

[0023] Calculate the time point difference between the time point when each memory area reaches the memory area threshold and the current time point respectively;

[0024] Sorting the plurality of time point difference values ​​according to a preset relationship;

[0025] Select the minimum time point difference from the time point difference sorting results;

[0026] A specific time point is selected from the time points when each memory area reaches the memory area threshold according to the minimum time point difference, and the specific time point is used as the target memory abnormality time point.

[0027] In one embodiment, the step of generating an abnormality alarm according to the target memory abnormality time point and the target memory abnormality data includes:

[0028] Calculate the target time point difference between the target abnormal time point and the current time point;

[0029] When the target time point difference is greater than a preset alarm time threshold, determining target memory abnormal data;

[0030] Producing an abnormality alarm according to the target memory abnormality time point and the target memory abnormality data;

[0031] Accordingly, after calculating the target time point difference between the target abnormal time point and the current time point, the method further includes:

[0032] When the target time point difference is less than or equal to a preset alarm time threshold, obtaining a current application memory data snapshot;

[0033] When it is determined that the time series of the multidimensional memory data needs to be obtained again based on the current application memory data snapshot, continue to execute the step of predicting the time point when each memory area reaches the memory area threshold based on the time series of the multidimensional memory data at the next moment based on each target time point prediction model.

[0034] In one embodiment, the step of obtaining the time series of multi-dimensional memory data of the application memory includes:

[0035] Obtain application deployment environment, software package version, and application memory configuration data;

[0036] Acquire a target application memory data snapshot according to the application deployment environment, the software package version, and the application memory configuration data;

[0037] Determining whether the preset collection requirements are met according to the target application memory data snapshot;

[0038] If yes, then obtain the time series of the multi-dimensional memory data of the application memory.

[0039] In addition, to achieve the above purpose, the present application also proposes an application memory abnormality alarm device, the application memory abnormality alarm device comprising:

[0040] The acquisition module is used to obtain the time series of multi-dimensional memory data of the application memory;

[0041] A prediction module, configured to predict the time point at which each memory area reaches a memory area threshold value based on the time series of the multi-dimensional memory data based on each target time point prediction model;

[0042] A determination module, used to determine a target memory abnormality time point according to a time point at which each memory area reaches a memory area threshold and a current time point;

[0043] The alarm module is used to generate an abnormal alarm according to the target memory abnormal time point and the target memory abnormal data.

[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes an application memory abnormality alarm device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the application memory abnormality alarm method as described above.

[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the application memory abnormality alarm method described above are implemented.

[0046] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the application memory abnormality alarm method described above are implemented.

[0047] One or more technical solutions proposed in the present application have at least the following technical effects: by obtaining the time series of multi-dimensional memory data of the application memory; predicting the time point when each memory area reaches the memory area threshold based on the time series of the multi-dimensional memory data based on each target time point prediction model; determining the target memory abnormal time point according to the time point when each memory area reaches the memory area threshold and the current time point; and issuing an abnormal alarm based on the target memory abnormal time point and the target memory abnormal data; through the above method, after obtaining the time series of the multi-dimensional memory data, using each target time point prediction model to analyze and predict the time point when each memory area reaches the memory area threshold, after determining the target memory abnormal time point, issuing an abnormal alarm in combination with the target memory abnormal data, thereby being able to implement an alarm before the application memory abnormality, reserving emergency processing time for operation and maintenance, and reducing the probability of memory problems occurring in the production environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, are used to explain the principles of the present application.

[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0050] Figure 1 A flowchart of the first embodiment of the memory abnormality alarm method for the present application is provided;

[0051] Figure 2 A flowchart of the second embodiment of the memory abnormality alarm method for this application is provided;

[0052] Figure 3 A schematic diagram of the overall process of the application memory abnormality alarm method provided in the second embodiment of the present application;

[0053] Figure 4 This is a schematic diagram of the module structure of the memory abnormality alarm device used in the embodiment of the present application;

[0054] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the memory abnormality alarm method applied in the embodiment of the present application.

[0055] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0056] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an abnormal alarm device, etc. The following takes the abnormal alarm device as an example to illustrate this embodiment and the following embodiments.

[0057] Based on this, the embodiment of the present application provides an application memory abnormality alarm method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the memory abnormality alarm method applied in this application.

[0058] In this embodiment, the application memory abnormality alarm method includes steps S10 to S40:

[0059] Step S10, obtaining the time series of multi-dimensional memory data of the application memory.

[0060] It should be noted that the multi-dimensionality includes but is not limited to the physical dimension, heap dimension, metaspace dimension, and direct dimension, etc. The multi-dimensional memory data at this time includes but is not limited to physical memory data, heap memory data, metaspace memory data, and direct memory data, etc. Since a lot of physical memory will be occupied at the moment of process startup and in the initial stage of business processing, it is necessary to collect the physical memory data of the application memory after the application has run for a period of time. The use of heap memory fluctuates with the memory gc. When the number of fullgcs increases and the frequency increases, it indicates that there may be problems with the use of heap memory. At this time, a fullgc number threshold is set. When the number of fullgcs reaches the fullgc number threshold, heap memory data is collected, or the time difference of a single fullgc is calculated. When the time difference is less than the time threshold, heap memory data is collected.

[0061] It should be understood that the timing for acquiring the multi-dimensional memory data of the application memory in this embodiment can be completed during the performance testing of the application system. When the preset collection requirements of the respective multi-dimensional memory data are met, the multi-dimensional memory data of the application memory is acquired, and the multi-dimensional memory data of the application memory is organized into a corresponding time series, that is, the time series of the multi-dimensional memory data of the application memory.

[0062] Further, step S10 includes: obtaining the application deployment environment, the software package version and the application memory configuration data; obtaining a target application memory data snapshot according to the application deployment environment, the software package version and the application memory configuration data; judging whether the preset collection requirements are met according to the target application memory data snapshot; and if so, obtaining the time series of the multi-dimensional memory data of the application memory.

[0063] It should be understood that the device in the application deployment environment can be a virtual machine or a container, and the software package version can be oraclejdk1.8.0, openjdk1.8.0 or other versions. For the application memory configuration data, taking the container as an example, the application memory configuration data includes but is not limited to total memory, reserved memory and JVM memory configuration data, among which the JVM memory configuration data mainly obtains the configuration data of heap memory and metaspace. The heap memory mainly focuses on the proportion of the old generation, and obtains the ratio parameter of the young generation to the old generation. The default value of the ratio parameter can be 2, which means that the young generation occupies 1 / 3 of the heap memory and the old generation occupies 2 / 3 of the heap memory.

[0064] Step S20, predicting the time point at which each memory area reaches the memory area threshold based on the time series of the multi-dimensional memory data based on each target time point prediction model.

[0065] It can be understood that the target time point prediction model refers to a model that predicts the time point when the memory area reaches the memory area threshold. Since the time series of the memory data in this embodiment is multi-dimensional, the trained target time point prediction model is also multi-dimensional, and the number is multiple. For example, for metaspace memory data, the target metaspace time point prediction model is used for prediction, and for heap memory data, the target heap time point prediction model is used for prediction.

[0066] It should be understood that in order to effectively improve the efficiency of predicting time points, after obtaining the time series of multidimensional memory data, the features of the time series of multidimensional memory data are extracted, and then each feature is input into the corresponding target time point prediction model respectively. Each target time point prediction model will output the time point when the memory area reaches the memory area threshold. For example, the time point when the metaspace memory area reaches the memory area threshold is T1, and the time point when the heap memory area reaches the memory area threshold is T2.

[0067] Furthermore, before step S20, it also includes: obtaining a time series set and a time point set of historical multi-dimensional memory data when the application memory is abnormal; preprocessing the time series set and the time point set respectively, and generating a historical sample training set based on the preprocessed time series set and the time point set; determining the dimension of the historical sample training set, and determining the current linear regression model based on the dimension of the historical sample training set; and determining each target time point prediction model based on the current linear regression model and the historical sample training set.

[0068] It should be understood that the time series set and time point set of historical multidimensional memory data when the application memory is abnormal refer to the set used to fit the target time point prediction model. In order to effectively improve the accuracy of fitting the target time point prediction model, after obtaining the time series set and time point set of historical multidimensional memory data when the application memory is abnormal, the above-mentioned sets are preprocessed. The preprocessing operations include but are not limited to data cleaning, screening and filtering.

[0069] It should be noted that for the time series of historical heap memory data, since the time series of historical heap memory data shows a fluctuating trend with the occurrence of fullgc, in order to make the fitting model obtained by linear prediction more accurate, the usage rate of the old generation when the number of fullgcs increases can be screened out as training data, that is, a time series set of historical multi-dimensional memory data is formed. When a fullgc occurs in the application, the memory usage rate of the old generation drops to a low point and then rises when a new object is created again.

[0070] It can be understood that after the preprocessing is completed, a historical sample training set is generated. The historical sample training set can be a set of preprocessed time series and a set of partial data of the time point set, and the other part can be divided into a historical sample test set. The current linear regression model refers to a linear regression model with the same dimension as the historical sample training set. For example, when the dimension of the historical sample training set is one-dimensional, the current linear regression model can be a univariate linear regression model.

[0071] It should be noted that the linear regression model refers to a regression model used in statistics to describe the linear relationship between one or more independent variables and a dependent variable. The current linear regression model is taken as an example of a univariate linear regression model. At this time, only one factor is considered. It can be specifically expressed as:

[0072] y=β0+β1x+μ.

[0073] Among them, y represents the dependent variable, x represents the independent variable, β0 represents the intercept term, β1 represents the slope, and μ represents the error term.

[0074] It should be noted that the above β0 and β1 can also be called regression coefficients. β0 can also be understood as the expectation of y when x=0; β1 can be understood as the average increase of y by β1 units for every unit increase in x.

[0075] Furthermore, the step of determining each target time point prediction model according to the current linear regression model and the historical sample training set includes: fitting the historical sample training set based on the current linear regression model to obtain each regression model; estimating the regression coefficient according to the target least squares algorithm and the historical sample training set; determining each current time point prediction model according to each regression model and the regression coefficient; testing each current time point prediction model according to the historical sample test set; when the current test result meets the preset test requirements, determining each target time point prediction model; when the current test result does not meet the preset test requirements, adjusting the parameters of the current time point prediction model that does not meet the preset test requirements, and retesting until the preset test requirements are met.

[0076] It should be noted that after obtaining each regression model, the regression coefficient will be estimated according to the target least squares algorithm and the historical sample training set. At this time, the core idea of ​​the target least squares algorithm is to estimate the regression coefficient by minimizing the residual sum of squares, specifically:

[0077]

[0078] It can be deduced that:

[0079]

[0080] in, and represents the estimate of the regression coefficient, Represents x i The fitted values ​​under , i=1,2,…,n.

[0081] It should be understood that after the above processing, each current time point prediction model has been fitted. In order to effectively improve the accuracy of predicting the time point when each memory area reaches the memory area threshold, this embodiment will also use the divided historical sample test set to test each current time point prediction model separately, and then judge whether the previous test results meet the preset test requirements. If so, it indicates that each current time point prediction model is qualified. At this time, each current time point prediction model can be directly used for prediction. Otherwise, it indicates that it is unqualified. At this time, it is necessary to adjust the parameters of the current time point prediction model that does not meet the preset test requirements, that is, iterative fitting of the model, and further perform model testing until all time point prediction models meet the preset test requirements.

[0082] Step S30, determining a target memory abnormality time point according to the time point at which each memory area reaches the memory area threshold and the current time point.

[0083] It should be understood that the target storage abnormality time point refers to the time point closest to the current time point among the time points when each memory area reaches the memory area threshold. After determining the target memory abnormality time point, it indicates that the application may have memory problems at the target memory abnormality time point.

[0084] Step S40: issuing an abnormality alarm according to the target memory abnormality time point and the target memory abnormality data.

[0085] It can be understood that the target memory exception data refers to the exception data of the application having memory problems. After determining the target memory exception time point, an exception alarm is issued in combination with the target memory exception data, that is, the target memory exception data is pushed while outputting the target memory exception time point.

[0086] Further, step S40 includes: calculating the target time point difference between the target abnormal time point and the current time point; when the target time point difference is greater than a preset alarm time threshold, determining the target memory abnormal data; and issuing an abnormal alarm based on the target memory abnormal time point and the target memory abnormal data; accordingly, after calculating the target time point difference between the target abnormal time point and the current time point, it also includes: when the target time point difference is less than or equal to the preset alarm time threshold, obtaining a snapshot of the current application memory data; when it is determined according to the current application memory data snapshot that the time series of the multidimensional memory data needs to be obtained again, continuing to execute the step of predicting the time point when each memory area reaches the memory area threshold based on the time series of the multidimensional memory data at the next moment based on each target time point prediction model.

[0087] It should be understood that the target time point difference refers to the time point difference between the target abnormal time point and the current time point. After calculating the target time point difference, it is determined whether the target time point difference is greater than the preset alarm time threshold. If so, an abnormal alarm is issued in combination with the target memory abnormal data. Otherwise, it is determined whether it is necessary to obtain the time series of the multi-dimensional memory data again based on the current application memory data snapshot. If so, the time series of the multi-dimensional memory data at the next moment is obtained, and then the time point prediction is continued based on each target time point prediction model.

[0088] It is understandable that the present embodiment will continue to optimize the solution. For example, in order to solve the problem of memory dropping or fluctuating in a short time after reaching the threshold, it is possible to consider increasing the confidence interval of the warning threshold, such as setting the threshold range: 90% to 100%, to improve reliability; in order to solve the problem that the application memory may be full in a short time and memory overflow may occur, the rapid surge in physical memory can be judged and an alarm can be quickly issued when collecting snapshots; typical data such as normal memory growth, abnormal growth, amplitude fluctuation, etc. are collected to train different trend models to form a model library. After fitting the model through the time series of the real-time collected data, a suitable prediction model is matched from the model library, and then the alarm is judged and analyzed.

[0089] This embodiment obtains the time series of multi-dimensional memory data of the application memory; predicts the time point when each memory area reaches the memory area threshold based on the target time point prediction model according to the time series of the multi-dimensional memory data; determines the target memory abnormal time point according to the time point when each memory area reaches the memory area threshold and the current time point; and issues an abnormal alarm based on the target memory abnormal time point and the target memory abnormal data. In the above manner, after obtaining the time series of the multi-dimensional memory data, each target time point prediction model is used for analysis, and the time point when each memory area reaches the memory area threshold is predicted. After determining the target memory abnormal time point, an abnormal alarm is issued in combination with the target memory abnormal data, thereby enabling an alarm before the application memory abnormality is issued, reserving emergency processing time for operation and maintenance, and reducing the probability of memory problems in the production environment.

[0090] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S30 includes steps S301 to S304:

[0091] Step S301, respectively calculating the time point difference between the time point at which each memory area reaches the memory area threshold and the current time point.

[0092] It should be noted that the time point difference refers to the difference between the time point when each memory area reaches the memory area threshold and the current time point. For example, the time point when the metaspace memory area reaches the memory area threshold is T1, the time point when the heap memory area reaches the memory area threshold is T2, and the current time point is t. Then the time point difference between the time point when the metaspace memory area reaches the memory area threshold and the current time point is |T1-t|. Similarly, the time point difference between the time point when the heap memory area reaches the memory area threshold and the current time point is |T2-t|.

[0093] Step S302: sort the multiple time point difference values ​​according to a preset relationship.

[0094] It can be understood that the preset relationship refers to a relationship for sorting multiple data. The preset relationship can be a sorting relationship from large to small, or a sorting relationship from small to large, that is, after obtaining the difference values ​​of each time point, the difference values ​​of multiple time points are sorted according to the preset relationship.

[0095] Step S303: Select the minimum time point difference from the time point difference sorting result.

[0096] It should be understood that the minimum time point difference refers to the time point difference with the smallest difference in the time point difference sorting result, and after sorting according to the preset relationship, the minimum time point difference is selected from the time point difference sorting result.

[0097] Step S304: selecting a specific time point from the time points at which each memory area reaches the memory area threshold according to the minimum time point difference, and using the specific time point as the target memory abnormality time point.

[0098] It can be understood that after obtaining the minimum time point difference, the time point used to calculate the minimum time point difference is traversed from the time points when each memory area reaches the memory area threshold, that is, the specific time point. At this time, the specific time point is used as the target memory abnormality time point, that is, the specific time point is closest to the current time point.

[0099] This embodiment calculates the time point difference between the time point when each memory area reaches the memory area threshold and the current time point respectively; sorts the multiple time point difference values ​​according to a preset relationship; selects the minimum time point difference value from the time point difference sorting result; selects a specific time point from the time points when each memory area reaches the memory area threshold according to the minimum time point difference value, and uses the specific time point as the target memory abnormality time point; through the above method, after respectively calculating the time point difference between the time point when each memory area reaches the memory area threshold and the current time point, sorts the multiple time point difference values ​​according to the preset relationship, and then selects the minimum time point difference, thereby effectively improving the efficiency of selecting the minimum time point difference, and then determines the target memory abnormality time point according to the minimum time point difference, thereby effectively improving the efficiency of the target memory abnormality time point.

[0100] For example, to help understand the implementation process of the application memory abnormality alarm method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A schematic diagram of the overall process of an application memory exception alarm method is provided, specifically:

[0101] After the start, the application deployment environment, software package version and application memory configuration data are obtained, and it is determined whether the preset collection requirements are met based on the application deployment environment, software package version and application memory configuration data. If so, the multi-dimensional memory data of the application memory is obtained, and then the multi-dimensional memory data of the application memory is pre-processed by screening and filtering to obtain the time series of the multi-dimensional memory data of the application memory, and then the target time point prediction model fitted in advance is used to predict the time point when each memory area reaches the memory area threshold, and the target memory abnormal time point is determined according to the time point when each memory area reaches the memory area threshold and the current time point, and then it is determined whether the target time point difference is greater than the preset alarm time threshold. If so, the target memory abnormal data is determined, and an abnormal alarm is issued by outputting the target memory abnormal time point and pushing the target memory abnormal data. If not, a snapshot of the current application memory data is obtained, and it is determined whether the multi-dimensional memory data needs to be obtained again. If so, the multi-dimensional memory data of the next moment is continued to be collected, and then the step of predicting the time point when each memory area reaches the memory area threshold is continued.

[0102] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the memory abnormality alarm method applied in the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0103] This application also provides an application memory abnormality alarm device, please refer to Figure 4 , the application memory abnormality alarm device comprises:

[0104] The acquisition module 10 is used to acquire the time series of multi-dimensional memory data of the application memory.

[0105] The prediction module 20 is used to predict the time point when each memory area reaches the memory area threshold based on the time series of the multi-dimensional memory data based on each target time point prediction model.

[0106] The determination module 30 is used to determine the target memory abnormality time point according to the time point when each memory area reaches the memory area threshold and the current time point.

[0107] The alarm module 40 is used to generate an abnormal alarm according to the target memory abnormal time point and the target memory abnormal data.

[0108] This embodiment obtains the time series of multi-dimensional memory data of the application memory; predicts the time point when each memory area reaches the memory area threshold based on the target time point prediction model according to the time series of the multi-dimensional memory data; determines the target memory abnormal time point according to the time point when each memory area reaches the memory area threshold and the current time point; and issues an abnormal alarm based on the target memory abnormal time point and the target memory abnormal data. In the above manner, after obtaining the time series of the multi-dimensional memory data, each target time point prediction model is used for analysis, and the time point when each memory area reaches the memory area threshold is predicted. After determining the target memory abnormal time point, an abnormal alarm is issued in combination with the target memory abnormal data, thereby enabling an alarm before the application memory abnormality is issued, reserving emergency processing time for operation and maintenance, and reducing the probability of memory problems in the production environment.

[0109] The application memory abnormality alarm device provided by the present application adopts the application memory abnormality alarm method in the above embodiment, which can solve the technical problem of the prior art that the application memory abnormality alarm is not timely. Compared with the prior art, the beneficial effects of the application memory abnormality alarm device provided by the present application are the same as the beneficial effects of the application memory abnormality alarm method provided by the above embodiment, and the other technical features in the application memory abnormality alarm device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0110] In one embodiment, the acquisition module 10 is also used to obtain the application deployment environment, the software package version and the application memory configuration data; obtain the target application memory data snapshot according to the application deployment environment, the software package version and the application memory configuration data; determine whether the preset collection requirements are met according to the target application memory data snapshot; if so, obtain the time series of the multi-dimensional memory data of the application memory.

[0111] In one embodiment, the prediction module 20 is also used to obtain a time series set and a time point set of historical multi-dimensional memory data when the application memory is abnormal; preprocess the time series set and the time point set respectively, and generate a historical sample training set based on the preprocessed time series set and the time point set; determine the dimension of the historical sample training set, and determine the current linear regression model based on the dimension of the historical sample training set; and determine the prediction model of each target time point based on the current linear regression model and the historical sample training set.

[0112] In one embodiment, the prediction module 20 is also used to fit the historical sample training set based on the current linear regression model to obtain each regression model; estimate the regression coefficient according to the target least squares algorithm and the historical sample training set; determine each current time point prediction model according to each regression model and the regression coefficient; test each current time point prediction model according to the historical sample test set; when the current test result meets the preset test requirements, determine each target time point prediction model; when the current test result does not meet the preset test requirements, adjust the parameters of the current time point prediction model that does not meet the preset test requirements, and retest until the preset test requirements are met.

[0113] In one embodiment, the determination module 30 is also used to respectively calculate the time point difference between the time point when each memory area reaches the memory area threshold and the current time point; sort the multiple time point differences according to a preset relationship; select the minimum time point difference from the time point difference sorting results; select a specific time point from the time points when each memory area reaches the memory area threshold according to the minimum time point difference, and use the specific time point as the target memory abnormality time point.

[0114] In one embodiment, the alarm module 40 is also used to calculate the target time point difference between the target abnormal time point and the current time point; when the target time point difference is greater than a preset alarm time threshold, determine the target memory abnormal data; issue an abnormal alarm based on the target memory abnormal time point and the target memory abnormal data; when the target time point difference is less than or equal to the preset alarm time threshold, obtain a snapshot of the current application memory data; when it is determined that the time series of multidimensional memory data needs to be obtained again based on the current application memory data snapshot, continue to execute the step of predicting the time point when each memory area reaches the memory area threshold based on the time series of the multidimensional memory data at the next moment based on each target time point prediction model.

[0115] The present application provides an application memory abnormality alarm device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the application memory abnormality alarm method in the above-mentioned embodiment one.

[0116] Reference below Figure 5, which shows a schematic diagram of the structure of an application memory abnormality alarm device suitable for implementing an embodiment of the present application. The application memory abnormality alarm device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The application memory abnormality alarm 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 application.

[0117] like Figure 5 As shown, the application memory abnormality alarm device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the application memory abnormality alarm device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the application memory abnormality alarm device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an application memory abnormality alarm device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0118] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a 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, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0119] The application memory abnormality alarm device provided by the present application adopts the application memory abnormality alarm method in the above embodiment, which can solve the technical problem of the prior art that the application memory abnormality alarm is not timely. Compared with the prior art, the beneficial effects of the application memory abnormality alarm device provided by the present application are the same as the beneficial effects of the application memory abnormality alarm method provided by the above embodiment, and the other technical features in the application memory abnormality alarm device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0120] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0122] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the application memory abnormality alarm method in the above-mentioned embodiment.

[0123] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, 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: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the 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, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0124] The computer-readable storage medium may be included in the application memory abnormality alarm device; or may exist independently without being assembled into the application memory abnormality alarm device.

[0125] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0126] 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 application. 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 alternative implementations, 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.

[0127] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0128] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned application memory abnormality alarm method, and can solve the technical problem of the prior art that the application memory abnormality alarm is not timely. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the application memory abnormality alarm method provided by the above-mentioned embodiment, and will not be repeated here.

[0129] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned application memory abnormality alarm method when executed by a processor.

[0130] The computer program product provided by this application can solve the technical problem of the prior art that the application memory abnormality alarm is not timely. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the application memory abnormality alarm method provided by the above embodiment, which will not be repeated here.

[0131] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for alarming application memory abnormality, characterized in that: The method comprises: Get the time series of multi-dimensional memory data of application memory; Predicting the time point at which each memory area reaches the memory area threshold based on the time series of the multi-dimensional memory data based on each target time point prediction model; Determine a target memory abnormality time point according to the time point at which each memory area reaches the memory area threshold and the current time point; An abnormality alarm is issued according to the target memory abnormality time point and the target memory abnormality data.

2. The method according to claim 1, characterized in that Before the step of predicting the time point at which each memory area reaches the memory area threshold value based on the time series of the multi-dimensional memory data based on each target time point prediction model, the step further includes: Obtain the time series set and time point set of historical multi-dimensional memory data when the application memory is abnormal; Preprocessing the time series set and the time point set respectively, and generating a historical sample training set according to the preprocessed time series set and the time point set; Determining the dimension of the historical sample training set, and determining the current linear regression model according to the dimension of the historical sample training set; The prediction model for each target time point is determined respectively according to the current linear regression model and the historical sample training set.

3. The method according to claim 2, characterized in that The step of determining the prediction model of each target time point according to the current linear regression model and the historical sample training set includes: Performing fitting processing on the historical sample training set based on the current linear regression model to obtain various regression models; estimating regression coefficients based on a target least squares algorithm and the historical sample training set; Determine the prediction model for each current time point respectively according to each regression model and the regression coefficient; Testing the prediction models at each current time point respectively according to the historical sample test set; When the current test results meet the preset test requirements, the prediction models for each target time point are determined respectively; When the current test result does not meet the preset test requirements, the parameters of the current time point prediction model that does not meet the preset test requirements are adjusted, and the test is re-performed until the preset test requirements are met.

4. The method according to claim 1, characterized in that The step of determining the target memory abnormality time point according to the time point at which each memory area reaches the memory area threshold and the current time point comprises: Calculate the time point difference between the time point when each memory area reaches the memory area threshold and the current time point respectively; Sorting the plurality of time point difference values ​​according to a preset relationship; Select the minimum time point difference from the time point difference sorting results; A specific time point is selected from the time points when each memory area reaches the memory area threshold according to the minimum time point difference, and the specific time point is used as the target memory abnormality time point.

5. The method according to any one of claims 1 to 4, characterized in that The step of issuing an abnormality alarm according to the target memory abnormality time point and the target memory abnormality data includes: Calculate the target time point difference between the target abnormal time point and the current time point; When the target time point difference is greater than a preset alarm time threshold, determining target memory abnormal data; Producing an abnormality alarm according to the target memory abnormality time point and the target memory abnormality data; Accordingly, after calculating the target time point difference between the target abnormal time point and the current time point, the method further includes: When the target time point difference is less than or equal to a preset alarm time threshold, obtaining a current application memory data snapshot; When it is determined that the time series of the multidimensional memory data needs to be obtained again based on the current application memory data snapshot, continue to execute the step of predicting the time point when each memory area reaches the memory area threshold based on the time series of the multidimensional memory data at the next moment based on each target time point prediction model.

6. The method according to claim 1, characterized in that The step of obtaining the time series of multi-dimensional memory data of the application memory includes: Obtain application deployment environment, software package version, and application memory configuration data; Acquire a target application memory data snapshot according to the application deployment environment, the software package version, and the application memory configuration data; Determining whether the preset collection requirements are met according to the target application memory data snapshot; If yes, then obtain the time series of the multi-dimensional memory data of the application memory.

7. An application memory abnormality alarm device, characterized in that: The device comprises: The acquisition module is used to obtain the time series of multi-dimensional memory data of the application memory; A prediction module, configured to predict the time point at which each memory area reaches a memory area threshold value based on the time series of the multi-dimensional memory data based on each target time point prediction model; A determination module, used to determine a target memory abnormality time point according to a time point at which each memory area reaches a memory area threshold and a current time point; The alarm module is used to generate an abnormal alarm according to the target memory abnormal time point and the target memory abnormal data.

8. An application memory abnormality alarm device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the application memory abnormality alarm method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the application memory abnormality alarm method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the application memory abnormality alarm method according to any one of claims 1 to 6 are implemented.