Graph Matching Using a Direct Classification of Node Attendance

合集下载

Distributed shortest path for directed graphs with negative edge lengths

Distributed shortest path for directed graphs with negative edge lengths

FI MU Copyright c 2001,FI MU May2001Distributed Shortest Paths for Directed Graphs with Negative Edge LengthsLubošBrim,IvanaˇCerná,Pavel Krˇcál and Radek PelánekFaculty of InformaticsMasaryk University BrnoBotanická68aCzech Republic{brim,cerna,xkrcal,xpelanek}@fi.muni.czAbstractA distributed algorithm for single source shortest path problem in anarbitrary directed graph which can contain negative length cycles ispresented.The new algorithm is a label-correcting one and uses anovel way for detection of negative length cycles.It works on a net-work of processors with disjoint memory that communicate via mes-sage passing.Correctness of the algorithm is proved.The algorithmis work-efficient as its worst time complexity is(n2nThis work has been partially supported by the Grant Agency of Czech Republic grants No.201/00/1023and201/00/0400.in mind is briefly discussed bellow).Whenever a graph is too large tofit into memory that is randomly accessed a memory that is sequentially ac-cessed has to be employed.This causes a bottleneck in the performance of a sequential algorithm owing to the significant amount of paging in-volved during its execution.An usual approach to deal with these practi-cal limitations is to increase the computational power(especially randomly accessed memory)by building a powerful(yet cheap)parallel computer as a network of workstations(NOWs).Individual workstations commu-nicate through message-passing interface such as MPI.From outside,a NOW appears as one single parallel computer with high computing power and huge amount of memory.We stress,that in this structure the avail-able memory is not shared but is distributed among individual processors. Hence,it is an essential goal tofind efficient distributed algorithms.The natural starting point for building a distributed algorithm is to dis-tribute a sequential one.Effective PRAM parallelisations are known for al-gorithms working with adjacency matrix graph’s representation(Floyd’s algorithms,see e.g.[Roo00])but their efficiency hardly depends on as-sumptions that all processors work synchronously and share common mem-ory.These assumptions are not valid in a distributed environment.Other algorithms(for excellent survey see[CG99]),which are based on relax-ation of graph’s edges,are inherently sequential and their parallel versions are known only for special settings of the problem.For general digraphs with non-negative edge lengths parallel algorithms are presented in[MS00, RV92,CMMS98]together with studies concerning good decompositions [HTB97].For special cases of graphs,like planar digraphs[TZ96,DKZ94], graphs with separator decomposition[Coh96]or graphs with small tree-width[CZ95]more efficient algorithms are known.Yet none of these algo-rithms are applicable on general digraphs with potential negative-length cycles.This paper presents a distributed algorithm for the SSSP problem on graphs with real edge lengths.The algorithm comes out from the Bellman-Ford algorithm and uses a novel way for detection of negative cycles,al-lowing thus to employ the full strength of parallelism.We prove the cor-rectness of the algorithm and analyse its worst-case complexity.Our motivation for this work was to develop a distributed model check-ing algorithm for linear temporal logic.Despite the development in the last years the so called state space explosion still limits practical applications of model checking techniques.We have shown that model checking prob-lem for linear temporal logic can be reduced to the negative cycle detection problem in directed graphs with arbitrary length edge[BˇCKP01].In oursearch for effective distributed algorithm for this problem we wanted to preserve its compatibility with another efficient technique dealing with the state space explosion,namely on thefly way of graph generation.Here the graph to be processed is not completely given at the beginning of the computation through its adjacency-list or adjacency-matrix representation. Instead,we are given a source vertex together with a function which for ev-ery vertex computes its adjacency-list.As successors of a vertex are deter-mined dynamically there is no need to store any information about edges permanently.Moreover,the technique allows to generate only reachable part of the graph and thus reduces the space requirements for graph repre-sentation.The structure of the paper is the following.In the next section we briefly summarise the necessary background.In Section3we present the dis-tributed algorithm and in Section4we formally prove its correctness and complexity.Experimental results are discussed in Section5.Concluding remarks are presented in Section6.2Basic Notations and DefinitionsWe are given a triple(G s l),where G=(V E)is a directed graph with n vertices and m edges,l:E R is a length function mapping edges to real-valued lengths,and s V is the source vertex.The length of the path =v0v1v k is the sum of the lengths of its constituent edges,l()= kl(v i1v i).We define the shortest path length from s to v by i=1(s v)=min l()is a path from s to v if there is such a pathotherwiseA shortest path from vertex s to vertex v is then defined as any path with length l()=(s v).If the graph G contains no cycle with negative length (negative cycle)that is reachable from the source vertex s,then for all v V the shortest path length remains well-defined and the graph is called feasible.If there is a negative cycle reachable from s,shortest paths are not well-defined as no path from s to a vertex on the cycle can be a shortest path. If there is a negative cycle on some path from s to v,we define(s v)=.The SSSP problem is to decide whether,for a given triple(G s l),the graph G is feasible and if it is then to compute the shortest paths from the source vertex s to all vertices v V.The negative cycle problem is to decide whether G is feasible.The general sequential method for solving the SSSP problem is the scan-ning method.For every vertex v,the method maintains its distance label d(v),parent vertex p(v)and status S(v)unreached labelled scanned.The subgraph G p of G induced by edges(p(v)v)for all v such that p(v)=nil, is called the parent graph.Initially for every vertex v,d(v)=p(v)=nil and S(v)=unreached.The method starts by setting d(s)=0,p(s)=nil and S(s)=labelled.At every step,the method selects a labelled vertex v and applies on it the SCAN operation(see Figure1).During scanning a vertex v the edges out-coming from v are relaxed which means that if d(u)d(v)+l(v u)then d(u)is set to d(v)+l(v u)and p(u)is set to v.The status of v is changed to scanned while the status of u is changed to labelled. If all vertices are either scanned or unreached then d gives the shortest path lengths and G p is the graph of shortest paths.proceach edge(v u)E dod(u)d(v)+l(v u)thenodFigure1:Scanning of vertex vDifferent strategies for selecting a labelled vertex to be scanned next lead to different algorithms.The optimal strategy is to scan vertices with exact distance label,i.e.vertices for which d(v)=(s v).However,efficient implementations of this idea are known only for special problem settings as graphs with non-negative length edges(Dijkstra’s algorithm[Dij59])or directed acyclic graphs(Lawler’s algorithm[Law76]).In comparison with these special,so called label-setting algorithms,algorithms for the general problem are called label-correcting.Label-correcting SSSP algorithms may select arbitrary labelled vertex to be scanned next,hence generally to re-insert the vertices for scanning until they arefinally settled(d(v)=(s v)).The well-known Bellman–Ford algo-rithm[Bel58,For56]uses FIFO strategy to select vertices.The next vertex to be scanned is removed from the head of the queue;a vertex that becomes labelled is added to the tail of the queue if it is not already in the queue. The algorithm runs in(mn)time in the worst case.For graphs where negative cycles could exist the scanning method mustbe modified in such a way,that in the presence of a negative cycle the method detects such a cycle and terminates.As in the case of scanning, various strategies are used to detect negative cycles.For our distributed al-gorithm we have used the walk to root cycle detection strategy.This strategy is based on the following fact(see e.g.[CG99]).Fact1Any cycle in the parent graph G p has negative length.If G p is acyclic,then its edges form a tree rooted at s.The walk to root method tests whether G p is acyclic.Suppose the scan-ning operation applies to an edge(v u)(i.e.d(u)d(v)+l(v u))and the parent graph G p is acyclic.This operation will create a cycle in G p if and only if u is an ancestor of v in the current tree.Before applying the opera-tion,we follow the parent pointers from v until we reach u or s.If we stop at u we have found a negative cycle;otherwise,the scanning operation does not create a cycle.The walk to root method gives immediate cycle detection and can be eas-ily combined with various scanning heuristics.However,since the path to the root can be long,the cost of applying the scanning operation to an edge becomes(n)instead of(1).In order to optimise the overall computa-tional complexity we propose to use amortisation to pay the cost of check-ing G p for cycles.More precisely,the parent graph G p is tested only after the underlying shortest paths algorithm performsΩ(n)work.The running time is thus increased only by a constant factor.However,a cycle in G p can appear after a relaxation of some edge and disappear after some later relaxation(see Figure2).The correctness of the amortised strategy is based on the following fact(see e.g.[CG99]).Fact2If G contains a negative cycle reachable from s,then after afinite number of scanning operation G p always has a cycle.Another drawback of the amortised strategy is the fact that even if the relaxation of an edge(v u)does not create a cycle in G p,there can be a cycle on the way from v to s.The particular modification of the walk to root strategy allowing to cope with this situation is presented in the next section.We stress that the presented sequential approaches to the SSSP problem and especially to the negative cycle detection problem are not the only ones -for an excellent survey see[CG99].Those presented above are in our opinion the best starting points for developing a distributed algorithm.Figure2:Disappearing cycles in the parent graph.(a)Part of the input graph.Vertex a has distance label2.(b)G p after scanning vertices a b c.(c) Scanning of the vertex d.(d)The distance label of the vertex a is decreased to3and the vertex a is scanned once more.3Distributed SSSP AlgorithmIn this section we describe a new algorithm that works in a distributed en-vironment and solves the SSSP problem for arbitrary directed graphs that can contain negative cycles.The algorithm runs on a network of P proces-sors which communicate through some message-passing interface.One of the processors is distinguished as the Manager processor and is responsible for starting and terminating the computation.All processors perform the same program.The set of vertices is supposed to be a priori divided into several disjoint subsets.The number of subsets corresponds to the num-ber of processors involved in the computation.The partition of vertices is given by the function owner which assigns a vertex to a processor.Each processor is responsible for its own part of the graph G determined by the owned subset of vertices.Good partition of vertices among processor can evidently affect the overall computational complexity but its construction is not a subject of our interest in this paper.The function successor gives for a vertex its adjacency list.It allows to construct the graph on thefly(see Sec-tion1).Each processor knows the functions owner and successor.Moreover, we suppose that some total linear order on vertices is given(induced e.g.from the numerical representation of vertices).The pseudo-code of the distributed algorithm is presented below.Its main idea can be summarised as follows.Each processor performs repeat-edly the basic scanning operation on all owned vertices with labelled status (the MAIN procedure).Such vertices are maintained in the processor’s lo-cal queue Q.To relax a cross-edge(v u),where v and u belong to different processors,a message is sent to the owner of u.In each iteration the pro-cessor atfirst handles messages received from other processors.Pseudo-Code of the Distributed Algorithm DSP1proc=Manager then Q:=finotfinished do5endSCAN(v)2foreach3ifUPDATE(u v d(v)+l(v u))5else od1procd(u)t then walk(u)=nil3then owner(v)=4thensend_message(owner(v)“do push(Q v)”)fid(u):=t;p(u):=v;7if WTR([u stamp]u);8stamp++fiu Q thenfi10endWTR([origin stamp]at)Walk To Root2done:=false;3while4if6if10ifREM([origin stamp]origin)12else14done:=true;15(walk(at)=[nil nil])(walk(at)[origin stamp])16walk(at):=[origin stamp];17at:=p(at)18fi20send_message(owner(at)“start WTR([origin stamp]at)”);21done:=true22fi24endREM([origin stamp]at)Remove Marks2done:=false;3while4ififwalk(at):=[nil nil];7at:=p(at)8else10else12odFor the detection of a negative cycle in the graph G the procedure WTR is used in an amortised manner.The processor starts the detection only after it has relaxed n edges.WTR tries to identify a cycle in the parent graph by following the parent pointers from a current vertex.As the relaxation of edges is performed in parallel and the cycle detec-tion is not initiated after every change in the parent graph,it can happen that even if the relaxation of an edge(v u)does not create a cycle in the par-ent graph G p there can be a cycle in G p on the way from v to the source s(see Figure3).In order to recognise such a cycle we introduce for each vertex x a new variable walk(x).Its initial value is nil.Once the WTR procedure started in a vertex(let us call this vertex origin)passes through a vertex v,the value of the variable walk(v)is set to origin(we say that the vertex v has been marked).Reaching a vertex already marked with the value ori-gin clearly indicates a cycle in the parent graph.However,it can happen that more than one WTR procedure is active at a time.Consequently WTR initiated in origin can get to a vertex marked with a value different fromFigure3:Cycle on the path to the sourceorigin indicating that some other WTR is active.Such a collision is resolved in favour of the procedure which has started in the higher vertex(with re-spect to the linear ordering on vertices).WTR started in the lower vertex is terminated.Another situation that could happen is that WTR started in origin gets to a vertex already marked with origin but this mark has been introduced by some previous WTR initiated from origin.This would lead to a detection of a false cycle(see Figure4).To guarantee correctness even in this special situation we in fact mark every vertex with two values:ori-gin and stamp(the initial value of walk(x)beeing[nil nil]).The value stamp is equal to the number of WTR procedures initiated by the particular pro-cessor.This value allows to distinguish among vertices marked by current and some previous WTR initiated from the same vertex.Let us summarise the four possible situations which can happen in cycle detection.the procedure WTR reaches the source vertex s(line9in WTR).A neg-ative cycle has not been detected and the REM procedure is started.the procedure WTR reaches a vertex marked with the same origin and the same stamp(line6).This indicates that a negative cycle has been recognised.The cycle can be easily reconstructed by following the parent edges.If necessary,the path connecting the cycle with the source vertex can be found using a suitable distributed reachability algorithm.the procedure WTR reaches a non-marked vertex,a vertex already marked with lower origin or a vertex marked with the same origin butFigure4:Detection of a false cycle.Vertices s x1x2x3x4have been marked by the value x.After that the parent pointer of x has been changed to x1and a new WTR is started from the vertex x.lower stamp(line15).The vertex is marked with[origin stamp]and the walk follows the parent edge.the procedure WTR reaches a vertex already marked with higher ori-gin(line9).The walk is stopped and the REM procedure is started. Whenever WTR has to continue in a non-local vertex a request to the vertex owner is sent and the local walk isfinished.Once the WTR procedurefinishes without detecting a cycle,the marks introduced by it must be removed(i.e.the value of the variable walk is reset to[nil nil]).A non-removed mark y can prevent detection of a cycle by WTR which has started in a vertex x where x y.The REM procedure is responsible for removing marks.Marks to be removed are found with the help of parent edges.This is why the updat-ing of a marked vertex is postponed(line2of the procedure UPDATE). The REM procedure follows the path in the parent graph in a similar way as WTR does.REM starts from the origin and terminates after reaching a source vertex or a vertex with different mark.The distributed algorithm terminates when either all queues of all pro-cessors are empty and there are no pending messages,or a negative cycle has been detected.The Manager process is used to detect termination andtofinish the algorithm by sending a termination signal to all the processors. 4Correctness and ComplexityThe formal proof of the correctness of the distributed algorithm comes out from several lemmas.Some of the arguments are similar to that for the sequential algorithms(see e.g.[CLR90]).The main difference in the dis-tributed case is that vertices are scanned in parallel,hence the edges can be relaxed concurrently.For the correctness argumentation we will suppose a fixed but arbitrary linear ordering of concurrently performed steps.Lemma1Let G be a given graph.Then d(v)(s v)for all v V and this invariant is maintained over any sequence of relaxations performed on the graph G.Moreover,once d(v)achieves its lower bound(s v),it never changes. Proof:The invariant d(v)(s v)is true after the initialisation performed on each processor.We shall use the proof by contradiction to show that the invariant is maintained over any linearly ordered sequence of relaxation steps performed on G.Suppose that v V is thefirst vertex(in the sense of linear ordering of relaxation steps)for which d(v)(s v).Then there is a vertex u V u=v(in fact u=p(v))such thatd(u)+l(u v)=d(v)(s v)(s u)+l(u v)which implies that d(u)(s u).Then we have a contradiction,because the relaxation of the edge(u v)does not change the value d(u)and v was the first vertex violating the invariant.To see that the value of d(v)never changes once d(v)=(s v)note,that relaxation steps do not increase d values.was the relaxation of the edge(v k1v k)that created the cycle in G p.Each vertex on the cycle c is reachable from s.We show that c is a negative cycle, thereby contradicting the assumption that G contains no negative cycles reachable from s.Before relaxing the edge(v k1v k)we had d(v i)d(v i1)+ l(v i1v i)for all i=12k1.Because p(v k)has changed,immediately beforehand we also have the strict inequality d(v k)d(v k1)+l(v k1v k)from which we obtainki=1d(v i)ki=1(d(v i1)+l(v i1v i))=ki=1d(v i1)+ki=1l(v i1v i)But ki=1d(v i)=k i=1d(v i1)since each vertex in the cycle c appears ex-actly once in each summation.This implies0k i=1l(v i1v i).Thus the sum of lengths around the cycle c is negative,thereby providing the desired contradiction.To show that G p forms a rooted tree with root s,it suffices to prove that for each vertex v V p,there is a unique simple path from s to v in G p.This follows directly from the definition of the parent graph and the way it is constructed in the UPDATE procedure.Lemma4Let G contains no reachable negative cycles.Then,at the termination of the algorithm,we have d(v)=(s v)(d(v)is exact)for all vertices v V and the parent graph G p is a shortest-path tree rooted at s.Proof:Supposefirst that v V is reachable from s.According to Lemma2 the graph G p forms at the termination of the algorithm a rooted tree with root s.Let us prove the assertion by induction on the depth of a vertex vin this tree.For the basis we have d(s)=(s s)=0after initialisation and by Lemma1this equality is maintained thereafter.For the inductive step, we assume that d(u)=(s u)for every vertex of depth at most i1.Let v be a vertex of depth i and let u=p(v).Obviously the depth of u is i1. Once the value d(u)is settled to(s u)the vertex u is pushed into the queue by the procedure UPDATE.Consequently,the edge(u v)is relaxed and by Lemma3we conclude that d(v)is settled to(s v)and it remains true for the rest of the computation.Let v V is not reachable from s.Then there is no path from s to v,d(v) is never updated,and keeps its initial value.Therefore d(v)==(s v).It remains to prove that G p is a shortest-path tree,i.e.that for each v V the unique simple path s;v in G p is a shortest path from s to v in G. Let the path be=v0v1v k,where v0=s and v k=v.We know that d(v i1)+l(v i1v i)=d(v)whenever p(v i)=v i1.At the terminationof the algorithm we have d(v i)=(s v i)and therefore l(v i1v i)=(s v i) (s v i1).Summing the lengths along the path yieldsl()=ki=1l(v i1v i)=ki=1((s v i)(s v i1))=(s v k)(s v0)=(s v k)We conclude that l()=(s v k)and thus is a shortest path from s to v=v k.Lemma5If G contains a reachable negative cycle,then after thefirst vertex up-date of thefinal pass,G p always has a cycle.Proof:Let v be a vertex which distance label is updated as thefirst in the final pass.Since d(v)is non-increasing,the new value of d(v)is less than the length of a shortest simple path from s to v.Suppose we start at v and follow the parent pointers.If wefind a cycle of parent pointers in this process,we are done.Otherwise we reach s and d(s)=0.This indicates the existence of a simple path with l()=d(v)which contradicts our assumption about v. Lemma7If G contains a reachable negative cycle,then some WTR procedure detects a cycle.Proof:Suppose the distributed algorithm is in thefinal pass and no cycle has been detected up to this moment.Arguments similar to that used in the proof of Lemma5manifest that from every vertex which distance label has been updated a cycle in G p is reachable.The WTR procedure is called on line7of UPDATE procedure for some u B and stamp i.WTR backtracks the parent graph systematically.The procedure can“meet”another walk to root initiated concurrently for an origin z,i.e.it gets to a vertex already marked by[z j].Then for u z or u=z i=j the marks of the second walk to root are overwritten(line15)by[u i].Otherwise the current walk to root is terminated,its marks are removed by the procedure REM and the other walk continues.However,in such a case the cycle in the parent graph is the same for both walks.We now have a similar situation as before for the walk started at the origin z u.As the number of vertices isfinite,walk to root with highest priority cannot be terminated by another one,detecting thus the cycle.Theorem1(Correctness of DSP)If G contains no negative cycles that are reach-able from the source vertex s,then the algorithm terminates,d(v)=(s v)for all vertices v V,and the parent graph G p is a shortest-path tree rooted at s.If G does contain a negative cycle reachable from s,then the algorithm terminates and reports“negative cycle found”.ComplexityWe use a simple model[GS93,CKP+93]to analyse the performance of the DSP algorithm.We view the distributed algorithm as a sequence of local computations interleaved with communication steps,where we allow com-putation and communication to overlap.We define the computation time T comp(n p)as the maximum time it takes a processor to perform all the local computation steps.Theorem2(Computational Complexity of DSP)Let the input graph with n vertices is distributed over P processors each of which owns(nP).Proof:The analysis of the time complexity proceeds in two steps.Every processor performs two basic operations:relaxation of edges and marking of vertices.First of all we state the time complexity of relaxation operations and then proceed by analysing the complexity of marking operations.Re-call that the computation can be divided into at most n+1passes.At the beginning of each pass(with the exception of thefinal one)every proces-sor has its own queue of size(nP ).In thepresence of a negative cycle in the input graph G the existence of a cycle in G p is guaranteed in thefinal pass(Lemma5).After that it takes at most n relaxation operations before a new WTR procedure is initiated.According to Lemma7this procedure must detect the presence of a negative cycle.Now,let us analyse the complexity of the WTR and the REM proce-dures.The negative cycle search is performed(on various processors)se-quentially and its time complexity is proportional to the length of the sear-ched path.On the searched path WTR cannot enter a vertex more than once as entering a vertex with the same mark indicates the presence of a cycle and causes the termination of the whole computation.Consequently,every WTR procedure takes at most(n)time.The complexity of the sub-sequent removing of marks is asymptotically the same.Every processor initiates the WTR procedure only when it has done n relaxation operations. Therefore the time complexity of WTR and REM is amortised over the time complexity of relaxation operations.The implementation has been done in C++and the experiments have been performed on a cluster of eight366MHz Pentium PC Linux work-stations with128Mbytes of RAM each interconnected with a fast100Mbps Ethernet and using Message Passing Interface(MPI)library.In the imple-mentation of the DSP algorithm we have employed the following optimi-sation scheme.For more efficient communication between processors we do not send separate messages.The messages are sent in packets of pre-specified size.The optimal size of a packet depends on the network con-nection and the underlying communication structure.In our case we have achieved the best results for packets of size around100single messages.DSPCross–edges Time Messages 40398793760:11130109431:131108 69693223872201:315331790126:4648577 77748818872522:02187978649:0425396 18699220:0520732880:37555 469561080:0918639050:513435 400013902620:1783967931:482489 8000020422121:39111141157:1998686 947200133384629:49 Random,with cycle11694381:20862(12)945781686160:1326992316:114500Table1:Summary of experimental resultsWe performed several sets of tests on different instances in order to ver-ify how fast is the algorithm in practice,i.e.beyond its theoretical charac-terisation.Our experiments were performed on two kinds of systems given by random graphs and generated graphs.Graphs were generated using a simple specification language and an LTL formula.In both cases we tested graphs with and without cycles to model faulty and correct behaviour of systems.As our real example we tested the parametrised Dining Philoso-phers problem.Each instance is characterised by the number of vertices and the number of cross-edges.The number of cross-edges significantly influences the overall performance of distributed algorithms.For each experiment we report the average time in minutes and the number of sent messages(communication)as the main metrics.Table1 summarises the achieved results.The experiments lead basically to the following two conclusions: the DSP algorithm is comparable with the NDFS one on all graphs.the DSP algorithm is significantly better on graphs without negative cycles.The experiments show that in spite of worse theoretical worst time com-plexity of the DSP algorithm its behaviour in practice can outperform the theoretically better NDFS one.This is due to the number of communi-cations which has essential impact on the resulting time.In the DSP al-gorithm messages can be grouped into packets and sent together.It is a general experience that the time needed for delivering t single messages is much higher than the time needed for delivering those messages grouped into one packet.On the other hand,the NDFS algorithm does not admit such a grouping.Another disadvantage of NDFS is that during the pass-ing of messages all the processors are idle,while in the DSP algorithm the computation can continue immediately after sending a st but not least,in NDFS all but one processor are idle whereas in DSP all can compute concurrently.We notice that all mentioned advantages of the DSP algorithm demonstrate themselves especially for systems without cycles where the whole graph has to be searched.This is in fact the desired prop-erty of our algorithm as the state explosion demonstrates itself just in these cases.Both algorithms perform equally well on graphs with cycles.We have accomplished yet another set of tests(see Table2)in order to validate the scalability of the DSP algorithm.The tests confirm that it scales well,i.e.the overall time needed for treating a graph is decreasing as the number of involved processors is increased.。

