Memory processing method and device, equipment, storage medium and program product

By acquiring and analyzing the application's memory data, using machine learning models to predict memory overflow risk time points, and automatically identifying abnormal memory objects, it solves the problems of low memory overflow problem locating efficiency and difficulty in manual cleaning in the existing technology, and achieves accurate Predictive and efficient analytics.

CN118535358APending Publication Date: 2024-08-23SHENZHEN TENCENT NETWORK INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310193520.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing technology is difficult to predict the occurrence time of the memory overflow problem in advance, the location efficiency is low, and the memory data needs to be manually cleaned to analyze abnormal memory objects.

Method used

By obtaining the memory data of the application, we perform feature extraction and machine learning model prediction, predict the memory overflow risk time point, automatically identify abnormal memory objects, and achieve analysis and processing without manual cleaning.

Benefits of technology

It achieves accurate prediction and early prediction of memory overflow problems, improves positioning efficiency, and analyzes and handles abnormal memory objects in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535358A
    Figure CN118535358A
Patent Text Reader

Abstract

The embodiment of the invention discloses a memory processing method and device, equipment, a storage medium and a program product, at least relates to technologies such as machine learning in artificial intelligence, can accurately predict a time point when a memory overflow problem occurs, and timely realizes analysis processing of an abnormal memory object. The method comprises the steps of obtaining first memory data of a first application program, wherein the first memory data is used for indicating a memory occupation condition of at least one memory object when the first application program runs in a tth time period; performing feature extraction processing on the first memory data to obtain a target feature; performing prediction processing on the target feature based on a target risk prediction model to obtain a target risk time point, the target risk time point being used for indicating that the memory occupation condition of the at least one memory object exceeds a preset occupation threshold; and determining an abnormal memory object from the at least one memory object based on the target risk time point, and performing anomaly analysis processing on the abnormal memory object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and specifically to a method, device, equipment, storage medium and program product for memory processing. Background Art

[0002] Out of memory (OOM) refers to the crash of various applications due to excessive use of memory objects. This is a mechanism by which the operating system manages memory.

[0003] In order to find and solve OOM problems, manual testing is usually used to capture memory files and collect memory-related data to find OOM problems. However, the traditional method cannot predict the time point when the OOM problem occurs in advance. The OOM problem can only be located by reproducing it multiple times after the OOM problem occurs, which leads to low efficiency in locating OOM problems. In addition, after locating the OOM problem, the memory data needs to be manually cleaned, which has low cleaning efficiency and cannot timely analyze and process abnormal memory objects. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for memory processing, which can achieve a relatively accurate prediction of the time point when a memory overflow problem occurs, and predict the occurrence of memory overflow risks in advance; and there is no need to manually clean memory data, and abnormal memory objects can be analyzed and processed in a timely manner.

[0005] In the first aspect, the embodiment of the present application provides a method for memory processing. The method includes: obtaining first memory data of a first application, the first memory data is used to indicate the memory occupancy of at least one memory object when the first application is running in the tth time period; performing feature extraction processing on the first memory data to obtain a target feature, the target feature is used to indicate the performance of at least one memory object; predicting the target feature based on a target risk estimation model to obtain a target risk time point, the target risk time point is used to indicate that the memory occupancy of at least one memory object exceeds a preset occupancy threshold, the target risk estimation model is a machine learning model obtained by iteratively training a preset initial model with the predicted target risk time point as the training target and the sample features of the training samples marked with time labels as the training data, the training samples are the historical memory data of at least one memory object when the first application is running in the first t-1 time period, and the time label is used to indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold; determining an abnormal memory object from at least one memory object based on the target risk time point, and performing abnormal analysis processing on the abnormal memory object.

[0006] In a second aspect, an embodiment of the present application provides a memory processing device. The memory processing device includes an acquisition unit and a processing unit. The acquisition unit is used to acquire first memory data of a first application, and the first memory data is used to indicate the memory occupancy of at least one memory object when the first application is running in the t-th time period. The processing unit is used to perform feature extraction processing on the first memory data to obtain a target feature, and the target feature is used to indicate the performance of at least one memory object. The processing unit is used to predict the target feature based on the target risk estimation model to obtain a target risk time point, and the target risk time point is used to indicate that the memory occupancy of at least one memory object exceeds a preset occupancy threshold. The target risk estimation model is a machine learning model obtained by iteratively training a preset initial model with the predicted target risk time point as the training target and the sample features of the first training sample marked with a time label as the training data. The first training sample is the historical memory data of at least one memory object when the first application is running in the first t-1 time period, and the time label is used to indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold. The processing unit is used to determine an abnormal memory object from at least one memory object based on the target risk time point, and perform abnormal analysis processing on the abnormal memory object.

[0007] In some optional embodiments, the processing unit is used to: determine the output vector of the Q-th layer residual sub-model based on the target feature and the Q-th layer residual sub-model, wherein the input of the first layer residual sub-model is the target feature, the input of the Q-th layer residual sub-model is the output vector of the Q-1-th layer residual sub-model, the target risk estimation model includes Q-th layer residual sub-models, Q ≥ 2, and Q is an integer; and use the output vector of the Q-th layer residual sub-model as the target risk time point.

[0008] In some other optional embodiments, the processing unit is used to: perform one-dimensional convolution processing on the output vector of the Q-1th layer residual sub-model to obtain a first output vector; determine the second output vector based on the output vector of the Q-1th layer residual sub-model and P convolution units, wherein the input of the first convolution unit is the output vector of the Q-1th layer residual sub-model, the input of the Pth convolution unit is the output vector of the P-1th convolution unit, the Qth layer residual sub-model includes P convolution units, P ≥ 2, and P is an integer; fuse the first output vector and the second output vector to obtain the output vector of the Qth layer residual sub-model.

[0009] In some other optional embodiments, the processing unit is used to: use the output vector of the P-1th convolution unit as the input of the dilated causal convolution layer of the Pth convolution unit to obtain a feature representation of the dilated causal convolution layer; use the feature representation of the dilated causal convolution layer as the input of the normalization layer of the Pth convolution unit to obtain a feature representation of the normalization layer; use the feature representation of the normalization layer as the input of the activation layer of the Pth convolution unit to obtain a feature representation of the activation layer; use the feature representation of the activation layer as the input of the random inactivation layer of the Pth convolution unit to obtain a second output vector.

[0010] In some other optional embodiments, the processing unit is used to: determine the output vector of the Rth hidden layer based on the output vector of the P-1th convolution unit and the Rth hidden layers in the dilated causal convolution layer, wherein the input of the first hidden layer is a vector obtained by merging every two vectors in the output vector of the P-1th convolution unit, and the input of the Rth hidden layer is a vector obtained by merging every two vectors in the output vector of the R-1th hidden layer, R≥1, and R is an integer; use the output vector of the Rth hidden layer as the input of the output layer of the dilated causal convolution layer to obtain a feature representation of the dilated causal convolution layer.

[0011] In some other optional implementations, the acquisition unit is further used to acquire second memory data of the second application before the target risk time point, the second memory data is used to indicate the memory occupancy of at least one memory object when the second application is running in the tth time period, and the first application and the second application are any two programs with different version numbers in the same application. The processing unit is used to: determine the change value of each memory object when the first memory data is different from the second memory data; and determine the abnormal memory object from at least one memory object based on the change value of each memory object.

