Method, device, electronic device and storage medium for determining memory usage

By determining the sudden drop point of memory usage and the capacity change data within the cumulative period, and using a machine learning model to build a linear relationship between memory usage and time, the problem of inaccurate memory usage prediction is solved, achieving more accurate prediction and system stability.

CN115454769BActive Publication Date: 2025-09-12BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211118295.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2025-09-12
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

In the prior art, the prediction of memory usage is inaccurate due to the uncertainty of manual cleaning, and the problem of memory capacity exhaustion cannot be effectively avoided.

Method used

By determining the sudden drop in memory usage, obtaining capacity change data within the cumulative period, and using a machine learning model to build a linear relationship between memory usage and time, accurate predictions can be made.

Benefits of technology

This improves the prediction accuracy of memory usage, avoids instability caused by manual cleaning, and ensures reliable system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454769B_ABST
    Figure CN115454769B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for determining memory usage, which relates to the field of machine learning, and in particular to the fields of data processing, computer and memory technology. The specific implementation scheme is: determining the sudden drop point moment when the memory usage suddenly drops, wherein the sudden drop point moment is the moment when the rate of decrease of the memory usage is greater than a first threshold; obtaining the capacity change data of the memory within a cumulative period, the cumulative period being the period from the sudden drop point moment to the moment when the memory usage is equal to a second threshold; determining the relationship between the memory usage and time based on the capacity change data of the memory within the cumulative period; and determining the memory usage at the target moment based on the relationship. The present disclosure also provides a device, electronic device and storage medium for determining the memory usage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of machine learning technology, and in particular to data processing, computer and memory technology. More specifically, the present disclosure provides a method, apparatus, electronic device and storage medium for determining memory usage. Background Art

[0002] Monitoring memory usage or available capacity is an important means to ensure reliable operation of application systems and to avoid system failures caused by memory exhaustion. Summary of the Invention

[0003] The present disclosure provides a method, apparatus, device, and storage medium for determining memory usage.

[0004] According to a first aspect, a method for determining a memory usage rate is provided, the method comprising: determining a sudden drop point moment at which the memory usage rate suddenly drops, wherein the sudden drop point moment is a moment at which the rate of decrease of the memory usage rate is greater than a first threshold value; obtaining capacity change data of the memory within a cumulative period, the cumulative period being a period from the sudden drop point moment to a moment at which the memory usage rate is equal to a second threshold value; determining a relationship between the memory usage rate and time based on the capacity change data of the memory within the cumulative period; and determining the memory usage rate at a target moment based on the relationship.

[0005] According to a second aspect, a device for determining a memory usage rate is provided, the device comprising: a first determination module for determining a sudden drop point moment when the memory usage rate suddenly drops, wherein the sudden drop point moment is a moment when the rate of decrease of the memory usage rate is greater than a first threshold; an acquisition module for acquiring capacity change data of the memory within a cumulative period, the cumulative period being a period from the sudden drop point moment to a moment when the memory usage rate is equal to a second threshold; a second determination module for determining a relationship between the memory usage rate and time based on the capacity change data of the memory within the cumulative period; and a third determination module for determining the memory usage rate at a target moment based on the relationship.

[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method provided according to the present disclosure.

[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided according to the present disclosure.

[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program, which implements the method provided according to the present disclosure when executed by a processor.

[0009] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0011] Figure 1 is a graph showing a relationship between memory usage and time according to one embodiment of the present disclosure;

[0012] Figure 2 is a flowchart of a method for determining memory usage according to one embodiment of the present disclosure;

[0013] Figure 3 is a schematic diagram of a method for determining memory usage according to an embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram of a method for determining a relationship between memory usage and time according to an embodiment of the present disclosure;

[0015] Figure 5 is a block diagram of an apparatus for determining memory usage according to an embodiment of the present disclosure;

[0016] Figure 6 The present invention is a block diagram of an electronic device for implementing a method for determining a memory usage rate according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0017] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0018] Figure 1 FIG. 4 is a graph showing the relationship between memory usage and time according to an embodiment of the present disclosure.