arulesViz 1.5-2 可视化关联规则和频繁项集的 R 包说明书

arulesViz 1.5-2 可视化关联规则和频繁项集的 R 包说明书

Package‘arulesViz’March7,2023Version1.5-2Date2023-03-07Title Visualizing Association Rules and Frequent ItemsetsDepends arules(>=1.6.0)Imports graphics,methods,utils,grDevices,stats,seriation,grid,vcd,igraph,scatterplot3d,ggplot2,ggraph,tibble,tidyr,dplyr,DT,plotly,visNetworkSuggests datasets,graph,Rgraphviz,tidygraph,shiny,shinythemes,htmlwidgetsDescription Extends package'arules'with various visualization techniques for associa-tion rules and itemsets.The package also includes several interactive visualizations for rule ex-ploration.Michael Hahsler(2017)<doi:10.32614/RJ-2017-047>.License GPL-3URL https:///mhahsler/arulesVizBugReports https:///mhahsler/arulesViz/issuesCopyright(C)2021Michael HahslerNeedsCompilation noAuthor Michael Hahsler[aut,cre,cph](<https:///0000-0003-2716-1405>),Giallanza Tyler[ctb],Sudheer Chelluboina[ctb]Maintainer Michael Hahsler<*****************.edu>Repository CRANDate/Publication2023-03-0716:50:02UTCR topics documented:associations2igraph (2)inspectDT (3)plot (4)ruleExplorer (11)rules2matrix (12)12associations2igraph Index15 associations2igraph Convert rules or itemsets into a graphDescriptionFunction to convert associations(rules,itemsets)into a igraph object and saves the graph in different formats(e.g.,GraphML,dimacs,dot).Usageassociations2igraph(x,associationsAsNodes=TRUE)saveAsGraph(x,file,format="graphml",...)Argumentsx an object of class"rules"or"itemsets".associationsAsNodesshould associations be translated into nodes or represented by edges?filefile name.formatfile format(e.g.,"edgelist","graphml","dimacs","gml","dot").See write.graph in package igraph....further arguments are passed on to associations2igraph().DetailsAssociations are represented as nodes:All items in the associations are connected to the association node.For itemsets,the wdges are undirected,for rules,the edges are directed towards the rhsWhen associations are represented as edges:For rules,each item in the LHS is connected with a directed edge to the item in the RHS.For itemsets,undirected edges for each pair of item in the itemset are created.Valueassociations2igraph returns an igraph object.Author(s)Michael HahslerSee Alsoplot,write.graph in igraphinspectDT3Examplesdata("Groceries")rules<-apriori(Groceries,parameter=list(support=0.01,confidence=0.5))#convert rules into a graph with rules as nodeslibrary("igraph")g<-associations2igraph(rules)gplot(g)#convert the graph into a tidygraphlibrary("tidygraph")as_tbl_graph(g)#convert the generating itemsets of the rules into a graph with itemsets as edgesitemsets<-generatingItemsets(rules)itemsetsg<-associations2igraph(itemsets,associationsAsNodes=FALSE)gplot(g,layout=layout_in_circle)#save rules as a graph so they can be visualized using external toolssaveAsGraph(rules,"rules.graphml")##clean upunlink("rules.graphml")inspectDT Inspect Associations Interactively Using datatableDescriptionUses datatable to create a HTML table widget using the DataTables library.Rules can be interac-tivelyfiltered and sorted.UsageinspectDT(x,...)Argumentsx an object of class"rules"or"itemsets"....additional arguments.precision controls the precision used to print the quality measures(defaults to2).All other arguments are passed on to datatable inpackage DT.4plot ValueA datatable htmlwidget.Author(s)Michael HahslerReferencesHahsler M(2017).arulesViz:Interactive Visualization of Association Rules with R.R Journal, 9(2):163-175.ISSN2073-4859.doi:10.32614/RJ2017047.See Alsodatatable in DT.Examples##Not run:data(Groceries)rules<-apriori(Groceries,parameter=list(support=0.005,confidence=0.5))rulesinspectDT(rules)#for more control on the data table,you can used DATAFRAME()to convert the rules.rules_df<-DATAFRAME(rules,setStart= ,setEnd= ,itemSep= + )rules_df$count<-NULLhead(rules_df)inspectDT(rules_df)#Save HTML widget as web pagep<-inspectDT(rules)htmlwidgets::saveWidget(p,"arules.html",selfcontained=FALSE)#Note:self-contained seems to make the browser slow.#inspect the widgetbrowseURL("arules.html")#clean upunlink(c("arules.html","arules_files"),recursive=TRUE)##End(Not run)plot Visualize Association Rules and Itemsetsplot5DescriptionMethods(S3)to visualize association rules and itemsets.Implemented are several popular visu-alization methods including scatter plots with shading(two-key plots),graph based visualizations, doubledecker plots,etc.Many plots can use different rendering engines including static standard plots(using base plots, ggplot2,grid),standard plots with interactive manipulation and interactive HTML widget-based visualizations.Usage##S3method for class rulesplot(x,method=NULL,measure="support",shading="lift",limit=NULL, interactive=NULL,engine="default",data=NULL,control=NULL,...)##S3method for class itemsetsplot(x,method=NULL,measure="support",shading=NULL,limit=NULL, interactive=NULL,engine="default",data=NULL,control=NULL,...)Argumentsx an object of class"rules"or"itemsets".method a string indicating the visualization method.Methods for rules include"scat-terplot","two-key plot","matrix","grouped matrix","graph","paracoord",etc.Specify"help"to get a complete list of available methods.Note that some meth-ods may only be available for rules or itemsets.measure measure(s)of interestingness(e.g.,"support","confidence","lift","order")used in the visualization.Some visualization methods need one measure,others takea vector with two measures(e.g.,scatterplot).In some plots(e.g.,graphs)NAcan be used to suppress using a measure.shading measure of interestingness used for the color of the points/arrows/nodes(e.g., "support","confidence","lift").The default is"lift".NULL can be often used tosuppress shading.limit A limit on the number of associations displayed.The top limit associations according to the measure specified in shading are chosen.interactive deprecated.See parameter engine below.engine a string indicating the plotting engine used to render the plot.The"default"engine uses(mostly)ggplot2.Other engines include"base"(base R plots),"grid","interactive","plotly","visnetwork","igraph","graphviz",and"html-widget"(which can be embedded in RMarkdown).Note that not all enginesare available for all methods.Specify"help"to get a complete list of availableengines for the selected visualization method.data the dataset(class"transactions")used to generate the rules/itemsets.Only"mo-saic"and"doubledecker"require the original data.control a list of control parameters for the plot.The available control parameters depend on the used visualization method and engine.Specify"help"to get a completelist of available control parameters and their default values....Further arguments are added for convenience to the control list.6plotDetailsMost visualization techniques are described by Bruzzese and Davino(2008),however,we added more color shading,reordering and interactive features(see Hahsler,2017).Many visualization methods take extra parameters as the control parameter list.Although,we have tried to keep control parameters consistent,the available control parameters vary from visualization method to visualization method.You can specift"help"for method,engine,or control to get a list of available settings.Note on HTML widgets:HTML widgets tend to get very slow or unresponsive for too many rules.To prevent this situation,the control parameter max sets a limit,and the user is warned if the limit is reached.The following visualization method are available:"scatterplot","two-key plot"This visualization method draws a two dimensional scatterplot with different measures of interestingness(parameter"measure")on the axes and a third measure (parameter"shading")is represented by the color of the points.There is a special value for shading called"order"which produces a two-key plot where the color of the points represents the length(order)of the rule."matrix"Arranges the association rules as a matrix with the itemsets in the antecedents on one axis and the itemsets in the consequents on the other.The measure of interestingness(first element of measure)is either visualized by a color(darker means a higher value for the measure)or as the height of a bar(engine"3d").The control parameter reorder takes the values"none", "measure","support/confidence",or"similarity"and can be used to reorder LHS and RHS of the rules differntly.The default reordering average measure(typically lift)pushingthe rules with the highest lift value to the top-left corner of the plot."grouped matrix"Grouped matrix-based visualization(Hahsler and Karpienko,2016;Hahsler 2016).Antecedents(columns)in the matrix are grouped using clustering.Groups are rep-resented by the most interesting item(highest ratio of support in the group to support in all rules)in the group.Balloons in the matrix are used to represent with what consequent the antecedents are connected.Interactive manipulations(zooming into groups and identifying rules)are available.The list of control parameters for this method includes:"main"plot title"k"number of antecedent groups(default:20)"rhs_max"maximal number of RHSs to show.The rest are suppressed.(default:10)"lhs_items"number of LHS items shown(default:2)"aggr.fun"aggregation function can be any function computing a scalar from a vector(e.g., min,mean(default),median,sum,max).It is also used to reorder the balloons in the plot."col"color palette(default is100heat colors.)"graph"Represents the rules(or itemsets)as a graph with items as labeled vertices,and rules(or itemsets)represented as vertices connected to items using arrows.For rules,the LHS items are connected with arrows pointing to the vertex representing the rule and the RHS has an arrow pointing to the item."doubledecker","mosaic"Represents a single rule as a doubledecker or mosaic plot.Parameter data has to be specified to compute the needed contingency table.No interactive version is available.plot7 "paracoord"Represents the rules(or itemsets)as a parallel coordinate plot.Currently there is no interactive version available.ValueSeveral interactive plots return a set of selected rules/itemsets.Other plots might return other data structures.For example,graph-based plots return the graph(invisibly).Engine"htmlwidget"always returns an object of class htmlwidget.Author(s)Michael Hahsler and Sudheer Chelluboina.Some visualizations are based on the implementation by Martin V odenicharov.ReferencesHahsler M(2017).arulesViz:Interactive Visualization of Association Rules with R.R Journal, 9(2):163-175.ISSN2073-4859.doi:10.32614/RJ2017047.Bruzzese,D.and Davino,C.(2008),Visual Mining of Association Rules,in Visual Data Mining: Theory,Techniques and Tools for Visual Analytics,Springer-Verlag,pp.103-122.doi:10.1007/ 9783540710806Hahsler,M.and Karpienko,R.(2016),Visualizing Association Rules in Hierarchical Groups.Jour-nal of Business Economics,87(3):17-335.doi:10.1007/s1157301608228Hahsler,M.(2016),Grouping association rules using lift.In C.Iyigun,R.Moghaddess,and A.Oztekin,editors,11th INFORMS Workshop on Data Mining and Decision Analytics(DM-DA 2016).See Alsoscatterplot3d in scatterplot3d,plot.igraph and tkplot in igraph,seriate in seriationExamples#Note:To speed example execution,not all examples are not run when using example("plot").#Use example("plot",run.dontrun=TRUE)to run all examples.data(Groceries)rules<-apriori(Groceries,parameter=list(support=0.001,confidence=0.8))rules##Getting help#There are many method,plotting engines and all of them have different control e #"help"to get help.List available methods for the object rules:plot(rules,method="help")#List the available engines for method"scatterplot"plot(rules,method="scatterplot",engine="help")##Not run:#List control parameters for scatterplot with engine"ggplot2"8plot plot(rules,method="scatterplot",engine="ggplot2",control="help")##End(Not run)##Scatter plot#Display a scatter plot using two quality measuresplot(rules)#Scatter plot with custom measures and limiting the plot to the100with the#largest value for for the shading measure.plot(rules,measure=c("support","lift"),shading="confidence",limit=100)##Not run:#Custom color scale,labels,theme and no title(ggplot2)library(ggplot2)plot(rules,engine="ggplot2",main=NULL,limit=100)+scale_color_gradient2(low="red",mid="gray90",high="blue",midpoint=1,limits=c(0,12))+labs(x="Supp.",y="Conf.",color="Lift")+theme_classic()#Interactive scatter plot using the grid engine(selected rules are returned)if(interactive()){sel<-plot(rules,engine="interactive")#Create a html widget for interactive visualization(uses plotly)plot(rules,engine="htmlwidget")}##End(Not run)#Two-key plot(a scatter plot with shading="order")plot(rules,method="two-key plot",limit=100)##Matrix shading#Display rules as a matrix with RHS itemsets as rows and LHS itemsets as columns#works better with small sets of rulessubrules<-subset(rules,lift>5)subrules#2D matrix with shading(ggplot2).The LHS and RHS are reordered so#that rules with similar lift are displayed close to each other.plot(subrules,method="matrix")##Not run:#Interactive matrix plot#*Engine interactive:identify rules by clicking on them(click outside to end)#*Engine htmlwidget:hoover over rules to identifyif(interactive()){plot(subrules,method="matrix",engine="interactive")plot(subrules,method="matrix",engine="htmlwidget")plot9 }##End(Not run)##Grouped matrix plot#Default engine is ggplot2plot(rules,method="grouped matrix",k=5)##Not run:#Create a htmlwidgetplot(rules,method="grouped matrix",engine="htmlwidget")#Interactive grouped matrix plotif(interactive()){sel<-plot(rules,method="grouped matrix",engine="interactive")}##End(Not run)##Graph representation#Default engine is ggplot2with ggraph.Associations are represented as nodes.#We limit the number of rules to the10with the larges#lift(measure used for shading)plot(subrules,method="graph",limit=10)##Not run:#Circular layout(see?ggraph for the meaning of the arguments)plot(subrules,method="graph",layout= linear ,circular=TRUE,limit=10)#Use igraph layouts(algorithm is passes on as...to ggraph)plot(subrules,method="graph",layout= igraph ,ggraphdots=list(algorithm= graphopt ,spring.const=1,mass=10),limit=10)#Specify edge and node representationlibrary(ggplot2)plot(subrules,method="graph",control=list(edges=ggraph::geom_edge_link(end_cap=ggraph::circle(4,"mm"),start_cap=ggraph::circle(4,"mm"),color="black",arrow=arrow(length=unit(2,"mm"),angle=20,type="closed"),alpha=.2),nodes=ggraph::geom_node_point(aes_string(size="support",color="lift")),nodetext=ggraph::geom_node_label(aes_string(label="label"),alpha=.8,repel=TRUE) ),limit=10)+scale_color_gradient(low="yellow",high="red")+scale_size(range=c(2,10))#ggplot also can represent associations as edges.Here a rules is represented as a set of #arrows going from the LHS items to the RHS item.10plot plot(subrules,method="graph",asEdges=TRUE,limit=10)plot(subrules,method="graph",asEdges=TRUE,circular=FALSE,limit=10)##End(Not run)#Engine igraphplot(subrules,method="graph",engine="igraph",limit=10)plot(subrules,method="graph",engine="igraph",nodeCol=grey.colors(10),edgeCol=grey(.7),alpha=1,limit=10)#Use plot_options to alter any aspect of the graph#(see:https:///r/doc/mon.html)plot(subrules,method="graph",engine="igraph",plot_options=list(edge.lty=2,bel.cex=.6,margin=c(.1,.1,.1,.1),asp=.5),limit=10)#igraph layout generators can be used(see?igraph::layout_)plot(subrules,method="graph",engine="igraph",layout=igraph::in_circle(),limit=10)##Not run:#Graph rendering using engine graphvizplot(subrules,method="graph",engine="graphviz",limit=10)if(interactive()){#Default interactive plot(using igraph s tkplot)plot(subrules,method="graph",engine="interactive",limit=10)#Interactive graph as a html widget(using igraph layout)plot(subrules,method="graph",engine="htmlwidget",limit=10)plot(subrules,method="graph",engine="htmlwidget",igraphLayout="layout_in_circle",limit=10)}##End(Not run)##Parallel coordinates plotplot(subrules,method="paracoord",limit=10)##Doubledecker and mosaic plot#Uses functions in package vcd#Notes:doubledecker and mosaic plots only visualize a single rule#and the transaction set is needed.oneRule<-sample(rules,1)inspect(oneRule)plot(oneRule,method="doubledecker",data=Groceries)##Visualizing itemsetsdata(Groceries)itemsets<-eclat(Groceries,parameter=list(support=0.02,minlen=2))ruleExplorer11#default is a scatter plot with ggplot2plot(itemsets)plot(itemsets,method="graph",limit=10)##Not run:plot(itemsets,method="graph",asEdges=TRUE,limit=10)plot(itemsets,method="graph",asEdges=TRUE,circular=FALSE,limit=10)+theme(plot.margin=margin(10,10,30,20,"mm"))##End(Not run)plot(itemsets,method="paracoord",alpha=.5,limit=10)#Add more quality measures to use for the scatter plotquality(itemsets)<-interestMeasure(itemsets,transactions=Groceries)head(quality(itemsets))plot(itemsets,measure=c("support","allConfidence"),shading="lift")##Not run:#Save HTML widget as web pagep<-plot(rules,engine="html")htmlwidgets::saveWidget(p,"arules.html",selfcontained=FALSE)#Note:self-contained seems to make the browser slow.#inspect the widgetbrowseURL("arules.html")#clean upunlink(c("arules.html","arules_files"),recursive=TRUE)##End(Not run)ruleExplorer Explore Association Rules InteractivelyDescriptionExplore association rules using interactive manipulations and visualization using shiny.UsageruleExplorer(x,sidebarWidth=2,graphHeight= 600px )Argumentsx a set of rules,a transactions object or a data.frame.sidebarWidth width of the sidebar as a number between0(=0%of the display width)and12 (=100%of the display width).graphHeight height of the plots in pixels.Increase if you have a larger/higher resolution display.Valuereturns a shiny app.Author(s)Tyler Giallanza and Michael Hahsler.Adapted from functions originally created by Andrew Brooks.See https:///brooksandrew/Rsenal for the original code.ReferencesHahsler M(2017).arulesViz:Interactive Visualization of Association Rules with R.R Journal, 9(2):163-175.ISSN2073-4859.doi:10.32614/RJ2017047.See Alsoplot with engine="html",inspectDT,apriori.Examples##Not run:data(Groceries)#explore pre-mined rulesrules<-apriori(Groceries,parameter=list(support=0.001,confidence=0.8))rulesruleExplorer(rules)#mine and explore rules on the flydata(iris)ruleExplorer(iris)##End(Not run)rules2matrix Convert association rules into a matrixDescriptionConverts a set of association rules into a matrix with unique LHS itemsets as columns and unique RHS itemsets as rows.The matrix cells contain a quality measure.The LHS itemsets can be grouped.Usagerules2matrix(rules,measure="support",reorder="measure",...)rules2groupedMatrix(rules,measure="lift",measure2="support",k=10,aggr.fun=mean,lhs_label_items=2)Argumentsrules a rules object.measure quality measure put in the matrixreorder reorder rows and columns?Possible methods are:"none","measure"(default), "support/confidence","similarity".measure2second quality measure(organized in the same way as measure).k number of LHS itemset groups.aggr.fun function to aggregate the quality measure for groups.lhs_label_itemsnumber of top items used to name LHS itemset groups(columns)....passed on to DATAFRAME.Valuerules2matrix returns a matrix with quality values.rules2groupedMatrix returns a list with elementsm the grouped matrix for measure.m2the grouped matrix for measure2.clustering_rulesvector with group assignment for each rule.Author(s)Michael HahslerReferencesMichael Hahsler and Radoslaw Karpienko.Visualizing association rules in hierarchical groups.Journal of Business Economics,87(3):317–335,May2016.doi:10.1007/s1157301608228.See Alsoplot for rules using method= matrix and method= grouped matrix .Examplesdata(Groceries)rules<-apriori(Groceries,parameter=list(support=0.001,confidence=0.8))rules##Matrixm<-rules2matrix(rules[1:10],measure="lift")mplot(rules[1:10],method="matrix")##Grouped matrix#create a matrix with LHSs grouped in k=10groupsgm<-rules2groupedMatrix(rules,k=10)gm$m#number of rules per grouptable(gm$clustering_rules)#get rules for group1inspect(rules[gm$clustering_rules==1])#create the corresponding grouped matrix plot by passing the grouped matrix as the groups parameter plot(rules,method="grouped matrix",groups=gm)Index∗fileassociations2igraph,2∗hplotplot,4∗printinspectDT,3apriori,12associations2igraph,2DATAFRAME,13datatable,4datatable(inspectDT),3explore(ruleExplorer),11guide_edge_colourbar(plot),4igraph(associations2igraph),2inspect(inspectDT),3inspectDT,3,12plot,2,4,12,13plot.igraph,7plotly(plot),4ruleExplorer,11rules2groupedMatrix(rules2matrix),12 rules2matrix,12saveAsGraph(associations2igraph),2 scatterplot3d,7seriate,7tidygraph(associations2igraph),2tkplot,7write.graph,215。

