Application running memory statistics analysis method and device, equipment and storage medium

By scanning the startup configuration code path to obtain the application's startup parameters and determine memory usage information, the problem of CMDB being unable to accurately count project-level memory consumption is resolved, and project-level memory management and resource optimization are implemented.

CN114185752BActive Publication Date: 2025-10-17PING AN SECURITIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111548116.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-10-17
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

Existing configuration management databases (CMDBs) are unable to implement project-level application memory usage statistics, especially for non-CPU-intensive applications. Existing methods cannot accurately count memory consumption, making resource assessment cumbersome and inaccurate.

Method used

By scanning the startup configuration code path, we can obtain the startup parameters of each application, determine its memory configuration information, calculate the memory usage range of subsystems and projects, perform visual analysis, generate memory consumption charts, and provide recommended startup parameters and purchase reminders.

Benefits of technology

It realizes intuitive statistics of project-level memory consumption, simplifies the resource application process, controls development costs, and improves the accuracy and efficiency of memory resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114185752B_ABST
    Figure CN114185752B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computers and discloses an application running memory statistical analysis method, device, equipment and storage medium.The method comprises the following steps: scanning a start configuration code path, and obtaining start parameters corresponding to each application in a subsystem; determining occupied memory configuration information corresponding to each application according to the start parameters; determining a running memory occupation interval corresponding to the subsystem according to the occupied memory configuration information; determining running memory occupation information corresponding to a target project according to the running memory occupation interval corresponding to each subsystem; and analyzing actual memory consumption of the target project according to the running memory occupation information.Through the above method, the memory occupation of multiple applications under a specific project is statistically analyzed according to the start parameters corresponding to the applications, the memory consumption corresponding to the project level is conveniently and intuitively analyzed, the user can effectively control the development cost, the resource application process is accelerated, and the start configuration code can be stored in a blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to an application running memory statistical analysis method and device, equipment and a storage medium. BACKGROUND

[0002] With the online of software development projects, development environments, test environments, production environments and the like are continuously added. Since too many environments are added, existing enterprises store hardware information through the construction of a configuration management database (CMDB, Configuration Management Database). When resources are evaluated before the online of large projects, the memory occupation of applications needs to be counted. However, the CMDB stores hardware resource information of a host, and does not specifically count the actual memory consumption of an application. For large projects, a large number of subsystems are involved, and each subsystem running will occupy memory resources. The CMDB cannot realize project-level running memory statistics. In existing project statistics, the CPU core number occupation of an application is considered. However, the CPU core number occupation index is too variable, and for most non-CPU-intensive applications, the CPU core number has little significance.

[0003] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0004] The main purpose of the present application is to provide an application running memory statistical analysis method, device, equipment and storage medium, which aims to solve the technical problem that the existing method cannot realize project-level running memory statistics.

[0005] To achieve the above purpose, the present application provides an application running memory statistical analysis method, which comprises the following steps:

[0006] Scanning a startup configuration code path to obtain startup parameters corresponding to each application in a subsystem;

[0007] Determining the occupied memory configuration information corresponding to each application according to the startup parameters;

[0008] Determining the running memory occupation interval corresponding to the subsystem according to the occupied memory configuration information;

[0009] Determining the running memory occupation information corresponding to a target project according to the running memory occupation interval corresponding to each subsystem;

[0010] Analyzing the actual memory consumption of the target project according to the running memory occupation information.

[0011] Optionally, after the scanning and obtaining the starting parameters of the applications in the subsystem, the method further comprises:

[0012] When the starting parameters of the target application are obtained, the target application is removed from the application list of the subsystem to obtain a remaining application list;

[0013] The host physical memory corresponding to each application in the remaining application list is obtained from a preset hardware resource database;

[0014] The occupied memory default configuration information of each application in the remaining application list is determined according to the host physical memory;

[0015] The running memory occupation interval of the subsystem is determined according to the occupied memory configuration information, comprising:

[0016] The running memory occupation interval of the subsystem is determined according to the occupied memory configuration information and the occupied memory default configuration information.

[0017] Optionally, before the scanning and obtaining the starting parameters of the applications in the subsystem, the method further comprises:

[0018] The starting parameter configuration information corresponding to the current application is obtained;

[0019] The starting configuration code is extracted from the starting parameter configuration information based on a preset code template;

[0020] The current subsystem corresponding to the current application is determined;

[0021] The starting configuration code is stored in a storage path corresponding to the current subsystem.