[0019] like Figure 1As shown, the horizontal axis of the relationship diagram 100 represents time, and the vertical axis represents memory usage. Business data can be continuously written to the memory, and the memory usage continues to increase. Depending on the actual application scenario, when the memory usage reaches a certain threshold (for example, 70%, 80% or 90%), manual cleaning is required, such as exporting the data in the memory, to avoid system overload or memory capacity exhaustion.

[0020] Manual memory cleaning can cause a sudden drop in memory usage. For example, the time corresponding to each of the sudden drop points 101 to 106 in the relationship diagram 100 can be the time of manual memory cleaning. The memory usage corresponding to each sudden drop point ranges from 10% to 20%, for example.

[0021] Manual cleaning of the memory each time may be performed based on the actual usage rate of the memory and the actual available capacity requirement of the memory. Therefore, the time point (sudden drop point moment) of manual cleaning of the memory is often not periodic.

[0022] A method for determining memory usage can predict memory usage in future time periods based on memory capacity change data over a historical period. However, due to the uncertainty of historical data caused by manual memory cleaning, this method makes the prediction inaccurate.

[0023] In the technical solutions disclosed herein, the memory may include various media types, such as semiconductor memory (e.g., MOS memory), magnetic surface memory (e.g., magnetic disk), and optical memory (e.g., CD). The memory of this embodiment may be used in various application scenarios, such as clusters or stand-alone machines, and this embodiment is not limited thereto.

[0024] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0025] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0026] Figure 2 is a flowchart of a method for determining memory usage according to one embodiment of the present disclosure.

[0027] like Figure 2 As shown, the method 200 for determining a memory usage rate may include operations S210 to S240.

[0028] In operation S210 , a sudden drop point time at which a sudden drop in memory usage occurs is determined.

[0029] For example, when it is detected that the memory usage rate changes from increasing to decreasing, and the rate of decrease in the memory usage rate is greater than a first threshold (e.g., 50%), this moment can be determined as a sudden drop point moment. The sudden drop point moment can correspond to the moment of manual memory cleaning. At the sudden drop point moment, the memory usage rate suddenly drops, for example, from a first usage rate (e.g., 80%) to a second usage rate (e.g., 20%). The rate of decrease in the memory usage rate can represent the difference between the first usage rate and the second usage rate (e.g., 60%).

[0030] In operation S220 , capacity change data of the memory within the accumulation period is acquired.

[0031] For example, after the sudden drop point, as business data is written, the memory usage rate begins to rise. It can be understood that the purpose of predicting the memory usage rate is to issue an early warning when the memory capacity is too full, to avoid insufficient available memory capacity or memory capacity being exhausted. When the memory usage rate is less than the second threshold (for example, 60%), it can be considered that the use of the memory is safe and there is no risk of capacity being exhausted. Therefore, there is no need to predict the memory usage rate during the period between the sudden drop point and the time when the memory usage rate equals the second threshold (which can be called the accumulation period).

[0032] If the system is stable, the capacity change data accumulated over a period of time can be considered stable. Therefore, the capacity change data accumulated over a period of time can be obtained and used to predict memory usage in future periods. The capacity change data can include changes in used memory capacity over time within the accumulation period.

[0033] In operation S230 , a relationship between memory usage and time is determined based on the capacity change data of the memory within the accumulation period.

[0034] For example, memory capacity change data over an accumulation period can be sampled to obtain multiple sampling moments, each of which can correspond to a memory usage capacity. The memory usage rate can be determined based on the ratio of the usage capacity to the total memory capacity. Thus, the memory usage rate corresponding to each of the multiple sampling moments can be determined.

[0035] For example, data fitting is performed on multiple sampling moments and multiple memory usage rates to determine the relationship between the memory usage rate and time. For example, the relationship between the memory usage rate and time may be a linear relationship.