NVIDIA DOCA DNS Filter MLNX-15-060486 _v1.1说明书

NVIDIA DOCA DNS Filter MLNX-15-060486 _v1.1说明书

Reference ApplicationTable of ContentsChapter 1. Introduction (1)Chapter 2. System Design (2)Chapter 3. Application Architecture (5)Chapter 4. Configuration Flow (6)Chapter 5. Running Application on BlueField (8)Chapter 6. Running Application on Host (10)Chapter 7. References (11)Chapter 1.IntroductionDomain name system (DNS) translates domain names to IP addresses so browsers can load internet resources. Each device connected to the internet has a unique IP address which other machines use to find the device.The DNS process includes several steps:1.Once a user tries to log into a website using a browser, the user's device creates a DNSquery and sends it to a DNS resolver.2.The DNS resolver queries the DNS domain to get an IP address by searching its cache orsending the request to another DNS server.3.Once a match is found, the DNS resolver returns the correct IP matching the DNS domain.4.The user can log into the required website using the correct IP.DNS filter is used to offload DNS requests from the host to the BlueField DPU Arm which allows reducing CPU overhead as Arm allows further DNS processing to be done (e.g., whitelisting, logging, filtering, etc).Chapter 2.System DesignThe DNS filter application is designed to run as a "bump-on-the-wire" on the BlueField-2 DPU instance. The DPU intercepts the traffic coming (ingress traffic) from the wire and either passes it to the Arm or forwards it to the egress port using hairpin. The decision is made by traffic classification.System DesignSystem DesignChapter 3.Application Architecture The DNS filter runs on top of DOCA FLOW to classify DNS requests.1.Ingress packet types are identified using pipes which encapsulate flow rule matchingpatterns and actions.2.Matched flows are identified, and FORWARDING actions can be executed.‣DNS traffic is forwarded to the Arm for further processing‣Non-DNS traffic is forwarded to the egress port using hairpinChapter 4.Configuration Flow1.DPDK initialization.dpdk_init(&argc, &argv, &nb_queues, &nb_ports);2.Stateful flow table (SFT) and port initialization.dpdk_ports_init(nb_queues,nb_ports);‣Mempool allocation‣Rx/Tx and hairpin queue initialization‣DPDK port initialization3.Hairpin binding.enable_hairpin_queues(portid, &peer_ports , 1);‣Binds hairpin queues for the given port ID4.DOCA flow initialization.doca_flow_init(&dns_flow_cfg, &error);5.DOCA flow ports initialization.dns_filter_port_init(&port_cfg, portid);‣Initializes DOCA flow port with the given port configuration for the given port ID.Note: DOCA flow port initialization is done for both ports of the BlueField and after theDPDK ports have been initialized.6.Non-DNS hairpin traffic.build_hairpin_pipes(ports[portid], portid, nb_queues);‣Builds two hairpin pipes, that forward packets to Arm. For a given port, each pipe has one entry for the relevant matching patterns. The first hairpin pipe is for matching UDP non-DNS traffic and the second one is for matching TCP traffic. Note that these pipes are built for both ports of the BlueField.7.Build DNS pipe.build_dns_pipes(ports[portid], portid, nb_queues);‣Builds DNS pipe for a given port. The built pipe has one entry for matching DNS traffic and forwarding it to Arm.8.Processing packets.main_loop(nb_queues, nb_ports);Configuration Flow‣All received packets on Arm, are DNS packets, while non-DNS packets are forwarded to the egress port using hairpin allowing DNS packets to be filtered.Chapter 5.Running Application onBlueField1.Please refer to the DOCA Installation Guide for details on how to install BlueField relatedsoftware.2.To build the applicationa).The DNS filter example is installed as part of the doca-dpi-lib package, the binary islocated under /opt/mellanox/doca/examples/dns_filter/bin/doca_dns_filter.To re-build the DNS filter sample, run:cd /opt/mellanox/doca/examples/dns_filter/srcmeson /tmp/buildninja -C /tmp/builddoca_dns_filter will be created under tmp/build.b).The build process depends on the PKG_CONFIG_PATH environment variable to locatethe DPDK libraries. If the variable was accidently corrupted, and the build fails, run the following command:‣For Ubuntu:export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/mellanox/dpdk/lib/aarch64-linux-gnu/pkgconfig‣For CentOS:export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/mellanox/dpdk/lib64/pkgconfigc).The DNS filter example is a DPDK application. Therefore, the user is required toprovide DPDK flags and allocate huge pages. Run:echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages3.To run the application:./doca_dns_filter [dpdk flags] -- -l [log_level]Note: SFs must be enabled according to Scalable Function Setup Guide.For example:/opt/mellanox/doca/examples/dns_filter/bin/doca_dns_filter -aauxiliary:mlx5_core.sf.4 -a auxiliary:mlx5_core.sf.5 -- -l 3Note: The flag -a auxiliary:mlx5_core.sf.4 -a auxiliary:mlx5_core.sf.5 isa must for proper usage of the application. Modifying this flag will result unexpectedbehavior as only two ports are supported. The SF number is arbitrary and configurable.For additional information on available flags for DPDK, use -h before the -- separator. ForRunning Application on BlueField information on available flags for the application, use -h after the -- separator. The -l or –-log_level flag sets the log level for the app (ERR=0, DEBUG=3).Chapter 6.Running Application onHostPlease refer to Running Reference Applications Over Host Guide.Chapter 7.References‣/opt/mellanox/doca/examples/dns_filter/src/dns_filter.cNoticeThis document is provided for information purposes only and shall not be regarded as a warranty of a certain functionality, condition, or quality of a product. NVIDIA Corporation nor any of its direct or indirect subsidiaries and affiliates (collectively: “NVIDIA”) make no representations or warranties, expressed or implied, as to the accuracy or completeness of the information contained in this document and assume no responsibility for any errors contained herein. NVIDIA shall have no liability for the consequences or use of such information or for any infringement of patents or other rights of third parties that may result from its use. This document is not a commitment to develop, release, or deliver any Material (defined below), code, or functionality.NVIDIA reserves the right to make corrections, modifications, enhancements, improvements, and any other changes to this document, at any time without notice. Customer should obtain the latest relevant information before placing orders and should verify that such information is current and complete.NVIDIA products are sold subject to the NVIDIA standard terms and conditions of sale supplied at the time of order acknowledgement, unless otherwise agreed in an individual sales agreement signed by authorized representatives of NVIDIA and customer (“Terms of Sale”). NVIDIA hereby expressly objects to applying any customer general terms and conditions with regards to the purchase of the NVIDIA product referenced in this document. No contractual obligations are formed either directly or indirectly by this document.NVIDIA products are not designed, authorized, or warranted to be suitable for use in medical, military, aircraft, space, or life support equipment, nor in applications where failure or malfunction of the NVIDIA product can reasonably be expected to result in personal injury, death, or property or environmental damage. NVIDIA accepts no liability for inclusion and/or use of NVIDIA products in such equipment or applications and therefore such inclusion and/or use is at customer’s own risk. NVIDIA makes no representation or warranty that products based on this document will be suitable for any specified use. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to evaluate and determine the applicability of any information contained in this document, ensure the product is suitable and fit for the application planned by customer, and perform the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this document. NVIDIA accepts no liability related to any default, damage, costs, or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this document or (ii) customer product designs.No license, either expressed or implied, is granted under any NVIDIA patent right, copyright, or other NVIDIA intellectual property right under this document. Information published by NVIDIA regarding third-party products or services does not constitute a license from NVIDIA to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property rights of the third party, or a license from NVIDIA under the patents or other intellectual property rights of NVIDIA.Reproduction of information in this document is permissible only if approved in advance by NVIDIA in writing, reproduced without alteration and in full compliance with all applicable export laws and regulations, and accompanied by all associated conditions, limitations, and notices.THIS DOCUMENT AND ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, “MATERIALS”) ARE BEING PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL NVIDIA BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the products described herein shall be limited in accordance with the Terms of Sale for the product.TrademarksNVIDIA, the NVIDIA logo, and Mellanox are trademarks and/or registered trademarks of Mellanox Technologies Ltd. and/or NVIDIA Corporation in the U.S. and in other countries. Other company and product names may be trademarks of the respective companies with which they are associated.Copyright© 2021 NVIDIA Corporation & affiliates. All rights reserved.NVIDIA Corporation | 2788 San Tomas Expressway, Santa Clara, CA 95051。