[0012] In other optional embodiments, the processing unit is used to: determine a first gradient based on the memory growth of at least one memory object in the second application and the time period corresponding to the memory growth; determine a sampling frequency based on the first gradient; and sample and process the memory data of the second application when it is running in the tth time period according to the sampling frequency to obtain second memory data.

[0013] In other optional embodiments, the processing unit is used to: determine a target index based on a first mapping relationship and an object identifier of an abnormal memory object, the first mapping relationship indicating an association between the object identifier and the target index, the target index being used to identify memory resources occupied when the memory occupancy of at least one memory object increases abnormally; determine the abnormal memory resources based on the target index; and perform exception analysis processing on the abnormal memory object based on the abnormal memory resources.

[0014] In some other optional embodiments, the acquisition unit is also used to: analyze and process the target features based on the target risk prediction model to obtain the historical memory data of at least one memory object when the first application is running in the previous t-1 time period, so as to obtain the first training sample. The processing unit is used to: perform feature extraction processing on the first training sample to obtain the sample features of the first training sample; perform prediction processing on the sample features of the first training sample based on the preset initial model to obtain the predicted risk time point when the memory occupancy of at least one memory object in the first training sample exceeds the preset occupancy threshold; calculate the difference between the predicted risk time point and the time label to obtain the target loss value; update the model parameters of the preset initial model based on the target loss value to obtain the target risk prediction model.

[0015] The third aspect of the embodiment of the present application provides a memory processing device, including: a memory, an input / output (I / O) interface and a memory. The memory is used to store program instructions. The processor is used to execute the program instructions in the memory to perform the memory processing method corresponding to the implementation method of the first aspect above.

[0016] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute a method corresponding to the implementation method of the first aspect described above.

[0017] The fifth aspect of the embodiments of the present application provides a computer program product containing instructions, which, when executed on a computer or a processor, enables the computer or the processor to execute the method corresponding to the implementation method of the first aspect.

[0018] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0019] In the embodiment of the present application, since the first memory data can be used to indicate the memory occupancy of at least one memory object when the first application is running in the tth time period, after obtaining the first memory data of the first application, the first memory data is subjected to feature extraction processing to obtain the target feature. The performance of at least one memory object is reflected by the target feature. In addition, the target risk prediction model is a machine learning model obtained by iteratively training the preset initial model with the predicted target risk time point as the training target and the sample features of the training samples marked with the time label as the training data. The training sample is the historical memory data of at least one memory object when the first application is running in the first t-1 time period, and the time label can indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold. Then, after obtaining the target feature, the target feature can be used as the input of the target risk prediction model, and then the target feature is predicted and processed by the target risk prediction model to obtain the target risk time point. Through the target risk time point, it is possible to timely understand at which time point the memory occupancy of at least one memory object exceeds the preset occupancy threshold, that is, when at least one memory object has a memory overflow problem. In this way, based on the target risk time point, an abnormal memory object is determined from at least one memory object, and an abnormal analysis and processing is performed on the abnormal memory object. Through the above method, there is no need to use manual methods to locate the memory overflow problem, but to build a target risk estimation model from the perspective of time series, so as to achieve a more accurate prediction of the time point when the memory overflow problem occurs through the target risk estimation model, so as to predict the occurrence of memory overflow risk in advance; and based on the target risk time point, an abnormal memory object is determined from at least one memory object, without the need to manually clean the memory data, and the analysis and processing of abnormal memory objects can be realized in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] 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, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A schematic diagram showing an implementation environment provided by an embodiment of the present application is shown;

[0022] Figure 2 A flow chart of a memory processing method provided by an embodiment of the present application is shown;

[0023] Figure 3 A schematic diagram of the prediction process provided by an embodiment of the present application is shown;

[0024] Figure 4 A schematic diagram of the structure of the target risk estimation model provided in the embodiment of the present application is shown;

[0025] Figure 5 A prediction effect diagram of a target risk time point provided by an embodiment of the present application is shown;

[0026] Figure 6 A schematic diagram showing memory growth provided by an embodiment of the present application is shown;

[0027] Figure 7 A schematic diagram of locating abnormal memory objects provided by an embodiment of the present application is shown;

[0028] Figure 8 A schematic diagram of risk cause location provided by an embodiment of the present application is shown;

[0029] Fig. 9 A schematic diagram of the process of model training provided in an embodiment of the present application is shown;

[0030] Fig.10 A schematic diagram of a loss function curve provided in an embodiment of the present application is shown;

[0031] Fig.11A A schematic diagram of an error curve provided in an embodiment of the present application is shown;

[0032] Fig. 11B A schematic diagram showing the relationship between the number of dilated causal convolutional layers and the MAE curve;

[0033] Fig.12 A schematic diagram of the structure of a memory processing device provided in an embodiment of the present application is shown;

[0034] Fig.13 A schematic diagram of the hardware structure of a memory processing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0035] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for memory processing, which can achieve a relatively accurate prediction of the time point when a memory overflow problem occurs, and predict the occurrence of memory overflow risks in advance; and there is no need to manually clean memory data, and abnormal memory objects can be analyzed and processed in a timely manner.

[0036] It is understandable that in the specific implementation of this application, related data such as user information and user personal data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0038] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present 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 data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0039] The memory processing method provided in the embodiment of the present application is implemented based on artificial intelligence (AI). Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.

[0040] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0041] In the embodiments of the present application, the artificial intelligence technologies mainly involved include the above-mentioned machine learning and other directions. For example, it may involve deep learning in machine learning (ML), including artificial neural networks and the like.

[0042] The memory processing method provided in the present application can be applied to memory processing devices with data processing capabilities, such as terminal devices, servers, etc. Among them, terminal devices may include but are not limited to smart phones, desktop computers, laptops, tablet computers, smart speakers, vehicle-mounted devices, smart watches, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms, etc., which are not specifically limited in this application. In addition, the terminal devices and servers mentioned can be directly or indirectly connected by wired communication or wireless communication, which are not specifically limited in this application.

[0043] The memory processing device mentioned above can have machine learning capabilities. Machine learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include technologies such as neural networks.

[0044] At present, with the rapid development of different types of virtual games, higher requirements are placed on the client performance of virtual games. Take open world games as an example. Due to the game characteristics such as huge task volume, open world games often encounter OOM problems caused by rapid memory growth during development. In the development process of traditional U3D virtual games, OOM problems are rarely reported. Compared with traditional virtual games developed based on the U3D (unity3D) game development engine, open world games face many performance bottlenecks caused by excessive map resources and rendering resources, which makes it easier to trigger OOM problems. Currently, for virtual games such as open world games, OOM problems often occur during the development process, but the cause of the problem cannot be quickly and accurately located, resulting in a delay in the development progress. In the actual development cycle of game projects such as open world games, in many cases, OOM problems are caused by testers completing other performance tests. Due to the frequent occurrence of OOM problems that block the test progress, developers will propose a single way to reproduce OOM problems to solve them. This process largely hinders the advancement of the entire process and slows down the development efficiency of the entire game project.

[0045] In other words, in related solutions, the traditional method cannot predict the time point when the OOM problem occurs in advance, and the problem can only be located as an OOM problem through multiple reproductions after the OOM problem occurs, which leads to low efficiency in locating the OOM problem; and after locating the OOM problem, since the OOM problem cannot be accurately reproduced, the memory data needs to be manually cleaned, the cleaning efficiency is low, and the abnormal memory objects cannot be analyzed and processed in time.