[0022] Optionally, after the starting configuration code is extracted from the starting parameter configuration information based on the preset code template, the method further comprises:

[0023] When the starting configuration code is not extracted, a label information of review failure is added to the current application, and the label information is stored;

[0024] After the scanning and obtaining the starting parameters of the applications in the subsystem, the method further comprises:

[0025] An application list corresponding to the subsystem is obtained;

[0026] The label information corresponding to each application in the application list is found;

[0027] When the label information corresponding to any application in the application list is of review failure, a starting parameter configuration reminder is performed.

[0028] Optionally, after the running memory occupation information corresponding to the target project is determined according to the running memory occupation interval corresponding to each subsystem, the method further comprises:

[0029] generating a display chart according to the running memory occupation interval corresponding to each subsystem and the running memory occupation information corresponding to the target project;

[0030] visually displaying the display chart.

[0031] Optionally, after the running memory occupation information corresponding to the target project is determined according to the running memory occupation interval corresponding to each subsystem, the method further comprises:

[0032] obtaining estimated hardware resource information corresponding to the target project;

[0033] when the estimated hardware resource information is less than the running memory occupation information, determining a corresponding proportional adjustment range according to the estimated hardware resource information and the running memory occupation information;

[0034] adjusting the occupied memory configuration information corresponding to each application according to the proportional adjustment range, and generating recommended start parameters corresponding to each application;

[0035] displaying the recommended start parameters.

[0036] Optionally, the analysis of the actual memory consumption of the target project according to the running memory occupation information comprises:

[0037] determining expected hardware resource information according to the running memory occupation information;

[0038] obtaining inventory hardware resource information, and comparing the expected hardware resource information with the inventory hardware resource information;

[0039] when expected memory corresponding to the expected hardware resource information is greater than inventory memory corresponding to the inventory hardware resource information, performing a purchase reminder.

[0040] In addition, in order to achieve the above-mentioned purpose, the application further provides an application running memory statistical analysis device, which comprises:

[0041] an acquisition module, configured to scan a start configuration code path and acquire start parameters corresponding to each application in a subsystem;

[0042] a determination module, configured to determine occupied memory configuration information corresponding to each application according to the start parameters;

[0043] a statistical module configured to determine a running memory occupation interval corresponding to the subsystem according to the memory occupation configuration information of the application;

[0044] The statistical module is further configured to determine running memory occupation information corresponding to the target project according to the running memory occupation interval corresponding to each subsystem.

[0045] An analysis module is configured to analyze the actual memory consumption of the target project according to the running memory occupation information.

[0046] In addition, to achieve the above-mentioned purpose, the application further provides an application running memory statistical analysis device, which comprises a memory, a processor and an application running memory statistical analysis program stored in the memory and executable on the processor, and the application running memory statistical analysis program is configured to implement the application running memory statistical analysis method as described above.

[0047] In addition, to achieve the above-mentioned purpose, the application further provides a computer storage medium, which stores an application running memory statistical analysis program, and the application running memory statistical analysis program implements the application running memory statistical analysis method as described above when executed by a processor.

[0048] The application determines the starting parameters corresponding to each application in the subsystem by scanning the starting configuration code path, determines the memory occupation configuration information corresponding to each application according to the starting parameters, determines the running memory occupation interval corresponding to the subsystem according to the memory occupation configuration information, determines the running memory occupation information corresponding to the target project according to the running memory occupation interval corresponding to each subsystem, and analyzes the actual memory consumption of the target project according to the running memory occupation information. In this way, the memory occupation of multiple applications under a specific project is statistically analyzed according to the starting parameters corresponding to the applications, the memory consumption corresponding to the project level is conveniently and intuitively analyzed, the development cost is effectively controlled by the user, the resource application process is accelerated, and the problem that the process of extracting the total host memory and the memory usage rate from the CMDB library is complicated and the actual consumed memory of the project cannot be accurately counted is solved. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 FIG. 1 is a structural schematic diagram of an application running memory statistical analysis device of a hardware running environment related to the embodiment scheme of the application;

[0050] Figure 2 FIG. 2 is a flowchart of the first embodiment of the application running memory statistical analysis method;

[0051] Figure 3 FIG. 3 is a flowchart of the second embodiment of the application running memory statistical analysis method;

[0052] Figure 4 This is a flow chart of a third embodiment of the memory statistical analysis method applied in the present invention;