英文配对题知识点总结

英文配对题知识点总结

英文配对题知识点总结1. Understanding of concepts and terms:Matching questions often require the test-taker to match a list of concepts or terms with their definitions, examples, or applications. In order to successfully answer these questions, one should have a deep understanding of the meaning and usage of the concepts and terms being tested. This requires familiarity with the subject matter and the ability to distinguish between similar-sounding or closely-related terms.2. Recognition of relationships:Matching questions may also assess the test-taker's ability to recognize and understand the relationships between different pieces of information. This could involve matching cause and effect relationships, categorizing items into their respective groups, or connecting related concepts or historical events. Test-takers should be able to discern the connections between the items presented and identify the appropriate matches based on their relationship to each other.3. Memorization of details:Some matching questions may test the test-taker's ability to recall specific details, such as matching dates with historical events, matching equations with their corresponding solutions, or matching names with their associated contributions or achievements. This requires strong memorization skills and the ability to accurately recall and apply specific pieces of information.4. Ability to categorize and classify:Matching questions often require the test-taker to categorize or classify items based on certain criteria. This could involve matching items to their respective categories, matching characteristics to their corresponding examples, or matching objects to their appropriate labels. The test-taker should possess the ability to categorize and classify information based on given criteria in order to successfully answer these types of matching questions.5. Understanding of context:In order to effectively answer matching questions, the test-taker should have a good understanding of the context in which the items are being presented. This could involve knowledge of the broader subject matter, historical context, scientific principles, or theoretical frameworks. Understanding the context is essential for accurately matching items based on their relevance to the given context.Overall, successfully answering matching questions requires a strong grasp of the subject matter, the ability to discern relationships between different pieces of information, and the capacity to recall and apply specific details. By developing these key knowledge points, test-takers can improve their performance on matching questions and demonstrate their mastery of the subject matter being tested.。

雅思阅读教材完整版

雅思阅读教材完整版

阅读 20 课时课程框架1- 2英语基本概念+从句判断3- 4配对题----heading题5- 6配对题----which paragraph题+sentence ending 题7-8 配对题 ----detail matching 题+classify 题9-10 判断题 111-12 判断题 213-14 摘要题 +填空题15-16 选择题17-18 简答题19-20 平行阅读法英语基本概念(一 ) 十大词性:八大句子成分:(二 )句子核心:句子主干举例:长得乖巧的常被邻居夸奖但今天却被妈妈骂了的小明不开心地看似有点想不开的步履蹒跚地走过了这条五年前由他爸爸主持修建的桥。

主干:句子能称为句子,一定是有动词的。

造句练习:1.他造了一座桥。

2.他和我在一起。

1.2.五大基本句型 3.4.5.区分下列句式:(1)Xiaoming finds food bitter.(2)Xiaoming finds food bitterly.(3)Xiaoming finds his little sister some bitter food.造句并说明句型1.汽车使交通变得方便。

2.我给你找了个房子。

3.人们认为猴子很奇怪。

(三 )长难句:1.加入复杂修饰成分:形容词,介词短语等2.加入复杂结构:插入语等3.合并多个句子:并列句& 主从句(四 ) 从句概念:八大句子成分中,除谓语动词和补语外,当一个句子充当某成分时,该从句就叫做某某从句。

如一个句子做主语,则该从句叫主语从句。

1. ________ 从句 +动词2. 实义动词 +________ 从句主干性从句(五 ) 六大从句判断标准 3. 系动词 +________ 从句4. 具体名词 +________ 从句5. 抽象名词 +________ 从句修饰性从句6.______从句,去掉不影响句子完整度(六 ) 六大从句共同特点: 1.有连词(可省略)且置于从句句首2.连词在句中做成分,有意思(that 除外)3.从句用陈述语序(让步状语从句例外)验证:他住在哪里?我不知道他住在哪里。

2014-ICDE论文集总结

2014-ICDE论文集总结

2014-ICDE论文集ICDE RESEARCH SESSIONSResearch Papers Session 1 Clustering●Incremental Cluster Evolution Tracking from Highly DynamicNetwork Data(s hxy)o Pei Lee* (UBC)o Laks V.S. Lakshmanan (UBC)o Evangelos Milios (Dalhousie University)摘要:Dynamic networks are commonly found in the current web age. In scenarios like social networks and social media,dynamic networks are noisy, are of large-scale and evolve quickly.In this paper, we focus on the cluster evolution tracking problemon highly dynamic networks, with clearapplication to eventevolution tracking. There are several previous works on datastream clustering using a node-by-node approach formaintainingclusters. However, handling of bulk updates, i.e., a subgraphat a time, is critical for achieving acceptable performance oververy large highly dynamic networks. We propose a subgraph-by subgraph incrementaltracking framework for cluster evolutionin this paper. To effectively illustrate the techniques in ourframework, we take the event evolution tracking task in socialstreams as an application, where a social stream and an eventare modeled as a dynamic post network and a dynamic clusterrespectively. By monitoring through a fading time window, weintroduce a skeletal graph to summarize the information in thedynamic network, and formalize cluster evolution patterns usinga group of primitive evolution operations and their algebra. Twoincremental computation algorithms are developed tomaintainclusters and track evolution patterns as time rolls on andthenetwork evolves. Our detailed experimental evaluation on largeTwitter datasets demonstrates that our framework can effectivelytrack the complete set of cluster evolution patterns in the wholelife cycle from highly dynamic networks on the fly.大意:动态网络(如社交网络)在网络时代非常常见。

剑6test1 阅读解析

剑6test1 阅读解析

篇章结构体裁说明文主题澳大利亚的体育成就结构A段:澳大利亚体育成绩斐然B段:科技是第一生产力C段:精确测量和数据分析D段:精确测量和数据分析的实例E段:数据的实际应用F段:不可复制的成功必背词汇A段fair adj.合理的pro n.职业运动员demolish v.击败;破坏,毁坏under the eye of 在……的注意下rival n.竞争者,对手body n.团体,机构seeming adj.表面上的(通常事实并非如此) finance v.给……提供经费ease n.不费力,轻松excellence n.优秀,卓越extensive adj.广泛的,涉及面广的intensive adj.强化的underpin v.以……为稳固基础nutritional adj.营养的B段centre stage 中心地位squash n.壁球collaborate v.合作instrument n.仪器,器械golfer n.打高尔夫球的人ethereal adj.飘渺的,引申为不切实际的C段come down to(sth.)可归结为wire-frame adj.线框的second-by-second 每秒的slice v.划开;切开output n.输出slow motion 慢动作wring…out of 原义为扭,榨取,此处引申为从……中(经过努力)获得side-on 从侧面stroke n.划动,划水tweak v.扭,用力拉spine n.脊柱world-beating adj.举世瞩目的swivel v.旋转prototype n.原型biomechanical adj.生物力(学)的profile n.原义为轮廓、外形,此处意为模型velocity n.速度,速率lap n.一圈budding adj.发展中的spit out 原义是吐出,此处引申为显示出、分析出frame n.帧,画面D段turn time 转身时间immunoglobulin n.免疫球蛋白unobtrusive adj.不显眼的,不醒目的present adj.存在的sensor n.传感器saliva n.唾液embed v.使插入;使嵌入ease v.减轻,减弱sweat v.出汗,发汗remarkably adv.显著地,引人注目地;非常地experimentation n.实验,试验immune-system 免疫系统的E段complex adj.复杂的transform v.转换,转变,改变championship n.冠军赛arguably adv.可论证地(可辩论地),有理由说地gear v.调整,(使)适合segment n.部分F段unveil v.展示(新产品);揭开altitude tent 高原帐篷coolant-lined 流线型散热replicate v.复制endurance n.耐力;忍耐力encompass v.包含或包括某事物slice v.减少,降低难句解析1. A lot of their work comes down to measurement—everything from the exact angle of a swimmer's dive to the second-by-second power output of a cyclist.参考译文:许多工作都涉及具体测量,测量内容包括从游泳运动员潜水的精确角度到自行车运动员每秒功率输出的所有数据。

OpenCL Snort性能优化与并行设计说明书

OpenCL Snort性能优化与并行设计说明书