[0046] Therefore, in order to solve the technical problems mentioned above, the embodiment of the present application provides a method for memory processing. The method for memory processing can be applied to the scenario of memory prediction when any application is running, and can accurately predict the time point when the memory overflow problem occurs, and predict the occurrence of memory overflow risk in advance; and there is no need to manually clean the memory data, but when the memory overflow problem occurs, the abnormal memory object is promptly determined in an automated manner, and the analysis and processing of the abnormal memory object is realized, effectively promoting the research and development efficiency of the project. Exemplarily, the application scenario described may include but is not limited to a virtual game scenario. In addition, the virtual game described may include but is not limited to the above-mentioned development world game, big world virtual game, etc., which is not limited in the embodiment of the present application. In practical applications, the method for memory processing provided in the embodiment of the present application can also be applied to other application scenarios, such as live broadcast scenarios, intelligent traffic scenarios, text classification scenarios, etc., and the specific application scenario is not limited in the embodiment of the present application. The embodiment of the present application only takes the application of the method for memory processing in a virtual game scenario as an example for detailed introduction.

[0047] Figure 1 A schematic diagram of an implementation environment provided by an embodiment of the present application is shown.

[0048] like Figure 1As shown, the implementation environment may include a model training device and a model using device. Among them, the model training device can be a computer device such as a terminal device, a server, etc., which is used to train the target risk prediction model. The described target risk prediction model can be understood as a model for realizing the prediction of the time point when the memory occupancy of a memory object exceeds a preset occupancy threshold. In an embodiment of the present application, the target risk prediction model is a machine learning model obtained by iteratively training a preset initial model with the predicted target risk time point as the training target and the sample features of the training samples marked with time labels as the training data. The described training samples are the historical memory data of at least one memory object when the first application is running in the first t-1 time periods. The time label is used to indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold. The model training device can train the target risk prediction model in a machine learning manner so that it has better time point automatic prediction performance. For specific information on how to train the target risk prediction model, please refer to the subsequent Fig. 9 The flowchart described above can be understood and will not be described here.

[0049] In addition, the target risk estimation model obtained after training can be deployed in the model-using device. The model-using device can be a terminal device, or it can be a server or other device, which is not specifically limited in the embodiments of the present application. The terminal devices described may include but are not limited to smart phones, tablet computers, laptops, desktop computers, smart speakers, smart watches, smart voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, medical equipment, multimedia playback devices, etc. When it is necessary to predict in advance the time point when the memory occupancy of a memory object exceeds a preset occupancy threshold, the model-using device can automatically detect the target risk time point through the target risk estimation model. In this way, the model-using device further determines the abnormal memory object from at least one memory object based on the target risk time point, and then performs abnormal analysis processing on the abnormal memory pair.

[0050] It should be understood that in practical applications, the memory processing method of the present application can also be applied to Figure 1 Other usage scenarios outside the illustrated implementation environment are not specifically limited in the embodiments of the present application.

[0051] In order to facilitate understanding of the technical solution of the present application, a memory processing method provided in an embodiment of the present application is introduced below with reference to the accompanying drawings.

[0052] Figure 2 A flow chart of a memory processing method provided by an embodiment of the present application is shown. Figure 2 As shown, the memory processing method may include the following steps:

[0053] 201. Obtain first memory data of a first application, where the first memory data is used to indicate memory occupancy of at least one memory object when the first application is running in a tth time period.

[0054] In this example, when the first application is run in the tth period, different memory resources will be called to support the running process of the first application, and the storage space of the corresponding memory object will be gradually occupied. Then, when the first application is run in the tth period, the first memory data of the first application can be obtained. The first memory data can reflect the memory occupancy of at least one memory object when the first application is run in the tth period.

[0055] It should be noted that the first application may include but is not limited to a virtual game application, a live broadcast application, an office application, an instant messaging application, etc., which are not limited in the embodiments of the present application. The memory resources described may include but are not limited to animation resources, component resources, lighting ratio resources, etc., which are not limited in the embodiments of the present application. In addition, memory objects include but are not limited to memory objects in read-only memory (ROM), random access memory (RAM), cache memory, etc., which are not limited in the embodiments of the present application.

[0056] 202. Perform feature extraction processing on the first memory data to obtain a target feature, where the target feature is used to indicate a performance status of at least one memory object.

[0057] In this example, after obtaining the first memory data of the first application, feature extraction processing can be performed on the first memory data to obtain target features. Exemplarily, the first memory data can be used as input to a feature extraction model, and then the features of the first memory data can be extracted through the feature extraction model. The feature extraction model described may include, but is not limited to, a graph convolutional networks (GCN) model, etc., which is not limited in the embodiments of the present application.

[0058] It should be noted that the target features described can indicate the performance of at least one memory object. In other words, the growth of memory data will change over time, and the corresponding target features can be understood as features related to the memory usage of each memory object showing an increasing trend. For example, the target features may include, but are not limited to, time, central processing unit (CPU) utilization, graphics processing unit (GPU) utilization, bandwidth transfer rate, frames per second (FPS), and one or more basic performance indicators in the rendering object level. Exemplarily, the target features may also include depth performance indicators such as the number of shaders, the number of drawcalls, and the number of triangles in image rendering, etc., which are not limited in the specific embodiments of the present application. For example, taking time, CPU utilization, GPU utilization, bandwidth transfer rate, FPS, rendering object level, number of shaders, number of drawcalls, and number of triangles as examples, the target feature can be expressed as x = {fps, gpu, cpu, t, v, object, shader, drawcall, triangles}, where t represents time, v represents bandwidth transfer rate, object represents rendering object level, and triangles represents the number of triangles.

[0059] 203. Predictively process the target features based on the target risk prediction model to obtain a target risk time point, where the target risk time point is used to indicate that the memory occupancy of at least one memory object exceeds a preset occupancy threshold. The target risk prediction model is a machine learning model obtained by iteratively training a preset initial model using the predicted target risk time point as a training target and the sample features of the training samples annotated with time labels as training data. The training samples are historical memory data of at least one memory object when the first application was running in the previous t-1 time period, and the time label is used to indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold.

[0060] In this example, the time point when the peak memory usage appears in the t-th period will be affected by the memory usage of each memory object in the previous t-1 periods. In other words, the memory usage of the memory objects in the previous t-1 period will lead to a peak memory usage in the t-th period under the trend of continuous growth. Then, the predicted target risk time point can be used as the training target, and the sample features of the training samples marked with time labels can be used as the training data to iteratively train the preset initial model, so as to train the target risk estimation model. In this way, after the target feature is extracted, the target feature can be used as the input of the target risk estimation model, and then the target feature is predicted by the target risk estimation model to predict the corresponding target risk time point. It should be noted that the target risk time point mentioned can indicate that the memory usage of at least one memory object exceeds the preset usage threshold. For example, if the predicted target risk time point is 9:30:20, it means that at the time point of 9:30:20, the memory usage of at least one memory object exceeds the preset usage threshold.

[0061] It should be noted that the target risk prediction model described is a machine learning model obtained by iteratively training a preset initial model with the prediction of the target risk time point as the training target and the sample features of the training samples annotated with time labels as the training data. The training samples described are the historical memory data of at least one memory object when the first application was running in the previous t-1 time period. The mentioned time label is used to indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold. For specific information on how to train the target risk prediction model, please refer to the subsequent Figure 8 The training process diagram described in the figure can be understood for reference and will not be described in detail here.

