CN110704222A - Dump file analysis method and device, storage medium and electronic equipment - Google Patents

Dump file analysis method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110704222A
CN110704222A CN201910827329.8A CN201910827329A CN110704222A CN 110704222 A CN110704222 A CN 110704222A CN 201910827329 A CN201910827329 A CN 201910827329A CN 110704222 A CN110704222 A CN 110704222A
Authority
CN
China
Prior art keywords
dump file
coping
coping strategy
candidate
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910827329.8A
Other languages
Chinese (zh)
Inventor
刘继武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910827329.8A priority Critical patent/CN110704222A/en
Publication of CN110704222A publication Critical patent/CN110704222A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2094Redundant storage or storage space

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a dump file analysis method and a dump file analysis device, which belong to the technical field of debugging tools, and the method comprises the following steps: acquiring configuration information of a terminal; acquiring running state information of the terminal, wherein the running state information corresponds to the configuration information; if the proportion of the operation state information of the terminal in the configuration information of the terminal reaches a first preset threshold value, generating a dump file corresponding to the terminal; when the dump file is detected to be generated, the dump file is acquired and analyzed to determine a coping strategy corresponding to the dump file. The method can process the fault before the system is crashed, and improves the processing efficiency.

Description

Dump file analysis method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the technical field of debugging tools, and in particular, to a dump file analysis method, a dump file analysis apparatus, a computer-readable storage medium, and an electronic device.
Background
The dump file is a file generated by dumping data in a memory when the system runs. According to the dump file, a developer can perform debugging analysis to solve technical problems occurring in the running of the program. Most of existing dump files are additionally generated after a system crashes, so that when a technical problem of the system crashes, developers cannot know the current situation of the system in time and process the situation, the processing efficiency is low, and after the system crashes, other programs also stop running, so that certain economic loss is easily caused, and the system crashes at a high cost.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The embodiment of the disclosure provides a dump file analysis method, a dump file analysis device, a computer-readable storage medium and an electronic device.
According to a first aspect of the present disclosure, there is provided a dump file analysis method, including:
acquiring configuration information of a terminal;
acquiring running state information of the terminal, wherein the running state information corresponds to the configuration information;
if the proportion of the operation state information of the terminal in the configuration information of the terminal reaches a first preset threshold value, generating a dump file corresponding to the terminal;
when the dump file is detected to be generated, the dump file is acquired and analyzed to determine a coping strategy corresponding to the dump file.
In an exemplary embodiment of the present disclosure, acquiring and analyzing the dump file to determine a coping strategy corresponding to the dump file includes:
traversing the dump file to obtain a keyword set of the dump file;
acquiring a plurality of keyword sets of coping strategies;
respectively comparing the keyword set of the dump file with the keyword set of each coping strategy, and determining coping strategies matched with the keyword set of the dump file in the keyword sets of the coping strategies as candidate coping strategies;
acquiring a historical execution result of each candidate coping strategy, and calculating the success rate of the candidate coping strategy according to the execution success times and the execution failure times in the historical execution result;
and determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy.
In an exemplary embodiment of the disclosure, comparing the keyword sets of the dump file with the keyword sets of each coping strategy respectively, and determining coping strategies in a plurality of coping strategies in which the keyword sets match the keyword sets of the dump file as candidate coping strategies includes:
comparing each keyword in the keyword set of the dump file with each keyword in the keyword set of each coping strategy one by one, and if the keywords are the same, accumulating the matching value by one;
dividing the matching value of the dump file and the coping strategy by the number of keywords of the union of the keyword set of the dump file and the keyword set of the coping strategy to obtain the matching degree of the dump file and the coping strategy;
determining whether the dump file is matched with the coping strategies or not according to the matching degree of the dump file and each coping strategy;
and determining the coping strategies matched with the dump file as candidate coping strategies.
In an exemplary embodiment of the disclosure, determining a target coping strategy corresponding to the dump file according to a success rate of each candidate coping strategy includes:
and determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy and the matching degree of the candidate coping strategy and the dump file.
In an exemplary embodiment of the present disclosure, determining a target coping strategy corresponding to the dump file according to a success rate of each candidate coping strategy and a matching degree of the candidate coping strategy and the dump file includes:
acquiring a success rate weight and a matching degree weight;
calculating the execution success rate D of each candidate coping strategy by the following formula:
D=Ap+Bc
wherein, a is a matching degree weight, p is a matching degree of the dump file and the candidate coping strategies, B is a success rate weight, and c is a success rate of the candidate coping strategies;
and determining a target coping strategy corresponding to the dump file according to the execution success rate D of each candidate coping strategy.
In an exemplary embodiment of the present disclosure, determining whether the dump file matches the coping strategies according to the matching degree of the dump file and each coping strategy includes:
arranging each coping strategy according to the sequence of the coping strategies and the dump file from large to small to obtain a coping strategy sequence;
and determining that the coping strategies arranged in front of the coping strategy sequence in a preset proportion are matched with the dump file.
In an exemplary embodiment of the present disclosure, determining whether the dump file matches the coping strategies according to the matching degree of the dump file and each coping strategy includes:
when the matching degree of the dump file and the coping strategy reaches a second preset threshold value, determining that the coping strategy with the matching degree reaching the second preset threshold value is matched with the dump file.
According to a second aspect of the present disclosure, there is provided an analysis apparatus of a dump file, including:
the first acquisition module is configured to acquire configuration information of the terminal;
a second obtaining module, configured to obtain operation state information of the terminal, where the operation state information corresponds to the configuration information;
the dump file generation module is configured to generate a dump file corresponding to the terminal if the proportion of the running state information of the terminal to the configuration information of the terminal reaches a first preset threshold;
the determining module is configured to acquire and analyze the dump file when the dump file is detected to be generated so as to determine a coping strategy corresponding to the dump file.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of analyzing a dump file as in any one of the above.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising:
a processor; and
a memory having a computer program stored thereon;
wherein the processor is configured to implement the analysis method of the dump file as described in any one of the above via execution of the computer program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the embodiments of the disclosure, the configuration information of a terminal and the running state information corresponding to the configuration information are obtained, when the proportion of the running state information in the configuration information reaches a first preset threshold value, a dump file is generated corresponding to the terminal, whether the dump file is generated or not is determined according to the proportion of the running state information in the configuration information, so that the dump file can be generated before the system crashes, developers can analyze technical problems occurring in the system at present according to the generated dump file in time, and the processing efficiency is improved. When the generation of the dump file is detected, the dump file is acquired and analyzed to determine a coping strategy corresponding to the dump file, and the coping strategy is executed to prevent system crash and reduce economic loss caused by system crash.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 is a schematic diagram illustrating an application scenario of a dump file analysis method according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a method for analyzing a dump file according to an exemplary embodiment of the present disclosure.
Fig. 3 shows a flowchart of step S240 in the analysis method of the dump file of fig. 2 according to an exemplary embodiment of the present disclosure.
Fig. 4 shows a schematic block diagram of a dump file analysis apparatus according to an exemplary embodiment of the present disclosure.
FIG. 5 shows a schematic block diagram of an electronic device according to an example embodiment of the present disclosure.
Fig. 6 illustrates a schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted.
Referring to fig. 1, fig. 1 is a schematic diagram of a system architecture to which a dump file analysis method according to an exemplary embodiment of the present disclosure may be applied, and as shown in the embodiment in fig. 1, the system architecture includes one or more of terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The user may interact with the server via the network 104 using the terminal devices 101, 102, 103. The terminal devices 101, 102, 103 may be various electronic devices with computing capabilities, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, for example, the server 105 may obtain configuration information of a terminal, and obtain operation state information of the terminal, where the operation state information corresponds to the configuration information, if a ratio of the operation state information of the terminal to the configuration information of the terminal reaches a first predetermined threshold, a dump file is generated corresponding to the terminal, and when it is detected that the dump file is generated, the dump file is obtained and analyzed to determine a coping strategy corresponding to the dump file.
Therefore, in some embodiments of the present disclosure, the analysis method of the dump file shown in fig. 2 may be performed by the server 105, and accordingly, the analysis apparatus shown in fig. 4 may be provided in the server 105.
Referring to fig. 2, fig. 2 is a flowchart illustrating an analysis method of a dump file according to an exemplary embodiment of the present disclosure, where the analysis method of the dump file may be executed in any computing device, such as a terminal or a server, or may be executed in a server cluster or a cloud server. Of course, those skilled in the art can also operate the method of the present invention on other platforms according to actual needs, and the disclosure is not limited thereto. As shown in fig. 2, the analysis method of the exemplary dump file at least includes steps 210 to S240, which are described in detail as follows:
step S210, obtaining configuration information of the terminal.
The terminal may be any computing device with program execution capability, including but not limited to a smart phone, a tablet computer, a desktop computer, a portable computer, or the like.
The configuration information may be a rated value of any performance parameter of the terminal, specifically, the configuration information may be a rated main frequency of a CPU (Central Processing Unit) of the terminal, and the configuration information may also be a rated operating memory of the terminal, and the like. Developers can obtain corresponding configuration information according to actual production needs, and the disclosure is not particularly limited thereto.
In an exemplary embodiment of the present disclosure, the server 105 may obtain the configuration information of the terminal devices 101, 102, and 103 through the network 104, specifically, the server 105 transmits a request signal of the configuration information to the terminal devices 101, 102, and 103 through the network 104, and when the terminal devices 101, 102, and 103 receive the request signal of the configuration information, the configuration information corresponding to the request signal is transmitted to the server 105 through the network 104.
Step S220, obtaining operation state information of the terminal, where the operation state information corresponds to the configuration information.
The operation state information may be a current state value of any performance parameter of the terminal, and the operation state information corresponds to the configuration information, for example, if the configuration information is a rated main frequency of a CPU of the terminal, the operation state information is a current operating frequency of the CPU of the terminal, and the like.
Step S230, if the ratio of the operating state information of the terminal to the configuration information of the terminal reaches a first predetermined threshold, generating a dump file corresponding to the terminal.
In the exemplary embodiment, the dump file is a file generated by dumping data in a memory when a system crashes, and a developer can perform debugging analysis according to the generated dump file to solve technical problems occurring in program operation.
And dividing the operation state information of the terminal by the configuration information of the terminal to obtain the proportion of the operation state information of the terminal in the configuration information. When the ratio of the operation state information of the terminal to the configuration information of the terminal reaches a first preset threshold value, the terminal is about to crash, and a dump file is generated corresponding to the memory data of the terminal for subsequent analysis and reference. The first predetermined threshold is configured in advance, and the first predetermined threshold may be 80%, 90%, or 95%, and the like, and a developer may configure the first predetermined threshold according to actual production needs, which is not limited in this disclosure. For example, the first predetermined threshold is 95%, the rated operation memory (configuration information) of the terminal is 8192M, and the current operation memory (operation state information) of the terminal is 7888M, so that the proportion of the operation state information of the terminal to the configuration information of the terminal is 7888/8192 ≈ 96%, and because 96% is greater than 95% of the first predetermined threshold, a dump file is generated corresponding to the memory data of the terminal.
Step S240, when the generation of the dump file is detected, the dump file is acquired and analyzed to determine the coping strategy corresponding to the dump file.
In the exemplary embodiment, the coping strategy may be a program module executable by the terminal, and the terminal may solve different technical problems occurring when the program on the terminal runs by executing different coping strategies, for example, the terminal performs a restart by executing the coping strategy, the terminal closes a process occupying the maximum running memory by executing the coping strategy, and the like, thereby preventing the terminal from a system crash.
When the dump file is detected to be generated, the dump file is acquired and analyzed to determine a coping strategy corresponding to the dump file. The determined coping strategy is sent to the terminal, and the terminal can prevent the system from being crashed by executing the coping strategy, so that the technical problem of the program during operation can be solved in time, the further economic loss caused by the program can be prevented, and the fault processing efficiency is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a step S240 in the dump file analysis method of fig. 2 according to an exemplary embodiment of the disclosure, and in the embodiment illustrated in fig. 3, the obtaining and analyzing the dump file to determine the coping strategies corresponding to the dump file includes:
step S310, traversing the dump file to obtain a keyword set of the dump file.
The keywords refer to words or phrases stored in the dump file to determine technical problems occurring in the system, such as "OutOfMemory", "Unhandle", and the like.
The keyword set refers to a set formed by all keywords of the dump file. In an exemplary embodiment, the dump file may be traversed by referring to a keyword library, specifically, by comparing each keyword in the keyword library with the dump file one by one, a keyword set of the dump file is obtained, where the keyword library is preconfigured for a developer, and the developer may store keywords of technical problems that may occur in actual operation of a program in the keyword library, so as to improve richness of the keyword library.
In step S320, a plurality of keyword sets corresponding to the policies are obtained.
In the exemplary embodiment, each coping strategy corresponds to a keyword set, and the keyword set of each coping strategy is configured in advance by a developer according to the technical problem that can be solved by the coping strategy, for example, the keyword set corresponding to the coping strategy a is { OutOfMemory, Unhandle, Null }, and the like.
Step S330, the keyword sets of the dump file are respectively compared with the keyword sets of each coping strategy, and coping strategies in a plurality of coping strategies, which are matched with the keyword sets of the dump file, are determined as candidate coping strategies.
In the exemplary embodiment, the keyword sets of the dump file are respectively compared with the keyword sets of each coping strategy, and when the keyword sets of the coping strategies are matched with the keyword sets of the dump file, the matched coping strategies are determined to be candidate coping strategies.
In an exemplary embodiment, comparing the keyword set of the dump file with the keyword set of each coping strategy respectively, and determining a coping strategy, of which the keyword set matches the keyword set of the dump file, as a candidate coping strategy includes:
and comparing each keyword in the keyword set of the dump file with each keyword in the keyword set of each coping strategy one by one, and if the keywords are the same as each other, accumulating the matching value by one.
The matching value is a numerical value used for recording the number of the same keywords in the keyword set of the dump file and the keyword set of the coping strategies, the matching value is initialized to be zero at the initial calculation, each keyword in the keyword set of the dump file is compared with each keyword in the keyword set of each coping strategy one by one, and when the keyword set of the dump file and the keyword set of each coping strategy are the same, the matching value is accumulated and added by one.
And dividing the matching value of the dump file and the coping strategy by the number of the keywords of the union of the keyword set of the dump file and the keyword set of the coping strategy to obtain the matching degree of the dump file and the coping strategy.
The union of the keyword set of the dump file and the keyword set of the coping strategy is a set formed by all keywords in the keyword set of the dump file and all keywords in the keyword set of the coping strategy, and the matching value of the dump file and the coping strategy is divided by the number of the keywords in the union of the keyword sets of the dump file and the coping strategy to obtain the matching degree of the dump file and the coping strategy. The higher the matching degree is, the more the same number of keywords in the keyword set representing the dump file and the keyword set of the coping strategy is, that is, the coping strategy has a greater possibility of being able to solve the technical problem corresponding to the dump file.
And determining whether the dump file is matched with the coping strategies or not according to the matching degree of the dump file and each coping strategy.
And determining the coping strategies matched with the dump file as candidate coping strategies.
In the present exemplary embodiment, it is determined whether the dump file matches the coping strategy, that is, whether the coping strategy can solve the technical problem corresponding to the dump file, according to the matching degree between the dump file and the coping strategy. And determining the coping strategies matched with the dump file as candidate coping strategies for subsequent selection.
In an exemplary embodiment, determining whether the dump file matches the coping strategies according to the matching degree of the dump file and each coping strategy includes:
arranging each coping strategy according to the sequence of the matching degree of the coping strategies with the dump file from large to small to obtain coping strategy sequences;
and determining that the coping strategies arranged in front of the coping strategy sequence in a preset proportion are matched with the dump file.
In the present exemplary embodiment, the predetermined ratio is pre-configured, and the developer may configure the predetermined ratio according to actual requirements, for example, configure the predetermined ratio to 10%, 15%, or 20%. And determining that the coping strategies arranged in front of the coping strategy sequence in a preset proportion are matched with the dump file, namely determining that the coping strategy in the preset proportion with the dump file with the maximum matching degree is matched with the dump file, so that the possibility that the selected coping strategy can solve the technical problem corresponding to the dump file is improved.
In another exemplary embodiment, determining whether the dump file matches the coping strategies according to the matching degree of the dump file and each coping strategy includes:
when the matching degree of the dump file and the coping strategy reaches a second preset threshold value, determining that the coping strategy with the matching degree reaching the second preset threshold value is matched with the dump file.
In the present exemplary embodiment, the second predetermined threshold is preconfigured, and the second predetermined configuration may be 75%, 85%, or 90%, etc. The coping strategy with the matching degree of the dump file reaching the second preset threshold is determined to be matched with the dump file, so that the possibility of solving the technical problem corresponding to the dump file by the coping strategy is improved, and the matching degree is compared with the second preset threshold, so that the sequencing step is omitted, and the determination efficiency is improved.
Referring to fig. 3, in step S340, a history execution result of each candidate coping strategy is obtained, and a success rate of the candidate coping strategy is calculated according to the execution success number and the execution failure number in the history execution result.
The historical execution result refers to the execution result of the coping strategy after being executed historically, and when the coping strategy is executed, if the system is not broken down, the execution is determined to be successful, and if the system is broken down, the execution is determined to be failed.
Dividing the execution success number by the sum of the execution success number and the execution failure number according to the execution success number and the execution failure number in the historical execution result of each candidate coping strategy to obtain the success rate of the coping strategy, for example, if the execution success number of the candidate coping strategy E is 12, and the execution failure number is 3, the success rate of the candidate coping strategy is 12/(12+3) ═ 80%.
And step S350, determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy.
In the exemplary embodiment, the candidate coping strategy with the highest power among all the candidate coping strategies may be determined as the target coping strategy, and the candidate coping strategy with the highest success rate is selected as the target coping strategy through comparison of the success rate of each candidate coping strategy, thereby ensuring the success rate of solving the technical problem corresponding to the dump file.
In an exemplary embodiment, determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy includes:
and determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy and the matching degree of the candidate coping strategy and the dump file.
In the exemplary embodiment, the success rate of each candidate coping strategy and the matching degree of the candidate coping strategy and the dump file are fully considered to determine the target coping strategy, so that the matching degree of the target coping strategy and the dump file is fully ensured while the success rate of the target coping strategy is ensured, the target coping strategy can have pertinence to the technical problem corresponding to the dump file, and the success rate is improved.
In an exemplary embodiment, determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy and the matching degree of the candidate coping strategy and the dump file includes:
acquiring a success rate weight and a matching degree weight;
calculating the execution success rate D of each candidate coping strategy by the following formula: d ═ Ap + Bc, where a is a matching degree weight, p is a matching degree of the dump file and the candidate coping strategies, B is a success rate weight, and c is a success rate of the candidate coping strategies;
and determining a target coping strategy corresponding to the dump file according to the execution success rate D of each candidate coping strategy.
In the present exemplary embodiment, the success rate weight and the matching degree weight are configured in advance, and a developer configures the success rate weight and the matching degree weight in advance according to an actual operation requirement. And calculating the execution success rate D of each candidate coping strategy, and determining the candidate coping strategy with the highest execution success rate D in all the candidate coping strategies as a target coping strategy. The selection of the target coping strategy can fully consider different weights occupied by the matching degree and the success rate, and the success rate of solving the problem after the target coping strategy is executed is ensured. For example, if the matching degree weight is 0.65, the success rate weight is 0.35, the matching degree between the candidate coping strategy F and the dump file is 75%, and the success rate is 80%, the execution success rate D of the candidate coping strategy F is: 0.65 × 0.75+0.35 × 0.8 ≈ 77%.
The embodiment of the disclosure further provides an analysis device 400 for dump files. Referring to fig. 4, the analysis apparatus 400 of the exemplary dump file may include a first obtaining module 410, a second obtaining module 420, a dump file generating module 430, and a determining module 440. Wherein:
the first acquisition module 410 is configured to: acquiring configuration information of a terminal;
the second acquisition module 420 is configured to: acquiring running state information of the terminal, wherein the running state information corresponds to the configuration information;
the dump file generation module 430 is configured to: if the proportion of the operation state information of the terminal in the configuration information of the terminal reaches a first preset threshold value, generating a dump file corresponding to the terminal;
the determination module 440 is configured to: when the dump file is detected to be generated, the dump file is acquired and analyzed to determine a coping strategy corresponding to the dump file.
The specific details of each module in the analysis apparatus for dump files have been described in detail in the analysis method for corresponding dump files, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
According to an exemplary embodiment, the apparatus may be realized as an electronic device comprising a memory and a processor, the memory having stored therein a computer program, which, when executed by the processor, causes the processor to perform any one of the method embodiments as described above, or which, when executed by the processor, causes the electronic device to realize the functions as implemented by the constituent units/modules of the apparatus embodiments as described above.
The processor described in the above embodiments may refer to a single processing unit, such as a central processing unit CPU, or may be a distributed processor system comprising a plurality of distributed processing units.
The memory described in the above embodiments may include one or more memories, which may be internal memories of the computing device, such as various memories of a transient or non-transient type, or external storage devices connected to the computing device through a memory interface.
An electronic device 500 according to this embodiment of the invention is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, and a bus 530 that couples various system components including the memory unit 520 and the processing unit 510.
Wherein the storage unit stores program code that is executable by the processing unit 510 to cause the processing unit 510 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 510 may execute step S210 shown in fig. 2 to acquire configuration information of the terminal; step S220, obtaining the running state information of the terminal, wherein the running state information corresponds to the configuration information; step S230, if the proportion of the operation state information of the terminal in the configuration information of the terminal reaches a first preset threshold value, generating a dump file corresponding to the terminal; step S240, when the generation of the dump file is detected, the dump file is acquired and analyzed to determine the coping strategy corresponding to the dump file.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
Storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. As shown, the network adapter 560 communicates with the other modules of the electronic device 500 over the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 6, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for analyzing a dump file, comprising:
acquiring configuration information of a terminal;
acquiring running state information of the terminal, wherein the running state information corresponds to the configuration information;
if the proportion of the operation state information of the terminal in the configuration information of the terminal reaches a first preset threshold value, generating a dump file corresponding to the terminal;
when the dump file is detected to be generated, the dump file is acquired and analyzed to determine a coping strategy corresponding to the dump file.
2. The analysis method of the dump file according to claim 1, wherein the obtaining and analyzing the dump file to determine the coping strategy corresponding to the dump file comprises:
traversing the dump file to obtain a keyword set of the dump file;
acquiring a plurality of keyword sets of coping strategies;
respectively comparing the keyword set of the dump file with the keyword set of each coping strategy, and determining coping strategies matched with the keyword set of the dump file in the keyword sets of the coping strategies as candidate coping strategies;
acquiring a historical execution result of each candidate coping strategy, and calculating the success rate of the candidate coping strategy according to the execution success times and the execution failure times in the historical execution result;
and determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy.
3. The analysis method of the dump file according to claim 2, wherein the step of comparing the keyword sets of the dump file with the keyword sets of each coping strategy respectively to determine coping strategies, which are matched with the keyword sets of the dump file, among the coping strategies is a candidate coping strategy comprises:
comparing each keyword in the keyword set of the dump file with each keyword in the keyword set of each coping strategy one by one, and if the keywords are the same, accumulating the matching value by one;
dividing the matching value of the dump file and the coping strategy by the number of keywords of the union of the keyword set of the dump file and the keyword set of the coping strategy to obtain the matching degree of the dump file and the coping strategy;
determining whether the dump file is matched with the coping strategies or not according to the matching degree of the dump file and each coping strategy;
and determining the coping strategies matched with the dump file as candidate coping strategies.
4. The analysis method of the dump file according to claim 3, wherein determining the target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy comprises:
and determining a target coping strategy corresponding to the dump file according to the success rate of each candidate coping strategy and the matching degree of the candidate coping strategy and the dump file.
5. The dump file analysis method according to claim 4, wherein determining the target coping strategies corresponding to the dump file according to the success rate of each candidate coping strategy and the matching degree of the candidate coping strategies and the dump file comprises:
acquiring a success rate weight and a matching degree weight;
calculating the execution success rate D of each candidate coping strategy by the following formula: d ═ Ap + Bc, where a is a matching degree weight, p is a matching degree of the dump file and the candidate coping strategies, B is a success rate weight, and c is a success rate of the candidate coping strategies;
and determining a target coping strategy corresponding to the dump file according to the execution success rate D of each candidate coping strategy.
6. The dump file analysis method according to claim 3, wherein determining whether the dump file matches the coping strategies according to a matching degree of the dump file and each coping strategy includes:
arranging each coping strategy according to the sequence of the coping strategies and the dump file from large to small to obtain a coping strategy sequence;
and determining that the coping strategies arranged in front of the coping strategy sequence in a preset proportion are matched with the dump file.
7. The dump file analysis method according to claim 3, wherein determining whether the dump file matches the coping strategies according to a matching degree of the dump file and each coping strategy includes:
when the matching degree of the dump file and the coping strategy reaches a second preset threshold value, determining that the coping strategy with the matching degree reaching the second preset threshold value is matched with the dump file.
8. An analysis apparatus for a dump file, comprising:
the first acquisition module is configured to acquire configuration information of the terminal;
a second obtaining module, configured to obtain operation state information of the terminal, where the operation state information corresponds to the configuration information;
the dump file generation module is configured to generate a dump file corresponding to the terminal if the proportion of the running state information of the terminal to the configuration information of the terminal reaches a first preset threshold;
the determining module is configured to acquire and analyze the dump file when the dump file is detected to be generated so as to determine a coping strategy corresponding to the dump file.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of analyzing a dump file according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor; and
a memory having a computer program stored thereon;
wherein the processor is configured to implement the analysis method of the dump file according to any one of claims 1-7 via execution of the computer program.
CN201910827329.8A 2019-09-02 2019-09-02 Dump file analysis method and device, storage medium and electronic equipment Pending CN110704222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910827329.8A CN110704222A (en) 2019-09-02 2019-09-02 Dump file analysis method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910827329.8A CN110704222A (en) 2019-09-02 2019-09-02 Dump file analysis method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN110704222A true CN110704222A (en) 2020-01-17