[0053] Figure 5 This is a structural block diagram of the first embodiment of the memory statistics analysis device applied in the present invention.

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

[0055] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0056] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of an application running memory statistics analysis device in a hardware running environment involved in an embodiment of the present invention.

[0057] like Figure 1 As shown, the application running memory statistics analysis device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0058] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the application running memory statistical analysis device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0059] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application running memory statistics analysis program.

[0060] exist Figure 1 In the application running memory statistics analysis device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the application running memory statistics analysis device of the present invention can be set in the application running memory statistics analysis device, and the application running memory statistics analysis device calls the application running memory statistics analysis program stored in the memory 1005 through the processor 1001, and executes the application running memory statistics analysis method provided by the embodiment of the present invention.

[0061] The embodiment of the present invention provides a method for analyzing application running memory statistics, referring to Figure 2 , Figure 2 This is a flow chart of the first embodiment of the memory statistical analysis method applied in the present invention.

[0062] In this embodiment, the application running memory statistical analysis method includes the following steps:

[0063] Step S10: Scan the startup configuration code path to obtain startup parameters corresponding to each application in the subsystem.

[0064] It can be understood that the execution subject of this embodiment is the application running memory statistics analysis device, which can be a computer, server and other devices, or other devices with the same or similar functions. This embodiment does not limit this.

[0065] It should be noted that the startup configuration code storage paths corresponding to different subsystems are set in advance. For example, a folder named after subsystem A. In the specific implementation, several subsystems corresponding to the current project are determined according to the project list, and the corresponding startup configuration code path is determined according to the subsystem name. The startup configuration code path stores the startup configuration codes corresponding to multiple applications included in the current subsystem. The startup configuration code corresponding to each application is read, and the startup parameters corresponding to each application are obtained from it.

[0066] Step S20: determining the memory occupied configuration information corresponding to each application according to the startup parameters.

[0067] It should be understood that the memory usage configuration information corresponding to each application is obtained from the startup parameters according to a pre-set extraction strategy. The memory usage configuration information includes at least the minimum memory usage and the maximum memory usage. For example, the values ​​corresponding to the -Xms and -Xmx bytes are extracted from the startup parameters, where -Xms is the minimum memory usage for the application startup and -Xmx is the maximum memory usage for the application.

[0068] In a specific implementation, according to the checking according to the subsystem list, when the occupied memory configuration information of an application in a subsystem is not acquired, the physical memory of a host on which the application runs is acquired from the hardware resource information according to the application name, and the minimum occupied memory and the maximum occupied memory of the application start are determined according to the physical memory. For example, the initial allocated memory of JVM is specified by -Xms, and the default is 1 / 64 of the physical memory. The maximum allocated memory of JVM is specified by -Xmx, and the default is 1 / 4 of the physical memory. When the physical memory is acquired, the minimum occupied memory of the application start is obtained by multiplying 1 / 64, and the maximum occupied memory is obtained by multiplying 1 / 4.

[0069] Step S30: determining the running memory occupied interval corresponding to the subsystem according to the occupied memory configuration information.

[0070] It should be noted that the occupied memory configuration information of each application in the subsystem acquired through step S20 is summarized to determine the running memory occupied interval of each subsystem. Specifically, the minimum occupied memory of the application start is summarized to obtain the minimum occupied memory corresponding to each subsystem, the maximum occupied memory of the application start is summarized to obtain the maximum occupied memory corresponding to each subsystem, and the running memory occupied interval corresponding to the subsystem is generated according to the minimum occupied memory and the maximum occupied memory corresponding to the subsystem.

[0071] Step S40: determining the running memory occupied information corresponding to the target project according to the running memory occupied interval corresponding to each subsystem.

[0072] Step S50: analyzing the actual memory consumption of the target project according to the running memory occupied information.

[0073] It can be understood that the running memory occupied interval corresponding to the plurality of subsystems determined through step S30 is summarized to obtain the running memory occupied information corresponding to the target project. Specifically, the running memory occupied information corresponding to the target project includes the minimum occupied memory and the maximum occupied memory corresponding to the target project, the minimum occupied memory corresponding to each subsystem is summarized to obtain the minimum occupied memory corresponding to the target project, and the maximum occupied memory corresponding to each subsystem is summarized to obtain the maximum occupied memory corresponding to the target project. By showing the running memory occupied information of the target project to the user, the user can master the hardware cost of the project in real time and understand the actual memory consumption of the project.