Parallel Design and Performance Optimization based on OpenCLSnortHongying Xie*,Yangxia Xiang †, Caisen Chen †*Unit 61175, China†Academy of Armored Force Engineering, ChinaKeywords: OpenCL snort, GPU, AC algorithm, parallel programmingAbstractWith the rapid increasement of the network speed and number of threats which hide in the network poses enormous challenges to network intrusion detection systems (NIDS). As the most popular NIDS, snort can run as a single threaded application. However, it may not be able to detect intrusions in real-time especially in networks with high traffic. In this paper, a parallel module OpenCL Snort (OCLSnort) is introduced: realize parallel pattern matching algorithm using GPU and innovate new architecture which is more suitable for the parallel algorithm. The result showed that OCLSnort can detect the attacks correctly and effectively, the new system not only has markedly improved on throughput, also effectively reduced the CPU utilization and memory usage.1 IntroductionIntrusion detection systems (IDSs) are of critical importance to the integrity of computer networks due to massive growth in the data transmission speed and the frequency of attacks. With the rapid development of computer network, more and more data need to be searched, analyzed and detected whether they have threat or not. Such as network monitoring application snort, which is an open source network intrusion prevention and detection system (IDS/IPS) developed by Sourcefire. Combining the benefits of signature, protocol, and anomaly-based inspection, and as so far, Snort is the most widely deployed IDS/IPS technology worldwide [1].In snort, they are using pattern matching algorithm such as AC, BM algorithm to detect thread. Pattern matching is one of the core operations used by applications such as traffic classification [2], intrusion detection systems [3] and content monitoring filters [1]. Unfortunately, packet detecting part occupies the most of the time of the whole processing time in modern NIDSes [4,5] and this operation has significant overheads in terms of both memory space and CPU cycles, so when the data or packet which will be detected is very large, there will be packet-losing problem about snort.Several research efforts have used GPU for security purposes, including cryptography [6], data carving [7] and intrusion detection [8]. And Jacob and Brodley were the first that tried to use the GPU as a pattern matching engine for NIDS in PixelSnort [8]. They changed KMP algorithm to parallel version but the performance result is not very ideal. This paper is organized as follows: In Section 2 and 3, two methods to realize OpenCL snort are presented. In section 4, we evaluate our implementation and compare with the original snort. Experimental results and analysis are given. Finally, conclusions are given in Section 5.2 ArchitectureThe overall architecture of Snort NIDS is shown in Fig.1 and the OpenCL version Snort’s architecture is showed in Fig.2. From Fig.1 and Fig.2, there are some differences between the original snort and the new version snort, one is collecting packets at packet classification part; the other is detecting packet content at packet detecting part.g ss2.1 Packet detecting using OpenCL AC algorithmFor the multi-pattern matching algorithm, the first thing is to build DFA such as Fig.3, and this section is finished before2nd Joint International Information Technology, Mechanical and Electronic Engineering Conference (JIMEC 2017)the beginning of the packet detected in snort. In our design of the OpenCL version Snort, the realized DFA is represented as a two-dimensional state table array that is mapped on the memory space of the GPU. The dimensions of the array are equal to the number of states and the size of the alphabet (256 in our case), respectively. Each cell contains the next state to move, as well as an indication of whether the state is a final state or not.Fig.3 AC State Machine of P atterns “he”, “hers”, “his”, “she” Fig.3 shows a state machine of patterns which used in our OpenCL AC algorithm, from this figure we can see that the difference between original AC state machine and OpenCL AC state machine is that whether it is needed about failure transitions. The failure transitions are used to back-track the state machine to recognize patterns in any location of an input stream. Given a current state and an input character, the original AC machine first looks up the valid transition table to check whether there is a valid transition for the input character; otherwise, the machine looks up the failure transition table and jumps to the failure state where the failure transition points. Then the machine regards the same input character until the character causes a valid transition. In our OpenCL version snort, we used OpenCL to change the AC algorithm for parallelism based on PFAC [9]. The idea of the parallel algorithm of AC is: Give an input stream have N byte, we will create N threads corresponding to N byte. And for each thread, it is only responsible for identifying the pattern starting at the thread starting position. So in OpenCL AC algorithm, the failure transitions of the AC state machine can all be removed as well as the self-loop transition of the initial state. And the whole process of the OpenCL AC is showed by Fig.4.Fig.4 OpenCL AC Algorithm Execution ProcessThere are several characteristics of the OpenCL AC algorithm. First, although it creates huge amounts of threads, most threads have a high probability of terminating very early because a thread in OpenCL AC is only responsible for matching the pattern beginning at its starting position. Second, the maximum detection length of each thread is the maximumlength in whole patterns, and based on this, when the larger the input stream is, the faster the detect speed is. And finally, the failure transitions are all removed when we are using OpenCL AC, and this simplifies the algorithm and the thread can detect the input stream automatically without rollback. 2.2 Packet collecting and transfer to GPUBefore the packet detecting in GPU, the first thing must to consider is how and how many packets will be transferred from the network to the GPU memory. The simplest method is according to the original snort architecture, transfer one packet to GPU for processing once time. However, as we know, the TCP or UDP packet size is usually hundreds byte,the performance is much better batching many small transfers into a large one than making each transfer separately [16].Thus, we realized the two methods (1) using original snort architecture, transferring one packet to GPU once time, and (2)change packet classification part, transferring more than onepackets to GPU once time and get the performancecomparison based on two methods. As we know, the process flow of original snort is showed as Fig.1: capture a packet from network once time, then packet analysis and classification, detecting packet and output the result finally. Using method (1), the process flow can be changed as follows: capture a packet from network, packet analysis and classification is not changed, then transfer the packet to GPU and detecting it using OpenCL AC algorithm, then transfer the results to CPU and output the result finally. So using method (1), we changed Detection part, using OpenCL AC take the place of original ac algorithm and the other part of snort ’s architecture are not changed, processing packet one by one.And using method 1, the performance improvement is not exciting, there are two reasons: (1) the DMA time occupied most of the time; (2) the input stream transferring to GPU only have hundreds byte each time. It does not make full use of GPU resources. Based on this, we proposed a new method that can transfer more than one packets to GPU, the architecture of OpenCL Snort are showed by Fig.2. From Fig.2 we can see the difference between OpenCL Snort and original snort is processing packet number once time. In OpenCL version Snort, we change the interface to realizecapture multi-packets at the beginning of snort and then deal with packets, transfer multi-packets to GPU once time, and finally output alerts/logs.3 Implementation In this section, we are showed the implementation details about the OpenCL version snort. In snort, they are using different rules to detecting whether the packet has threatened or not according to packet type. Different rules create different state transition tables. So we are focus on the packets collecting and the state transition tables correspond to packets part when using method (2) transfer multi-packets to GPU once time.3.1 Transferring a Single Packet to GPUIn this approach, when capturing a packet from network, snort will decode and classify it, then send it to GPU for detecting,send the result to CPU and finally output the result.Assume the packet has N characters, the algorithm will create N threads in GPU if the device has this ability, and else they will create maximum threads which under the device’s ability, then each thread will loop many times to detecting the wholeThis method is very simple, because there is only one packet, and the state transition table which transferred to GPU also has one. So this method need not to find out which state transition table is corresponding to which packet. A drawback of this approach is that the input stream is very small and the DMA time occupied most of the time, so the GPU is not utilized effectively.3.2 Transferring Multi-packets to GPUIn this approach, we will mark the packets which we interfered to GPU as unique packetID, and give a unique tableID for each state transition table which finished creation process and transfer all the state transition tables to GPU. The whole process will be finished at the initialization phase of snort.Using this approach to detect packets, the way to creating threads is the same as method (1), and the difference is the packet must correspond to the state transition table. And this could be solved adding elements packetID and tableID to struct ACSM, and we will also transfer those elements to GPU. In the OpenCL algorithm, we must to judge the packet boundaries in order to get the correct results. The process flow is showed by Fig.6, and example of packets collecting process is showed by Fig.7. From Fig.7, each packet corresponds to a state transition table, so when we transfer packets to GPU, we must to determine the transition table’s address corresponding to each packet.Although this method is complicated comparing with method (1), the input stream transferring into GPU once time is muchindex n4 EvaluationPattern matching is the most critical operation in the snort system. Usually pattern matching algorithm can be classified into single pattern matching algorithm (such as KMP) and multi-patterns algorithm (such as AC).In this section, we explore the performance of our implementation. We realize the two approaches in Snort and compare the two methods with the original snort respectively. In processing multi-packets method, we change the parameter about the collecting packet number once time then get the average time about processing one packet.In our experiments we used an AMD A10-4600m computer, the CPU in this computer is 2.3GHz APU with Radeon™ HD Graphics 4 processor , 8G memory and GPU is AMD Radeon HD 7660G card, the operating system is Ubuntu12.04 64-bit. We get the packets data LLS DDOS 1.0-inside.dump from MIT Lincoln Laboratory [17] as the detected data, we also using snort to dump some small packets date set using the detected data LLS DDOS 1.0-inside.dump, such as contain 200 packets date set, 1000 packets date set, 10000 packets date set and 20000 packets date set, and we read the packets from disk rather than network in order to get the same speed of capture packet in different experiments. We also using the default rules file when using different version snort and this can ensure the correctness of the result.For all experiments, we disregard the time spent in the initialization phase of snort as well as the log of the alerts to the disk or terminal. Even though it only takes just a few seconds to load rule files and build its internal structures. And we used the full AC implementation to measure the performance in original snort.4.1 Performance Comparison between One Packet OpenCL snort and Original snortIn this experiment, input1, input2 and input3 are three different size detected packets and the packets size is 200, 1000 and 10000 respectively. We change the input packet numbers to get the performance data about one packet OpenCL snort and original snort and the performance data is showed by Fig.8. From Fig.8, (1) with the increase of input packet size, the throughput of two methods becomes large; (2)using one packet OpenCL snort, the throughput is not batter than the original snort’s throughput, because the local memory is not large enough, the state transition table is stored in Global memory, when judge the current character meet the conversion criteria or not each time, the algorithm must access the global memory once time; and most of threads are terminated at the beginning of the algorithm, and the GPU’s utilization is not high.Fig.8 Performance Comparison4.2 Performance Analysis about Multi-Packets OpenCL snortIn this experiment, we get the performance comparison about multi-packets OpenCL snort and one packet OpenCL snort. Before this comparison, first thing we must to ensure is when we transfer how many packets to GPU, the algorithm will get the best performance and maximum throughput. Fig.9 showed the algorithm’s performance comparison when transferring different number of packets to GPU. From Fig.9 we can see with the number’s difference, the throughput has some difference as well. When the number which transfers to GPU once time is 30, the throughput is 4.78Gbits/sec, when the number is 100, the throughput is up to 6.43Gbits/sec. And when the number changes from 150 to 200, the throughput grows slowly and then it has a downward trend. So we select 200 as the number which transfers to GPU once time.Fig.9 Performance Comparison of Multi-packets OpenCLSnortThe next experiment we are focus on is the performance comparison about the three version snort: original snort, one packet OpenCL snort and multi-packets OpenCL snort. And the result is showed by Fig.10. In this figure, input1, input2 and input3 are three different size detected packets as the same as Fig.9, the packets size is 150, 1200 and 10000 respectively. From the result, we can see the multi-packets OpenCL snort’s throughput is about two times faster than other two methods. And the GPU’s utilization in multi-packets OpenCL snort is much higher than the one packet OpenCL snort.Fig.10 Performance Comparison on Different Versions 5 ConclusionsIn this paper, we have proposed two OpenCL version snort, one packet OpenCL snort and multi-packets OpenCL snort in order to accelerate packet detecting by GPU. And the result showed that although one packet OpenCL snort’s throughput is about 20% slower than original snort, multi-packets OpenCL snort is about 2 times faster than original snort, and this system was able to achieve a maximum throughput of 6.758Gbit/s.AcknowledgementsThis work is supported by the National Natural Science Foundation of China under Grant No. 61402528, all support is gratefully acknowledged.References[1] Snort: : Home Page. /.[2] Application Layer Packet Classifier for Linux. http://17-/.[3] Clam AntiVirus. /.[4] S. Antonatos, K. Anagnostakis, and E. Markatos.Generating realistic workloads for network intrusion detection systems. In Proceedings of the 4th ACM Workshop on Software and Performance, (2004).[5] J. B. D. Cabrera, J. Gosar,W. Lee, and R. K. Mehra. Onthe statistical distribution of processing times in network intrusion detection. In 43rd IEEE Conference on Decision and Control, 75-80, (2004).[6] D. L. Cook, J. Ioannidis, A. D. Keromytis, and J. Luck.Cryptographics: Secret key cryptography using graphics cards. In Proceedings of RSA Conference, Cryptographer’s Track. 334-350, (2005).[7] G. G. R. I. Lodovico Marziale and V. Roussev. Massivethreading: Using GPUs to increase the performance of digital forensics tools. Digital Investigation. 73–81. [8] N. Jacob and C. Brodley. Offloading IDS computation tothe GPU. In Proceedings of the 22nd Annual Computer Security Applications Conference on Annual Computer Security Applications Conference, Washington, DC, USA, IEEE Computer Society. 371–380, (2006).[9] Lin CH, Tsai SY, Liu CH, Chang SC, Shyu. JMAccelerating string matching using multi-threaded algorithm on gpu. In: GLOBECOM, 1-5, (2010). [10] C. IOS. IPS deployment guide. /.。

剑6test1 阅读解析

剑6test1 阅读解析

篇章结构体裁说明文主题澳大利亚的体育成就结构A段:澳大利亚体育成绩斐然B段:科技是第一生产力C段:精确测量和数据分析D段:精确测量和数据分析的实例E段:数据的实际应用F段:不可复制的成功必背词汇A段fair adj.合理的pro n.职业运动员demolish v.击败;破坏,毁坏under the eye of 在……的注意下rival n.竞争者,对手body n.团体,机构seeming adj.表面上的(通常事实并非如此) finance v.给……提供经费ease n.不费力,轻松excellence n.优秀,卓越extensive adj.广泛的,涉及面广的intensive adj.强化的underpin v.以……为稳固基础nutritional adj.营养的B段centre stage 中心地位squash n.壁球collaborate v.合作instrument n.仪器,器械golfer n.打高尔夫球的人ethereal adj.飘渺的,引申为不切实际的C段come down to(sth.)可归结为wire-frame adj.线框的second-by-second 每秒的slice v.划开;切开output n.输出slow motion 慢动作wring…out of 原义为扭,榨取,此处引申为从……中(经过努力)获得side-on 从侧面stroke n.划动,划水tweak v.扭,用力拉spine n.脊柱world-beating adj.举世瞩目的swivel v.旋转prototype n.原型biomechanical adj.生物力(学)的profile n.原义为轮廓、外形,此处意为模型velocity n.速度,速率lap n.一圈budding adj.发展中的spit out 原义是吐出,此处引申为显示出、分析出frame n.帧,画面D段turn time 转身时间immunoglobulin n.免疫球蛋白unobtrusive adj.不显眼的,不醒目的present adj.存在的sensor n.传感器saliva n.唾液embed v.使插入;使嵌入ease v.减轻,减弱sweat v.出汗,发汗remarkably adv.显著地,引人注目地;非常地experimentation n.实验,试验immune-system 免疫系统的E段complex adj.复杂的transform v.转换,转变,改变championship n.冠军赛arguably adv.可论证地(可辩论地),有理由说地gear v.调整,(使)适合segment n.部分F段unveil v.展示(新产品);揭开altitude tent 高原帐篷coolant-lined 流线型散热replicate v.复制endurance n.耐力;忍耐力encompass v.包含或包括某事物slice v.减少,降低难句解析1. A lot of their work comes down to measurement—everything from the exact angle of a swimmer's dive to the second-by-second power output of a cyclist.参考译文:许多工作都涉及具体测量,测量内容包括从游泳运动员潜水的精确角度到自行车运动员每秒功率输出的所有数据。

雅思培训丨雅思阅读匹配题全解析

雅思培训丨雅思阅读匹配题全解析

雅思培训丨雅思阅读匹配题全解析朗阁雅思培训中心宋媛婧纵观近几年的雅思阅读考试,我们会发现考官的出题已经发生了某些变化。

从题型角度来看,现在雅思考试中匹配题在整张阅读试卷中所占的比重已经越来越高了。

匹配题主要考察细节信息的寻找和理解能力,以及同义替换的辨别能力,因此这类题型是比较难也是比较费时间的,考生们对此头痛不已。

而如何才能减少匹配题的做题时间,提高解题正确率成为雅思考生们最为关心的内容。

其实,“匹配题”只是一个总称,它具体包含了以下五种题型,分别是Heading, Matching, Complete the sentence with the correct ending, Classify和Which paragraph contains the following information。

下面我们依次来解析这些题型的解题方法和解题技巧。

一、Heading题Heading题即段落大意归纳概括题,要求考生为文章指定的段落选出一个能够概括该段落中心意思的小标题。

此种题型正常情况下每次雅思阅读考试的三篇文章中会考到一篇,偶尔会出现不考和考两篇的现象。

1. Heading题的典型特征:首先,与雅思阅读其余题型不同,只有Heading题会出现在正文的前面,所以考生一定要注意这点。

考生一般习惯了拿到题目后,往前去找文章的情况,但Heading题是例外,其文章在它后面。

其次,Heading题有时会出现example的现象。

考生需要注意example已经选出的选项在做题前赶紧先从众多选项中划去,因为它不可能再成为答案了。

另外,example已用段落也可以做个标记,以免做题时重复看,浪费时间。

最后,要注意题目要求配对的段落出现在文章的哪里。

Heading题要求配对的段落一般会标注好A、B、C…等段落。

考生不要经验主义的以为A段就是正文的第一段,以此类推。

(比如剑6的The Advantages of Public Transport中,要配对的A-E段就出现在正文的最后五段)。

GTM算法

GTM算法
3
4
Graph Transformation Matching
Assuming that two sets of corresponding points
and
of size (where matches ) are found.
Algorithm GTM:
(1)
(2)
(3)
(4)
when
(5)
(ii) remove the outlier from and (this is done just by setting the value -1 at cell [outlier,1]);
(iii) for each occurrence of the outlier in and (in its first K columns) remove the edge and re-connect it with the next closest vertex (using the information stored in and ), updating the respective entries in and and incrementing the respective values in and .
– It relying on finding a consensus nearest-neighbour graph emerging from candidate matches.
– It iteratively eliminates dubious matches in order to obtain the consensus graph.
,
, and
(6) iterate
5

IBM Cognos Transformer V11.0 用户指南说明书

IBM Cognos Transformer V11.0 用户指南说明书
Dimensional Modeling Workflow................................................................................................................. 1 Analyzing Your Requirements and Source Data.................................................................................... 1 Preprocessing Your ...................................................................................................................... 2 Building a Prototype............................................................................................................................... 4 Refining Your Model............................................................................................................................... 5 Diagnose and Resolve Any Design Problems........................................................................................ 6

《图论课件第五章匹配与因子分解》课件

《图论课件第五章匹配与因子分解》课件

二、因子分解
2.1 定义
因子分解是将图进行拆分,使得每个因子都是图的 一个子图。
2.2 贪心算法
贪心算法用于在因子分解时选择边或顶点。
2.3 DAG上的匈牙利算法
用于在有向无环图上寻找因子分解的算法。
2.4 Tutte定理
用于判断一个图是否存在完美匹配。
三、应用实例
1
3.1 二分图最大匹配的应用
《图论课件第五章匹配与 因子分解》PPT课件
图论课件第五章匹配与因子分解
一、匹配
1.1 定义
匹配指的是图中的一组边,这些边不相交并且 没有公共顶点。
1.3 最大匹配
最大匹配是图中包含边数最多的匹配。
1.2 匹配的分类
分类包括完美匹配、最大匹配和最小匹配。
1.4 匈牙利算法
匈牙利算法用于寻找二分图的最大匹配。
应用于任务分配、婚姻匹配等场景。
3.2 带权二分图匹配的应用
2
应用于资源分配、工作调度等场景。
3
3.3 双倍经验的关卡通关问题
使用匹配算法解决游戏中的关卡设计问
3.4 理发店问题
4
题。
利用匹配算法解决顾客理发需要和理发 师时间安排的问题。

四、参考资料
4.1 书籍
《图论导论》、《算法导论》等
4.3 网站
Grap h Alg orithm s, Grap h Theo ry Online等
4.2 论文
Graph Matching Alg orithm s: A C om prehensive C om parison
4.4 其他资源
相关研究报告、课程讲义等

A survey of content based 3d shape retrieval methods

A survey of content based 3d shape retrieval methods