[0036] In operation S240 , the memory usage at the target time is determined according to the relationship between the memory usage and time.

[0037] For example, based on the relationship between memory usage and time, the moment (target moment) when the memory usage reaches a third threshold (for example, 70%) can be predicted, and early warning information for the target moment can be generated to avoid the risk of memory usage exceeding the third threshold and causing insufficient available memory capacity.

[0038] It is understandable that multiple third thresholds can be set (for example, 65%, 70%, 80%), and different degrees of warning can be issued at the moments of multiple third thresholds, so that operation and maintenance personnel can take corresponding measures according to the degree of risk.

[0039] The embodiments of the present disclosure determine the relationship between memory usage and time based on capacity change data accumulated over a period of time after a sudden drop point, thereby avoiding the problem of inaccurate memory usage prediction caused by data instability due to manual memory cleaning, and improving the accuracy of memory usage prediction.

[0040] Figure 3 is a schematic diagram of a method for determining memory usage according to an embodiment of the present disclosure.

[0041] like Figure 3 As shown, this embodiment 300 includes multiple sudden drop points. The sudden drop points 310, 320, and 330 are taken as examples to illustrate the method for determining the memory usage rate provided by the present disclosure.

[0042] For ease of description, the time corresponding to the sudden drop point 310 may be described as the sudden drop time 310 , the time corresponding to the sudden drop point 320 may be described as the sudden drop time 320 , and the time corresponding to the sudden drop point 330 may be described as the sudden drop time 330 .

[0043] It is understood that the period between sudden drop time 310 and sudden drop time 330 is not periodic due to the presence of sudden drop point 320. However, the period between sudden drop time 310 and sudden drop time 320 can be considered a memory usage cycle (referred to as a first usage cycle), and the period between sudden drop time 320 and sudden drop time 330 can also be considered a memory usage cycle (referred to as a second usage cycle). This embodiment can perform data fitting and memory usage rate prediction within a single memory usage cycle.

[0044] For example, for the first usage cycle, the memory usage corresponding to the sudden drop moment 310 may be 15%. After the sudden drop moment 310, if the memory usage is detected to increase over time, the memory usage may be monitored to see whether it reaches a second threshold (e.g., 60%). The moment when the memory usage reaches 60% is, for example, the moment corresponding to point 311 (which may be referred to as moment 311). Between the sudden drop moment 310 and moment 311, the memory is safe to use, and the memory capacity change data is stable. By fitting the memory capacity change data during the period between the sudden drop moment 310 and moment 311, a linear relationship (which may be referred to as a first linear relationship) between the memory usage and time during the first usage cycle may be obtained. Based on this first linear relationship, the memory usage at any moment between moment 311 and moment 320 may be predicted. An early warning may also be issued when the memory usage reaches a third threshold (e.g., 65%), allowing operations and maintenance personnel to manually clean up the memory.

[0045] After a new sudden drop point (eg, sudden drop point 320 ) is detected, the prediction of the memory usage rate in the first usage cycle is stopped, and data fitting and memory usage rate prediction in the second usage cycle are performed for the sudden drop point 320 .

[0046] Similar to the first usage cycle, for the second usage cycle, the memory usage rate corresponding to the sudden drop moment 320 may be 12%. After the sudden drop moment 320, the memory usage rate is monitored to see if it reaches a second threshold value (e.g., 60%). The moment when the memory usage rate reaches 60% is, for example, the moment corresponding to point 321 (which may be referred to as moment 321). By fitting the capacity change data of the memory in the period between the sudden drop moment 320 and moment 321, a linear relationship between the memory usage rate and time in the second usage cycle (which may be referred to as a second linear relationship) may be obtained. Based on the second linear relationship, the memory usage rate at any moment between moment 321 and moment 330 may be predicted. An early warning may also be issued when the memory usage rate reaches a third threshold value (e.g., 65%), so that operation and maintenance personnel can manually clean up the memory.