[0074] In a specific implementation, the memory information of the hardware for deploying the target project scheduled to be online, i.e., the total physical memory of the host, is determined, the minimum occupied memory and the maximum occupied memory corresponding to the target project, i.e., the running memory floating interval of the target project, are determined according to the running memory occupation information of the target project, the minimum proportion between the minimum occupied memory of the target project and the total physical memory of the host and the maximum proportion between the maximum occupied memory of the target project and the total physical memory of the host are determined, the minimum proportion and the maximum proportion obtained through analysis are displayed, and whether the current minimum proportion or the maximum proportion meets the expected requirement is determined based on the pre-set proportion requirement, for example, the pre-set proportion requirement is that the maximum running memory does not exceed 30%, the maximum proportion between the maximum occupied memory of the target project and the total physical memory of the host is analyzed, and if the maximum proportion obtained through current analysis is less than or equal to 30%, it is determined that the memory consumption of the target project meets the expected requirement.

[0075] Further, after the step S40, the method further comprises: generating a display chart according to the running memory occupation interval corresponding to each subsystem and the running memory occupation information corresponding to the target project; and visually displaying the display chart.

[0076] It should be noted that the embodiment provides a visual display function, and the memory consumption of the subsystems and the memory consumption of the projects are visually displayed in multiple dimensions, for example, a pie chart is used to display the running memory proportion of each subsystem in the project, and a column chart is used to display the maximum occupied memory and the minimum occupied memory of each subsystem.

[0077] Further, after the step S40, the method further comprises: obtaining the estimated hardware resource information corresponding to the target project; when the estimated hardware resource information is less than the running memory occupation information, determining a corresponding proportion adjustment range according to the estimated hardware resource information and the running memory occupation information; adjusting the occupied memory configuration information corresponding to each application according to the proportion adjustment range, generating recommended start parameters corresponding to each application; and displaying the recommended start parameters.

[0078] It should be understood that the estimated hardware resource information is the running memory occupation information estimated by the project manager according to the actual situation of the inventory and the project cost, specifically, the physical memory is determined according to the project plan, and the estimated running memory is determined according to the physical memory. If the estimated hardware resource information is less than the running memory occupation information, that is, the current set startup parameter volume is too large and exceeds the project estimate, the proportional adjustment range can be represented as the ratio between the estimated hardware resource information and the running memory occupation information, in addition, a reserved value is set, and the proportional adjustment range is represented as the ratio between the estimated hardware resource information and the running memory occupation information plus the preset reserved value, so as to avoid that the project estimated hardware resource does not meet the actual operation of the application. According to the proportional adjustment range, the values corresponding to the -Xms and -Xmx bytes are adjusted to determine the recommended minimum occupied memory and maximum occupied memory of the application startup, generate the recommended startup parameters and display. Prompt the user to adjust the application startup parameters before the project goes online.

[0079] Further, the step S50 comprises: determining expected hardware resource information according to the running memory occupation information; obtaining inventory hardware resource information, comparing the expected hardware resource information with the inventory hardware resource information; when the expected memory corresponding to the expected hardware resource information is greater than the inventory memory corresponding to the inventory hardware resource information, a procurement reminder is given.

[0080] It should be noted that the running memory occupation information is the minimum occupation memory and the maximum occupation memory corresponding to the target project running time, and the expected hardware resource information is the physical memory required to maintain the normal running of the target project according to the running memory occupation information. Whether the inventory hardware meets the project to be put online is determined before the project is put online. If not, the project manager is prompted to purchase. When the project is put online or tested, each application is started based on the generated startup configuration code, so that the project size matches the estimated size. Specifically, taking the JVM running memory allocation as an example, the initial memory allocated by JVM is specified by -Xms, and the default is 1 / 64 of the physical memory. The maximum memory allocated by JVM is specified by -Xmx, and the default is 1 / 4 of the physical memory. When the free heap memory is less than 40%, JVM will increase the heap until the maximum limit of -Xmx. When the free heap memory is greater than 70%, JVM will reduce the heap until the minimum limit of -Xms. Generally, the server sets -Xms and -Xmx to be equal to avoid adjusting the size of the heap after each GC. In the embodiment, the minimum occupation memory and the maximum occupation memory in the running memory occupation information of the project level are used to determine the required expected hardware resource information based on the corresponding default proportion, that is, the estimated physical memory of the host used to deploy the target project. For example, the first physical memory is obtained by dividing the minimum occupation memory by 1 / 64, and the second physical memory is obtained by dividing the maximum occupation memory by 1 / 4. The smaller resource information of the first physical memory and the second physical memory is taken as the expected memory. If the inventory memory corresponding to the inventory hardware resource information is less than the expected memory, the project manager is prompted to purchase.