A Survey of Content Based3D Shape Retrieval MethodsJohan W.H.Tangelder and Remco C.VeltkampInstitute of Information and Computing Sciences,Utrecht University hanst@cs.uu.nl,Remco.Veltkamp@cs.uu.nlAbstractRecent developments in techniques for modeling,digitiz-ing and visualizing3D shapes has led to an explosion in the number of available3D models on the Internet and in domain-specific databases.This has led to the development of3D shape retrieval systems that,given a query object, retrieve similar3D objects.For visualization,3D shapes are often represented as a surface,in particular polygo-nal meshes,for example in VRML format.Often these mod-els contain holes,intersecting polygons,are not manifold, and do not enclose a volume unambiguously.On the con-trary,3D volume models,such as solid models produced by CAD systems,or voxels models,enclose a volume prop-erly.This paper surveys the literature on methods for con-tent based3D retrieval,taking into account the applicabil-ity to surface models as well as to volume models.The meth-ods are evaluated with respect to several requirements of content based3D shape retrieval,such as:(1)shape repre-sentation requirements,(2)properties of dissimilarity mea-sures,(3)efficiency,(4)discrimination abilities,(5)ability to perform partial matching,(6)robustness,and(7)neces-sity of pose normalization.Finally,the advantages and lim-its of the several approaches in content based3D shape re-trieval are discussed.1.IntroductionThe advancement of modeling,digitizing and visualizing techniques for3D shapes has led to an increasing amount of3D models,both on the Internet and in domain-specific databases.This has led to the development of thefirst exper-imental search engines for3D shapes,such as the3D model search engine at Princeton university[2,57],the3D model retrieval system at the National Taiwan University[1,17], the Ogden IV system at the National Institute of Multimedia Education,Japan[62,77],the3D retrieval engine at Utrecht University[4,78],and the3D model similarity search en-gine at the University of Konstanz[3,84].Laser scanning has been applied to obtain archives recording cultural heritage like the Digital Michelan-gelo Project[25,48],and the Stanford Digital Formae Urbis Romae Project[75].Furthermore,archives contain-ing domain-specific shape models are now accessible by the Internet.Examples are the National Design Repos-itory,an online repository of CAD models[59,68], and the Protein Data Bank,an online archive of struc-tural data of biological macromolecules[10,80].Unlike text documents,3D models are not easily re-trieved.Attempting tofind a3D model using textual an-notation and a conventional text-based search engine would not work in many cases.The annotations added by human beings depend on language,culture,age,sex,and other fac-tors.They may be too limited or ambiguous.In contrast, content based3D shape retrieval methods,that use shape properties of the3D models to search for similar models, work better than text based methods[58].Matching is the process of determining how similar two shapes are.This is often done by computing a distance.A complementary process is indexing.In this paper,indexing is understood as the process of building a datastructure to speed up the search.Note that the term indexing is also of-ten used for the identification of features in models,or mul-timedia documents in general.Retrieval is the process of searching and delivering the query results.Matching and in-dexing are often part of the retrieval process.Recently,a lot of researchers have investigated the spe-cific problem of content based3D shape retrieval.Also,an extensive amount of literature can be found in the related fields of computer vision,object recognition and geomet-ric modelling.Survey papers to this literature have been provided by Besl and Jain[11],Loncaric[50]and Camp-bell and Flynn[16].For an overview of2D shape match-ing methods we refer the reader to the paper by Veltkamp [82].Unfortunately,most2D methods do not generalize di-rectly to3D model matching.Work in progress by Iyer et al.[40]provides an extensive overview of3D shape search-ing techniques.Atmosukarto and Naval[6]describe a num-ber of3D model retrieval systems and methods,but do not provide a categorization and evaluation.In contrast,this paper evaluates3D shape retrieval meth-ods with respect to several requirements on content based 3D shape retrieval,such as:(1)shape representation re-quirements,(2)properties of dissimilarity measures,(3)ef-ficiency,(4)discrimination abilities,(5)ability to perform partial matching,(6)robustness,and(7)necessity of posenormalization.In section2we discuss several aspects of3D shape retrieval.The literature on3D shape matching meth-ods is discussed in section3and evaluated in section4. 2.3D shape retrieval aspectsIn this section we discuss several issues related to3D shape retrieval.2.1.3D shape retrieval frameworkAt a conceptual level,a typical3D shape retrieval frame-work as illustrated byfig.1consists of a database with an index structure created offline and an online query engine. Each3D model has to be identified with a shape descrip-tor,providing a compact overall description of the shape. To efficiently search a large collection online,an indexing data structure and searching algorithm should be available. The online query engine computes the query descriptor,and models similar to the query model are retrieved by match-ing descriptors to the query descriptor from the index struc-ture of the database.The similarity between two descriptors is quantified by a dissimilarity measure.Three approaches can be distinguished to provide a query object:(1)browsing to select a new query object from the obtained results,(2) a direct query by providing a query descriptor,(3)query by example by providing an existing3D model or by creating a3D shape query from scratch using a3D tool or sketch-ing2D projections of the3D model.Finally,the retrieved models can be visualized.2.2.Shape representationsAn important issue is the type of shape representation(s) that a shape retrieval system accepts.Most of the3D models found on the World Wide Web are meshes defined in afile format supporting visual appearance.Currently,the most common format used for this purpose is the Virtual Real-ity Modeling Language(VRML)format.Since these mod-els have been designed for visualization,they often contain only geometry and appearance attributes.In particular,they are represented by“polygon soups”,consisting of unorga-nized sets of polygons.Also,in general these models are not“watertight”meshes,i.e.they do not enclose a volume. By contrast,for volume models retrieval methods depend-ing on a properly defined volume can be applied.2.3.Measuring similarityIn order to measure how similar two objects are,it is nec-essary to compute distances between pairs of descriptors us-ing a dissimilarity measure.Although the term similarity is often used,dissimilarity corresponds to the notion of dis-tance:small distances means small dissimilarity,and large similarity.A dissimilarity measure can be formalized by a func-tion defined on pairs of descriptors indicating the degree of their resemblance.Formally speaking,a dissimilarity measure d on a set S is a non-negative valued function d:S×S→R+∪{0}.Function d may have some of the following properties:i.Identity:For all x∈S,d(x,x)=0.ii.Positivity:For all x=y in S,d(x,y)>0.iii.Symmetry:For all x,y∈S,d(x,y)=d(y,x).iv.Triangle inequality:For all x,y,z∈S,d(x,z)≤d(x,y)+d(y,z).v.Transformation invariance:For a chosen transforma-tion group G,for all x,y∈S,g∈G,d(g(x),g(y))= d(x,y).The identity property says that a shape is completely similar to itself,while the positivity property claims that dif-ferent shapes are never completely similar.This property is very strong for a high-level shape descriptor,and is often not satisfied.However,this is not a severe drawback,if the loss of uniqueness depends on negligible details.Symmetry is not always wanted.Indeed,human percep-tion does not alwaysfind that shape x is equally similar to shape y,as y is to x.In particular,a variant x of prototype y,is often found more similar to y then vice versa[81].Dissimilarity measures for partial matching,giving a small distance d(x,y)if a part of x matches a part of y, do not obey the triangle inequality.Transformation invariance has to be satisfied,if the com-parison and the extraction process of shape descriptors have to be independent of the place,orientation and scale of the object in its Cartesian coordinate system.If we want that a dissimilarity measure is not affected by any transforma-tion on x,then we may use as alternative formulation for (v):Transformation invariance:For a chosen transforma-tion group G,for all x,y∈S,g∈G,d(g(x),y)=d(x,y).When all the properties(i)-(iv)hold,the dissimilarity measure is called a metric.Other combinations are possi-ble:a pseudo-metric is a dissimilarity measure that obeys (i),(iii)and(iv)while a semi-metric obeys only(i),(ii)and(iii).If a dissimilarity measure is a pseudo-metric,the tri-angle inequality can be applied to make retrieval more effi-cient[7,83].2.4.EfficiencyFor large shape collections,it is inefficient to sequen-tially match all objects in the database with the query object. Because retrieval should be fast,efficient indexing search structures are needed to support efficient retrieval.Since for query by example the shape descriptor is computed online, it is reasonable to require that the shape descriptor compu-tation is fast enough for interactive querying.2.5.Discriminative powerA shape descriptor should capture properties that dis-criminate objects well.However,the judgement of the sim-ilarity of the shapes of two3D objects is somewhat sub-jective,depending on the user preference or the application at hand.E.g.for solid modeling applications often topol-ogy properties such as the numbers of holes in a model are more important than minor differences in shapes.On the contrary,if a user searches for models looking visually sim-ilar the existence of a small hole in the model,may be of no importance to the user.2.6.Partial matchingIn contrast to global shape matching,partial matching finds a shape of which a part is similar to a part of another shape.Partial matching can be applied if3D shape mod-els are not complete,e.g.for objects obtained by laser scan-ning from one or two directions only.Another application is the search for“3D scenes”containing an instance of the query object.Also,this feature can potentially give the user flexibility towards the matching problem,if parts of inter-est of an object can be selected or weighted by the user. 2.7.RobustnessIt is often desirable that a shape descriptor is insensitive to noise and small extra features,and robust against arbi-trary topological degeneracies,e.g.if it is obtained by laser scanning.Also,if a model is given in multiple levels-of-detail,representations of different levels should not differ significantly from the original model.2.8.Pose normalizationIn the absence of prior knowledge,3D models have ar-bitrary scale,orientation and position in the3D space.Be-cause not all dissimilarity measures are invariant under ro-tation and translation,it may be necessary to place the3D models into a canonical coordinate system.This should be the same for a translated,rotated or scaled copy of the model.A natural choice is tofirst translate the center to the ori-gin.For volume models it is natural to translate the cen-ter of mass to the origin.But for meshes this is in gen-eral not possible,because they have not to enclose a vol-ume.For meshes it is an alternative to translate the cen-ter of mass of all the faces to the origin.For example the Principal Component Analysis(PCA)method computes for each model the principal axes of inertia e1,e2and e3 and their eigenvaluesλ1,λ2andλ3,and make the nec-essary conditions to get right-handed coordinate systems. These principal axes define an orthogonal coordinate sys-tem(e1,e2,e3),withλ1≥λ2≥λ3.Next,the polyhe-dral model is rotated around the origin such that the co-ordinate system(e x,e y,e z)coincides with the coordinatesystem(e1,e2,e3).The PCA algorithm for pose estimation is fairly simple and efficient.However,if the eigenvalues are equal,prin-cipal axes may switch,without affecting the eigenvalues. Similar eigenvalues may imply an almost symmetrical mass distribution around an axis(e.g.nearly cylindrical shapes) or around the center of mass(e.g.nearly spherical shapes). Fig.2illustrates the problem.3.Shape matching methodsIn this section we discuss3D shape matching methods. We divide shape matching methods in three broad cate-gories:(1)feature based methods,(2)graph based meth-ods and(3)other methods.Fig.3illustrates a more detailed categorization of shape matching methods.Note,that the classes of these methods are not completely disjoined.For instance,a graph-based shape descriptor,in some way,de-scribes also the global feature distribution.By this point of view the taxonomy should be a graph.3.1.Feature based methodsIn the context of3D shape matching,features denote ge-ometric and topological properties of3D shapes.So3D shapes can be discriminated by measuring and comparing their features.Feature based methods can be divided into four categories according to the type of shape features used: (1)global features,(2)global feature distributions,(3)spa-tial maps,and(4)local features.Feature based methods from thefirst three categories represent features of a shape using a single descriptor consisting of a d-dimensional vec-tor of values,where the dimension d isfixed for all shapes.The value of d can easily be a few hundred.The descriptor of a shape is a point in a high dimensional space,and two shapes are considered to be similar if they are close in this space.Retrieving the k best matches for a3D query model is equivalent to solving the k nearest neighbors -ing the Euclidean distance,matching feature descriptors can be done efficiently in practice by searching in multiple1D spaces to solve the approximate k nearest neighbor prob-lem as shown by Indyk and Motwani[36].In contrast with the feature based methods from thefirst three categories,lo-cal feature based methods describe for a number of surface points the3D shape around the point.For this purpose,for each surface point a descriptor is used instead of a single de-scriptor.3.1.1.Global feature based similarityGlobal features characterize the global shape of a3D model. Examples of these features are the statistical moments of the boundary or the volume of the model,volume-to-surface ra-tio,or the Fourier transform of the volume or the boundary of the shape.Zhang and Chen[88]describe methods to com-pute global features such as volume,area,statistical mo-ments,and Fourier transform coefficients efficiently.Paquet et al.[67]apply bounding boxes,cords-based, moments-based and wavelets-based descriptors for3D shape matching.Corney et al.[21]introduce convex-hull based indices like hull crumpliness(the ratio of the object surface area and the surface area of its convex hull),hull packing(the percentage of the convex hull volume not occupied by the object),and hull compactness(the ratio of the cubed sur-face area of the hull and the squared volume of the convex hull).Kazhdan et al.[42]describe a reflective symmetry de-scriptor as a2D function associating a measure of reflec-tive symmetry to every plane(specified by2parameters) through the model’s centroid.Every function value provides a measure of global shape,where peaks correspond to the planes near reflective symmetry,and valleys correspond to the planes of near anti-symmetry.Their experimental results show that the combination of the reflective symmetry de-scriptor with existing methods provides better results.Since only global features are used to characterize the overall shape of the objects,these methods are not very dis-criminative about object details,but their implementation is straightforward.Therefore,these methods can be used as an activefilter,after which more detailed comparisons can be made,or they can be used in combination with other meth-ods to improve results.Global feature methods are able to support user feed-back as illustrated by the following research.Zhang and Chen[89]applied features such as volume-surface ratio, moment invariants and Fourier transform coefficients for 3D shape retrieval.They improve the retrieval performance by an active learning phase in which a human annotator as-signs attributes such as airplane,car,body,and so on to a number of sample models.Elad et al.[28]use a moments-based classifier and a weighted Euclidean distance measure. Their method supports iterative and interactive database searching where the user can improve the weights of the distance measure by marking relevant search results.3.1.2.Global feature distribution based similarityThe concept of global feature based similarity has been re-fined recently by comparing distributions of global features instead of the global features directly.Osada et al.[66]introduce and compare shape distribu-tions,which measure properties based on distance,angle, area and volume measurements between random surface points.They evaluate the similarity between the objects us-ing a pseudo-metric that measures distances between distri-butions.In their experiments the D2shape distribution mea-suring distances between random surface points is most ef-fective.Ohbuchi et al.[64]investigate shape histograms that are discretely parameterized along the principal axes of inertia of the model.The shape descriptor consists of three shape histograms:(1)the moment of inertia about the axis,(2) the average distance from the surface to the axis,and(3) the variance of the distance from the surface to the axis. Their experiments show that the axis-parameterized shape features work only well for shapes having some form of ro-tational symmetry.Ip et al.[37]investigate the application of shape distri-butions in the context of CAD and solid modeling.They re-fined Osada’s D2shape distribution function by classifying2random points as1)IN distances if the line segment con-necting the points lies complete inside the model,2)OUT distances if the line segment connecting the points lies com-plete outside the model,3)MIXED distances if the line seg-ment connecting the points lies passes both inside and out-side the model.Their dissimilarity measure is a weighted distance measure comparing D2,IN,OUT and MIXED dis-tributions.Since their method requires that a line segment can be classified as lying inside or outside the model it is required that the model defines a volume properly.There-fore it can be applied to volume models,but not to polyg-onal soups.Recently,Ip et al.[38]extend this approach with a technique to automatically categorize a large model database,given a categorization on a number of training ex-amples from the database.Ohbuchi et al.[63],investigate another extension of the D2shape distribution function,called the Absolute Angle-Distance histogram,parameterized by a parameter denot-ing the distance between two random points and by a pa-rameter denoting the angle between the surfaces on which two random points are located.The latter parameter is ac-tually computed as an inner product of the surface normal vectors.In their evaluation experiment this shape distribu-tion function outperformed the D2distribution function at about1.5times higher computational costs.Ohbuchi et al.[65]improved this method further by a multi-resolution ap-proach computing a number of alpha-shapes at different scales,and computing for each alpha-shape their Absolute Angle-Distance descriptor.Their experimental results show that this approach outperforms the Angle-Distance descrip-tor at the cost of high processing time needed to compute the alpha-shapes.Shape distributions distinguish models in broad cate-gories very well:aircraft,boats,people,animals,etc.How-ever,they perform often poorly when having to discrimi-nate between shapes that have similar gross shape proper-ties but vastly different detailed shape properties.3.1.3.Spatial map based similaritySpatial maps are representations that capture the spatial lo-cation of an object.The map entries correspond to physi-cal locations or sections of the object,and are arranged in a manner that preserves the relative positions of the features in an object.Spatial maps are in general not invariant to ro-tations,except for specially designed maps.Therefore,typ-ically a pose normalization is donefirst.Ankerst et al.[5]use shape histograms as a means of an-alyzing the similarity of3D molecular surfaces.The his-tograms are not built from volume elements but from uni-formly distributed surface points taken from the molecular surfaces.The shape histograms are defined on concentric shells and sectors around a model’s centroid and compare shapes using a quadratic form distance measure to compare the histograms taking into account the distances between the shape histogram bins.Vrani´c et al.[85]describe a surface by associating to each ray from the origin,the value equal to the distance to the last point of intersection of the model with the ray and compute spherical harmonics for this spherical extent func-tion.Spherical harmonics form a Fourier basis on a sphere much like the familiar sine and cosine do on a line or a cir-cle.Their method requires pose normalization to provide rotational invariance.Also,Yu et al.[86]propose a descrip-tor similar to a spherical extent function and a descriptor counting the number of intersections of a ray from the ori-gin with the model.In both cases the dissimilarity between two shapes is computed by the Euclidean distance of the Fourier transforms of the descriptors of the shapes.Their method requires pose normalization to provide rotational in-variance.Kazhdan et al.[43]present a general approach based on spherical harmonics to transform rotation dependent shape descriptors into rotation independent ones.Their method is applicable to a shape descriptor which is defined as either a collection of spherical functions or as a function on a voxel grid.In the latter case a collection of spherical functions is obtained from the function on the voxel grid by restricting the grid to concentric spheres.From the collection of spher-ical functions they compute a rotation invariant descriptor by(1)decomposing the function into its spherical harmon-ics,(2)summing the harmonics within each frequency,and computing the L2-norm for each frequency component.The resulting shape descriptor is a2D histogram indexed by ra-dius and frequency,which is invariant to rotations about the center of the mass.This approach offers an alternative for pose normalization,because their method obtains rotation invariant shape descriptors.Their experimental results show indeed that in general the performance of the obtained ro-tation independent shape descriptors is better than the cor-responding normalized descriptors.Their experiments in-clude the ray-based spherical harmonic descriptor proposed by Vrani´c et al.[85].Finally,note that their approach gen-eralizes the method to compute voxel-based spherical har-monics shape descriptor,described by Funkhouser et al.[30],which is defined as a binary function on the voxel grid, where the value at each voxel is given by the negatively ex-ponentiated Euclidean Distance Transform of the surface of a3D model.Novotni and Klein[61]present a method to compute 3D Zernike descriptors from voxelized models as natural extensions of spherical harmonics based descriptors.3D Zernike descriptors capture object coherence in the radial direction as well as in the direction along a sphere.Both 3D Zernike descriptors and spherical harmonics based de-scriptors achieve rotation invariance.However,by sampling the space only in radial direction the latter descriptors donot capture object coherence in the radial direction,as illus-trated byfig.4.The limited experiments comparing spherical harmonics and3D Zernike moments performed by Novotni and Klein show similar results for a class of planes,but better results for the3D Zernike descriptor for a class of chairs.Vrani´c[84]expects that voxelization is not a good idea, because manyfine details are lost in the voxel grid.There-fore,he compares his ray-based spherical harmonic method [85]and a variation of it using functions defined on concen-tric shells with the voxel-based spherical harmonics shape descriptor proposed by Funkhouser et al.[30].Also,Vrani´c et al.[85]accomplish pose normalization using the so-called continuous PCA algorithm.In the paper it is claimed that the continuous PCA is better as the conventional PCA and better as the weighted PCA,which takes into account the differing sizes of the triangles of a mesh.In contrast with Kazhdan’s experiments[43]the experiments by Vrani´c show that for ray-based spherical harmonics using the con-tinuous PCA without voxelization is better than using rota-tion invariant shape descriptors obtained using voxelization. Perhaps,these results are opposite to Kazhdan results,be-cause of the use of different methods to compute the PCA or the use of different databases or both.Kriegel et al.[46,47]investigate similarity for voxelized models.They obtain a spatial map by partitioning a voxel grid into disjoint cells which correspond to the histograms bins.They investigate three different spatial features asso-ciated with the grid cells:(1)volume features recording the fraction of voxels from the volume in each cell,(2) solid-angle features measuring the convexity of the volume boundary in each cell,(3)eigenvalue features estimating the eigenvalues obtained by the PCA applied to the voxels of the model in each cell[47],and a fourth method,using in-stead of grid cells,a moreflexible partition of the voxels by cover sequence features,which approximate the model by unions and differences of cuboids,each containing a number of voxels[46].Their experimental results show that the eigenvalue method and the cover sequence method out-perform the volume and solid-angle feature method.Their method requires pose normalization to provide rotational in-variance.Instead of representing a cover sequence with a single feature vector,Kriegel et al.[46]represent a cover sequence by a set of feature vectors.This approach allows an efficient comparison of two cover sequences,by compar-ing the two sets of feature vectors using a minimal match-ing distance.The spatial map based approaches show good retrieval results.But a drawback of these methods is that partial matching is not supported,because they do not encode the relation between the features and parts of an object.Fur-ther,these methods provide no feedback to the user about why shapes match.3.1.4.Local feature based similarityLocal feature based methods provide various approaches to take into account the surface shape in the neighbourhood of points on the boundary of the shape.Shum et al.[74]use a spherical coordinate system to map the surface curvature of3D objects to the unit sphere. By searching over a spherical rotation space a distance be-tween two curvature distributions is computed and used as a measure for the similarity of two objects.Unfortunately, the method is limited to objects which contain no holes, i.e.have genus zero.Zaharia and Prˆe teux[87]describe the 3D Shape Spectrum Descriptor,which is defined as the histogram of shape index values,calculated over an en-tire mesh.The shape index,first introduced by Koenderink [44],is defined as a function of the two principal curvatures on continuous surfaces.They present a method to compute these shape indices for meshes,byfitting a quadric surface through the centroids of the faces of a mesh.Unfortunately, their method requires a non-trivial preprocessing phase for meshes that are not topologically correct or not orientable.Chua and Jarvis[18]compute point signatures that accu-mulate surface information along a3D curve in the neigh-bourhood of a point.Johnson and Herbert[41]apply spin images that are2D histograms of the surface locations around a point.They apply spin images to recognize models in a cluttered3D scene.Due to the complexity of their rep-resentation[18,41]these methods are very difficult to ap-ply to3D shape matching.Also,it is not clear how to define a dissimilarity function that satisfies the triangle inequality.K¨o rtgen et al.[45]apply3D shape contexts for3D shape retrieval and matching.3D shape contexts are semi-local descriptions of object shape centered at points on the sur-face of the object,and are a natural extension of2D shape contexts introduced by Belongie et al.[9]for recognition in2D images.The shape context of a point p,is defined as a coarse histogram of the relative coordinates of the re-maining surface points.The bins of the histogram are de-。