[0062] For example, after predicting the risk time point in each of the first t-1 periods based on the target risk estimation model, Figure 3 A schematic diagram of the prediction process is shown to predict the target risk time point T in the tth period t .like Figure 3 As shown, it includes at least one time-series graph convolution model and a fully connected layer, and each time-series graph convolution model also includes a GCN model and a target risk estimation model. After obtaining the first memory data and the risk time points in each of the first t-1 time periods, the first memory data can be used as the input of the GCN model to extract the target features. The target features are further used as the input of the target risk estimation model, and the output vector is converted into the corresponding target risk time point T through the fully connected layer. t .

[0063] Figure 3The target risk estimation model described in the above may include but is not limited to a temporal convolutional network (TCN) model, etc., which is not limited in the embodiments of the present application. As an illustrative description, taking the TCN model as the target risk estimation model as an example, Figure 4 FIG. 1 is a schematic diagram showing the structure of the target risk estimation model provided in the embodiment of the present application. Figure 4 As shown, the target risk estimation model may include Q-layer residual sub-models, where Q≥2 and Q is an integer. Regarding how to use the target risk estimation model to predict the target features, the processing process can be understood in the following manner, namely: determining the output vector of the Q-th layer residual sub-model based on the target features and the Q-th layer residual sub-model. In this way, after calculating the output vector of the Q-th layer residual sub-model, the output vector of the Q-th layer residual sub-model can be used as the target risk time point.

[0064] exist Figure 4 In the described Q-layer residual sub-model, the input of the first-layer residual sub-model is the target feature x, and the input of the Q-th layer residual sub-model is the output vector of the Q-1-th layer residual sub-model. For example, when Q=3, the target feature can be used as the input of the first-layer residual sub-model, and then the target embedding vector is processed by the first-layer residual sub-model to obtain the output vector of the first-layer residual sub-model. Then, the server uses the output vector of the first-layer residual sub-model as the input of the second-layer residual sub-model, and then processes the output vector of the first-layer residual sub-model by the second-layer residual sub-model to obtain the output vector of the second-layer residual sub-model. Similarly, the server uses the output vector of the second-layer residual sub-model as the input of the third-layer residual sub-model, and then processes the output vector of the second-layer residual sub-model by the third-layer residual sub-model to obtain the output vector of the third-layer residual sub-model.

[0065] Each residual sub-model in the Q-layer residual sub-model described above may include P convolutional units (P ≥ 2, and P is an integer). Figure 4 The structure shown is understood.

[0066] Taking the Q-th layer residual sub-model as an example, in order to calculate the output vector of the Q-th layer residual sub-model, on the one hand, the output vector of the Q-1-th layer residual sub-model can be processed by one-dimensional convolution to obtain the first output vector; on the other hand, the second output vector is determined based on the output vector of the Q-1-th layer residual sub-model and P convolution units. Then, the first output vector and the second output vector are fused to obtain the output vector of the Q-th layer residual sub-model.

[0067] It should be noted that in the described Q-th layer residual sub-model, the input of the first convolution unit is the output vector of the Q-1-th layer residual sub-model. In addition, the input of the P-th convolution unit is the output vector of the P-1-th convolution unit. For example, when P=2, the output vector of the Q-1-th layer residual sub-model can be used as the input of the first convolution unit, and then the output vector of the Q-1-th layer residual sub-model is processed by the first convolution unit to obtain the output vector of the first convolution unit. Then, the output vector of the first convolution unit is used as the input of the second convolution unit, and then the output vector of the first convolution unit is processed by the second convolution unit to obtain the output vector of the second convolution unit.

[0068] Exemplarily, each of the P convolutional units described may include an expanded causal convolutional layer, a normalization layer, an activation layer, and a random dropout layer. As an illustrative description, taking how to calculate the output vector of the Pth convolutional unit as an example, the specific calculation process can be understood by referring to the following method, namely:

[0069] First, in the P-th convolution unit, after obtaining the output vector of the P-1-th convolution unit, the output vector of the P-1-th convolution unit can be used as the input of the dilated causal convolution layer in the P-th convolution unit, so as to perform causal convolution processing on the output vector of the P-1-th convolution unit through the dilated causal convolution layer in the P-th causal convolution layer, thereby obtaining the feature representation of the dilated causal convolution layer.

[0070] The dilated causal convolutional layer described can be found in Figure 4 The structure shown in the figure can be understood. Figure 4As shown, the dilated causal convolution layer may include R hidden layers and one output layer, R≥1, and R is an integer. After calculating the output vector of the P-1th convolution unit, the output vector of the Rth hidden layer can be determined based on the output vector of the P-1th convolution unit and the R hidden layers in the dilated causal convolution layer. The input of the first hidden layer described is a vector after every two vectors in the output vector of the P-1th convolution unit are fused, and the input of the Rth hidden layer is a vector after every two vectors in the output vector of the R-1th hidden layer are fused. For example, when R=2, every two vectors in the output vector of the P-1th convolution unit can be fused to obtain at least two fused vectors. Then, the at least two fused vectors are used as the input of the first hidden layer, and the at least two fused vectors are processed by the first hidden layer to output the output vector of the first hidden layer. Then, every two vectors in the output vector of the first hidden layer are fused again, and the fused vectors are used as the input of the second hidden layer to obtain the output vector of the second hidden layer. In this way, the output vector of the second hidden layer is used as the input of the output layer of the dilated causal convolution layer to obtain the feature representation of the dilated causal convolution layer. In the above manner, since the dilated causal convolution layer can analyze the causal change relationship of the object in the time series change, that is, the increase in the memory usage of the memory object at the previous moment will lead to the increase in the memory usage at the next moment, the time point when the peak of the memory usage of the memory object occurs can be predicted more accurately through the dilated causal convolution layer and the related features of the known moment.

[0071] It should be noted that the above mainly uses R=2 as an example to illustrate the structure of the dilated causal convolution layer and the corresponding processing process. In practical applications, the dilated causal convolution layer can also include hidden layers of other numbers, such as R=3, R=5, etc., which is not limited in the embodiments of the present application.

[0072] Then, after obtaining the feature representation of the dilated causal convolution layer, the feature representation of the dilated causal convolution layer can be used as the input of the normalization layer in the Pth convolution unit, and then the feature representation of the dilated causal convolution layer is normalized by the normalization layer, thereby obtaining the feature representation of the normalization layer. In this way, the feature representation of the normalization layer is used as the input of the activation layer of the Pth convolution unit, and then the feature representation of the normalization layer is processed by the activation layer, thereby obtaining the feature representation of the activation layer. Finally, the feature representation of the activation layer is used as the input of the random deactivation layer of the Pth convolution unit, so that the feature representation of the activation layer is processed by the random deactivation layer, thereby obtaining the second output vector.

[0073] It should be noted that the activation layer mentioned may include but is not limited to the ReLU activation function, etc., which is not limited in the embodiments of the present application. In addition, the above mainly uses how to calculate the output vector of the Pth convolution unit as an example to illustrate how to calculate the output vector of other convolution units, and the calculation process of the output vector of the Pth convolution unit can also be understood by referring to the calculation process of the output vector of the Pth convolution unit, which will not be repeated here.