[0081] In the embodiment, the startup configuration code path is scanned to obtain the startup parameters corresponding to each application in the subsystem. The occupation memory configuration information corresponding to each application is determined according to the startup parameters. The running memory occupation interval corresponding to the subsystem is determined according to the occupation memory configuration information. The running memory occupation information corresponding to the target project is determined according to the running memory occupation interval corresponding to each subsystem. The actual memory consumption of the target project is analyzed according to the running memory occupation information. In the above manner, the memory occupation of multiple applications under a specific project is counted according to the startup parameters corresponding to the applications. The memory consumption corresponding to the project level is conveniently and intuitively counted. The user can effectively control the development cost and speed up the resource application process. The problem that the process of extracting the total host memory and the memory usage rate from the CMDB library is complicated and cannot accurately count the actual consumed memory of the project is solved.

[0082] Reference Figure 3 , Figure 3 The flowchart of the second embodiment of the application of the running memory statistical analysis method.

[0083] Based on the above first embodiment, the running memory statistical analysis method further comprises the following steps after step S10:

[0084] Step S201: When the starting parameter corresponding to the target application is acquired, the target application is removed from the application list corresponding to the subsystem to obtain a remaining application list.

[0085] It can be understood that the project list and the application list corresponding to the subsystem are generated in advance according to the project development plan, the application list corresponding to the subsystem contains all application names contained in the subsystem, if the starting parameter corresponding to the target application is found, the information corresponding to the target application is deleted from the application list corresponding to the subsystem, and the application information of the application whose starting parameter is found is removed from the application list corresponding to the subsystem in turn to obtain the remaining application list whose starting parameter is not found.

[0086] Step S202: The host physical memory corresponding to each application in the remaining application list is acquired from a preset hardware resource database.

[0087] It should be noted that the hardware data in the preset hardware resource database is called according to the remaining application list to determine the host physical memory corresponding to the application whose starting parameter is not found.

[0088] Step S203: The occupied memory default configuration information of each application in the remaining application list is determined according to the host physical memory.

[0089] It can be understood that the memory default configuration information corresponding to each application is determined according to the host physical memory, for example, the JVM running memory allocation is taken as an example, the minimum occupied memory corresponding to the application is obtained by multiplying the host physical memory by 1 / 64, the maximum occupied memory corresponding to the application is obtained by multiplying the host physical memory by 1 / 4, and thus the occupied memory default configuration information of each application in the remaining application list is obtained.

[0090] The step S30 comprises:

[0091] Step S301: The running memory occupied interval corresponding to the subsystem is determined according to the occupied memory configuration information and the occupied memory default configuration information.

[0092] It should be noted that the occupied memory configuration information of the application whose starting parameter is found and the occupied memory default configuration information of the application whose starting parameter is not found are summarized to determine the running memory occupied interval corresponding to the subsystem.

[0093] The embodiment obtains the starting parameters corresponding to each application in the subsystem by scanning the starting configuration code path; when the starting parameters corresponding to the target application are obtained, the target application is removed from the application list corresponding to the subsystem to obtain a remaining application list; the host physical memory corresponding to each application in the remaining application list is obtained from a preset hardware resource database; the occupied memory default configuration information of each application in the remaining application list is determined according to the host physical memory; the occupied memory configuration information corresponding to each application is determined according to the starting parameters; the running memory occupation interval corresponding to the subsystem is determined according to the occupied memory configuration information and the occupied memory default configuration information; the running memory occupation information corresponding to the target project is determined according to the running memory occupation interval corresponding to each subsystem; and the actual memory consumption of the target project is analyzed according to the running memory occupation information. In the above manner, the memory occupation of multiple applications under a specific project is counted according to the starting parameters corresponding to the applications. If the starting parameters corresponding to the applications are not scanned, the host physical memory is called from the hardware resource database to estimate the actual running memory of the applications, the memory consumption corresponding to the project level is counted conveniently and intuitively, the user can effectively control the development cost, the resource application process is accelerated, and the problem that the running memory of the project level cannot be counted in the prior art is solved.

[0094] Reference Figure 4 , Figure 4 The flowchart of the third embodiment of the application running memory statistical analysis method is shown.

