CN109376027A - A kind of abnormal processing method and terminal for destroying process - Google Patents

A kind of abnormal processing method and terminal for destroying process Download PDF

Info

Publication number
CN109376027A
CN109376027A CN201811122038.0A CN201811122038A CN109376027A CN 109376027 A CN109376027 A CN 109376027A CN 201811122038 A CN201811122038 A CN 201811122038A CN 109376027 A CN109376027 A CN 109376027A
Authority
CN
China
Prior art keywords
abnormal
destroying
reason
overtime reason
overtime
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
CN201811122038.0A
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 CN201811122038.0A priority Critical patent/CN109376027A/en
Publication of CN109376027A publication Critical patent/CN109376027A/en
Pending legal-status Critical Current

Links

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/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention is suitable for field of computer technology, provide a kind of abnormal processing method and terminal for destroying process, this method comprises: determining the abnormal destruction process for causing time-out when detecting the counter time-out for guarding the gate enough, and obtain the abnormal overtime reason for destroying process;According to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and the overtime reason for including in preset white list, target abnormal process is determined from the abnormal destruction process;It calls and restarts house dog for restarting the function of house dog, and the target abnormal process is kept to continue to run.The embodiment of the present invention, by keeping continuing to run the not serious target abnormal process of systematic influence degree, abnormal process of destroying serious to systematic influence degree is terminated to run, it can be avoided because the destroying threads for currently destroying the object that destroyed with horse back are interrupted, and resource leakage or initiator led to problems such as to even result in system extremely and be unable to run.

Description

