Method for improving RAM (Random Access Memory) read-write performance, electronic equipment and medium
By obtaining the environment parameters and read and write rates of RAM, identifying and limiting abnormal processes, the problem of low RAM read and write performance is solved, and intelligent performance improvement is achieved.
Patent Information
- Application Number
- CN202510256706.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-03-05
AI Technical Summary
During the use of RAM, the reading and writing efficiency is low due to environmental factors. The problem of how to intelligently improve the reading and writing performance of RAM needs to be solved urgently.
By obtaining the target environment parameters of RAM and the current read and write rate, comparing and determining the first memory usage parameters, identifying the exception process and limiting it to improve RAM read and write performance.
Accurately identify and limit abnormal processes, improve RAM read and write performance, and ensure that memory usage efficiency can be effectively improved during inefficient periods.
Smart Images

Figure CN120179170A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology or computer technology, and particularly to a method, an electronic device, and a medium for improving the read and write performance of RAM. Background Art
[0002] With the rapid development of electronic technology, various storage requirements have also become the focus of users. For example, the read and write of random access memory (RAM) is also a key concern of users. However, during the use of RAM, due to environmental constraints, the read and write efficiency is sometimes low. Therefore, the problem of how to intelligently improve the read and write performance of RAM needs to be solved urgently. Summary of the Invention
[0003] Embodiments of this application provide a method, an electronic device, and a medium for improving the read and write performance of RAM, which can intelligently improve the read and write performance of RAM.
[0004] In a first aspect, embodiments of this application provide a method for improving the read and write performance of RAM, which is applied to an electronic device. The electronic device includes RAM, and the method includes:
[0005] Obtain target environment parameters of the RAM;
[0006] Obtain the current read and write rate of the RAM at the current moment;
[0007] Obtain a reference read and write rate corresponding to the target environment parameters;
[0008] When the current read and write rate is less than the reference read and write rate, determine first memory usage parameters of the RAM. The first memory usage parameters include a first total memory usage amount and first memory change monitoring data of the memory occupied by each process within a preset time period. The preset time period is a time period with a preset duration from the current moment; the first total memory usage amount is the total memory usage amount of the RAM corresponding to the current moment;
[0009] Identify a abnormal processes according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer;
[0010] Restrict b abnormal processes among the a abnormal processes to improve the read and write performance of the RAM, where b is a positive integer less than or equal to a.
[0011] In a second aspect, embodiments of this application provide an electronic device. The electronic device includes RAM, and the electronic device includes: an acquisition unit, a determination unit, an identification unit, and a restriction unit, where
[0012] The obtaining unit is configured to obtain the target environment parameters of the RAM; obtain the current read / write rate of the RAM at the current moment; and obtain the reference read / write rate corresponding to the target environment parameters.
[0013] The determining unit is configured to, when the current read / write rate is less than the reference read / write rate, determine the first memory usage parameter of the RAM, where the first memory usage parameter includes the first total memory usage amount and the first memory change monitoring data of the memory occupied by each process within a preset time period, and the preset time period is a time period with a preset duration between the current moment; the first total memory usage amount is the total memory usage amount of the RAM corresponding to the current moment.
[0014] The identifying unit is configured to identify a abnormal processes according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer.
[0015] The restricting unit is configured to restrict b abnormal processes among the a abnormal processes to improve the read / write performance of the RAM, where b is a positive integer less than or equal to a.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the processor, and the programs include instructions for performing the steps in the first aspect of the embodiments of the present application.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
[0019] Implementing the embodiments of the present application has the following beneficial effects:
[0020] It can be seen that a method, an electronic device, and a medium for improving the read / write performance of a RAM described in the embodiments of the present application are applied to an electronic device. The electronic device includes a RAM. The target environment parameters of the RAM are obtained, the current read / write rate of the RAM at the current moment is obtained, the reference read / write rate corresponding to the target environment parameters is obtained. When the current read / write rate is less than the reference read / write rate, the first memory usage parameter of the RAM is determined. The first memory usage parameter includes the first total memory usage amount and the first memory change monitoring data of the memory occupied by each process within a preset time period. The preset time period is a time period of a preset duration between the current moment; the first total memory usage amount is the total memory usage amount of the RAM corresponding to the current moment. a abnormal processes are identified according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer. b abnormal processes among the a abnormal processes are restricted to improve the read / write performance of the RAM, where b is a positive integer less than or equal to a. In this way, when the read / write performance of the RAM is lower than expected, the abnormal processes can be accurately identified, and thus, the corresponding processes can be accurately restricted to improve the read / write performance of the RAM. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 is a flowchart of a method for improving the read / write performance of a RAM provided by an embodiment of the present application;
[0023] Figure 2 is a structural diagram of an electronic device provided by an embodiment of the present application;
[0024] Figure 3 is a block diagram of the functional units of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] In order to enable those skilled in the art to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0026] In the description, claims, and above-mentioned drawings of this application, terms such as "first" and "second" are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0027] Reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0028] In the embodiments of this application, the electronic device involved can be a device with communication capabilities. The electronic device can include various handheld devices with wireless communication functions, vehicle-mounted devices (such as dash cams, in-vehicle cameras, car speakers, etc.), smart home devices, wearable devices (such as smart glasses, smart bracelets, Internet of Things devices (such as smart refrigerators, smart washing machines, smart TVs), smart watches, etc.), computing devices, or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE), mobile stations (MS), terminal devices, etc.
[0029] The embodiments of this application will be introduced in detail below.
[0030] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for improving the read / write performance of RAM provided by the embodiments of this application. As shown in the figure, it is applied to an electronic device that includes RAM. This method for improving the read / write performance of RAM includes:
[0031] 101. Obtain the target environment parameters of the RAM.
[0032] In the embodiments of this application, the target environment parameters can include at least one of the following: the first hardware environment parameter, the first software environment parameter, the first external environment parameter of the RAM, etc., which are not limited herein.
[0033] Among them, the first hardware environment parameter may include at least one of the following: the model of the RAM, the circuit structure of the RAM, the memory size of the RAM, the remaining service life of the RAM, the hardware current, the hardware voltage, the hardware power, etc., which are not limited herein.
[0034] Among them, the first software environment parameter may include at least one of the following: network bandwidth, system file type, cache size, operating system, etc., which are not limited herein.
[0035] Among them, the first external environment parameter of the RAM may include at least one of the following: environmental temperature, environmental humidity, magnetic field interference intensity, etc., which are not limited herein.
[0036] In a specific implementation, the target environment parameter of the RAM at the current moment can be obtained, and the target environment parameter characterizes the actual environmental situation.
[0037] 102. Obtain the current read / write rate of the RAM at the current moment.
[0038] In the embodiment of the present application, the current read / write rate reflects the quality of the RAM read / write performance. Therefore, the current read / write rate of the RAM at the current moment can be obtained.
[0039] 103. Obtain the reference read / write rate corresponding to the target environment parameter.
[0040] In the embodiment of the present application, different environment parameters reflect the actual environmental situation. The mapping relationship between the preset environment parameter and the read / write rate can be stored in advance. Furthermore, the reference read / write rate corresponding to the target environment parameter can be determined based on this mapping relationship. In this way, the read / write rate corresponding to the actual environmental situation can be obtained.
[0041] Optionally, the target environment parameter includes the first hardware environment parameter, the first software environment parameter, and the first external environment parameter of the RAM; in the above step 103, obtaining the reference read / write rate corresponding to the target environment parameter may include the following steps:
[0042] Determine the first reference read / write rate corresponding to the first hardware environment parameter;
[0043] Determine the first adjustment parameter corresponding to the first software environment parameter;
[0044] Determine the first fine-tuning parameter corresponding to the first external environment parameter;
[0045] Adjust the first reference read / write rate according to the first adjustment parameter and the first fine-tuning parameter to obtain the reference read / write rate.
[0046] In specific implementation, the mapping relationship between the preset hardware environment parameters and the read / write rate can be stored in advance. Furthermore, based on this mapping relationship, the first reference read / write rate corresponding to the first hardware environment parameters can be determined. Also, the mapping relationship between the preset software environment parameters and the adjustment parameters can be stored in advance. Then, based on this mapping relationship, the first adjustment parameter corresponding to the first software environment parameters can be determined. The value range of the adjustment parameter can be set in advance or be the system default. For example, the value range of the adjustment parameter is -0.25 to 0.25. Additionally, the mapping relationship between the preset external environment parameters and the fine-tuning parameters can be stored in advance. Subsequently, based on this mapping relationship, the first fine-tuning parameter corresponding to the first external environment parameters can be determined. The value range of the fine-tuning parameter can be set in advance or be the system default. For example, the value range of the fine-tuning parameter is -0.05 to 0.05. Finally, the first reference read / write rate can be adjusted according to the first adjustment parameter and the first fine-tuning parameter to obtain the reference read / write rate, where the reference read / write rate = the first reference read / write rate * (1 + the first adjustment parameter) * (1 + the first fine-tuning parameter).
[0047] In this example, the hardware environment parameters have a dominant influence on the read / write rate. The read / write efficiency corresponding to the actual hardware environment parameters can be determined first. The software environment parameters will, to a certain extent, affect the read / write rate. Therefore, the adjustment parameter corresponding to the actual software environment parameters can be adapted, and the read / write rate can be dynamically adjusted based on this adjustment parameter. In addition, the external environment parameters will also have a certain impact on the read / write rate. Therefore, the fine-tuning parameter corresponding to the external environment parameters can be adapted, and the read / write rate can be further fine-tuned based on this fine-tuning parameter, so that the final read / write rate fully conforms to the actual environmental conditions.
[0048] 104. When the current read / write rate is less than the reference read / write rate, determine the first memory usage parameter of the RAM. The first memory usage parameter includes the first total memory usage and the first memory change monitoring data of the memory occupied by each process within a preset time period. The preset time period is a time period with a preset duration between the current moment; the first total memory usage is the total memory usage of the RAM corresponding to the current moment.
[0049] In specific implementation, the preset duration can be set in advance or be the system default. The preset duration can be related to the target environment parameters. For example, the preset duration can be related to the first hardware environment parameters, or the preset duration can be related to the first software environment parameters, or the preset duration can be related to the first external environment parameters of the RAM.
[0050] In an embodiment of the present application, when the current read / write rate is less than the reference read / write rate, it indicates that the RAM read / write performance is lower than expected. Furthermore, a first memory usage parameter of the RAM can be determined. The first memory usage parameter includes a first total memory usage amount and first memory change monitoring data of the memory occupied by each process within a preset time period. The preset time period is a time period with a preset duration from the current moment, and the first total memory usage amount is the total memory usage amount of the RAM corresponding to the current moment.
[0051] Among them, the first memory usage parameter reflects the actual memory change and memory change trend of the RAM.
[0052] Of course, when the current read / write rate is greater than or equal to the reference read / write rate, it indicates that there is no problem (meeting the expectation) with the RAM read / write performance, and it is also possible not to improve the RAM read / write performance.
[0053] 105. Identify a abnormal processes according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer.
[0054] In an embodiment of the present application, a abnormal processes can be identified according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer. The abnormal processes may include at least one of the following: processes with abnormal resource occupation, malware processes, processes warned by security software, processes with abnormal execution behaviors, etc., which are not limited herein.
[0055] In a specific implementation, a abnormal processes can be identified according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer.
[0056] Optionally, in step 105 above, identifying a abnormal processes according to the first total memory usage amount and the first memory change monitoring data can be implemented in the following manner:
[0057] Determine c process memory data sets corresponding to c processes according to the first memory change monitoring data. Each process memory data set includes multiple memory data, and each memory data corresponds to a monitoring moment; c is an integer greater than or equal to a;
[0058] Perform fitting on the c process memory data sets to obtain c fitting straight lines and c fitting curves. Each process memory data set corresponds to a fitting straight line and a fitting curve;
[0059] Determine c slopes and c mean square errors according to the c fitting straight lines and the c fitting curves;
[0060] Obtain c attribute information according to the c process memory data sets. Each process memory data set corresponds to one attribute information;
[0061] Determine the a abnormal processes according to the c attribute information, the c slopes and the c mean square deviations.
[0062] In a specific implementation, c process memory data sets corresponding to c processes can be determined according to the first memory change monitoring data. Each process memory data set includes multiple memory data, and each memory data corresponds to a monitoring moment; c is an integer greater than or equal to a. It is also possible to perform fitting on the c process memory data sets to obtain c fitting straight lines and c fitting curves. Each process memory data set corresponds to a fitting straight line and a fitting curve. Specifically, each memory data corresponding to each process can correspond to a monitoring moment. These memory data can be mapped to a coordinate system. The horizontal axis of this coordinate system is time, so multiple coordinate points can be obtained. The multiple coordinates corresponding to each process are fitted to obtain the corresponding fitting straight line and fitting curve.
[0063] Next, c slopes and c mean square deviations can be determined according to the c fitting straight lines and the c fitting curves. Each process corresponds to a fitting straight line, a fitting curve, a slope and a mean square deviation. Specifically, for any process, the slope of the fitting straight line can be obtained to get the corresponding slope. It is also possible to intercept a curve segment of a preset time period from the fitting curve to obtain a fitting curve segment, determine the period of the fitting curve segment, obtain the sampling number corresponding to the period, uniformly sample the fitting curve segment based on the sampling number to obtain multiple sampling points, and perform mean square deviation calculation based on the multiple sampling points to obtain the corresponding mean square deviation. The mean square deviation reflects the process stability to a certain extent.
[0064] Among them, the attribute information of the process can include at least one of the following: process name, process source, whether the process can be restricted, the degree of restriction, etc., which are not limited here. The process memory data set reflects the change of the process to a certain extent, or the attributes of the process. Of course, a mapping relationship between the preset process memory data set and the attribute information can also be set in advance. Furthermore, the attribute information corresponding to the process memory data set of each process can be determined based on this mapping relationship.
[0065] Then, c attribute information can be obtained according to the c process memory data sets. Each process memory data set corresponds to an attribute information. Finally, a abnormal processes can be determined according to the c attribute information, the c slopes and the c mean square deviations. In this way, since the attribute information deeply reflects the characteristics of the process, the slope reflects the memory change trend of the process, and the mean square deviation reflects the process stability to a certain extent. Furthermore, the corresponding abnormal processes can be identified based on the characteristics of the process, the memory change trend of the process and the process stability. In this way, the abnormal processes can be accurately identified, and thus, the corresponding processes can be accurately restricted, thereby improving the RAM read and write performance.
[0066] Further, for the above steps, determining the a abnormal processes according to the c attribute information, the c slopes, and the c mean square deviations can be implemented in the following manner:
[0067] Determine the limitable processes among the c processes according to the c attribute information, obtaining d processes, where d is an integer greater than or equal to b and less than or equal to c;
[0068] Obtain the slopes and mean square deviations corresponding to the d processes from the c slopes and the c mean square deviations, obtaining d slopes and d mean square deviations;
[0069] Select the slopes greater than the first preset threshold from the d slopes, obtaining m slopes, where m is an integer less than or equal to d;
[0070] Select the mean square deviations greater than the second preset threshold from the d mean square deviations, obtaining n mean square deviations, where n is an integer less than or equal to d;
[0071] Determine the a abnormal processes according to the m slopes and the n mean square deviations.
[0072] In specific implementation, the limitable processes among the c processes can be determined according to the c attribute information, obtaining d processes, where d is an integer greater than or equal to b and less than or equal to c. For example, the mapping relationship between the preset attribute information and the limitable degree can be stored in advance. Furthermore, based on this mapping relationship, the limitable degree of each process among the c processes can be determined, obtaining c limitable degrees. The limitable degrees within the preset range can be selected, and the corresponding processes can be obtained, obtaining d processes.
[0073] Among them, the first preset threshold can be set in advance or be the system default, and the second preset threshold can be set in advance or be the system default. If the slope is greater than the first preset threshold, it indicates abnormal memory change. If the mean square deviation is greater than the second preset threshold, it indicates abnormal process stability.
[0074] Next, the slopes and mean square deviations corresponding to d processes can be obtained from c slopes and c mean square deviations, resulting in d slopes and d mean square deviations. Then, the slopes greater than the first preset threshold are selected from the d slopes to obtain m slopes, where m is an integer less than or equal to d, and the mean square deviations greater than the second preset threshold are selected from the d mean square deviations to obtain n mean square deviations, where n is an integer less than or equal to d. Finally, a abnormal processes can be determined based on the m slopes and n mean square deviations, that is, the processes corresponding to the m slopes and the processes corresponding to the n mean square deviations can be obtained, and the union of the two processes is determined to obtain a abnormal processes. In this way, since the attribute information deeply reflects the characteristics of the process, the slope reflects the memory change trend of the process, and the mean square deviation reflects the process stability to a certain extent. Furthermore, the corresponding abnormal processes can be identified based on the characteristics of the process, the memory change trend of the process, and the process stability. In this way, the abnormal processes can be accurately identified, and thus, the corresponding processes can be accurately restricted, thereby improving the RAM read and write performance.
[0075] 106. Restrict b abnormal processes among the a abnormal processes to improve the RAM read and write performance, where b is a positive integer less than or equal to a.
[0076] In the embodiments of the present application, restriction can be understood as improving the memory space by means of memory release. The restriction methods include at least one of the following: ending the process, putting the process to sleep, compressing the process, releasing the process memory, etc., which are not limited herein.
[0077] In specific implementation, b abnormal processes among the a abnormal processes can be restricted to improve the RAM read and write performance, where b is a positive integer less than or equal to a. Furthermore, the RAM read and write performance can be intelligently improved.
[0078] In specific implementation, b abnormal processes can be restricted synchronously or asynchronously based on the actual situation to improve the RAM read and write performance.
[0079] Optionally, in step 106 above, restricting b abnormal processes among the a abnormal processes can be implemented in the following manner:
[0080] Determine the first attribute information of the first abnormal process; the first abnormal process is any one of the a abnormal processes;
[0081] Determine the first restriction strategy corresponding to the first attribute information;
[0082] Restrict the first abnormal process according to the first restriction strategy.
[0083] Among them, the first restriction strategy may include at least one of the following: ending the process, putting the process to sleep, compressing the process, releasing the process memory, etc., which are not limited herein.
[0084] In a specific implementation, taking the first abnormal process as an example, where the first abnormal process is any one of the a abnormal processes, the first attribute information of the first abnormal process can be determined. Additionally, the mapping relationship between the preset attribute information and the restriction policies can be pre-stored. Furthermore, based on this mapping relationship, the first restriction policy corresponding to the first attribute information can be determined. Finally, the first abnormal process can be restricted according to the first restriction policy. In this way, based on the characteristics of the process, the process can be restricted in a personalized manner, ensuring the stability of the overall RAM memory environment and also intelligently improving the RAM read / write performance.
[0085] Optionally, for step 106 of restricting b out of the a abnormal processes, it can be implemented as follows:
[0086] Obtain the memory sizes of the a abnormal processes to get a memory sizes;
[0087] Determine the restriction methods for the a abnormal processes to get a restriction methods;
[0088] Determine the contribution degrees for improving the RAM read / write performance based on the a memory sizes and the a restriction methods to get a contribution degrees;
[0089] Determine the priority order corresponding to the a abnormal processes according to the a contribution degrees;
[0090] Restrict b out of the a abnormal processes according to the priority order.
[0091] Among them, the restriction method can include at least one of the following: ending the process, putting the process into sleep, compressing the process, releasing the process memory, etc., which are not limited here.
[0092] Among them, the contribution degree can be understood as the degree of improvement in the RAM read / write performance. The greater the contribution degree, the greater the improvement in the RAM read / write performance, and vice versa.
[0093] In the embodiments of the present application, the memory sizes of the a abnormal processes can be obtained to get a memory sizes, and the mapping relationship between the preset attribute information and the restriction methods can also be pre-stored. Furthermore, based on this mapping relationship, the restriction methods for the a abnormal processes can be determined to get a restriction methods.
[0094] Next, the contribution degree of improving the RAM read and write performance can be determined according to a memory sizes and a limiting methods, and a contribution degrees are obtained. For example, the memory change value can be estimated based on the memory size and the limiting method. Based on this method, a memory change values can be estimated according to a memory sizes and a limiting methods. Then, the mapping relationship between the preset memory change value and the contribution degree is stored in advance. Furthermore, the corresponding a contribution degrees can be determined based on the mapping relationship and the a memory change values. Then, the priority order of a abnormal processes corresponding to the a contribution degrees is determined. Finally, b abnormal processes among the a abnormal processes can be limited according to the priority order. In this way, the corresponding contribution degree can be determined based on the limiting method of the actual process, and the corresponding priority order can be determined. The abnormal processes are dynamically limited based on the priority order, which can not only ensure the stability of the internal environment of the RAM, but also intelligently improve the RAM read and write performance.
[0095] It can be seen that a method for improving the RAM read and write performance described in the embodiment of the present application is applied to an electronic device. The electronic device includes a RAM. The target environment parameters of the RAM are obtained, the current read and write rate of the RAM at the current moment is obtained, and the reference read and write rate corresponding to the target environment parameters is obtained. When the current read and write rate is less than the reference read and write rate, the first memory usage parameter of the RAM is determined. The first memory usage parameter includes the first total memory usage and the first memory change monitoring data of the memory occupation of each process within a preset time period. The preset time period is a time period with a preset duration from the current moment; the first total memory usage is the total memory usage of the RAM corresponding to the current moment. a abnormal processes are identified according to the first total memory usage and the first memory change monitoring data, where a is a positive integer. b abnormal processes among the a abnormal processes are limited to improve the RAM read and write performance, where b is a positive integer less than or equal to a. In this way, when the RAM read and write performance is lower than expected, the abnormal processes are accurately identified, and thus, the corresponding processes can be accurately limited to improve the RAM read and write performance.
[0096] Consistent with the above embodiments, please refer to Figure 2 , Figure 2 FIG. is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface, and one or more programs. The above one or more programs are stored in the above memory and are configured to be executed by the above processor. In the embodiment of the present application, the electronic device includes a RAM, and the above program includes instructions for performing the following steps:
[0097] Obtain the target environment parameters of the RAM;
[0098] Obtain the current read and write rate of the RAM at the current moment;
[0099] Obtain a reference read / write rate corresponding to the target environmental parameter;
[0100] When the current read / write rate is less than the reference read / write rate, determine a first memory usage parameter of the RAM, where the first memory usage parameter includes a first total memory usage and first memory change monitoring data of the memory occupation of each process within a preset time period, and the preset time period is a time period with a preset duration between the current moment; the first total memory usage is the total memory usage of the RAM corresponding to the current moment;
[0101] Identify a abnormal processes according to the first total memory usage and the first memory change monitoring data, where a is a positive integer;
[0102] Restrict b abnormal processes among the a abnormal processes to improve the read / write performance of the RAM, where b is a positive integer less than or equal to a.
[0103] Optionally, the target environmental parameter includes a first hardware environmental parameter, a first software environmental parameter, and a first external environmental parameter of the RAM; in terms of obtaining the reference read / write rate corresponding to the target environmental parameter, the above program includes instructions for performing the following steps:
[0104] Determine a first reference read / write rate corresponding to the first hardware environmental parameter;
[0105] Determine a first adjustment parameter corresponding to the first software environmental parameter;
[0106] Determine a first fine-tuning parameter corresponding to the first external environmental parameter;
[0107] Adjust the first reference read / write rate according to the first adjustment parameter and the first fine-tuning parameter to obtain the reference read / write rate.
[0108] Optionally, in terms of identifying a abnormal processes according to the first total memory usage and the first memory change monitoring data, the above program includes instructions for performing the following steps:
[0109] Determine c process memory data sets corresponding to c processes according to the first memory change monitoring data, where each process memory data set includes a plurality of memory data, and each memory data corresponds to a monitoring moment; c is an integer greater than or equal to a;
[0110] Perform fitting according to the c process memory data sets to obtain c fitting straight lines and c fitting curves, where each process memory data set corresponds to a fitting straight line and a fitting curve;
[0111] Determine c slopes and c mean squared errors according to the c fitted straight lines and the c fitted curves;
[0112] Obtain c attribute information according to the c process memory data sets, and each process memory data set corresponds to one attribute information;
[0113] Determine the a abnormal processes according to the c attribute information, the c slopes and the c mean squared errors.
[0114] Optionally, in the aspect of determining the a abnormal processes according to the c attribute information, the c slopes and the c mean squared errors, the above program includes instructions for performing the following steps:
[0115] Determine the limit-able processes among the c processes according to the c attribute information, and obtain d processes, where d is an integer greater than or equal to b and less than or equal to c;
[0116] Obtain the slopes and mean squared errors corresponding to the d processes from the c slopes and the c mean squared errors, and obtain d slopes and d mean squared errors;
[0117] Select the slopes greater than the first preset threshold from the d slopes, and obtain m slopes, where m is an integer less than or equal to d;
[0118] Select the mean squared errors greater than the second preset threshold from the d mean squared errors, and obtain n mean squared errors, where n is an integer less than or equal to d;
[0119] Determine the a abnormal processes according to the m slopes and the n mean squared errors.
[0120] Optionally, in the aspect of limiting b abnormal processes among the a abnormal processes, the above program includes instructions for performing the following steps:
[0121] Determine the first attribute information of the first abnormal process; the first abnormal process is any one of the a abnormal processes;
[0122] Determine the first limiting strategy corresponding to the first attribute information;
[0123] Limit the first abnormal process according to the first limiting strategy.
[0124] It can be seen that for the electronic device described in the embodiments of the present application, the electronic device includes a RAM, obtains the target environment parameters of the RAM, obtains the current read / write rate of the RAM at the current moment, obtains the reference read / write rate corresponding to the target environment parameters, and when the current read / write rate is less than the reference read / write rate, determines the first memory usage parameter of the RAM. The first memory usage parameter includes the first total memory usage amount and the first memory change monitoring data of the memory occupation of each process within a preset time period. The preset time period is a time period of a preset duration between the current moment; the first total memory usage amount is the total memory usage amount of the RAM corresponding to the current moment. Identifies a abnormal processes according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer, and restricts b abnormal processes among the a abnormal processes to improve the RAM read / write performance, where b is a positive integer less than or equal to a. In this way, when the RAM read / write performance is lower than expected, the abnormal processes can be accurately identified, and thus, the corresponding processes can be accurately restricted to improve the RAM read / write performance.
[0125] Figure 3 FIG. 4 is a functional unit block diagram of an electronic device 300 involved in the embodiments of the present application. The electronic device 300 includes a RAM. The electronic device 300 includes: an acquisition unit 301, a determination unit 302, an identification unit 303, and a restriction unit 304, where
[0126] The acquisition unit 301 is configured to obtain the target environment parameters of the RAM; obtain the current read / write rate of the RAM at the current moment; obtain the reference read / write rate corresponding to the target environment parameters;
[0127] The determination unit 302 is configured to determine the first memory usage parameter of the RAM when the current read / write rate is less than the reference read / write rate. The first memory usage parameter includes the first total memory usage amount and the first memory change monitoring data of the memory occupation of each process within a preset time period. The preset time period is a time period of a preset duration between the current moment; the first total memory usage amount is the total memory usage amount of the RAM corresponding to the current moment;
[0128] The identification unit 303 is configured to identify a abnormal processes according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer;
[0129] The restriction unit 304 is configured to restrict b abnormal processes among the a abnormal processes to improve the RAM read / write performance, where b is a positive integer less than or equal to a.
[0130] Optionally, the target environment parameters include first hardware environment parameters, first software environment parameters, and first external environment parameters of the RAM; in terms of obtaining a reference read / write rate corresponding to the target environment parameters, the obtaining unit 301 is specifically configured to:
[0131] Determine a first reference read / write rate corresponding to the first hardware environment parameters;
[0132] Determine a first adjustment parameter corresponding to the first software environment parameters;
[0133] Determine a first fine-tuning parameter corresponding to the first external environment parameters;
[0134] Adjust the first reference read / write rate according to the first adjustment parameter and the first fine-tuning parameter to obtain the reference read / write rate.
[0135] Optionally, in terms of identifying a abnormal processes according to the first total memory usage and the first memory change monitoring data, the identifying unit 303 is specifically configured to:
[0136] Determine c process memory data sets corresponding to c processes according to the first memory change monitoring data, each process memory data set includes multiple memory data, and each memory data corresponds to a monitoring moment; c is an integer greater than or equal to a;
[0137] Perform fitting according to the c process memory data sets to obtain c fitting straight lines and c fitting curves, and each process memory data set corresponds to a fitting straight line and a fitting curve;
[0138] Determine c slopes and c mean square errors according to the c fitting straight lines and the c fitting curves;
[0139] Obtain c attribute information according to the c process memory data sets, and each process memory data set corresponds to one attribute information;
[0140] Determine the a abnormal processes according to the c attribute information, the c slopes, and the c mean square errors.
[0141] Optionally, in terms of identifying a abnormal processes according to the first total memory usage and the first memory change monitoring data, the identifying unit 303 is specifically configured to:
[0142] Determine c process memory data sets corresponding to c processes according to the first memory change monitoring data, each process memory data set includes multiple memory data, and each memory data corresponds to a monitoring moment; c is an integer greater than or equal to a;
[0143] Fitting is performed based on the c process memory data sets to obtain c fitting straight lines and c fitting curves, with each process memory data set corresponding to a fitting straight line and a fitting curve;
[0144] Determine c slopes and c mean square errors based on the c fitting straight lines and the c fitting curves;
[0145] Obtain c attribute information based on the c process memory data sets, with each process memory data set corresponding to an attribute information;
[0146] Determine the a abnormal processes based on the c attribute information, the c slopes, and the c mean square errors.
[0147] Optionally, in terms of determining the a abnormal processes based on the c attribute information, the c slopes, and the c mean square errors, the identification unit 303 is specifically configured to:
[0148] Determine the limitable processes among the c processes based on the c attribute information to obtain d processes, where d is an integer greater than or equal to b and less than or equal to c;
[0149] Obtain the slopes and mean square errors corresponding to the d processes from the c slopes and the c mean square errors to obtain d slopes and d mean square errors;
[0150] Select the slopes greater than the first preset threshold from the d slopes to obtain m slopes, where m is an integer less than or equal to d;
[0151] Select the mean square errors greater than the second preset threshold from the d mean square errors to obtain n mean square errors, where n is an integer less than or equal to d;
[0152] Determine the a abnormal processes based on the m slopes and the n mean square errors.
[0153] Optionally, in terms of restricting b abnormal processes among the a abnormal processes, the restriction unit 304 is specifically configured to:
[0154] Determine the first attribute information of the first abnormal process; the first abnormal process is any one of the a abnormal processes;
[0155] Determine the first restriction policy corresponding to the first attribute information;
[0156] Restrict the first abnormal process according to the first restriction policy.
[0157] It can be seen that for the electronic device described in the embodiments of the present application, the electronic device includes a RAM. The target environment parameters of the RAM are obtained, the current read / write rate of the RAM at the current moment is obtained, the reference read / write rate corresponding to the target environment parameters is obtained. When the current read / write rate is less than the reference read / write rate, the first memory usage parameter of the RAM is determined. The first memory usage parameter includes the first total memory usage amount and the first memory change monitoring data of the memory occupation of each process within a preset time period. The preset time period is a time period of a preset duration between the current moment; the first total memory usage amount is the total memory usage amount of the RAM corresponding to the current moment. a abnormal processes are identified according to the first total memory usage amount and the first memory change monitoring data, where a is a positive integer. b abnormal processes among the a abnormal processes are restricted to improve the RAM read / write performance, where b is a positive integer less than or equal to a. In this way, when the RAM read / write performance is lower than expected, the abnormal processes can be accurately identified, and thus, the corresponding processes can be accurately restricted to improve the RAM read / write performance.
[0158] It can be understood that the functions of the respective program modules of an electronic device in this embodiment can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can refer to the relevant descriptions of the above method embodiments and will not be elaborated here.
[0159] The embodiments of the present application further provide a computer storage medium. The computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute some or all of the steps of any of the methods recorded in the above method embodiments.
[0160] The embodiments of the present application further provide a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to enable a computer to execute some or all of the steps of any of the methods recorded in the above method embodiments. The computer program product can be a software installation package.
[0161] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0162] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0163] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods. 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 displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0164] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0166] If the above-mentioned 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 memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods in each embodiment of the present application. And the aforementioned memory includes: USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs and other media that can store program codes.
[0167] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable memory. The memory can include: flash drives, read-only memories (abbreviation: ROM), random access memories (abbreviation: RAM), magnetic disks, or optical discs, etc.
[0168] The embodiments of the present application have been introduced in detail above. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for improving RAM read and write performance, characterized in that: Applied to an electronic device, the electronic device includes a RAM, and the method includes: Obtain target environment parameters of the RAM; Obtain the current read and write rate of the RAM at the current moment; Acquire a reference read / write rate corresponding to the target environment parameter; When the current read / write rate is less than the reference read / write rate, determining a first memory usage parameter of the RAM, the first memory usage parameter including a first total memory usage and first memory change monitoring data of memory occupancy of each process within a preset time period, the preset time period being a time period of a preset length between the current moment; the first total memory usage is the total memory usage of the RAM corresponding to the current moment; Identify a abnormal process according to the first total memory usage and the first memory change monitoring data, where a is a positive integer; Limiting b abnormal processes among the a abnormal processes to improve the RAM read and write performance, wherein b is a positive integer less than or equal to a.
2. The method according to claim 1, characterized in that The target environment parameters include a first hardware environment parameter, a first software environment parameter, and a first external environment parameter of the RAM; and obtaining a reference read / write rate corresponding to the target environment parameter includes: Determine a first reference read / write rate corresponding to the first hardware environment parameter; Determining a first adjustment parameter corresponding to the first software environment parameter; determining a first fine-tuning parameter corresponding to the first external environment parameter; The first reference read / write rate is adjusted according to the first adjustment parameter and the first fine-tuning parameter to obtain the reference read / write rate.
3. The method according to claim 1 or 2, characterized in that: The identifying a abnormal process according to the first total memory usage and the first memory change monitoring data includes: Determine c process memory data sets corresponding to c processes according to the first memory change monitoring data, each process memory data set includes a plurality of memory data, and each memory data corresponds to a monitoring time; c is an integer greater than or equal to a; Perform fitting according to the c process memory data sets to obtain c fitting straight lines and c fitting curves, where each process memory data set corresponds to one fitting straight line and one fitting curve; Determine c slopes and c mean square errors according to the c fitted straight lines and the c fitted curves; Acquire c pieces of attribute information according to the c process memory data sets, each process memory data set corresponding to one piece of attribute information; The a abnormal processes are determined according to the c pieces of attribute information, the c slopes and the c mean square errors.
4. The method according to claim 3, characterized in that The determining the a abnormal processes according to the c pieces of attribute information, the c slopes and the c mean square errors comprises: Determine the restrictable processes among the c processes according to the c pieces of attribute information, and obtain d processes, where d is an integer greater than or equal to b and less than or equal to c; Obtaining the slopes and mean square errors corresponding to d processes from the c slopes and the c mean square errors, to obtain d slopes and d mean square errors; Selecting a slope greater than a first preset threshold from the d slopes to obtain m slopes, where m is an integer less than or equal to d; Selecting a mean square error greater than a second preset threshold from the d mean square errors to obtain n mean square errors, where n is an integer less than or equal to d; The a abnormal processes are determined according to the m slopes and the n mean square errors.
5. The method according to claim 4, characterized in that The limiting b abnormal processes among the a abnormal processes comprises: Determine first attribute information of a first abnormal process; the first abnormal process is any abnormal process among the a abnormal processes; Determining a first restriction strategy corresponding to the first attribute information; The first abnormal process is restricted according to the first restriction policy.
6. An electronic device, characterized in that: The electronic device includes a RAM, and the electronic device includes: an acquisition unit, a determination unit, an identification unit and a restriction unit, wherein: The acquisition unit is used to acquire the target environment parameter of the RAM; acquire the current read and write rate of the RAM at the current moment; and acquire the reference read and write rate corresponding to the target environment parameter; The determining unit is used to determine a first memory usage parameter of the RAM when the current read / write rate is less than the reference read / write rate, the first memory usage parameter including a first total memory usage and first memory change monitoring data of memory usage of each process within a preset time period, the preset time period being a time period of a preset length between the current moment; the first total memory usage is the total memory usage of the RAM corresponding to the current moment; The identification unit is used to identify a abnormal processes according to the first total memory usage and the first memory change monitoring data, where a is a positive integer; The limiting unit is used to limit b abnormal processes among the a abnormal processes to improve the RAM reading and writing performance, and b is a positive integer less than or equal to a.
7. The electronic device according to claim 6, characterized in that: The target environment parameters include a first hardware environment parameter, a first software environment parameter and a first external environment parameter of the RAM; in terms of obtaining a reference read / write rate corresponding to the target environment parameter, the obtaining unit is specifically used to: Determine a first reference read / write rate corresponding to the first hardware environment parameter; Determining a first adjustment parameter corresponding to the first software environment parameter; determining a first fine-tuning parameter corresponding to the first external environment parameter; The first reference read / write rate is adjusted according to the first adjustment parameter and the first fine-tuning parameter to obtain the reference read / write rate.
8. The electronic device according to claim 6 or 7, characterized in that: In the aspect of identifying a abnormal process according to the first total memory usage and the first memory change monitoring data, the identifying unit is specifically used for: Determine c process memory data sets corresponding to c processes according to the first memory change monitoring data, each process memory data set includes a plurality of memory data, and each memory data corresponds to a monitoring time; c is an integer greater than or equal to a; Perform fitting according to the c process memory data sets to obtain c fitting straight lines and c fitting curves, where each process memory data set corresponds to one fitting straight line and one fitting curve; Determine c slopes and c mean square errors according to the c fitted straight lines and the c fitted curves; Acquire c pieces of attribute information according to the c process memory data sets, each process memory data set corresponding to one piece of attribute information; The a abnormal processes are determined according to the c pieces of attribute information, the c slopes and the c mean square errors.
9. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-channel FIFO (First In First Out) buffer and control method thereof
CN104407809A
NVME SSD storage simulation system based on FPGA
CN117873809A
Automobile fault diagnosis early warning system and method based on artificial intelligence
CN119292237A
BHT-based single-port RAM data processing method, apparatus and device, and medium
CN119536810A