[0095] Based on the above first embodiment, the application running memory statistical analysis method further includes the following steps before step S10.

[0096] Step S101: Obtain the starting parameter configuration information corresponding to the current application.

[0097] It can be understood that the starting parameter configuration information can be an application starting script. The developer controls the use of memory by setting parameters in the application starting script during development.

[0098] Step S102: Extract the starting configuration code from the starting parameter configuration information based on a preset code template.

[0099] It should be noted that the preset code template can include a field name related to memory configuration. The starting configuration code is extracted from the starting parameter configuration information according to the field name.

[0100] Step S103: Determine the current subsystem corresponding to the current application.

[0101] Step S104: Store the starting configuration code in the storage path corresponding to the current subsystem.

[0102] It should be emphasized that, in order to further ensure the privacy and security of the above startup configuration code, the above startup configuration code can also be stored in a node of a block chain, that is, the storage path corresponding to each subsystem is set in the node of the block chain.

[0103] Further, in order to facilitate project-level running memory statistics, the embodiment is provided with a development process review mechanism. After step S102, the method further comprises: when the startup configuration code is not extracted, adding label information of failed review to the current application, and storing the label information.

[0104] After step S10, the method further comprises: obtaining an application list corresponding to a subsystem; finding the label information corresponding to each application in the application list; and when the label information corresponding to any application in the application list is failed review, prompting startup parameter configuration.

[0105] It should be noted that before the application goes online, the user needs to configure the startup memory size of the application, otherwise it cannot pass the review. After the user configures the startup memory size and other information of the application, the application startup configuration is separated as a code, which is distinguished in the code base based on the name of the application through a folder. Through standardized operation, it is possible to statistically analyze and summarize the running memory occupation of multiple subsystems.

[0106] The embodiment obtains the startup parameter configuration information corresponding to the current application; extracts the startup configuration code from the startup parameter configuration information based on a preset code template; determines the current subsystem corresponding to the current application; stores the startup configuration code in the storage path corresponding to the current subsystem; scans the startup configuration code path to obtain the startup parameters corresponding to each application in the subsystem; determines the occupied memory configuration information corresponding to each application according to the startup parameters; determines the running memory occupation interval corresponding to the subsystem according to the occupied memory configuration information; determines the running memory occupation information corresponding to the target project according to the running memory occupation interval corresponding to each subsystem; and analyzes the actual memory consumption of the target project according to the running memory occupation information. Through the above manner, the code is extracted from the application configuration startup parameter configuration information and stored in the code base. The application startup parameters are scanned through the code base, and the memory consumption of each subsystem and project is summarized. This avoids calling complex APIs to obtain multi-dimensional hardware data from the CMDB library for cleaning and classification and summary, greatly simplifies the data collection process, facilitates intuitive statistics of the memory consumption corresponding to the project level, facilitates the user to effectively control the development cost, speeds up the resource application process, and solves the problem that the existing manner cannot realize project-level running memory statistics.

[0107] In addition, the application also provides a computer storage medium, and the computer storage medium stores an application running memory statistical analysis program.

[0108] Since the storage medium adopts all the technical solutions of the above embodiments, it has all the beneficial effects brought by the technical solutions of the above embodiments, which will not be repeated here.

[0109] Referring to Figure 5 , Figure 5 is a structural block diagram of the application running memory statistical analysis device.

[0110] As Figure 5 shown, the application running memory statistical analysis device provided by the embodiment of the application comprises:

[0111] The acquisition module 10 is configured to scan a start configuration code path and acquire start parameters corresponding to each application in the subsystem.

[0112] The determination module 20 is configured to determine occupied memory configuration information corresponding to each application according to the start parameters.

[0113] The statistical module 30 is configured to determine a running memory occupied interval corresponding to the subsystem according to the occupied memory configuration information.

[0114] The statistical module 30 is further configured to determine running memory occupied information corresponding to the target project according to the running memory occupied interval corresponding to each subsystem.

[0115] The analysis module 40 is configured to analyze actual memory consumption of the target project according to the running memory occupied information.

[0116] It should be understood that the above is only for illustration, and does not constitute any limitation on the technical solutions of the application. In specific applications, those skilled in the art can set it according to the needs, and the application does not limit it.