A kind of abnormal processing method and terminal for destroying process
Technical field
The invention belongs to field of computer technology more particularly to a kind of abnormal processing methods and terminal for destroying process.
Background technique
The memory that terminator (Finalize) is used to discharge Useless object is executed in garbage collection procedure, for example, cleaning is originally Ground object (object created by JNI) will discharge the memory of Useless object when Garbage Collector.Using Finalize into When row resource clears up releasing memory, it is understood that there may be timeout issue.
A kind of method of the solution Finalize timeout issue provided in the prior art is to restart Finalize mechanism to evade Fall timeout issue.
The major defect of this mode has: restarting the opportunity of Finalize mechanism, it is likely that causes currently destroying The destroying threads for the object that destroyed with horse back are interrupted, and resource is caused to reveal or lock, or cause to break system safety Relay protective scheme, initiator even result in system extremely and are unable to run.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of abnormal processing method and terminal for destroying process, it is existing to solve Have in technology, restarts Finalize mechanism and evade falling defect present in timeout issue.
The first aspect of the embodiment of the present invention provides a kind of abnormal processing method for destroying process, comprising:
When detecting the counter time-out for guarding the gate enough, the abnormal destruction process for causing time-out is determined, and described in acquisition The abnormal overtime reason for destroying process;
According to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and preset white The overtime reason for including in list determines target abnormal process from the abnormal destruction process;Include in the white list Overtime reason is to mark and be not required to overtime reason to be processed in advance;
It calls and restarts house dog for restarting the function of house dog, and the target abnormal process is kept to continue to run.
The second aspect of the embodiment of the present invention provides a kind of terminal, including memory, processor and is stored in described In memory and the computer program that can run on the processor, the processor are realized when executing the computer program Following steps:
When detecting the counter time-out for guarding the gate enough, the abnormal destruction process for causing time-out is determined, and described in acquisition The abnormal overtime reason for destroying process;
According to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and preset white The overtime reason for including in list determines target abnormal process from the abnormal destruction process;Include in the white list Overtime reason is to mark and be not required to overtime reason to be processed in advance;
It calls and restarts house dog for restarting the function of house dog, and the target abnormal process is kept to continue to run.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program performs the steps of when being executed by processor
When detecting the counter time-out for guarding the gate enough, the abnormal destruction process for causing time-out is determined, and described in acquisition The abnormal overtime reason for destroying process;
According to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and preset white The overtime reason for including in list determines target abnormal process from the abnormal destruction process;Include in the white list Overtime reason is to mark and be not required to overtime reason to be processed in advance;
It calls and restarts house dog for restarting the function of house dog, and the target abnormal process is kept to continue to run.
Implementing a kind of abnormal processing method for destroying process and terminal provided in an embodiment of the present invention has below beneficial to effect Fruit:
The embodiment of the present invention, terminal is by destroying process according to exception in the counter time-out for detecting house dog Process identification (PID), the abnormal overtime reason for destroying process and the overtime reason for including in preset white list, from it is abnormal destroy into Determine target abnormal process in journey, call and for restarting the function of house dog restart house dog, and keep target abnormal process after Reforwarding row.Corresponding abnormal destruction process is user preset setting and to systematic influence degree due to overtime in white list Not serious known exception process keeps target abnormal process to continue to run, and can be avoided because currently destroying and wanting at once The destroying threads for the object destroyed are interrupted, and resource is caused to be revealed or locked, or are caused to break system safeguard protection and be patrolled Volume, initiator even results in system extremely and is unable to run.Abnormal process of destroying serious to systematic influence degree is terminated to run, It can be avoided and run the problem of exception destruction process causes.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation flow chart for abnormal processing method for destroying process that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides a kind of abnormal processing method for destroying process implementation flow chart;
Fig. 3 is a kind of schematic diagram for terminal that one embodiment of the invention provides;
Fig. 4 be another embodiment of the present invention provides a kind of terminal schematic diagram.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Referring to Figure 1, Fig. 1 is a kind of implementation process of abnormal processing method for destroying process provided in an embodiment of the present invention Figure.Extremely the executing subject that the processing method of process is destroyed in the present embodiment is terminal.Terminal include but is not limited to smart phone, The mobile terminals such as tablet computer, wearable device can also be desktop computer etc..The processing of abnormal destruction process as shown in the figure Method can include:
S101: when detecting the counter time-out for guarding the gate enough, the abnormal destruction process for causing time-out is determined, and obtain The abnormal overtime reason for destroying process.
Terminal executes terminator Finalize in detecting starting garbage collection procedure, destroys certain nothing by Finalize With the process of object, when the occupied memory of relevant information to recycle the Useless object, starts the counter of house dog, control House dog starts to count automatically.
Terminal is sentenced when the corresponding timing of counter for detecting house dog is greater than or equal to preset timing Determine the counter time-out of house dog, the processor (Central Processing Unit, CPU) for obtaining terminal is currently running Process and process identification (PID), and the process according to Useless object relevant information (such as process mark, execute duration, execute State etc.), the abnormal destruction process for destroying Useless object is filtered out from the currently running process of CPU.
The abnormal destruction process for causing time-out includes executing duration to be greater than the default process or execution for executing duration threshold value The process of abnormal state.Executing abnormal state includes that process is stuck, executes wrong or program error etc..
Terminal obtains the prompt information for identifying overtime reason, and the instruction information based on overtime reason and overtime reason Between default corresponding relationship, it is determining with the matched overtime reason of the prompt information, obtain each abnormal time-out for destroying process Reason.The instruction information of overtime reason can be the combination of number and/or letter.
Optionally, in order to improve the efficiency of the overtime reason for determining the abnormal destruction process for causing time-out, terminal can be with The incidence relation between the process identification (PID) and its corresponding overtime reason for the abnormal destruction process for causing time-out is pre-established, so that Terminal get it is identical cause time-out abnormal destruction process when, can based on cause time-out abnormal destruction process into Incidence relation between journey mark and its corresponding overtime reason, quickly determines the abnormal overtime reason for destroying process.
S102: according to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and pre- If white list in include overtime reason, determine target abnormal process from the abnormal destruction process;In the white list The overtime reason for including is to mark and be not required to overtime reason to be processed in advance.
Target abnormal process is the abnormal process for needing maintenance to run.
Specifically, every kind that includes in preset white list exception can be destroyed the overtime reason of process and obtained by terminal The corresponding overtime reason of abnormal destruction process each of is got to be compared, with searched from the overtime reason got with The target time-out reason that the overtime reason for including in white list matches, it is former based on the abnormal process identification (PID) for destroying process and time-out Incidence relation because between, obtains the corresponding abnormal destruction process of the target time-out reason, and by the exception found destroy into Journey is identified as target abnormal process.
Or when the incidence relation comprising the abnormal process identification (PID) for destroying process and its overtime reason in white list, terminal By every kind that includes in the preset white list abnormal overtime reason for destroying process and it each of can get abnormal destroy The corresponding overtime reason of process is compared, and searches white name from each of getting in the abnormal process identification (PID) for destroying process The target process for the abnormal destruction process for including in list identifies, and when finding target process mark, will get in S101 Target process mark abnormal destruction process overtime reason overtime original corresponding with target process mark in white list Because being compared, to determine whether the two is identical.When both confirmations are identical, by the corresponding abnormal destruction of target process mark Progress recognizing is target abnormal process.
White list is to be stored in advance in terminal, should comprising marking and being not required to overtime reason to be processed in advance in white list Time-out is the reason is that execute the reason for destroying the process time-out of Useless object.Influence of the overtime reason for including in white list to system Degree is negligible, and the corresponding abnormal destruction process of the overtime reason in white list is that user preset is set and to systematic influence The not serious known exception process of degree.The overtime reason for not including in white list is the time-out more serious to systematic influence degree Reason.
White list can be arranged by terminal, and terminal can also obtain the white list that dynamic updates from server, herein not It is limited.
S103: it calls and restarts house dog for restarting the function of house dog, and keep the target abnormal process after reforwarding Row.
The preset function for restarting house dog of terminal calling system restarts house dog, and target abnormal process is kept to continue Operation, to continue the audio file or picture resource of cleaning Useless object by target abnormal process, to discharge its occupancy Memory, until target abnormal process end of run, with prevent from currently destroying and pair to be destroyed at once The destroying threads of elephant are interrupted, and lead to resource leakage or deadlock, and the situation of initiator exception occurs.
The embodiment of the present invention, terminal is by destroying process according to exception in the counter time-out for detecting house dog Process identification (PID), the abnormal overtime reason for destroying process and the overtime reason for including in preset white list, from it is abnormal destroy into Determine target abnormal process in journey, call and for restarting the function of house dog restart house dog, and keep target abnormal process after Reforwarding row.Corresponding abnormal destruction process is user preset setting and to systematic influence degree due to overtime in white list Not serious known exception process keeps target abnormal process to continue to run, and can be avoided because currently destroying and wanting at once The destroying threads for the object destroyed are interrupted, and resource is caused to be revealed or locked, or are caused to break system safeguard protection and be patrolled Volume, initiator even results in system extremely and is unable to run.Abnormal process of destroying serious to systematic influence degree is terminated to run, It can be avoided and run the problem of exception destruction process causes.
Refer to Fig. 2, Fig. 2 be another embodiment of the present invention provides a kind of abnormal processing method for destroying process realization Flow chart.Extremely the executing subject that the processing method of process is destroyed in the present embodiment is terminal.Terminal includes but is not limited to intelligence The mobile terminals such as mobile phone, tablet computer, wearable device can also be desktop computer etc..Extremely process is destroyed in the present embodiment Processing method executing subject be terminal.The processing method of abnormal destruction process as shown in the figure can include:
S201: when detecting the counter time-out for guarding the gate enough, the abnormal destruction process for causing time-out is determined, and obtain The abnormal overtime reason for destroying process.
S201 is identical as the S101 in a upper embodiment in the present embodiment, referring specifically to the phase of S101 in a upper embodiment Description is closed, is not repeated herein.
Further, the abnormal overtime reason for destroying process includes any combination of following any one or at least two: Process takes long time, program error, source code existing defects and source code have exception.
Program error refers to that control runs the program error that the exception destroys process.
Further, the overtime reason of process is destroyed when exception to deposit when abnormal for source code existing defects or source code, Determine and feed back the location information of the corresponding abnormality code of the abnormal destruction process.
Terminal is the exception destruction process corresponding source generation in the overtime reason for determining the abnormal destruction process for causing time-out Code existing defects or source code are deposited when abnormal, determine that the exception is sold based on the operation information for the abnormal destruction process for causing time-out The location information of abnormality code in the corresponding source code of process is ruined, abnormality code location information is abnormal in source code for positioning Code, so that maintenance personnel carries out system maintenance based on abnormality code location information or determines solution.For example, certain code piece Line n in section.Operation information refers to that is generated when running the abnormal destruction process for causing time-out sells for identifying the exception Ruin the information of running state of a process or progress.
Optionally, in order to improve the efficiency of the overtime reason for determining the abnormal destruction process for causing time-out, terminal can be with The incidence relation between the process identification (PID) and its corresponding overtime reason for the abnormal destruction process for causing time-out is pre-established, so that Terminal get it is identical cause time-out abnormal destruction process when, can based on cause time-out abnormal destruction process into Incidence relation between journey mark and its corresponding overtime reason, quickly determines the abnormal overtime reason for destroying process.
S202: the white list is arranged in the information for destroying process extremely according to history;The history destroys process extremely Information includes the overtime reason that history destroys the process identification (PID) of process, label extremely.
Terminal obtains the information that history destroys process extremely, and the information that history destroys process extremely includes that history is destroyed extremely The process identification (PID) of process, label overtime reason;Destroy the process identification (PID) of process, the overtime reason of label extremely based on history, The overtime reason when history run destroys process extremely to systematic influence degree within an acceptable range is filtered out, and will screening History out destroys the overtime reason and its process identification (PID) association write-in white list of process extremely.
It should be noted that S202 can be executed before S201, can also be executed after S202, or be performed simultaneously.
Further, in the counter time-out for detecting house dog, cause the abnormal destruction process quilt of time-out in order to prevent Break system safeguard protection logic when interruption, initiator even results in the case where system is unable to run extremely, and S202 can be with It specifically includes:
S2021: process identification (PID) and each history exception destruction process that the history destroys process extremely are obtained Corresponding marked overtime reason.
Terminal can be obtained from system log history destroy the process identification (PID) of process extremely, each history destroy extremely into The corresponding marked overtime reason of journey.
S2022: the corresponding every kind of institute of each history exception destruction process is determined according to default problem evaluation index State the menace level of marked overtime reason.
Default problem evaluation index includes following a kind of or two kinds at least any: each abnormal time-out for destroying process is former Because of the respective frequency of occurrence of every kind of time-out reason, the corresponding operation of abnormal destruction process in affiliated type, default measurement period Environmental parameter.Wherein, running environment parameter include OS Type, be operating abnormally destruction process terminal production firm, Device model etc..
Wherein, when type difference belonging to overtime reason, corresponding menace level can be different, can also be identical.Example Such as, overtime reason is the corresponding source code existing defects of abnormal destruction process or deposits when abnormal that the position of abnormality code is different When, corresponding menace level is different.
Multiple frequency of occurrence ranges can be set in terminal, and are each frequency of occurrence range assignment menace level, wherein go out The existing frequency is higher, and the corresponding menace level of overtime reason is higher.Later, terminal is according to every kind of respective frequency of occurrence of overtime reason It determines the target frequency of occurrence range belonging to it, determines that frequency occurs in target according to the corresponding menace level of each frequency of occurrence range The menace level of underrange.
Terminal system problem caused when can also be run under different running environment according to abnormal destruction process Severity distributes overtime reason corresponding menace level for the abnormal corresponding running environment of process of destroying.It is abnormal to destroy process The severity of caused system problem can be what user marked in advance when running under different running environment.
Specifically, terminal is when getting the corresponding running environment parameter of abnormal destruction process, according to running environment parameter In OS Type, production firm, the device model of terminal etc. that are operating abnormally destruction process determine that overtime reason is corresponding Menace level.
It is understood that referring to when default problem evaluation index includes at least two according to by the assessment of each problem The menace level for marking determining overtime reason carries out comprehensive assessment, obtains final menace level.
Specifically, terminal can distribute weight coefficient for each problem evaluation index, so that it is determined that crucial problem assessment Index, final menace level can be by subject to menace levels that crucial problem evaluation index determines.Crucial problem assessment Index is can to protrude the index of severity.
S2023: it is satisfactory that the menace level based on overtime reason marked described in every kind filters out menace level Overtime reason, by the overtime reason filtered out and its corresponding process identification (PID) association write-in white list.
In the present embodiment, the lower overtime reason of menace level is the satisfactory overtime reason of menace level.
Terminal filters out the lower overtime reason of the corresponding menace level of each abnormal destruction process, and different by what is filtered out The process identification (PID) in constant demand for ruining process and its overtime reason association write-in white list.
S203: according to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and pre- If white list in include overtime reason, determine target abnormal process from the abnormal destruction process;In the white list The overtime reason for including is to mark and be not required to overtime reason to be processed in advance.
S203 is identical as the S102 in a upper embodiment in the present embodiment, referring specifically to the phase of S102 in a upper embodiment Description is closed, is not repeated herein.
S204: it calls and restarts house dog for restarting the function of house dog, and keep the target abnormal process after reforwarding Row.
The preset function for restarting house dog of terminal calling system restarts house dog, and target abnormal process is kept to continue Operation, to continue the audio file or picture resource of cleaning Useless object by target abnormal process, to discharge its occupancy Memory, until target abnormal process end of run, with prevent from currently destroying and pair to be destroyed at once The destroying threads of elephant are interrupted, and lead to resource leakage or deadlock, and the situation of initiator exception occurs.
Further, it can also include S205 after S203: it is former to terminate the time-out for running and not including in the white list Because of corresponding abnormal destruction process.
Terminal is determined from the overtime reason of the abnormal destruction process got according to the overtime reason recorded in white list The overtime reason that white list does not include, and abnormal destruction process corresponding to the overtime reason that white list does not include is closed, thus Terminate abnormal destruction process corresponding to the overtime reason for not including in operation white list.
Since the overtime reason mark for the abnormal destruction process for including in white list is super in the counter for detecting house dog When, the abnormal destruction process that needs to retain;And the overtime reason mark for the abnormal destruction process for not including in white list is detecting To the counter time-out of house dog, the corresponding abnormal destruction process of the time-out reason is needed to terminate, be sold extremely to avoid this is run It ruins process and causes system problem, operated normally with safeguards system or Support Resource is not leaked.
Wherein, S204 and S205 can be performed simultaneously.
The embodiment of the present invention, terminal is by destroying process according to exception in the counter time-out for detecting house dog Process identification (PID), the abnormal overtime reason for destroying process and the overtime reason for including in preset white list, from it is abnormal destroy into Determine target abnormal process in journey, call and for restarting the function of house dog restart house dog, and keep target abnormal process after Reforwarding row.Corresponding abnormal destruction process is user preset setting and to systematic influence degree due to overtime in white list Not serious known exception process keeps target abnormal process to continue to run, and can be avoided because currently destroying and wanting at once The destroying threads for the object destroyed are interrupted, and resource is caused to be revealed or locked, or are caused to break system safeguard protection and be patrolled Volume, initiator even results in system extremely and is unable to run.
Abnormal destruction process corresponding to the overtime reason for running and not including in the white list is terminated, to terminate to system The serious abnormal process of destroying of influence degree is run, and be can be avoided and is run the problem of exception destruction process causes.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Referring to Fig. 3, Fig. 3 is a kind of schematic diagram for terminal that one embodiment of the invention provides.The each unit that terminal includes For executing each step in the corresponding embodiment of FIG. 1 to FIG. 2.Referring specifically in the corresponding embodiment of FIG. 1 to FIG. 2 Associated description.For ease of description, only the parts related to this embodiment are shown.Referring to Fig. 3, terminal 3 includes:
Acquiring unit 310, for when detecting the counter time-out for guarding the gate enough, determine cause the exception of time-out destroy into Journey, and obtain the abnormal overtime reason for destroying process;
Target abnormal process determination unit 320, for according to the abnormal process identification (PID) for destroying process, the abnormal pin The overtime reason for including in the overtime reason and preset white list of process is ruined, determines target from the abnormal destruction process Abnormal process;The overtime reason for including in the white list is to mark and be not required to overtime reason to be processed in advance;
Process holding unit 330 for calling the function for restarting house dog to restart house dog, and keeps the target Abnormal process continues to run.
Further, the abnormal overtime reason for destroying process includes following any one or any group of at least two It closes:
Process takes long time, program error, source code existing defects and source code have exception.
Further, terminal further include:
Feedback unit, for being that source code existing defects or source code exist when the abnormal overtime reason for destroying process When abnormal, the location information of the corresponding abnormality code of the abnormal destruction process is determined and fed back.
Further, terminal further include:
The white list is arranged in white list setting unit, the information for destroying process extremely according to history;The history The abnormal information for destroying process includes the overtime reason that history destroys the process identification (PID) of process, label extremely.
Further, white list setting unit is specifically used for:
It is corresponding to obtain the history process identification (PID) of destruction process and each history exception destruction process extremely Marked overtime reason;
Determine that each history exception destruction process has been marked described in every kind corresponding according to default problem evaluation index The menace level of the overtime reason of note;
It is former that menace level based on overtime reason marked described in every kind filters out the satisfactory time-out of menace level Cause, by the overtime reason filtered out and its corresponding process identification (PID) association write-in white list.
Further, terminal further include:
Process terminates unit, destroys for terminating exception corresponding to the overtime reason for running and not including in the white list Process.
Fig. 4 be another embodiment of the present invention provides a kind of terminal schematic diagram.As shown in figure 4, the terminal 4 of the embodiment Include: processor 40, memory 41 and is stored in the calculating that can be run in the memory 41 and on the processor 40 Machine program 42.The processor 40 realizes the place of the abnormal destruction process of above-mentioned each terminal when executing the computer program 42 Manage the step in embodiment of the method, such as S101 shown in FIG. 1 to S103.Alternatively, the processor 40 executes the computer The function of each unit in above-mentioned each terminal embodiment, such as the function of unit 310 to 330 shown in Fig. 3 are realized when program 42.
Illustratively, the computer program 42 can be divided into one or more units, one or more of Unit is stored in the memory 41, and is executed by the processor 40, to complete the present invention.One or more of lists Member can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing the computer journey Implementation procedure of the sequence 42 in the terminal 4.For example, can be divided into acquiring unit, target different for the computer program 42 Chang Jincheng determination unit and process holding unit, each unit concrete function are as described above.
The terminal may include, but be not limited only to, processor 40, memory 41.It will be understood by those skilled in the art that figure 4 be only the example of terminal 4, and the not restriction of structure paired terminal 4 may include components more more or fewer than diagram, or Combine certain components or different components, for example, the terminal can also include input/output terminal, network insertion terminal, Bus etc..
Alleged processor 40 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 41 can be the internal storage unit of the terminal 4, such as the hard disk or memory of terminal 4.It is described Memory 41 is also possible to the external storage terminal of the terminal 4, such as the plug-in type hard disk being equipped in the terminal 4, intelligence Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) Deng.Further, the memory 41 can also both including the terminal 4 internal storage unit and also including external storage end End.The memory 41 is for other programs and data needed for storing the computer program and the terminal.It is described to deposit Reservoir 41 can be also used for temporarily storing the data that has exported or will export.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of abnormal processing method for destroying process characterized by comprising
When detecting the counter time-out for guarding the gate enough, the abnormal destruction process for causing time-out is determined, and obtain the exception The overtime reason of destruction process;
According to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and preset white list In include overtime reason, determine target abnormal process from the abnormal destruction process;The time-out for including in the white list Reason is to mark and be not required to overtime reason to be processed in advance;
It calls and restarts house dog for restarting the function of house dog, and the target abnormal process is kept to continue to run.
2. the abnormal processing method for destroying process according to claim 1, which is characterized in that the abnormal destruction process Overtime reason includes any combination of following any one or at least two:
Process takes long time, program error, source code existing defects and source code have exception.
3. the abnormal processing method for destroying process according to claim 2, which is characterized in that the abnormal destruction process Processing method further include:
The overtime reason of process is destroyed when the exception to deposit when abnormal for source code existing defects or source code, is determined and is fed back The abnormal location information for destroying the corresponding abnormality code of process.
4. the abnormal processing method for destroying process according to any one of claims 1 to 3, which is characterized in that the basis Include in the abnormal process identification (PID) for destroying process, the overtime reason of the abnormal destruction process and preset white list Overtime reason, before determining target abnormal process in the abnormal destruction process, further includes:
The white list is arranged in the information for destroying process extremely according to history;The information that the history destroys process extremely includes going through History destroys the overtime reason of the process identification (PID) of process, label extremely.
5. the abnormal processing method for destroying process according to claim 4, which is characterized in that described to be sold extremely according to history The white list is arranged in the information for ruining process, comprising:
Obtain that the history destroys the process identification (PID) of process extremely and each history exception destruction process is corresponding has marked The overtime reason of note;
According to default problem evaluation index determine each history exception destruction process it is corresponding every kind it is described marked The menace level of overtime reason;
Menace level based on overtime reason marked described in every kind filters out the satisfactory overtime reason of menace level, will The overtime reason filtered out and its corresponding process identification (PID) association write-in white list.
6. the abnormal processing method for destroying process according to claim 1, which is characterized in that the calling is seen for restarting The function of door dog restarts house dog, and after keeping target abnormal process to continue to run, further includes:
Terminate abnormal destruction process corresponding to the overtime reason for running and not including in the white list.
7. a kind of terminal, which is characterized in that the terminal include memory, processor and storage in the memory and can The computer program run on the processor, the processor realize following steps when executing the computer program:
When detecting the counter time-out for guarding the gate enough, the abnormal destruction process for causing time-out is determined, and obtain the exception The overtime reason of destruction process;
According to the abnormal process identification (PID) for destroying process, the abnormal overtime reason for destroying process and preset white list In include overtime reason, determine target abnormal process from the abnormal destruction process;The time-out for including in the white list Reason is to mark and be not required to overtime reason to be processed in advance;
It calls and restarts house dog for restarting the function of house dog, and the target abnormal process is kept to continue to run.
8. terminal according to claim 7, which is characterized in that it is described according to the abnormal process identification (PID) for destroying process, The abnormal overtime reason for destroying process and the overtime reason for including in preset white list, from the abnormal destruction process Before middle determining target abnormal process, the processor also realizes following steps when executing the computer program:
The white list is arranged in the information for destroying process extremely according to history;The information that the history destroys process extremely includes going through History destroys the overtime reason of the process identification (PID) of process, label extremely.
9. terminal according to claim 8, which is characterized in that institute is arranged in the information for destroying process extremely according to history State white list, comprising:
Obtain that the history destroys the process identification (PID) of process extremely and each history exception destruction process is corresponding has marked The overtime reason of note;
According to default problem evaluation index determine each history exception destruction process it is corresponding every kind it is described marked The menace level of overtime reason;
Menace level based on overtime reason marked described in every kind filters out the satisfactory overtime reason of menace level, will The overtime reason filtered out and its corresponding process identification (PID) association write-in white list.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 6 of realization the method.
CN201811122038.0A 2018-09-26 2018-09-26 A kind of abnormal processing method and terminal for destroying process Pending CN109376027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811122038.0A CN109376027A (en) 2018-09-26 2018-09-26 A kind of abnormal processing method and terminal for destroying process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811122038.0A CN109376027A (en) 2018-09-26 2018-09-26 A kind of abnormal processing method and terminal for destroying process

