CN104035865B - Method for deployment optimization of monitoring points in operating process of programs - Google Patents
Method for deployment optimization of monitoring points in operating process of programs Download PDFInfo
- Publication number
- CN104035865B CN104035865B CN201410239663.9A CN201410239663A CN104035865B CN 104035865 B CN104035865 B CN 104035865B CN 201410239663 A CN201410239663 A CN 201410239663A CN 104035865 B CN104035865 B CN 104035865B
- Authority
- CN
- China
- Prior art keywords
- module
- monitoring
- submodule
- current
- solution
- 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.)
- Expired - Fee Related
Links
Abstract
The invention relates to a method for deployment optimization of monitoring points in the operating process of programs. The method includes the steps that firstly, monitored and executed program codes are represented through a hierarchical structure model; secondly, module information is read, and a monitoring point deployment scheme is set as an initial solution; thirdly, an objective function E(M) for evaluating the monitoring points is constructed, and an objective function value of the initial solution is calculated and stored; fourthly, the module information, the initial solution and the objective function value are read, a simulated annealing algorithm is conducted, and then an optimized monitoring point deployment scheme is obtained. Compared with the prior art, the method has the advantages of being simple and flexible in process, high in practicality and efficiency and the like and solves the problem that the monitoring points are not reasonable deployed in the operating process of the programs.
Description
Technical field
The present invention relates to a kind of monitoring point dispositions method, especially relate to monitoring point optimization deployment when a kind of program is run
Method.
Background technology
In checking when program is run, produce monitor generally from system program demand, monitor is in program structure
The position of setting is monitoring point, by the execution of monitoring program, monitor checks whether program operation process meets system program
Demand, one side monitor needs to detect mistake when program is run, and on the other hand needs to find mistake in time, repaiies for mistake
The multiple time providing abundance and space, these are all with the deployment scheme close relation of monitoring point, the deployment scheme of monitoring point
Both needed all to cover each several part in program, and needed to consider monitoring point, monitored area, the optimum power between the monitoring time again
Weighing apparatus, if the method for monitoring point is also increasingly paid attention to by technical staff in therefore reasonable deployment program, and proposes
Advocate:
1) havelund et al. carries in " synthesizing monitors for safety properties " literary composition
Go out a kind of algorithm, it is read the expression formula into a past tense linear time temporal logic and then dynamically generates generation corresponding with expression formula
Code, this Codabar code will analyze the Perform sequence of finite length in linear session, and whether judgement sequence of obtaining a result meets use
The stipulations that family is formulated.This algorithm is referred to as monitor composition algorithm in article, has realization in pathexplorer project, this
It is the instrument of a run time verification also under development, this article is patrolled it is also mentioned that algorithm also can be developed in the future describing others
Collect preferably to be applied to real-time system, or find the latent fault of multi-threaded system.
2) bonakdarpour et al. propose in " sampling based runtime verification " " when
Between triggering sampling " run time verification, every the time internal trigger sampling action of a segment length, this sampling interval is by designer
Depend on the circumstances.This sampling interval of this article is set to the time interval the shortest of all variable change on the other hand, this
Sample can once sample in can all correlated variabless of pull-in range change, thus reducing the state of system under test (SUT).This article solves
How to reduce space expense (variable change log buffer) simultaneously, maximizing the optimization problem of acquisition interval.This article
Optimization aspect based on making system stipulations, the variable in the range of article algorithm discussion is all to participate in ltl stipulations meter
The variable calculated, thus preferably go back the state change of original system with relatively small number of record space.
3) stoller et al. is based in " runtime verification with state estimation " literary composition
The run time verification scheme of " Time Triggered sampling ", finds to have logout in status switch during sampling system execution sometimes
Loss, propose a challenge to accurately carrying out run time verification.This article is held to system using HMM
Row model is modeled, and adjusts the correlation of HMM from the example of system Perform sequence by baum-welch algorithm
Transition probability between parameter, such as hidden state, thus the probability of the generation for estimating some sequence is prepared.This article assumes system
Loss partial-length in Perform sequence is l, is then estimated in a certain bar Perform sequence according to the fsm that ltl stipulations generate
What kind of event node is vacancy should fill out thus meeting the fsm of correlation, then using the Hidden Markov mould that precondition is good
Type is estimating the probability sum of be likely to occur sequence.
Content of the invention
The purpose of the present invention is exactly to overcome the defect of above-mentioned prior art presence to provide a kind of reliability high journey
Monitoring point optimization dispositions method during sort run.
The purpose of the present invention can be achieved through the following technical solutions:
A kind of monitoring point optimization dispositions method when program is run, comprising:
Step s1: monitored program code hierarchy Model is represented, that is, is divided into disparate modules, including 1
Top-level module m0With multiple submodule m, obtain the oriented hierarchy chart of tree, tree is preserved as module information;
Step s2: read module information, if a monitoring point deployment scheme is as initial solution, the mould of stationary monitoring wanted in record
Block;
Step s3: construction evaluates object function e (m) of monitoring point, and calculates the target function value of initial solution and preserve:
E (m)=g (m0)*∑c(mx)/(1+∑r(mx)),mx∈m (1)
Wherein, mxIt is x-th submodule in module collection m, c (mx) it is submodule mxMonitoring overhead, r (mx) it is submodule
Block mxMonitoring redundancy, g (m0)-1=p (m0), g (m0) it is top-level module m0Monitoring granularity, p (m0) represent is current
The lower top-level module m of observation strategy0It is divided into many small parts;
Step s4: read module information, initial solution and target function value, it is simulated annealing algorithm, obtain an optimization
Monitoring point deployment scheme.
Top-level module m under Current observation strategy0It is divided into many small parts and adopt p (m0) represent, p (m0) refer to a journey
The degree that sequence code is divided in monitoring, is defined as follows:
Wherein, d (m) is the depth of submodule m, o (m0) it is top-level module m0In monitored submodule set, h (m)
It is the set of next straton module of submodule m, s (m), next (m) represent respectively and determine quilt in next straton module of submodule m
The submodule of monitoring and submodule set of blocks.
Described monitoring redundancy r (mx) refer to that submodules at different levels remark additionally the degree of higher level's modules, are defined as follows:
Wherein, path (m') is the node set with regard to module m', and paths (m') represents all roads that slave module m' is set out
The set in footpath, it is assumed that there are module m1, and there is Module nodes set path (m1)={ m1,m2,...,md+1, each of which
Individual mk∈h(mk-1), d is module m1Depth, k=1,2,3 ..., d+1, slave module m1The collection in all paths set out is combined into
paths(m1), path (m1)∈paths(m1);Assume there is module mxAnd my, wherein mx∈h(my), f (mx) it is in module mxSend out
The probability of raw fault, is defined as f (mx)=f (my)/next(my), next (my) representation module myNext level submodule total
Number.
Simulated annealing in described step s4 concretely comprises the following steps:
401: given initial temperature t0, primary iteration number of times i0, initial solution is the current solution of first time iteration, present energy
e0Target function value for initial solution;
402: the module that can refine monitoring to each of current solution calculates the neighborhood that candidate is currently solved, and remembers
Record is in buffering;
403: if neighborhood is not empty, execution step 404, if neighborhood is sky, simulated annealing terminates, and output is current
Solution;
404: the monitoring overhead of each of neighborhood according to current solution member's scheme, select the minimum conduct of expense new
Solution;
405: calculate monitoring redundancy, monitoring granularity and the monitoring overhead of new explanation, and then the target function value of calculating new explanation,
The i.e. energy e of new explanation1;
406: work as e1< e0Or work as e1≥e0, calculate Probability p r [accept]=exp (- (e1-e0)/t), pr [accept] <
R, r are an equally distributed random number between 0 to 1, then accepting new explanation is current solution, even e0=e1, adjust stationary monitoring
Module collection, deletes about being refined the related choosing solution of the module of monitoring, current iteration number of times i=i-1 in neighborhood, and executes step
Rapid 408;
407: work as e1≥e0, pr [accept] >=r, current iteration number of times i=i-1;
408: if i > 0, return to step 402, if i=0, make Current Temperatures t=0.95t, iterationses i=i0;
409: if t=0, simulated annealing terminates, output is current to be solved, if t ≠ 0, return to step 402.
Compared with prior art, the invention has the advantages that
1) present invention carries out, to the execution of system under test (SUT), the structural model that abstract modeling draws a program, and proposes
The measure of supporting evaluation monitoring scheme, makes program structure become apparent from, simultaneously can be according to evaluating tolerance to monitoring
Point deployment scheme is verified the reliability it is ensured that deployment scheme, and then ensures that monitor can when program is run and is monitored
Quickly and accurately to find mistake.
2) algorithm frame of the structural model based on program for the present invention and simulated annealing, obtains monitoring point optimization deployment
Scheme, decreases deployment time, improves the efficiency for complicated process Optimization deployment monitoring point, may be used on practical programs execution
It is achieved that the prototype experiment instrument of a run time verification in system, carry out the execution of dynamic authentication structured program.
Brief description
Fig. 1 is the structural representation of the present invention;
Fig. 2 is the comparison diagram of the initial solution of modular structure and observation station deployment and last solution in example;
Fig. 3 is simulated annealing each iteration energy and temperature change in example.
Specific embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.The present embodiment is with technical solution of the present invention
Premised on implemented, give detailed embodiment and specific operating process, but protection scope of the present invention be not limited to
Following embodiments.
As shown in figure 1, taking the deployment of the observation station of the execution of lwip protocol stack as a example, test platform: intel (r) core
(tm) 2quad 2.66ghz, internal memory 2gb, stm32f107 72mhz, internal memory 64kb;Operating system: windows xp, need to monitor
One section of execution from listen state to syn_rcvd state of lwip protocol stack, monitoring point optimization portion when a kind of program is run
Arranging method, comprising:
Step s1: monitored program code hierarchy Model is represented, that is, is divided into disparate modules, obtain tree-shaped
The oriented hierarchy chart of structure, including 1 top-level module m0With multiple submodule m, top-level module m0Represent whole program execution code,
It is a module black box treating deep subdivision, from top-level module m0Triggering can reach any one submodule m, tree simultaneously
Preserved as module information;
Step s2: read module information, if a monitoring point deployment scheme is as initial solution, the mould of stationary monitoring wanted in record
Block;
Step s3: construction evaluates object function e (m) of monitoring point, and calculates the target function value of initial solution and preserve:
E (m)=g (m0)*∑c(mx)/(1+∑r(mx)),mx∈m (1)
Wherein, mxIt is x-th submodule, c (mx) it is submodule mxMonitoring overhead, r (mx) it is submodule mxMonitoring superfluous
Remaining, g (m0)-1=p (m0), g (m0) it is top-level module m0Monitoring granularity, p (m0) represent is under Current observation strategy,
Module m0It is divided into many small parts, be defined as follows:
Wherein, d (m) is the depth of the comprised submodule of module m, o (m0) it is top-level module m0In monitored submodule
Set, h (m) is the set of next straton module of module m, and s (m), next (m) are respectively in next straton module of representation module m
Determine monitored submodule and submodule set of blocks;
Monitoring redundancy r (m) refers to the degree of submodules supplementary notes higher level's modules at different levels, is defined as follows:
Wherein, path (m') is the node set with regard to module m', and paths (m') represents all roads that slave module m' is set out
The set in footpath, it is assumed that there are module m1, and there is Module nodes set path (m1)={ m1,m2,...,md+1, each of which
Individual mk∈h(mk-1), d is module m1Depth, k=1,2,3 ..., d+1, slave module m1The collection in all paths set out is combined into
paths(m1), path (m1)∈paths(m1);Assume there is module mxAnd my, wherein mx∈h(my), f (mx) it is in module mxSend out
The probability of raw fault, is defined as f (mx)=f (my)/next(my), next (my) representation module myNext level submodule total
Number.
Step s4: read module information, initial solution and target function value, it is simulated annealing algorithm, obtain an optimization
Monitoring point deployment scheme, concretely comprise the following steps:
401: given initial temperature t0, primary iteration number of times i0, initial solution is the current solution of first time iteration, present energy
e0Target function value for initial solution;
402: the module that can refine monitoring to each of current solution calculates the neighborhood that candidate is currently solved, and remembers
Record is in buffering;
403: if neighborhood is not empty, execution step 404, if neighborhood is sky, simulated annealing terminates, and output is current
Solution;
404: the monitoring overhead of each of neighborhood according to current solution member's scheme, select the minimum conduct of expense new
Solution;
405: calculate monitoring redundancy, monitoring granularity and the monitoring overhead of new explanation, and then the target function value of calculating new explanation,
The i.e. energy e of new explanation1;
406: work as e1< e0Or work as e1≥e0, calculate Probability p r [accept]=exp (- (e1-e0)/t), pr [accept] <
R, r are an equally distributed random number between 0 to 1, then accepting new explanation is current solution, even e0=e1, adjust stationary monitoring
Module collection, deletes about being refined the related choosing solution of the module of monitoring, current iteration number of times i=i-1 in neighborhood, and executes step
Rapid 408;
407: work as e1≥e0, pr [accept] >=r, current iteration number of times i=i-1;
408: if i > 0, return to step 402, if i=0, make Current Temperatures t=0.95t, iterationses i=i0;
409: if t=0, simulated annealing terminates, output is current to be solved, if t ≠ 0, return to step 402.
Finally can be according to the monitoring granularity of prioritization scheme and monitoring redundancy come proof scheme.
As shown in Fig. 2 the contrast in front and back that in modular structure, monitoring point is disposed, the initial solution that left side is disposed for monitoring point, right
The last solution that side is disposed for monitoring point.
As shown in figure 3, the simulated annealing that have recorded in example has carried out 10 iteration, along with energy value and temperature
Value decline, wherein the 6th time iteration, algorithm logic receives once poor solution with 88% probability, thus open new
Excellent solution search path.System under test (SUT) has been divided into 13 parts by final scheme, and observation station generally covers the model at place
Node, observation redundancy is 0.30873 simultaneously, maintains relatively low expense.From the point of view of the iterative process of optimized algorithm, some moulds
Block is subdivided into its all submodules it is achieved that refinement observation, and have then provides module and part or all submodules simultaneously
Information it is achieved that the redundancy of observation information.Consider observation granularity, redundancy and expense from algorithm logic simultaneously comprehensively, with
Determine which module to be applied which type of observation program in, wherein expense limits and is placed in first place.
Claims (4)
1. monitoring point optimization dispositions method when a kind of program is run is it is characterised in that include:
Step s1: monitored program code hierarchy Model is represented, that is, is divided into disparate modules, including 1 top layer
Module m0With multiple submodule m, obtain the oriented hierarchy chart of tree, tree is preserved as module information;
Step s2: read module information, if a monitoring point deployment scheme is as initial solution, the module of stationary monitoring wanted in record;
Step s3: construction evaluates object function e (m) of monitoring point, and calculates the target function value of initial solution and preserve:
E (m)=g (m0)*σc(mx)/(1+∑r(mx)),mx∈m (1)
Wherein, mxIt is x-th submodule in module collection m, c (mx) it is submodule mxMonitoring overhead, r (mx) it is submodule mx's
Monitoring redundancy, g (m0)-1=p (m0), g (m0) it is top-level module m0Monitoring granularity, p (m0) represent is in Current observation plan
Slightly descend top-level module m0It is divided into many small parts;
Step s4: read module information, initial solution and target function value, it is simulated annealing algorithm, obtain the prison of an optimization
Measuring point deployment scheme.
2. monitoring point optimization dispositions method when a kind of program according to claim 1 is run is it is characterised in that current
The lower top-level module m of observation strategy0It is divided into many small parts and adopt p (m0) represent, p (m0) refer to a program code in monitoring
The degree being divided, is defined as follows:
Wherein, d (m) is the depth of submodule m, o (m0) it is top-level module m0In monitored submodule set, h (m) is son
The set of next straton module of module m, s (m), next (m) represent respectively determine in next straton module of submodule m monitored
Submodule and submodule set of blocks.
3. monitoring point optimization dispositions method when a kind of program according to claim 2 is run is it is characterised in that described
Monitoring redundancy r (mx) refer to that submodules at different levels remark additionally the degree of higher level's modules, are defined as follows:
Wherein, path (m') is the node set with regard to module m', and paths (m') represents all paths that slave module m' is set out
Set, it is assumed that there are module m1, and there is Module nodes set path (m1)={ m1,m2,...,md+1, each of which mk
∈h(mk-1), d is module m1Depth, k=1,2,3 ..., d+1, slave module m1The collection in all paths set out is combined into paths
(m1), path (m1)∈paths(m1);Assume there is module mxAnd my, wherein mx∈h(my), f (mx) it is in module mxThere is event
The probability of barrier, is defined as f (mx)=f (my)/next(my), next (my) representation module myNext level submodule sum.
4. monitoring point optimization dispositions method when a kind of program according to claim 1 is run is it is characterised in that described
In step s4, simulated annealing concretely comprises the following steps:
401: given initial temperature t0, primary iteration number of times i0, initial solution is the current solution of first time iteration, present energy e0For
The target function value of initial solution;
402: the module that can refine monitoring to each of current solution calculates the neighborhood that candidate is currently solved, and records
In buffering;
403: if neighborhood is not empty, execution step 404, if neighborhood is sky, simulated annealing terminates, and output is current to be solved;
404: the monitoring overhead of each of neighborhood according to current solution member's scheme, select expense minimum as new explanation;
405: calculate monitoring redundancy, monitoring granularity and the monitoring overhead of new explanation, and then the target function value of calculating new explanation, that is, newly
The energy e of solution1;
406: work as e1< e0Or work as e1≥e0, calculate Probability p r [accept]=exp (- (e1-e0)/t), pr [accept] < r, r
For an equally distributed random number between 0 to 1, then accepting new explanation is current solution, even e0=e1, adjust stationary monitoring mould
Set of blocks, deletes in neighborhood about being refined the related choosing solution of the module of monitoring, current iteration number of times i=i-1, and execution step
408;
407: work as e1≥e0, pr [accept] >=r, current iteration number of times i=i-1;
408: if i > 0, return to step 402, if i=0, make Current Temperatures t=0.95t, iterationses i=i0;
409: if t=0, simulated annealing terminates, output is current to be solved, if t ≠ 0, return to step 402.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410239663.9A CN104035865B (en) | 2014-05-30 | 2014-05-30 | Method for deployment optimization of monitoring points in operating process of programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410239663.9A CN104035865B (en) | 2014-05-30 | 2014-05-30 | Method for deployment optimization of monitoring points in operating process of programs |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104035865A CN104035865A (en) | 2014-09-10 |
CN104035865B true CN104035865B (en) | 2017-02-01 |
Family
ID=51466638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410239663.9A Expired - Fee Related CN104035865B (en) | 2014-05-30 | 2014-05-30 | Method for deployment optimization of monitoring points in operating process of programs |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104035865B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5319645A (en) * | 1990-08-07 | 1994-06-07 | Bull Hn Information Systems Italia S.P.A. | Method for debugging and testing the correctness of programs |
CN101482849A (en) * | 2009-02-24 | 2009-07-15 | 北京星网锐捷网络技术有限公司 | Test monitoring method and apparatus |
-
2014
- 2014-05-30 CN CN201410239663.9A patent/CN104035865B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5319645A (en) * | 1990-08-07 | 1994-06-07 | Bull Hn Information Systems Italia S.P.A. | Method for debugging and testing the correctness of programs |
CN101482849A (en) * | 2009-02-24 | 2009-07-15 | 北京星网锐捷网络技术有限公司 | Test monitoring method and apparatus |
Non-Patent Citations (1)
Title |
---|
基于模拟退火-单纯形法的目标函数的优化;曹治国等;《华中科技大学学报(自然科学版)》;20050630;第33卷(第6期);第67-69页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104035865A (en) | 2014-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chen et al. | Online battery state of health estimation based on Genetic Algorithm for electric and hybrid vehicle applications | |
Sankararaman et al. | Bayesian methodology for diagnosis uncertainty quantification and health monitoring | |
US20170351957A1 (en) | Automated creation of semantically-enriched diagnosis models | |
Guth et al. | What can the observation of nonzero curvature tell us? | |
CN102262191B (en) | A kind of forecasting service life of solid tantalum electrolytic capacitor | |
CN107944571A (en) | A kind of power transformer remaining life Forecasting Methodology | |
CN103620625A (en) | Information processing device and method, recording medium, and program | |
Liu et al. | Utilizing accelerated degradation and field data for life prediction of highly reliable products | |
CN104486222B (en) | Small time delay defect test critical path system of selection based on ant colony optimization algorithm | |
CN115994486A (en) | Residual life prediction method of IGBT power module based on depth time sequence migration characteristic | |
CN115438897A (en) | Industrial process product quality prediction method based on BLSTM neural network | |
CN113269041B (en) | Signal abnormality detection method applied to synchronous device | |
CN104035865B (en) | Method for deployment optimization of monitoring points in operating process of programs | |
CN108875960A (en) | A kind of learning method and system of the timing ambiguity Cognitive Map based on gradient decline | |
Marufuzzaman et al. | Hardware simulation of pattern matching and reinforcement learning to predict the user next action of smart home device usage | |
Huang et al. | A multi-variable multi-step Seq2seq networks for the state of charge estimation of lithium-ion battery | |
CN116258269A (en) | Ultra-short-term load dynamic prediction method based on load characteristic decomposition | |
Coco et al. | Sensitivity analysis of the reduced forms of the one‐diode model for photovoltaic devices | |
CN106324517A (en) | Method for predicting performance of battery of new energy automobile | |
Bakkiyaraj et al. | Reliability evaluation of composite electric power system based on Latin hypercube sampling | |
CN105930613A (en) | Equivalent modeling method for distributed power generation system | |
Shukla et al. | Development of smart component based framework for dynamic reliability analysis of nuclear safety systems | |
Liu et al. | State of health estimation of lithium-ion batteries based on multi-feature extraction and temporal convolutional network | |
Hossain et al. | Online measurement based power system reduced order model generation and validation | |
CN117647725B (en) | Aging test method and system for PCBA |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170201 |
|
CF01 | Termination of patent right due to non-payment of annual fee |