[0117] The embodiment obtains the starting parameters corresponding to each application in the subsystem by scanning the starting configuration code path; determines the occupied memory configuration information corresponding to each application according to the starting parameters; determines the running memory occupation interval corresponding to the subsystem according to the occupied memory configuration information; determines the running memory occupation information corresponding to the target project according to the running memory occupation interval corresponding to each subsystem; and analyzes the actual memory consumption of the target project according to the running memory occupation information. In the above manner, the memory occupation of multiple applications under a specific project is counted according to the starting parameters corresponding to the applications, the memory consumption corresponding to the project level is conveniently and intuitively counted, the user can effectively control the development cost, and the resource application process is accelerated, thereby solving the problems that the process of extracting the total host memory and the memory usage rate from the CMDB library is complicated and the actual consumed memory of the project cannot be accurately counted.

[0118] It should be noted that the above-described workflow is merely illustrative and does not limit the protection scope of the present application. In actual application, a person skilled in the art can select part or all of the workflow according to actual needs to achieve the purpose of the embodiment, which is not limited herein.

[0119] In addition, technical details not described in detail in the embodiment can be referred to the application running memory statistical analysis method provided by any embodiment of the present application, which will not be described herein.

[0120] In an embodiment, the obtaining module 10 is further configured to, when the starting parameters corresponding to the target application are obtained, remove the target application from the application list corresponding to the subsystem to obtain a remaining application list; obtain the host physical memory corresponding to each application in the remaining application list from a preset hardware resource database; and determine the occupied memory default configuration information of each application in the remaining application list according to the host physical memory.

[0121] The statistical module 30 is further configured to determine the running memory occupation interval corresponding to the subsystem according to the occupied memory configuration information and the occupied memory default configuration information.

[0122] In an embodiment, the obtaining module 10 is further configured to obtain the starting parameter configuration information corresponding to a current application; extract a starting configuration code from the starting parameter configuration information based on a preset code template; determine a current subsystem corresponding to the current application; and store the starting configuration code in a storage path corresponding to the current subsystem.

[0123] In an embodiment, the application running memory statistical analysis apparatus further includes an evaluation module and a reminding module.

[0124] The review module is configured to add label information of review failure to the current application when the start configuration code is not extracted, and store the label information.

[0125] The reminding module is configured to acquire an application list corresponding to a subsystem, find label information corresponding to each application in the application list, and remind of start parameter configuration when the label information corresponding to any application in the application list is of review failure.

[0126] In an embodiment, the application running memory statistical analysis device further comprises a display module.

[0127] The display module is configured to generate a display chart according to the running memory occupation interval corresponding to each subsystem and the running memory occupation information corresponding to the target project, and visually display the display chart.

[0128] In an embodiment, the application running memory statistical analysis device further comprises a recommendation module.

[0129] The recommendation module is configured to acquire estimated hardware resource information corresponding to the target project, determine a corresponding proportional adjustment range according to the estimated hardware resource information and the running memory occupation information when the estimated hardware resource information is less than the running memory occupation information, adjust the occupation memory configuration information corresponding to each application according to the proportional adjustment range, generate recommended start parameters corresponding to each application, and display the recommended start parameters.

[0130] In an embodiment, the application running memory statistical analysis device further comprises a procurement reminding module.

[0131] The procurement reminding module is configured to determine expected hardware resource information according to the running memory occupation information, acquire inventory hardware resource information, compare the expected hardware resource information with the inventory hardware resource information, and remind of procurement when expected memory corresponding to the expected hardware resource information is greater than inventory memory corresponding to the inventory hardware resource information.

[0132] In addition, it needs to be noted that, in this document, the term “comprising” or “including” or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or system. Without more limitations, the element defined by the statement “comprising a” does not exclude the presence of another identical element in the process, method, article or system including the element.

[0133] The above-mentioned embodiment numbers of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and the necessary general hardware platform, of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods described in the various embodiments of the application.

[0135] The above is only the preferred embodiment of the application, and does not limit the patent scope of the application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the application.

[0136] The blockchain referred to in the application is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. Blockchain, in essence, is a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block contains a batch of network transaction information, and is used to verify the validity (anti-fake) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer, etc.

Claims

1. A method for statistical analysis of application running memory, characterized in that: The application running memory statistical analysis method includes: Scan the startup configuration code path to obtain the startup parameters corresponding to each application in the subsystem; When the startup parameters corresponding to the target application are obtained, the target application is removed from the application list corresponding to the subsystem to obtain a remaining application list; Obtaining the host physical memory corresponding to each application in the remaining application list from a preset hardware resource database; Determine default configuration information of memory occupied by each application in the remaining application list according to the host physical memory; Determine the memory usage configuration information corresponding to each application according to the startup parameters; Determine the running memory occupation interval corresponding to the subsystem according to the occupied memory configuration information and the occupied memory default configuration information; Determine the running memory usage information corresponding to the target project based on the running memory usage interval corresponding to each subsystem; The actual memory consumption of the target project is analyzed based on the running memory usage information.