Publications (1)

Publication Number Publication Date
CN109376027A true CN109376027A (en) 2019-02-22

Family

ID=65401889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811122038.0A Pending CN109376027A (en) 2018-09-26 2018-09-26 A kind of abnormal processing method and terminal for destroying process

Country Status (1)

Country Link
CN (1) CN109376027A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988282A (en) * 2021-04-27 2021-06-18 荣耀终端有限公司 Application keep-alive method and terminal equipment
CN113468036A (en) * 2021-07-15 2021-10-01 上海晶赞融宣科技有限公司 Task execution time consumption analysis method and device, storage medium and terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988282A (en) * 2021-04-27 2021-06-18 荣耀终端有限公司 Application keep-alive method and terminal equipment
CN112988282B (en) * 2021-04-27 2021-08-20 荣耀终端有限公司 Application keep-alive method and terminal equipment
CN113468036A (en) * 2021-07-15 2021-10-01 上海晶赞融宣科技有限公司 Task execution time consumption analysis method and device, storage medium and terminal
CN113468036B (en) * 2021-07-15 2023-11-24 上海晶赞融宣科技有限公司 Time-consuming analysis method and device for task execution, storage medium and terminal

Similar Documents

Publication Publication Date Title
CN106716972B (en) Semi-automatic failover
CN106909411B (en) File updating method and device
US9280664B2 (en) Apparatus and method for blocking activity of malware
WO2023115999A1 (en) Device state monitoring method, apparatus, and device, and computer-readable storage medium
WO2013009619A9 (en) System and method for validating components during a booting process
CN110225078B (en) Application service updating method, system and terminal equipment
CN109376027A (en) A kind of abnormal processing method and terminal for destroying process
US7975176B2 (en) Application failure recovery
CN109766112A (en) A kind of method and device of program white list knowledge base update
CN109634802B (en) Process monitoring method and terminal equipment
CN108292342A (en) The notice of intrusion into firmware
CN112540725A (en) Nonvolatile data storage method, embedded system and storage medium
CN111752822A (en) Containerization pressure measurement scheduling method, computer equipment and readable storage medium
CN111796954A (en) Watchdog control method, device, equipment and storage medium based on JVM
CN111859399A (en) Vulnerability detection method and device based on oval
US11782753B2 (en) Node-local-unscheduler for scheduling remediation
CN105824709A (en) Critical region accessing method and device
CN108897646B (en) Switching method of BIOS (basic input output System) chips and substrate management controller
US20170024244A1 (en) Method for monitoring a software program and corresponding electronic device, communication system, computer readable program product and computer readable storage medium
US20220255762A1 (en) Lifecycle change cryptographic ledger
CN105159810B (en) The method and device that the BIOS of computer system is tested
US10635454B2 (en) Service management method and the device
CN115167896A (en) Method and device for updating software version, storage medium and electronic equipment
CN114816852A (en) Method, device and medium for recovering user configuration data
CN114722927A (en) Collapse clustering 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