基于Halcon_的手机背板表面缺陷快速检测方法

基于Halcon_的手机背板表面缺陷快速检测方法

第37卷第1期湖南理工学院学报(自然科学版)V ol. 37 No. 1 2024年3月 Journal of Hunan Institute of Science and Technology (Natural Sciences) Mar. 2024基于Halcon的手机背板表面缺陷快速检测方法朱志鹏, 陈腾飞, 廖杜杰, 张国云, 赵林(三维重建与智能应用技术湖南省工程研究中心, 湖南岳阳 414006;湖南理工学院信息科学与工程学院, 湖南岳阳 414006)摘要:针对人工检测手机背板表面缺陷效率低、成本高等问题, 提出一种基于Halcon的手机背板表面缺陷检测方法. 该方法可快速定位并校正光照不均、位置偏差等成像不一的背板图像, 同时运用二进制大型对象分析、形态学处理和模板匹配等算法实现对手机背板表面缺陷图像的检测与分类. 针对logo区域和非logo区域, 该检测系统采用不同的策略来检测缺陷. 缺陷分类环节利用Halcon中的分类工具, 结合事先定义的特征集合, 根据其形状、大小和颜色等特征进行分类, 以便后续的品质监控和反馈. 一方面对120张缺陷图片进行检测, 检出113张缺陷图片, 单张图片平均耗时约500 ms, 检出率达94%以上; 另一方面对800张同样条件下的无缺陷图片进行测试, 检出25张误判的图片, 即误判率约3%. 实验表明, 该方法具有较高的准确性和实用性, 相较于传统的人工检测, 可大幅度提升生产效率和检测精度, 有效控制企业人力成本. 该方法已在工业生产线实际应用.关键词:Halcon; 缺陷检测; 手机背板; 图像处理中图分类号: TP391 文章编号: 1672-5298(2024)01-0020-07Surface Defect Detection Rapid Method ofMobile Phone Backplane Based on Halcon ZHU Zhipeng, CHEN Tengfei, LIAO Dujie, ZHANG Guoyun, ZHAO Lin (Hunan Engineering Research Center of 3D Reconstruction and Intelligent Application Technology, Yueyang 414006, China;School of Information Science and Engineering, Hunan Institute of Science and Technology, Yueyang 414006, China) Abstract:Aiming at the problems of low efficiency and high cost of manually detecting defects on the surface of mobile phone backplane, a method based on Halcon was proposed for surface defects detection of mobile phone backplane. The method can quickly locate and correct the backplane images with different images such as uneven illumination and position deviation. At the same time, the algorithm of binary large object analysis, morphological processing and template matching was used to detect and classify the surface defect images of mobile phone backplane. For logo area and non-logo area, the detection system adopts different strategies to detect defects. The defect classification process utilizes the classification tool in Halcon, combined with the predefined feature set, according to its shape, size, color and other characteristics, so as to facilitate subsequent quality monitoring and feedback. On one hand, through the detection experiment of 120 defect diagrams, 113 defect diagrams were detected, and the average time of a single image was about 500 ms, and the detection rate was more than 94%. On the other hand, 800 non-defect pictures were tested under the same conditions, and 25 misjudgments were detected, that is, the misjudgment rate was 3%. The experiment shows that the method has high accuracy and practicability, compared with the traditional manual detection, can greatly improve the production efficiency and detection accuracy, and effectively control the labor cost of enterprises. At the same time, the method has been applied in industrial production lines.Key words: Halcon; defect detection; mobile phone backplane; image processing0 引言随着移动通信技术的快速发展, 智能手机已成为现代社会不可或缺的一部分. 而手机背板作为智能手机的外壳, 不仅承担着保护内部电路和组件的功能, 同时也具备提升美观和质感的重要作用. 然而, 在手机背板的制造过程中, 由于材料、工艺等方面的不确定因素, 不可避免地会产生各种各样的缺陷[1]. 准确、高效地检测手机背板的缺陷, 对于保证产品质量、提高生产效率以及增强品牌竞争力具有重要意义. 而Halcon作为一种先进的机器视觉软件系统, 它提供了大量的视觉处理函数, 支持各种图像采集、处理、收稿日期: 2023-02-15基金项目: 湖南省研究生科研创新项目(CX20221237, CX20221212)作者简介: 朱志鹏, 男, 硕士研究生. 主要研究方向: 机器视觉、人工智能通信作者: 赵林, 男, 博士, 副教授. 主要研究方向: 图像信息处理、智能控制第1期 朱志鹏, 等: 基于Halcon 的手机背板表面缺陷快速检测方法 21 分析、识别和检测任务[2].传统的手机背板表面缺陷检测方法主要是人工检测, 该方法耗时耗力且效率低下, 无法满足大规模生产的质量控制需求[3]. 此外, 人工检测容易受到操作人员主观判断的影响, 导致检测结果的不一致性和可重复性差[4]. 随着计算机视觉技术、图像处理技术以及人工智能的发展, 自动化视觉检测系统能够提供一个高效、准确并且客观的解决方案, 以确保产品质量和提升生产效率[5].本文提出一种基于Halcon 的手机背板表面缺陷检测方法. 通过结合高分辨率成像技术和先进的图像处理算法, 尝试解决实际工业生产线上的手机背板缺陷快速检测问题. 先提出包含图像预处理、特征提取、模板匹配以及缺陷分类等多个步骤的综合解决方案[6], 然后在此基础上开展一系列实验, 验证所提方法的有效性和实用性, 并探讨在实际应用时的潜在挑战及可能的解决策略.1 手机背板表面缺陷检测系统总体方案根据手机背板表面缺陷快速检测的需求构建一个综合性系统, 一方面包括硬件部分对图像的获取和采集, 另一方面包括软件部分对图像的处理以及对缺陷的识别和分类. 旨在通过优化硬件配置和软件算法, 实现自动化的高性能缺陷检测, 从而为手机背板检测提供一个可靠的方案.1.1 机械硬件结构手机背板缺陷检测机械结构包括提取背板的吸盘及气缸、工业相机、光源、工控机、图像采集模块、图像处理模块等. 当机台启动时, 载有手机背板的托盘被送入机台指定位置, 吸盘提取背板并放置在相机下方进行图像采集, 通过相机、光源、传感器等图像采集单元将图像信号传输到工控机上[7]. 工控机上的图像处理模块利用Halcon 中的图像处理算法对背板进行图像定位、图像增强等预处理操作, 然后根据预定的手机背板表面缺陷检测算法判断待检品是否存在缺陷, 最后由运控模块将检测出的OK 、NG 产品分类放置. 手机背板缺陷检测系统如图1所示.1.2 图像处理软件结合VS 2022集成开发环境, 使用图像处理开源库研发, 实现基于Halcon 的手机背板表面缺陷快速检测. Halcon 的开发接口支持几乎所有的工业相机和框架抓取卡, 功能覆盖数学运算、图像滤波、形态学分析、图像校正、颜色处理和几何及模式识别等计算任务. 手机背板的表面缺陷主要包括脏污、划伤、腐蚀点、水渍等. 手机背板的常见表面缺陷如图2所示.图像采集模块载有手机背板的托盘图1 手机背板缺陷检测系统 图2 手机背板常见表面缺陷手机背板缺陷检测流程如图3所示. 检测的主要步骤包括: (1)图像采集模块采集图像传输至图像处理模块; (2)运用图像定位、通道转换、图像增强和感兴趣区域(Region Of Interest, ROI)提取进行图像预处理;(3)将手机背板图像非logo 区域和logo 区域分开; (4)对不同区域进行检测, 并根据各缺陷特征将识别的缺22 湖南理工学院学报(自然科学版) 第37卷进而提取到特定特征点(角点、边缘、logo等)的位置信息, 后续在对齐的图像上应用相应的缺陷检测算法. 图4为部分特征点提取结果展示.2.2 通道转化现场缺陷检测机台CCD相机采集的图像为4096像素×4096像素RGB三通道的彩色图像. 为简化后续图像处理与分析, 并降低计算复杂度, 可将三通道图像转换成单通道图像, 对于特定问题只提取某个通道作为灰度图像. 该环节应尽可能防止手机背板部分颜色信息的丢失, 故按照Halcon中decompose3算子将输入的RGB图像分解为红、绿、蓝三个通道的图像. 图5为通道转换后的相应效果图. 在RGB图像中, 每个像素的颜色由红、绿、蓝三个通道的亮度值确定, 其亮度值范围为0~255, 0最暗, 255最亮. decompose3算子将每个像素的RGB值分别存储在三个通道图像中, 将RGB图像转换为三个独立的8位灰度图像, 每个灰度图像对应一个通道. 分解后的图像, 可根据后期实际项目情况达到特定的图像效果和任务需求.输入:Image输出:Image1输出:Image2输出:Image3图4 图像特征点区域及其坐标信息图5 通道转换效果2.3 图像增强实际检测流水线中采集的手机背板图像数量众多, 且图像易受外界传感器、环境或者传输影响, 带来图3 手机背板缺陷检测流程第1期 朱志鹏, 等: 基于Halcon 的手机背板表面缺陷快速检测方法 23 的变化具有不确定性, 因此成像的统一性是缺陷检测中不可忽视的重要问题之一. 图像增强的作用是改善图像的质量、对比度、清晰度或者细节等以突出图像中的一些重要的缺陷特征, 同时弱化非必要的图像信息. 以腐蚀点缺陷特征为例, 使用scale_image 算子调整图像的对比度, 调整前后对比如图6所示.scale_image 算子根据设定的目标值对输入的手机背板图像像素值进行线性映射, 即scale max min255factor ,value value =- (1) scale min offset factor value ,=-⨯ (2)new scale pixel factor pixel offset.=⨯+ (3)其中max value 、min value 分别是输入图像像素值的最大值和最小值, scale factor 、offset 分别是像素映射的斜率和偏移, new pixel 是线性映射后的新像素值. 通过增强图像, 可以使采集到的图像更易于观察、分析和处理, 以适应不同的要求和环境, 进而提高缺陷检测算法的准确性和效果.2.4 感兴趣区域提取受工业环境复杂性等影响, 实际采集到的手机背板图像有较多非必要背景, 还需将背板图像中的相机孔、logo 区域分离开, 即对感兴趣区域(ROI)进行提取, 以便进行后续的缺陷检测工作. 图7为手机背板部分点位的感兴趣区域提取过程效果图.通过ROI 提取可以减少图像处理的时间和计算量, 进而提高检测算法的效率和性能. 本文数据集单张图片规格为4096像素×4096像素, 占据内存48 MB, 每一组图像(包含可采集到手机背板全部信息的8个点位图像)占内存384 MB, 且每次至少检测100组数据, 因此缺陷检测的数据集属于大型数据集.调整前调整后原图分离背景分离相机孔、logo 图6 scale_image 算子调整图像对比度效果图7 ROI 提取效果 3 手机背板表面缺陷检测智能手机在设计的时候会划分不同的功能和装饰区域, 其中之一是logo 区域. 这个区域通常包括特定图案及文字, 往往会采用不同于手机背板其余区域的材料和颜色等. 由于这种划分, 手机背板的缺陷检测需要能区分这两个区域, 即logo 区域和非logo 区域. 因此, 需根据每个区域的特定性质实施不同的检测策略.3.1 logo 区域检测手机背板上的logo 和小字体通常设计为尺寸、形状固定, 具有高度标准化[8], 模板匹配算法能够轻松识别出其在不同图片中的相似区域. 这种一致性降低了算法出错的可能性, 提高了检测的准确性. 由于logo 等字体区域包含大量可区分的特征信息, 即使存在噪声或图像质量的轻微变化, 模板匹配技术通常也能可靠执行. 本文采用最小二乘法模板匹配遍历待检测图像的每个像素点, 将待检测图像与模板图像进行匹配, 通过对比计算两者对应位置的匹配得分来确定它们之间的差异, 匹配效果如图8所示. 设置一24 湖南理工学院学报(自然科学版) 第37卷个分数阈值, 当匹配得分超过设定的阈值时, 可以认为该位置与模板匹配良好, 从而达到对logo文字区域的检测效果.模板图待检测图8 手机背板logo区域检测3.2 非logo区域检测(1) 缺陷初筛对于非logo区域缺陷的检测, 先读取图像并将其转换为灰度图像, 水平和垂直方向遍历ROI图像的每一个像素点, 根据需求筛选出特定的灰度值. 记录所选灰度值像素点的位置信息, 并绘制出对应的散点图, 通过观察散点图来初步识别缺陷. 如果特定灰度值与缺陷特性相关, 那么这些灰度值的像素点的聚集可能就暗示着潜在缺陷的存在. 同理, 特定灰度值可换成其他缺陷相关的特征信息. 图9为背板ROI图像缺陷初筛灰度散点分布.图9 背板ROI图像缺陷初筛灰度散点分布(2) 缺陷检测初筛之后, 基于Halcon机器视觉软件平台, 对经过预处理的手机背板表面缺陷图像进行二进制大型对象(Blob)分析处理来细化缺陷检测, 提取出脏污、划伤、亮斑、腐蚀点等缺陷特征, 然后使用select_shape( )算子基于面积、周长、圆度、长短轴比、平均灰度等特征将识别出的非缺陷特征部分排除掉. 再采用area_center( )和intensity( )算子计算剩余区域的中心位置、面积和灰度值平均强度、标准偏差, 其中intensity( )算子可分析区域的纹理和一致性. 这种综合利用面积、位置和灰度信息的方法极大提高了对真第1期 朱志鹏, 等: 基于Halcon 的手机背板表面缺陷快速检测方法 25 实缺陷的识别能力. 最后, 通过对剩余候选区域的细致分析, 能够进一步筛选出真正的缺陷, 降低漏检率和误判率, 提高手机背板表面缺陷检测的精确度和可靠性.(3) 缺陷分类 接下来对手机背板表面几种常见工艺缺陷进行特征分析, 目的是选出有效特征进行提取. 这些特征包括几何特征、形状特征、颜色特征等. 为将缺陷及其相关特征进行可视化和量化, 对各类缺陷图像及其特征进行统计, 结果见表1. 每种缺陷类型都会与相应的示例检出图像配对展示, 紧接其后是各自的特征统计数据. 这些数据的统计不仅有助于揭示缺陷的本质和特征, 更重要的是, 为后续的分类算法设计提供了依据. 表1中单位pixel 表示像素.表1 各类缺陷图像及其特征统计特征类别缺陷名称脏污碰伤水渍斑点划伤异色 擦伤面积/pixel 1869 11006 151868 960 9550 365705 11671周长/pixel 213.581 407.061 3248.130126.627 1691.8505014.200 1500.480宽/pixel 40 112 950 36 88 1297 398高/pixel 87 136 274 34 736 560 68最大直径/pixel 90.758 135.724 953.546 38.079 739.899 1401.700 400.522圆度 0.273 0.735 0.200 0.805 0.022 0.154 0.086矩形度 0.820 0.780 0.670 0.851 0.762 0.630 0.610紧密度 1.942 1.198 5.528 1.329 23.851 5.470 15.351凸形 0.929 1.00 0.816 0.944 0.756 0.936 0.669长短轴比 3.664 1.308 3.616 1.042 40.718 2.984 7.723蓬松度 1.035 1.010 1.224 1.017 1.040 1.174 1.237平均灰度67.153 151.121 155.856 39.413 92.731 100.489 121.421 4 实验结果与分析出率是互补的, 其计算公式为FN MR 1DR.TP FN==-+ (5) 误判率是系统错误标记为缺陷的非缺陷项目与所有实际非缺陷项目的比例, 反映系统产生误报的频率, 其计算公式为FP FAR .FP TN=+ (6)26 湖南理工学院学报(自然科学版) 第37卷其中TP为真阳性(正确识别为缺陷的数量), TN为真阴性(正确识别为非缺陷的数量), FP为假阳性(错误识别为缺陷的数量), FN为假阴性(错误识别为非缺陷的数量, 即漏检数).按照本文的缺陷检测方案, 实际的检测结果见表2. 可以看出, 基于Halcon的自动化图像处理系统在扫描手机背板表面缺陷方面表现优异. 该系统的检出率达到94.167%, 这意味着其能够检测到几乎所有缺陷, 确保产品质量的高标准. 同时, 误判率仅为3.125%, 表示它几乎不会将良好的产品错误判定为次品, 这对于减少浪费和维护生产流程的连续性至关重要. 此外, 该系统的图像处理速度达到平均500 ms/张, 这样的速度可以轻松适应快节奏的工业生产线, 确保不会成为生产效率的瓶颈. 与传统的人工检测方式相比, 这种自动化缺陷检测方案显著提升了检测的速度, 同时也提高了结果的一致性和可重复性, 减少了因人为判断不一致引起的误差.表2 检测结果统计有缺陷样本数/个检出数/个检出率/% 平均耗时/ms 120 113 94.167 524.1无缺陷样本数/个检出数/个误判率/% 平均耗时/ms 800 25 3.125 512.75 结束语本文基于Halcon图像处理软件, 提出了一种先进的手机背板表面缺陷检测方法. 该方法利用Halcon 强大的图像分析库, 结合自定义的算法, 实现了对手机背板上各类缺陷的快速准确检测. 通过采集高分辨率图像, 并运用Halcon中的图像预处理、特征提取、分类器训练和模板匹配等多种算子, 本文方案能够有效区分正常品和次品, 提高了生产线的自动化水平和质量控制精度. 实验结果表明, 缺陷检出率达到了94%以上的高水平, 同时将误判率控制在3%左右, 证明了该方法的可靠性和实用性. 此外, 每张图像的平均处理时间约为500 ms, 使得本方法能够适应高速的工业生产环境. 另外, 本文提出的快速检测方法已应用于成都、杭州等地企业的实际项目.本文虽然给出基于工业背景下的手机背板表面缺陷快速检测方法, 但该方法在一些极端工作条件下仍存在一些局限性, 例如在背景复杂或光照条件极端变化时, 检测性能可能受到影响. 因此, 未来的工作将致力于提高算法的鲁棒性, 以确保算法在不同的生产环境下都能保持高效稳定的检测性能. 此外, 随着人工智能和机器学习技术的快速发展, 如何进一步融入深度学习等创新方法以提升检测准确度和速度, 也将是我们下一步研究的重点.参考文献:[1]陶显, 侯伟, 徐德. 基于深度学习的表面缺陷检测方法综述[J]. 自动化学报, 2021, 47(5): 1017−1034.[2]郭绍陶, 苑玮琦. 基于双高斯纹理滤波模板和极值点韦伯对比度的圆柱锂电池凹坑缺陷检测[J]. 电子学报, 2022, 50(3): 637−642.[3]高春艳, 秦燊, 李满宏, 等. 改进YOLOv7算法的钢材表面缺陷检测研究[J/OL]. 计算机工程与应用, 1−12[2024-01-22].[4]CHAO S M, TSAI D M, LI W C, et al. A generalized anisotropic diffusion for defect detection in low-contrast surfaces[C]// Proceedings of the 20thInternational Conference on Pattern Recognition, IEEE, 2010: 4408−4411.[5]曾毅, 郭龙源, 罗百通. 基于BP神经网络和均值差分的TFT-LCD MURA缺陷检测方法[J]. 湖南理工学院学报(自然科学版), 2017, 30(1):32−38.[6]任鹏霏, 周传德, 胡帅, 等. HALCON图像处理在纸杯缺陷检测中的应用[J]. 自动化应用, 2019 (6): 98−99+103.[7]贺振东, 王耀南, 毛建旭, 等. 基于反向P-M扩散的钢轨表面缺陷视觉检测[J]. 自动化学报, 2014, 40(8): 1667−1679.[8]汪成龙, 黄余凤, 陈铭泉, 等. 基于Halcon的字符缺陷检测系统[J]. 制造业自动化, 2018, 40(9): 38−41.。