[0074] As a schematic description, Figure 5 The following is a diagram showing the prediction effect of the target risk time point provided by the embodiment of the present application. Figure 5 As shown, at 08:43, the corresponding memory usage reached a peak, with 1783MB of memory occupied.

[0075] 204. Determine an abnormal memory object from at least one memory object based on the target risk time point, and perform abnormal analysis processing on the abnormal memory object.

[0076] In this example, after predicting the target risk time point, an abnormal memory object can be determined from at least one memory object based on the target risk time point. The abnormal memory object described can be understood as a memory object when the memory occupancy exceeds a preset occupancy threshold. In this way, after determining the abnormal memory object, the abnormal memory object can also be subjected to abnormal analysis processing to determine the cause of the abnormality, etc.

[0077] In some examples, in order to determine how to determine abnormal memory objects, the second memory data of the second application can be obtained before the target risk time point. The described second memory data can indicate the memory occupancy of at least one memory object when the second application is running in the tth time period. The described first application and second application are any two programs with different version numbers in the same application. For example, if the application is a virtual game A, the first application can be understood as a virtual game A with version number a, and the second application can be understood as a virtual game A with version number b. The described version number a is different from the version number b. Exemplarily, the first gradient ε can be determined based on the memory growth of at least one memory object in the second application and the time period corresponding to the memory growth, that is, Wherein, dpss is the memory growth of at least one memory object, and dt is the time period corresponding to the memory growth. For example, if the value corresponding to the memory growth of the memory object is 352M, and the corresponding time period is from 9:10 to 9:20, then the first gradient ε=352 / 10=35.2M / minute is calculated.

[0078] In this way, the sampling frequency is determined based on the first gradient. It should be noted that the larger the first gradient is, the faster the memory usage of the memory object grows, and the sampling frequency for sampling the second memory data needs to be denser; conversely, the smaller the first gradient is, the slower the memory usage of the memory object grows, and the sampling frequency for sampling the second memory data needs to be sparser. After obtaining the sampling frequency, the memory data of the second application when it is running in the tth time period can also be sampled and processed according to the sampling frequency to obtain the second memory data. For example, if the first gradient is 10, the memory data of the second application when it is running in the tth time period can be sampled once every 5 seconds. Alternatively, when the first gradient is 5, the memory data of the second application when it is running in the tth time period can also be sampled once every 10 seconds, and so on, which is not limited in the embodiments of the present application. It should be noted that the second memory data described can also be understood as the full amount of memory data obtained before the target risk time point.

[0079] In this way, after obtaining the second memory data, the first memory data and the second memory data can be compared. Further, when it is determined that the first memory data and the second memory data are different, the change value of each memory object is determined. For example, Figure 6 FIG. 1 shows a schematic diagram of memory growth provided by an embodiment of the present application. Figure 6 As shown, by comparing the first memory data and the second memory data, it can be determined that the memory change value of the memory object Texture2D is +193M, the memory change value of the memory object Class is +2M, and so on.

[0080] After determining the change value of each memory object, an abnormal memory object can be determined from at least one memory object based on the change value of each memory object. Exemplarily, a memory object whose change value exceeds a preset occupancy threshold can be determined as an abnormal memory object. Exemplarily, a tree structure can be used to store memory data, which can well display the hierarchical relationship between memory objects and facilitate accurate positioning of abnormal memory objects. For example, Figure 7 A schematic diagram of locating abnormal memory objects provided by an embodiment of the present application is shown. Figure 7As shown, if the preset occupancy threshold is 180M, the change value of the memory object object, the change value of the memory object streamableRenderAsset, the change value of the memory object Text, and the change value of the memory object Texture2D are 193.3M, 193.4M, 193.4M, and 193.4M, respectively, all of which are greater than 180M. At this time, the memory object object, the memory object streamableRenderAsset, the memory object Text, and the memory object Texture2D can be determined as abnormal memory objects. After determining the abnormal memory object, the abnormal memory object can also be subjected to abnormal analysis processing, so as to be able to timely discover the OOM risk and locate the abnormal cause when the memory overflow risk occurs. Exemplarily, since the object identifier of each memory object is pre-constructed with the target index, the corresponding first mapping relationship, and the target index can be used to identify the memory resources occupied when the memory occupancy of at least one memory object increases abnormally. In this way, the target index can be determined based on the first mapping relationship and the object identifier of the abnormal memory object. Then, the abnormal memory resource is determined based on the target index, and the abnormal memory object is subjected to abnormal analysis processing based on the abnormal memory resource.

[0081] For example, Figure 8 FIG. 1 is a schematic diagram showing the location of risk causes provided by an embodiment of the present application. Figure 8 As shown, if the preset occupancy threshold is 2500MB, and the memory occupancy of the memory objects corresponding to the target index N1 and the target index N2 are 2900MB and 2782MB respectively, it can be seen by comparison that the memory object corresponding to the target index N1 and the memory object corresponding to the target index N2 both have a memory overflow risk. Moreover, the memory resources indicated by the target index N1 are component resource upgrades, and the memory resources indicated by the target index N2 are animation resource increases. It can be seen that the memory object corresponding to the target index N1 has a memory overflow risk due to the component resource upgrade, and the memory object corresponding to the target index N2 has a memory overflow risk due to the increase in animation resources.

[0082] It should be noted that the memory resources described may include but are not limited to animation resources, component resources, lighting ratio resources, etc., which are not limited in the embodiments of the present application.

[0083] In the embodiment of the present application, the first memory data is used to indicate the memory occupancy of at least one memory object when the first application is running in the tth time period. Then, after obtaining the first memory data of the first application, the first memory data is subjected to feature extraction processing to obtain the target feature. The performance of at least one memory object is reflected by the target feature. In addition, the target risk prediction model is a machine learning model obtained by iteratively training the preset initial model with the predicted target risk time point as the training target and the sample features of the training samples marked with the time label as the training data. The training sample is the historical memory data of at least one memory object when the first application is running in the first t-1 time period. The time label can indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold. Then, after obtaining the target feature, the target feature can be used as the input of the target risk prediction model, and then the target feature is predicted and processed by the target risk prediction model to obtain the target risk time point. Through the target risk time point, it is possible to timely understand at which time point the memory occupancy of at least one memory object exceeds the preset occupancy threshold, that is, when at least one memory object has a memory overflow problem. In this way, based on the target risk time point, an abnormal memory object is determined from at least one memory object, and an abnormal analysis and processing is performed on the abnormal memory object. Through the above method, there is no need to use manual methods to locate the memory overflow problem, but to build a target risk estimation model from the perspective of time series, so as to achieve a more accurate prediction of the time point when the memory overflow problem occurs through the target risk estimation model, so as to predict the occurrence of memory overflow risk in advance; and based on the target risk time point, an abnormal memory object is determined from at least one memory object, without the need to manually clean the memory data, and the analysis and processing of abnormal memory objects can be realized in a timely manner.

[0084] Whether the memory processing method provided in the embodiment of the present application can accurately predict the target risk time point depends to a great extent on the model performance of the target risk estimation model mentioned above. The training process of the target risk estimation model is introduced in detail below through the method embodiment.

[0085] Fig. 9 The flow chart of the model training provided by the embodiment of the present application is shown. For the convenience of description, the following embodiment is introduced by taking the execution subject of the model training as a server as an example. Fig. 9 As shown, the model training process includes at least the following steps:

[0086] 901. Obtain historical memory data of at least one memory object when a first application is running in a previous t-1 time period to obtain a first training sample.

[0087] In this example, when the first application is run in the first t-1 time periods, different memory resources will be called to support the running process of the first application, and the storage space of the corresponding memory object will be gradually occupied. In this way, when the first application is run in the first t-1 time periods, the corresponding memory data of the first application can be obtained, and then the memory data of each time period in the first t-1 time periods can be saved in the database or file system as historical memory data. In this way, when a target risk prediction model is needed, the historical memory data of at least one memory object when running in the first t-1 time periods can be used as the first training sample.

[0088] It should be noted that the first application described here can refer to Figure 2 The memory mentioned in step 201 in the above description is understood and will not be described in detail here.

[0089] 902. Perform feature extraction processing on the first training sample to obtain sample features of the first training sample.

[0090] In this example, after obtaining the first training sample, feature extraction processing can be performed on the first training sample to obtain the sample features of the first training sample. For details, please refer to the above Figure 2 The contents described in step 202 in FIG. 1 can be understood for reference only and will not be described in detail here.

[0091] 903. Perform prediction processing on the sample features of the first training sample based on a preset initial model to obtain a predicted risk time point when the memory occupancy of at least one memory object in the first training sample exceeds a preset occupancy threshold.

[0092] In this example, after obtaining each sample feature, the server can use all the sample features as input to a preset initial model, and then perform predictive processing on the sample features through the preset initial model, thereby obtaining a predicted risk time point when the memory occupancy of at least one memory object in the first training sample exceeds a preset occupancy threshold.

[0093] Exemplarily, the preset initial model described may include a Q-layer residual submodel. Among them, in the Q-layer residual submodel in the preset initial model, the input of the first residual submodel is the sample feature, the input of the Q-th layer residual submodel is the output vector of the Q-1-th layer residual submodel, and the output vector of the Q-th layer residual submodel is used as the predicted risk time point.

[0094] Moreover, each layer of residual sub-model may include P convolution units. Among the P convolution units in the preset initial model, the input of the first convolution unit is the output vector of the Q-1th layer residual sub-model, and the input of the Pth convolution unit is the output vector of the P-1th convolution unit. In this way, after obtaining the output vector of the Pth convolution unit, the output vector of the Q-1th layer residual sub-model can also be subjected to one-dimensional convolution processing, and then the output vector of the Pth convolution unit obtained is fused with the output vector obtained by the one-dimensional convolution processing, so as to obtain the output vector of the Qth layer residual sub-model.

[0095] In addition, each convolution unit may also include a dilated causal convolution layer, a normalization layer, an activation layer, and a random inactivation layer. And for each collision causal convolution layer in each convolution unit, it may include R hidden layers and one output layer. For details, please refer to the above Figure 4 The model structure shown is for understanding and will not be elaborated here.

[0096] 904. Calculate the difference between the predicted risk time point and the time label to obtain the target loss value.

[0097] In this example, because we want the output of the deep neural network to be as close as possible to the value we really want to predict, we can compare the predicted value of the current network with the target value we really want, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the deep neural network). For example, if the network's predicted value is high, adjust the weight vector to make it predict lower, and keep adjusting until the neural network can predict the target value we really want. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value", which is the loss function or objective function, which are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the deep neural network becomes a process of minimizing this loss as much as possible.

[0098] Therefore, after calculating the predicted risk time point of the first training sample, the server may also calculate the difference between the predicted risk time point of the first training sample and the time label, and determine the difference as the target loss value.

[0099] 905. Based on the target loss value, the model parameters of the preset initial model are updated to obtain a target risk estimation model.

[0100] In this example, after calculating the target loss value, the server can update the model parameters of the preset initial model based on the target loss value, so as to train the target risk estimation model. Exemplarily, the target loss value can be iteratively trained and optimized based on the gradient descent algorithm until the training result meets the conditions for terminating the model training. It should be noted that the gradient descent algorithm described may include stochastic gradient descent, stochastic gradient descent with momentum, adaptive gradient algorithm (adaptive gradient), adaptive matrix estimation algorithm (adaptive moment estimation) and other algorithms, which are not specifically limited in the embodiments of the present application. In addition, the conditions for terminating model training may include setting the number of training iterations to meet a preset value, or the target loss value is less than a preset value, etc., which are not specifically limited in the present application. As an illustrative description, Fig.10 FIG. 1 is a schematic diagram showing a loss function curve provided in an embodiment of the present application. Fig.10 As shown in the figure, when the number of iterations (epoch) meets the preset value, the target loss value will gradually approach an optimal value, such as a target loss value of 0.5.

[0101] For example, after the target risk estimation model is trained, the mean absolute error (MAE) can be calculated based on the predicted risk time points and time labels, such as Among them, y i is the preset risk time point in the i-th period, is the time tag in the i-th period, and i is the i-th period. In this way, after calculating the mean absolute error, the prediction accuracy of the target risk estimation model can be evaluated by the mean absolute error. For details, please refer to Fig.11A A schematic diagram of the error curve is shown for understanding.

[0102] in addition, Figure 4 The number of dilated causal convolutional layers shown in FIG. 5 will affect the convergence speed and prediction accuracy of the target risk prediction model. Fig. 11B Figure 2 shows the relationship between the number of dilated causal convolutional layers and the MAE curve. Fig. 11B As shown in the figure, when the number of dilated causal convolutional layers increases to a certain extent, the MAE of the target risk estimation model will increase accordingly. Moreover, when the MAE value is the smallest, it means that the prediction error of the target risk estimation model is the smallest. Based on this, the number of layers corresponding to the minimum value of the MAE curve can be used as the optimal number of dilated causal convolutional layers, thereby obtaining a target risk estimation model with a smaller error and improving the prediction accuracy.

[0103] The target risk estimation model trained in the above manner is used to predict the target risk time point, which can predict the memory abnormality risk in advance and accurately locate the pain point problem of abnormal memory growth of memory objects.

[0104] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the method. It can be understood that in order to realize the above functions, the hardware structure and / or software module corresponding to the execution of each function are included. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0105] The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0106] The memory processing device in the embodiment of the present application is described in detail below. Fig.12 FIG. 1 is a schematic diagram of an embodiment of a memory processing device provided in an embodiment of the present application. Fig.12 As shown, the memory processing device may include an acquisition unit 1201 and a processing unit 1202 .

[0107] The acquisition unit 1201 is used to acquire first memory data of the first application, where the first memory data is used to indicate the memory occupancy of at least one memory object when the first application is running in the tth time period. Figure 2 The contents described in step 201 in FIG. 2 can be understood for reference only and will not be described in detail here.

[0108] The processing unit 1202 is used to perform feature extraction processing on the first memory data to obtain a target feature, where the target feature is used to indicate the performance of at least one memory object. Figure 2 The contents described in step 202 in FIG. 1 can be understood for reference only and will not be described in detail here.

[0109] Processing unit 1202 is used to predict and process the target features based on the target risk prediction model to obtain a target risk time point. The target risk time point is used to indicate that the memory occupancy of at least one memory object exceeds a preset occupancy threshold. The target risk prediction model is a machine learning model obtained by iteratively training a preset initial model using the predicted target risk time point as a training target and the sample features of a first training sample annotated with a time tag as training data. The first training sample is the historical memory data of at least one memory object when the first application was running in the previous t-1 time period. The time tag is used to indicate the actual time point when the memory occupancy of at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold. For details, please refer to the aforementioned Figure 2 The contents described in step 203 in FIG. 1 can be understood for reference only and will not be described in detail here.