2. The application running memory statistical analysis method according to claim 1, characterized in that: Before scanning the startup configuration code path to obtain startup parameters corresponding to each application in the subsystem, the method further includes: Get the startup parameter configuration information corresponding to the current application; Extracting a startup configuration code from the startup parameter configuration information based on a preset code template; Determining a current subsystem corresponding to the current application; The startup configuration code is stored in the storage path corresponding to the current subsystem.

3. The application running memory statistical analysis method according to claim 2, characterized in that: After extracting the startup configuration code from the startup parameter configuration information based on the preset code template, the method further includes: When the startup configuration code is not extracted, adding a label information indicating that the current application has failed the review, and storing the label information; After scanning the startup configuration code path and obtaining startup parameters corresponding to each application in the subsystem, the method further includes: Get the application list corresponding to the subsystem; Searching for label information corresponding to each application in the application list; When the tag information corresponding to any application in the application list indicates that the application has failed the review, a startup parameter configuration reminder is issued.

4. The method for statistical analysis of application running memory according to any one of claims 1 to 3, characterized in that: After determining the running memory occupancy information corresponding to the target project according to the running memory occupancy intervals corresponding to the subsystems, the method further includes: Generate a display chart based on the running memory usage interval corresponding to each subsystem and the running memory usage information corresponding to the target project; The display chart is visually displayed.

5. The method for statistical analysis of application running memory according to any one of claims 1 to 3, characterized in that: After determining the running memory occupancy information corresponding to the target project according to the running memory occupancy intervals corresponding to the subsystems, the method further includes: Get the estimated hardware resource information corresponding to the target project; When the estimated hardware resource information is less than the running memory usage information, determining a corresponding ratio adjustment range according to the estimated hardware resource information and the running memory usage information; Adjusting the memory usage configuration information corresponding to each application according to the proportional adjustment range to generate recommended startup parameters corresponding to each application; The recommended startup parameters are displayed.

6. The method for statistical analysis of application running memory according to any one of claims 1 to 3, characterized in that: The analyzing the actual memory consumption of the target project according to the running memory usage information includes: Determining expected hardware resource information based on the running memory usage information; Acquire inventory hardware resource information, and compare the expected hardware resource information with the inventory hardware resource information; When the expected memory corresponding to the expected hardware resource information is greater than the inventory memory corresponding to the inventory hardware resource information, a purchase reminder is issued.

7. A device for statistical analysis of application running memory, characterized in that: The application running memory statistics analysis device includes: The acquisition module is used to scan the startup configuration code path and obtain the startup parameters corresponding to each application in the subsystem; A determination module, configured to determine the memory usage configuration information corresponding to each application according to the startup parameters; The determination module is further configured to, upon obtaining startup parameters corresponding to the target application, remove the target application from the application list corresponding to the subsystem to obtain a remaining application list; obtain host physical memory corresponding to each application in the remaining application list from a preset hardware resource database; and determine default memory configuration information for each application in the remaining application list based on the host physical memory; A statistics module, configured to determine a running memory occupation interval corresponding to a subsystem according to the occupied memory configuration information and the occupied memory default configuration information; The statistical module is further used to determine the running memory occupancy information corresponding to the target project according to the running memory occupancy interval corresponding to each subsystem; The analysis module is used to analyze the actual memory consumption of the target project according to the running memory usage information.

8. An application running memory statistical analysis device, characterized in that: The device includes: a memory, a processor, and an application running memory statistical analysis program stored in the memory and executable on the processor, wherein the application running memory statistical analysis program is configured to implement the application running memory statistical analysis method according to any one of claims 1 to 6.

9. A computer storage medium, characterized in that The computer storage medium stores an application running memory statistical analysis program, and when the application running memory statistical analysis program is executed by the processor, the application running memory statistical analysis method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Mobile terminal and management method thereof

    CN103197973A

  • Memory management method and device, electronic equipment and computer readable medium

    CN109788354A

  • Memory resource allocation method, apparatus and device, and machine readable storage medium

    CN111538584A

  • Computing resource adjusting method and device

    CN112286637A