[0047] The disclosed embodiment performs data fitting and memory usage prediction within a single memory usage cycle, which can improve prediction accuracy.

[0048] Figure 4 FIG. 4 is a schematic diagram of a method for determining a relationship between memory usage and time according to an embodiment of the present disclosure.

[0049] like Figure 4As shown, time series data 401 can be data obtained by sampling capacity change data accumulated over a single usage cycle. For example, time series data 401 includes multiple sampling moments and the memory usage rate corresponding to each sampling moment. It is understood that when the system is in a stable state, the memory write rate should not change much. There is generally a linear relationship between memory usage and time.

[0050] The machine learning model 402 may be a trained time series model, such as a time series model constructed based on an exponential smoothing algorithm, a robust regression algorithm, or a prophet algorithm, and is obtained by training using time series samples. The input of the machine learning model 402 may be a time series (sampling time) and a corresponding value (memory usage), and the output may be a future time series trend.

[0051] The time series data 401 is input into the machine learning model 402, and the machine learning model 402 can output a linear relationship 403 between memory usage and time in a future time period.

[0052] The embodiment of the present disclosure uses a machine learning model to determine the linear relationship between memory usage and time, which can improve the accuracy and efficiency of determining the linear relationship.

[0053] Figure 5 is a block diagram of an apparatus for determining memory usage according to an embodiment of the present disclosure.

[0054] like Figure 5 As shown, the apparatus 500 for determining memory usage includes a first determining module 501 , an acquiring module 502 , a second determining module 503 and a third determining module 504 .

[0055] The first determining module 501 is configured to determine a sudden drop point moment when a sudden drop in memory usage occurs, wherein the sudden drop point moment is a moment when a drop rate of the memory usage is greater than a first threshold.

[0056] The acquisition module 502 is configured to acquire capacity change data of the memory within an accumulation period, where the accumulation period is a period from the sudden drop point to the moment when the memory usage rate is equal to the second threshold.

[0057] The second determining module 503 is configured to determine the relationship between the memory usage and time according to the capacity change data of the memory within the accumulation period.

[0058] The third determining module 504 is configured to determine the usage rate of the memory at the target time according to the relationship.

[0059] According to an embodiment of the present disclosure, the relationship includes a linear relationship; the third determination module 504 includes a first determination unit and a generation unit.

[0060] The first determining unit is configured to determine, based on a linear relationship, a time when the memory usage rate is equal to a third threshold value as a target time.

[0061] The generating unit is used to generate warning information for the target moment.

[0062] The acquiring module 502 is configured to acquire capacity change data of the memory within the accumulation period in response to the new sudden drop point moment at which the memory usage rate suddenly drops, determined by the first determining module 501 .

[0063] According to an embodiment of the present disclosure, the apparatus 500 for determining a memory usage rate further includes a fourth determining module.

[0064] The second determining module 503 is configured to determine the relationship between the memory usage rate and time within a memory usage cycle according to the capacity change data of the memory within the accumulation period.

[0065] The third determining module 504 is configured to determine the usage rate of the memory at a target time within the memory usage cycle according to the linear relationship.

[0066] According to an embodiment of the present disclosure, the second determining module 503 includes a sampling unit and a second determining unit.

[0067] The sampling unit is used to sample the capacity change data of the memory within the accumulation period to obtain multiple sampling moments and capacity data corresponding to the sampling moments.

[0068] The second determination unit is used to input multiple sampling moments and capacity data corresponding to the sampling moments into a machine learning model to obtain a linear relationship between memory usage and time.

[0069] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0070] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0071] like Figure 6As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0072] Various components in device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0073] The computing unit 601 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the method for determining memory usage. For example, in some embodiments, the method for determining memory usage can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method for determining memory usage described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the method for determining memory usage by any other appropriate means (e.g., by means of firmware).

[0074] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0075] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0076] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0077] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0078] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0079] Computer systems may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.