[0110] The processing unit 1202 is used to determine an abnormal memory object from at least one memory object based on the target risk time point, and perform abnormal analysis on the abnormal memory object. Figure 2 The contents described in step 204 in FIG. 1 can be understood for reference only and will not be described in detail here.

[0111] In some optional embodiments, processing unit 1202 is used to: determine the output vector of the Q-th layer residual sub-model based on the target feature and the Q-th layer residual sub-model, wherein the input of the first layer residual sub-model is the target feature, the input of the Q-th layer residual sub-model is the output vector of the Q-1-th layer residual sub-model, the target risk estimation model includes Q-th layer residual sub-model, Q ≥ 2, and Q is an integer; and use the output vector of the Q-th layer residual sub-model as the target risk time point.

[0112] In some other optional embodiments, the processing unit 1202 is used to: perform one-dimensional convolution processing on the output vector of the Q-1th layer residual sub-model to obtain a first output vector; determine the second output vector based on the output vector of the Q-1th layer residual sub-model and P convolution units, wherein the input of the first convolution unit is the output vector of the Q-1th layer residual sub-model, the input of the Pth convolution unit is the output vector of the P-1th convolution unit, the Qth layer residual sub-model includes P convolution units, P ≥ 2, and P is an integer; perform fusion processing on the first output vector and the second output vector to obtain the output vector of the Qth layer residual sub-model.

[0113] In some other optional embodiments, the processing unit 1202 is used to: use the output vector of the P-1th convolution unit as the input of the dilated causal convolution layer of the Pth convolution unit to obtain a feature representation of the dilated causal convolution layer; use the feature representation of the dilated causal convolution layer as the input of the normalization layer of the Pth convolution unit to obtain a feature representation of the normalization layer; use the feature representation of the normalization layer as the input of the activation layer of the Pth convolution unit to obtain a feature representation of the activation layer; use the feature representation of the activation layer as the input of the random inactivation layer of the Pth convolution unit to obtain a second output vector.

[0114] In some other optional embodiments, the processing unit 1202 is used to: determine the output vector of the Rth hidden layer based on the output vector of the P-1th convolution unit and the Rth hidden layers in the dilated causal convolution layer, wherein the input of the first hidden layer is a vector obtained by merging every two vectors in the output vector of the P-1th convolution unit, and the input of the Rth hidden layer is a vector obtained by merging every two vectors in the output vector of the R-1th hidden layer, R≥1, and R is an integer; use the output vector of the Rth hidden layer as the input of the output layer of the dilated causal convolution layer to obtain a feature representation of the dilated causal convolution layer.

[0115] In some other optional implementations, the acquisition unit 1201 is further used to acquire the second memory data of the second application before the target risk time point, the second memory data is used to indicate the memory occupancy of at least one memory object when the second application is running in the tth time period, and the first application and the second application are any two programs with different version numbers in the same application. The processing unit 1202 is used to: when the first memory data and the second memory data are different, determine the change value of each memory object; and determine the abnormal memory object from at least one memory object based on the change value of each memory object.

[0116] In other optional embodiments, the processing unit 1202 is used to: determine a first gradient based on the memory growth of at least one memory object in the second application and the time period corresponding to the memory growth; determine a sampling frequency based on the first gradient; and sample and process the memory data of the second application when it is running in the tth time period according to the sampling frequency to obtain second memory data.

[0117] In other optional embodiments, the processing unit 1202 is used to: determine a target index based on a first mapping relationship and an object identifier of the abnormal memory object, the first mapping relationship indicating an association between the object identifier and the target index, the target index being used to identify memory resources occupied when the memory occupancy of at least one memory object increases abnormally; determine the abnormal memory resources based on the target index; and perform exception analysis processing on the abnormal memory object based on the abnormal memory resources.

[0118] In some other optional implementations, the acquisition unit 1201 is also used to: analyze and process the target features based on the target risk prediction model to obtain the historical memory data of at least one memory object when the first application is running in the previous t-1 time period to obtain the first training sample. The processing unit 1202 is used to: perform feature extraction processing on the first training sample to obtain the sample features of the first training sample; perform prediction processing on the sample features of the first training sample based on the preset initial model to obtain the predicted risk time point when the memory occupancy of at least one memory object in the first training sample exceeds the preset occupancy threshold; calculate the difference between the predicted risk time point and the time label to obtain the target loss value; update the model parameters of the preset initial model based on the target loss value to obtain the target risk prediction model.

[0119] The memory processing device in the embodiment of the present application is described above from the perspective of modular functional entities, and the memory processing device in the embodiment of the present application is described below from the perspective of hardware processing. The memory processing device described can be a terminal device, a server, etc. Fig.13 1304. The memory processing device provided in the embodiment of the present application is a schematic diagram of the structure of the memory processing device. The memory processing device may have relatively large differences due to different configurations or performances. The memory processing device may include at least one processor 1301, a communication line 1307, a memory 1303 and at least one communication interface 1304.

[0120] Processor 1301 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (server IC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0121] The communication link 1307 may include a pathway to transmit information between the above-mentioned components.

[0122] The communication interface 1304 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0123] The memory 1303 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, and the memory may exist independently and be connected to the processor via a communication line 1307. The memory may also be integrated with the processor.

[0124] The memory 1303 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1301. The processor 1301 is used to execute the computer-executable instructions stored in the memory 1303, thereby implementing the method provided in the above embodiment of the present application.

[0125] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0126] In a specific implementation, as an embodiment, the memory processing device may include multiple processors, such as Fig.13 1301 and 1302 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0127] In a specific implementation, as an embodiment, the memory processing device may further include an output device 1305 and an input device 1306. The output device 1305 communicates with the processor 1301 and may display information in a variety of ways. The input device 1306 communicates with the processor 1301 and may receive input of a target object in a variety of ways. For example, the input device 1306 may be a mouse, a touch screen device, or a sensor device.

[0128] The memory processing device can be a general device or a dedicated device. In a specific implementation, the memory processing device can be a server, a terminal device, or a Fig.13 The embodiment of the present application does not limit the type of the memory processing device.

[0129] Need to explain, Fig.13 The processor 1301 in the memory 1303 can call the computer execution instructions stored in the memory 1303 to make the memory processing device execute the following Figure 2 or Fig. 9 The method in the corresponding method embodiment.

[0130] Specifically, Fig.12 The function / implementation process of the processing unit 1202 in Fig.13 The processor 1301 in the embodiment calls the computer execution instructions stored in the memory 1303 to implement. Fig.12 The function / implementation process of the acquisition unit 1201 can be achieved by Fig.13 This is implemented by the communication interface 1304 in.

[0131] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any memory processing method recorded in the above method embodiments.

[0132] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any memory processing method recorded in the above method embodiments.

[0133] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0135] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.

[0139] The above embodiments may be implemented in whole or in part through software, hardware, firmware or any combination thereof. When implemented by software, they may be implemented in whole or in part in the form of a computer program product.