基于用户兴趣模型的大学生就业信息推荐方法

基于用户兴趣模型的大学生就业信息推荐方法

I G I T C W技术 分析Technology Analysis60DIGITCW2024.02随着各地大学招生规模的不断扩大,如何为大学生提供个性化、精准的就业服务信息,已成为高校就业服务部门的一项重大任务与工作。

当前,现代化网络技术不断兴起,正在改变着企业的用工方式。

在新技术的支持与带动下,全新的管理方式不断涌现,这一现象不仅对高校毕业生就业提出了新的要求。

高校毕业生在面对新常态的同时,也需快速适应社会新形势的变化[1]。

为落实此项工作,提升大学生的就业服务质量,为不同需求的个体提供专项服务,本文将在此次研究中,引进用户兴趣模型,将个体就业需求作为前提条件,设计一种针对大学生的就业信息推荐方法,旨在通过此次设计,全面提高应届毕业生的一次就业率与大学生入职后的满意度。

1 基于用户兴趣模型的大学生兴趣特征信息提取为实现对大学生就业信息的推荐,引进用户兴趣模型,设计大学生兴趣特征信息的提取方法。

在此过作者简介:南 楠(1979-),女,汉族,山东日照人,副教授,本科,研究方向为控制工程、机械设计制造及其自动化。

张玉香(1974-),女,汉族,山东济宁人,副教授,本科,研究方向为机械设计与制造。

吴 冉(1967-),女,汉族,山东东平人,教授,本科,研究方向为机械设计制造及自动化。

基于用户兴趣模型的大学生就业信息推荐方法南 楠,张玉香,吴 冉(济宁职业技术学院,山东 济宁 272103)摘要:为提高推荐就业信息与大学生偏好就业信息的匹配程度,文章将个体就业需求作为前提条件,设计一种基于用户兴趣模型的大学生就业信息推荐方法。

首先,利用兴趣模型中的关联规则,对高校提供的就业信息中兴趣特征点进行匹配;其次,在既定的分类规则下,根据就业文本信息的内容对其进行类别划分;最后,根据用户浏览高校就业信息、在就业招聘界面的停留时间等,针对大学生偏好进行计算。

对比实验结果表明:本文中设计的推荐方法应用效果良好,按照规范使用该方法进行大学生就业信息推荐,能够增加推荐就业信息与大学生偏好就业信息的匹配程度,为大学生提供更加优质的就业服务,提高大学生就业质量。

3interface

3interface

1. INTRODUCTION Most current user interfaces for robot teleoperation are largely similar: the operator controls a remote robot via a hand-controller, such as a sensor gloves, a keyboard and a mouse, through observing feedback messages from the field video and other sensors. It is desirable to find a more natural interface as the one that human beings interact with each other. The visual gesture interface –realizing human machine interaction (HMI) by identifying human hand postures and movement, is a reasonable choice, since it is easy to deploy and can be used anywhere in the field of view of a visual camera. The operator does not need to master special hardware. Vision also allows a variety of gestures to be used, since it is software based.
Proceedings of the 2003 IEEE/RSJ Intl. Conference on Intelligent Robots and Systems Las Vegas, Nevada · October 2003

街舞分类教案英语初中模板

街舞分类教案英语初中模板

教学目标:1. Students will be able to understand and use key vocabulary related to different styles of street dance.2. Students will learn to classify street dances into different categories based on their characteristics.3. Students will practice speaking and listening skills through interactive activities.4. Students will develop an appreciation for street dance culture andits diversity.教学对象:初中英语学生教学时长:2课时教学准备:1. 教学课件,包含不同街舞风格的图片和视频。

2. 街舞风格卡片,如Breaking、Hip-Hop、Locking等。

3. 黑板或白板,用于板书和展示。

4. 音响设备,用于播放音乐。

教学步骤:第一课时一、导入1. Show a short video clip of street dance and ask students what they see and feel. (5分钟)2. Introduce the topic of the lesson: "Street Dance Classification."二、新授1. Present key vocabulary related to street dance styles:- Breaking: 动态舞、地板舞- Hip-Hop: 潮流舞、嘻哈舞- Locking: 锁舞、定点舞- Popping: 弹跳舞、泡泡舞- Krumping: 激情舞、街头战舞(10分钟)2. Divide the class into small groups and distribute street dance style cards to each group.3. Instruct students to research and discuss the characteristics of each dance style.三、活动1. Group activity: Each group presents their research findings to the class, using the vocabulary they've learned. (15分钟)2. Class discussion: Ask students to classify the dance styles into categories based on their characteristics. (10分钟)四、巩固1. Practice matching dance styles with their corresponding descriptions using a worksheet. (10分钟)2. Pair work: Students work in pairs to create a short dialogue about their favorite street dance style and why. (10分钟)五、总结1. Review the key vocabulary and dance styles discussed in the lesson.2. Discuss the importance of street dance culture and its influence on modern dance forms.第二课时一、复习1. Play a short quiz game to review the street dance styles and their characteristics. (10分钟)二、拓展1. Introduce a new street dance style that students may not be familiar with, such as Waacking or House.2. Have students create their own dance moves that could be classified as a new style.三、活动1. Group activity: Students create a short street dance performance using the styles they've learned. (20分钟)2. Show and tell: Each group performs their dance for the class, and the class votes for the best performance.四、总结1. Discuss the importance of creativity and expression in street dance.2. Encourage students to explore different dance styles and developtheir own unique moves.教学评价:1. Students' participation and engagement in class activities.2. Accuracy and fluency in using the target vocabulary and phrases.3. Ability to classify and describe different street dance styles.4. Quality of the street dance performances created by the students.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Graph Matching Using a Direct Classi cation of Node Attendance
Fred DePiero and Mohan Trivedi Computer Vision and Robotics Research Laboratory Electrical and Computer Engineering Department The University of Tennessee, Knoxville, TN 37996-2100 depiero@ trivedi@ Steve Serbin Mathematics Department University of Tennessee, Knoxville, TN 37996-2100 serbin@
Abstract
An algorithm has been developed that nds isomorphisms between both graphs and subgraphs. The development is introduced in the object recognition problem domain. The method isolates matching subgraphs, nds a node-to-node mapping and reorders nodes thus permitting a direct comparison to be made between the resultant graphs. The algorithm is of polynomial order. It yields approximate results, maintaining a performance level for subgraph isomorphisms at or above 95% under a wide variety of conditions and with varying levels of noise. The performance on the full size comparisons associated with graph isomorphisms has been found to be 100/100, also under a variety of conditions. Performance metrics, methods of testing and results are presented.
1.1 Goals for DCA Algorithm Development
The goals for nding subisomorphisms were driven by the object recognition application. First and foremost, it was desired to have an e cient algorithm. Results which are approximate - either in terms of accuracy or the size of extracted matches - were acceptable, rather than more lengthy and potentially more complete analyses. This is consistent with trends in active vision 6] 7]. We prefer a rapid examination of a scene followed by active exploration. Exploration can yield more information about a scene and can result in the availability of new viewpoints for observations. Achieving a rapid analysis of a scene is commensurate with this goal of active exploration. In object recognition it is also very helpful to provide more than just a simple yes or no answer to the isomorphism question. A node-to-node mapping between the scene and database graphs is a required nal result. The mapping allows the adjacency matrices and other properties of the two graphs to be compared directly. Some object recognition algorithms depend on node and edge properties having a very \information rich" character. Requiring close matches based on these \rich" properties greatly reduces the number of mappings that must be considered. Too great a reliance on such characterizations can create problems due to occlusions and other noise sources. Our goal is to nd an algorithm that relies on the dynamic 2
is research is sponsored in part by a grant awarded by the O ce of Technology Development, U.S. Department of Energy as part of the Environmental Restoration and Waste Management Program.
0
Techniques are also sometimes tailored for the bin picking problem which focuses on a cluttered scene involving just a few di erent kinds of objects 2]. We pursue active vision research 3] topics in the Computer Vision and Robotics Research Laboratory (CVRR), as well as real time ranging techniques involving Structured Light 4] and STG Stereo 5], for example. Given these interests, we desire a rapid recognition technique to help facilitate these e orts. Approximate results are acceptable from this perspective as a tradeo for speed. A more rapid technique will also aide in the processing of larger databases of known objects. Our approach is to evaluate evidence describing the likelihood of a node's predicted attendance in another graph. The evidence is based on measures that are local to each node. A global veri cation step completes the process. In this way, the algorithm performs a direct classi cation of node attendance (DCA). The presence of a node in the other graph is viewed in an isomorphic sense, i.e., there is some node-to-node mapping under which the matched nodes appear as identical members of their graphs. A node's attendance in the other graph is rated on a scale 0.0 to 1.0. The evidence that describes each node characterizes its local structural properties and any node and edge properties that a graph may possess. After the best matching pairs of nodes are identi ed, the nodes of one graph are reordered to allow a side by side veri cation of the graphs' similarity. Attention has been focused on testing DCA under challenging, realistic conditions. Extensive experiments have been run on arti cial data sets that were generated with a relatively low distinction in the local character of each node. The simulation tool developed to test DCA serves as a means to carefully investigate performance under varying conditions.
相关文档
最新文档