[0080] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0081] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A method for determining memory usage, comprising: Determining a sudden drop point time when a sudden drop occurs in the memory usage rate, wherein the sudden drop point time is a time when a drop rate of the memory usage rate is greater than a first threshold; Acquire capacity change data of the memory within a cumulative period, where the cumulative period is a period from the sudden drop point to the moment when the usage rate of the memory is equal to a second threshold; determining a relationship between the memory usage rate and time based on the memory capacity change data within the accumulation period; and The usage rate of the memory at the target time is determined according to the relationship.

2. The method according to claim 1, wherein The relationship includes a linear relationship; and determining the usage rate of the memory at the target time based on the relationship includes: Determining, based on the linear relationship, a time when the memory usage rate is equal to a third threshold as the target time; and Generate warning information for the target moment.

3. The method according to claim 2, further comprising: In response to determining a new sudden drop point time at which the memory usage rate suddenly drops, returning to the operation of obtaining the capacity change data of the memory within the accumulation period for the new sudden drop point time.

4. The method according to claim 3, further comprising: Determine the period between the sudden drop point and the new sudden drop point as a memory usage cycle; Determining the relationship between the memory usage rate and time according to the capacity change data of the memory within the accumulation period includes: determining, based on the capacity change data of the memory within the accumulation period, a relationship between the memory usage rate and time within the memory usage cycle; Determining the usage rate of the memory at the target time according to the relationship includes: The usage rate of the memory at a target time within the memory usage cycle is determined according to the linear relationship.

5. The method according to any one of claims 1 to 4, wherein Determining the relationship between the memory usage rate and time according to the capacity change data of the memory within the accumulation period includes: Sampling the capacity change data of the memory during the accumulation period to obtain a plurality of sampling moments and capacity data corresponding to the sampling moments; and The multiple sampling moments and the capacity data corresponding to the sampling moments are input into a machine learning model to obtain a linear relationship between the memory usage rate and time.

6. A device for determining memory usage, comprising: a first determining module, configured to determine a sudden drop point moment when a sudden drop in memory usage occurs, wherein the sudden drop point moment is a moment when a drop rate of the memory usage is greater than a first threshold; an acquisition module, configured to acquire capacity change data of the memory within an accumulation period, wherein the accumulation period is a period from the sudden drop point to the moment when the usage rate of the memory is equal to a second threshold; a second determining module, configured to determine a relationship between the memory usage rate and time based on the capacity change data of the memory within a cumulative period; and The third determining module is configured to determine the usage rate of the memory at the target time according to the relationship.

7. The device according to claim 6, wherein The relationship includes a linear relationship; and the third determining module includes: a first determining unit, configured to determine, based on the linear relationship, a time when the memory usage rate is equal to a third threshold, as the target time; and A generating unit is used to generate warning information for the target moment.

8. The device according to claim 7, wherein The acquisition module is configured to, in response to the first determination module determining a new sudden drop point at which the memory usage rate suddenly drops, execute an operation of acquiring the capacity change data of the memory within an accumulation period for the new sudden drop point.

9. The apparatus according to claim 8, further comprising: a fourth determining module, configured to determine a period between the sudden drop point and the new sudden drop point as a memory usage cycle; The second determining module is configured to determine a relationship between the memory usage rate and time within the memory usage cycle based on the capacity change data of the memory within the accumulation period; The third determining module is configured to determine the usage rate of the memory at a target moment within the memory usage cycle based on the linear relationship.

10. The device according to any one of claims 6 to 9, wherein The second determining module includes: a sampling unit, configured to sample the capacity change data of the memory during an accumulation period to obtain a plurality of sampling moments and capacity data corresponding to the sampling moments; and The second determining unit is used to input the multiple sampling moments and the capacity data corresponding to the sampling moments into a machine learning model to obtain a linear relationship between the memory usage and time.

11. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.

13. A computer program product, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data processing method and device, server and computer readable storage medium

    CN112311629A

  • Disk capacity prediction method for identifying manual cleaning behavior based on second-order difference method

    CN113157204A