[0140] The computer program product includes one or more computer instructions. When loading and executing the computer execution instruction on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that includes one or more available media integration. Available media can be magnetic media, (for example, floppy disk, hard disk, tape), optical media (for example, DVD), or semiconductor media (such as SSD)) and the like.

[0141] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A memory processing method, characterized in that: include: Acquire first memory data of a first application, where the first memory data is used to indicate memory occupancy of at least one memory object when the first application is running in a t-th time period; Performing feature extraction processing on the first memory data to obtain a target feature, where the target feature is used to indicate a performance condition of the at least one memory object; The target feature is predicted and processed based on the target risk prediction model to obtain a target risk time point, wherein the target risk time point is used to indicate that the memory occupancy of the at least one memory object exceeds a preset occupancy threshold, and the target risk prediction model is a machine learning model obtained by iteratively training a preset initial model with the prediction of the target risk time point as the training target and the sample features of the training samples marked with time labels as training data, wherein the training samples are historical memory data of the at least one memory object when the first application was running in the previous t-1 time period, and the time label is used to indicate the actual time point when the memory occupancy of the at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold; An abnormal memory object is determined from the at least one memory object based on the target risk time point, and an abnormality analysis process is performed on the abnormal memory object.

2. The method according to claim 1, characterized in that The predicting process of the target feature based on the target risk estimation model to obtain the target risk time point includes: Determine the output vector of the Q-th layer residual sub-model based on the target feature and the Q-th layer residual sub-model, wherein the input of the first layer residual sub-model is the target feature, the input of the Q-th layer residual sub-model is the output vector of the Q-1-th layer residual sub-model, the target risk estimation model includes the Q-th layer residual sub-model, Q≥2, and Q is an integer; The output vector of the Q-th layer residual sub-model is used as the target risk time point.

3. The method according to claim 2, characterized in that Determining an output vector of the Q-th layer residual sub-model based on the target feature and the Q-th layer residual sub-model includes: Performing one-dimensional convolution processing on the output vector of the Q-1th layer residual sub-model to obtain a first output vector; Determine a second output vector based on the output vector of the Q-1th layer residual sub-model and P convolution units, wherein the input of the first convolution unit is the output vector of the Q-1th layer residual sub-model, the input of the Pth convolution unit is the output vector of the P-1th convolution unit, the Qth layer residual sub-model includes the P convolution units, P≥2, and P is an integer; The first output vector and the second output vector are fused to obtain an output vector of the Q-th layer residual sub-model.

4. The method according to claim 3, characterized in that Determining a second output vector based on the output vector of the Q-1th layer residual sub-model and the P convolution units includes: Using the output vector of the P-1th convolution unit as the input of the dilated causal convolution layer of the Pth convolution unit to obtain a feature representation of the dilated causal convolution layer; Using the feature representation of the dilated causal convolutional layer as an input of the normalization layer of the P-th convolutional unit to obtain the feature representation of the normalization layer; Using the feature representation of the normalized layer as the input of the activation layer of the P-th convolutional unit to obtain the feature representation of the activation layer; The feature representation of the activation layer is used as an input of the random inactivation layer of the P-th convolutional unit to obtain a second output vector.

5. The method according to claim 4, characterized in that The step of using the output vector of the P-1th convolution unit as the input of the dilated causal convolution layer of the Pth convolution unit to obtain the feature representation of the dilated causal convolution layer includes: Determine the output vector of the Rth hidden layer based on the output vector of the P-1th convolution unit and the Rth hidden layer in the dilated causal convolution layer, wherein the input of the first hidden layer is a vector obtained by merging every two vectors in the output vector of the P-1th convolution unit, the input of the Rth hidden layer is a vector obtained by merging every two vectors in the output vector of the R-1th hidden layer, R≥1, and R is an integer; The output vector of the Rth hidden layer is used as the input of the output layer of the dilated causal convolutional layer to obtain the feature representation of the dilated causal convolutional layer.

6. The method according to any one of claims 1 to 5, characterized in that Determining an abnormal memory object from the at least one memory object based on the target risk time point includes: Before the target risk time point, second memory data of a second application is obtained, where the second memory data is used to indicate the memory occupancy of the at least one memory object when the second application is running in the tth time period, and the first application and the second application are any two programs with different version numbers in the same application; When the first memory data is different from the second memory data, determining a change value of each of the memory objects; An abnormal memory object is determined from the at least one memory object based on the change value of each of the memory objects.

7. The method according to claim 6, characterized in that The method of obtaining the second memory data of the second application program includes: Determine a first gradient based on a memory growth condition of at least one of the memory objects in the second application and a time period corresponding to the memory growth condition; determining a sampling frequency based on the first gradient; The memory data of the second application program when it is running in the t-th time period is sampled and processed according to the sampling frequency to obtain the second memory data.

8. The method according to any one of claims 1 to 5, characterized in that The performing abnormal analysis processing on the abnormal memory object includes: Determine a target index based on a first mapping relationship and an object identifier of the abnormal memory object, wherein the first mapping relationship indicates an association relationship between the object identifier and the target index, and the target index is used to identify memory resources occupied when an abnormal increase occurs in the memory occupancy of the at least one memory object; Determining abnormal memory resources based on the target index; An exception analysis process is performed on the abnormal memory object based on the abnormal memory resource.

9. The method according to any one of claims 1 to 5, characterized in that Before analyzing and processing the target characteristics based on the target risk estimation model to obtain the target risk time point, the method further includes: Acquire historical memory data of the at least one memory object when the first application is running in a previous t-1 time period to obtain a first training sample; Performing feature extraction processing on the first training sample to obtain sample features of the first training sample; Predictively process the sample features of the first training sample based on a preset initial model to obtain a predicted risk time point when the memory occupancy of the at least one memory object in the first training sample exceeds a preset occupancy threshold; Calculating the difference between the predicted risk time point and the time label to obtain a target loss value; The model parameters of the preset initial model are updated based on the target loss value to obtain the target risk estimation model.

10. A memory processing device, characterized in that: include: an acquiring unit, configured to acquire first memory data of a first application, wherein the first memory data is used to indicate memory occupancy of at least one memory object when the first application is running in a t-th time period; a processing unit, configured to perform feature extraction processing on the first memory data to obtain a target feature, wherein the target feature is used to indicate a performance condition of the at least one memory object; The processing unit is used to perform prediction processing on the target feature based on the target risk prediction model to obtain a target risk time point, wherein the target risk time point is used to indicate that the memory occupancy of the at least one memory object exceeds a preset occupancy threshold, and the target risk prediction model is a machine learning model obtained by iteratively training a preset initial model with the prediction of the target risk time point as a training target and the sample features of the first training sample marked with a time label as training data, wherein the first training sample is the historical memory data of the at least one memory object when the first application is running in the previous t-1 time period, and the time label is used to indicate the actual time point when the memory occupancy of the at least one memory object corresponding to the historical memory data exceeds the preset occupancy threshold; The processing unit is used to determine an abnormal memory object from the at least one memory object based on the target risk time point, and perform abnormal analysis processing on the abnormal memory object.

11. A memory processing device, characterized in that: The memory processing includes: an input / output (I / O) interface, a processor and a memory, wherein program instructions are stored in the memory; The processor is used to execute program instructions stored in the memory to perform the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 9.

13. A computer program product, characterized in that The finished computer program comprises instructions, and when the instructions are executed on a computer device or a processor, the computer device or the processor executes the method according to any one of claims 1 to 9.