Family

ID=69193793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910827329.8A Pending CN110704222A (en) 2019-09-02 2019-09-02 Dump file analysis method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110704222A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113687971A (en) * 2021-08-24 2021-11-23 杭州迪普科技股份有限公司 Method and device for generating memory mapping file

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113687971A (en) * 2021-08-24 2021-11-23 杭州迪普科技股份有限公司 Method and device for generating memory mapping file

Similar Documents

Publication Publication Date Title
CN106649084B (en) The acquisition methods and device of function call information, test equipment
CN109272348B (en) Method and device for determining number of active users, storage medium and electronic equipment
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
US20200379807A1 (en) Method, device, and computer program product for managing jobs in processing system
US20200057685A1 (en) Automatically deploying hardware accelerators based on requests from users
US20170091010A1 (en) Introduction determination program, introduction determination device and introduction determination method
CN110704325B (en) Data processing method and device, computer storage medium and electronic equipment
CN110460647B (en) Network node scheduling method and device, electronic equipment and storage medium
EP3923155A2 (en) Method and apparatus for processing snapshot, device, medium and product
US11755954B2 (en) Scheduled federated learning for enhanced search
CN110515758A (en) A kind of Fault Locating Method, device, computer equipment and storage medium
CN114064435A (en) Database test method, device, medium and electronic equipment
US11740827B2 (en) Method, electronic device, and computer program product for recovering data
CN110704222A (en) Dump file analysis method and device, storage medium and electronic equipment
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN109977005B (en) End-to-end test method, medium, device and computing equipment
CN112463574A (en) Software testing method, device, system, equipment and storage medium
CN112416746A (en) Test case generation method, device, equipment and medium
CN112416747A (en) Test case execution method, device, equipment and medium
CN113141407B (en) Page resource loading method and device and electronic equipment
CN111949862B (en) Method and device for managing business task flow and electronic equipment
CN111681093B (en) Method and device for displaying resource page and electronic equipment
CN111949549B (en) Test request screening method, system, electronic equipment and storage medium
CN114090514A (en) Log retrieval method and device for distributed system
CN108874625B (en) Information processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination