CN106775705B - A kind of software module division methods - Google Patents

A kind of software module division methods Download PDF

Info

Publication number
CN106775705B
CN106775705B CN201611140354.1A CN201611140354A CN106775705B CN 106775705 B CN106775705 B CN 106775705B CN 201611140354 A CN201611140354 A CN 201611140354A CN 106775705 B CN106775705 B CN 106775705B
Authority
CN
China
Prior art keywords
module
particle
value
software
fitness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611140354.1A
Other languages
Chinese (zh)
Other versions
CN106775705A (en
Inventor
孙家泽
令蓓蕾
王曙燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an pengdi Information Technology Co., Ltd
Original Assignee
Xian University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Posts and Telecommunications filed Critical Xian University of Posts and Telecommunications
Priority to CN201611140354.1A priority Critical patent/CN106775705B/en
Publication of CN106775705A publication Critical patent/CN106775705A/en
Application granted granted Critical
Publication of CN106775705B publication Critical patent/CN106775705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Abstract

The present invention discloses a kind of software module division methods for module partition problem in software system structure.This method utilizes the characteristic of particle swarm algorithm population optimizing, discrete codes are carried out to software module partition problem, the software design principle of high cohesion, lower coupling is used for the evaluation of result of software module division simultaneously, use the location updating mode using software modularity evaluation criteria as foundation, each location updating is all more nearly optimal software module and divides, and finally obtains the division result of software module.The present invention provides a kind of fast convergence rate, stability is good and divides the good software module division methods of effect, the structure for optimization software system.

Description

A kind of software module division methods
Technical field
The invention belongs to technical field of software engineering, and in particular to the problem of module divides into software systems provides A kind of software module division methods based on search mainly solve in software systems how optimization system code structure is asked Topic, makes each module its expectation function of execution as independent as possible, reaches elimination system redundancy, increase being appreciated that for software systems Property, reduce the purpose of software systems maintenance cost.
Background technique
Software maintenance is a very important stage in software life-cycle, and maintenance cost is often very high.With industry The increase of business demand, software systems gradually change, this makes to understand and safeguard that a software systems in large scale become to get over Come more complicated, this problem, which forces, needs a kind of reasonable software module division methods, and the something lost of document is lacked especially for those System is stayed, how to decompose software configuration, makes software systems become prone to understand, maintenance and management is one and urgently to be resolved asks Topic.
It is tissue or a kind of activity for reorganizing software systems that software module, which divides, keeps each module as independent as possible Its expectation function is executed, to reach optimization software system structure, redundancy is eliminated, increases the comprehensibility of software systems, reduce soft The purpose of part system maintenance expense.Software module cluster is a kind of important means that software module divides, and software cluster is to pass through Module dependency graph carries out modular structure division to software systems using clustering algorithm, and software systems are decomposed into some subsystems, Complicated software systems are made to become prone to understand and manage.The method for carrying out module division using cluster mode at present mainly have with Lower strategy: (1) classical clustering technique is applied directly in software module division;It (2) will be through according to the characteristic of software field The clustering algorithm of allusion quotation is improved and is used;(3) the new clustering technique of application carries out software module division.Technology for software cluster It can be mainly divided into figure theory and technology, the technology based on information retrieval, the technology based on data mining, the skill based on pattern match Art and meta-heuristic method.Method using figure theory and technology be software is expressed as one figure, wherein software entity (such as: side Method or class) it is used as node, the inheritance between calling or class between method is found in figure best as side with drawing method Division mode.However figure theoretical method solves clustering problem with the increase of software systems scale, search space is exponentially Increase.Software module partition problem is a np problem, due to that can generate huge solution space in search process, using traditional Optimisation technique is unable to get effective solution of problem.In order to reduce the complexity of calculating, the propositions such as Mancoridis are used based on search Method carry out software module division and realizing software system module dividing tool Bunch.Then, in succession by hill-climbing algorithm, Simulated annealing, the meta-heuristics method such as genetic algorithm are applied on software module partition problem, and problem is made to obtain certain journey The solution of degree, but that there are convergence rates is slow, the disadvantages of easily falling into local optimum.
Hussain etc. is proposed particle swarm optimization algorithm (PSO) for software module partition problem, but due to not examining Consider the discrete feature of software module partition problem solution space, the evaluation criteria that location updating does not divide software module considers It is interior, but being searched in solution space for blindness, so that optimization process convergence rate is slow, and computationally intensive, it is unfavorable for carrying out big The software module of scale complication system divides.
For this purpose, the present invention is based on discrete particle cluster algorithm, in conjunction with software module partition problem particularity to tradition Discrete particle cluster algorithm is improved, and location updating uses the location updating mode using software modularity evaluation criteria as foundation, Each location updating is set all to be more nearly optimal software module division result;Meanwhile the evaluation criteria that software module divides The software design principle of high cohesion, lower coupling is followed, fundamentally ensure that generation one is structurally reasonable, divides effective knot Fruit.
Summary of the invention
Problems solved by the invention: overcoming the shortcomings of existing methods, and improved discrete particle cluster algorithm is applied to software In module partition problem, a kind of division effect better method is provided for software module partition problem, makes complexity in large scale Software systems divide subsystem that is smaller on a large scale, being easier to management.
Inventive solution: to achieve the above object, technical solution of the present invention includes the following steps, as shown in Figure 1:
(1) tune in the software systems that object oriented language is write, using the method in code as node, between method It uses relationship as side, software systems is expressed as a figure, and store in the matrix form, if there is n method in the system, these Method can be expressed as F={ f with set F1,f2,...,fj,...,fn, j is 1 to any one integer value between n, fjTable Show j-th of method in the software systems, then the Two-Dimensional Moment of one n × n of call relation in the software systems between method Battle array B carries out coded representation, if method fiCall method fj, then the element value of the i-th row jth column of B is 1, i.e. bij=1, if method fi There is no call method fj, then the element value of the i-th row jth column of B is 0, i.e. bij=0, according to the method described above, the method for software systems It adjusts
With relationship coded representation are as follows:Wherein i and j is 1 to any one between n A integer value;
(2) assume that the software systems are divided into m module, wherein m < < n, then it is soft after being divided by module Part system can be expressed as C={ c with set C1,c2,...ci,...cm, i is 1 to any one integer value between m, ciTable Show i-th module of the software systems after module divides, in discrete particle cluster algorithm, it is assumed that initial population scale N, kind W-th of particle P in groupwIt indicates, then population can be indicated with set P, P={ P1,P2,...,Pw,...,PN, w is 1 to N Between any one integer value, the two-dimensional matrix A for being a m × n to the module splitting scheme coded representations of the software systems, Each column of matrix A represent a method, and every a line represents a module being divided into, then w-th of particle is iterating to t step When software systems module dividing condition byIn each elementValue determine that wherein i is 1 to any one between m Integer value, j is 1 to any one integer value between n, if method fjBelong to ciModule, thenIn the i-th row jth column member Element value is 1, i.e.,And other element values of jth column are 0, i.e.,Wherein k is 1 to any one integer between m It is worth and is not equal to i, then module dividing condition coded representation of w-th of particle when iterating to t step are as follows:N is the method number in the software systems, and m is the number of modules after software system module divides, t For iterative steps, wherein t is positive integer;
(3) parameter based on discrete particle cluster algorithm is set, the parameter includes the quantity N, soft of particle in population Module number m, the stopping criterion for iteration of part system division;
(4) each particle is initialized
Particle P in population PwInitial value using random generating mode initialize, it is specific as follows: assuming that for w-th Sub- PwIn j-th of method fj, wherein j be 1 to any one integer value between n, then it is random generate one 1 between m with Machine integer, when the integer generated at random is i, wherein i is 1 to any one integer value between m, represents particle PwJth A method belongs to i-th of module, thenInAnd other element values of jth column are 0, i.e.,Wherein k be 1 to m it Between any one integer value and be not equal to i, can determine particle P in this waywIn each method said module;It compiles CodeIn 1 number should have n, respectively represent module position selected by n method, all particles in population are with above-mentioned side Method carries out initialization coding, enables the number of iterations t=1, starts to carry out software system module division;
(5) fitness value of each particle is calculated
Assuming that i-th of module ciIn method number NiIt indicates, wherein i is 1 to any one integer value between m, mould Block ciWith module cjBetween the call number of method calculated by method call matrix B, and use Ei,jIt indicates:
Module ciCall number M between internalist methodologyiIt indicates:
After software systems carry out module division, i-th of module ciWith j-th of module cjBetween coupling εi,jIt indicates:
I-th of module ciCohesion by μiIt indicates:
High cohesion, lower coupling are the standards that evaluation software module divides superiority and inferiority, use software module quality (Modularization Quality, abbreviation MQ) combines the coupling between the cohesion and module of inside modules comprehensive Close the superiority and inferiority that evaluation software module divides, the module splitting scheme MQ that w-th of particle representswAssessment expression is carried out,
Wherein, m indicates software systems being divided into m module, and in optimization process, software systems coupling subtracts as far as possible Small, cohesion increases as far as possible, i.e. the value of MQ constantly increases, using function MQ as the fitness function in particle swarm algorithm, w The fitness value fitness of a particle current locationwIt indicates;
(6) for w-th of particle, wherein N is population scale, and w is 1 to any one integer value between N, will currently be fitted Answer the fitness value l of angle value He the particle local optimum positionwBest is compared, if its value is greater than lwBest, then by particle Local optimum position LocBest of the current location as the particlew=Aw, and the current fitness value of the particle is as the particle Local optimum fitness value lwBest=fitnessw
(7) for w-th of particle, wherein N is population scale, and w is 1 to any one integer value between N, by its part Adaptive optimal control angle value lwBest and the global fitness value LGBest for living through optimal location are compared, if w-th of particle Pw's Local optimum fitness value lwBest is greater than LGBest, then using its local optimum position as the global optimum of current particle group position Set gBest=LocBestw, global optimum fitness value LGBest of the local optimum fitness value of the particle as population =lwBest;
(8) position that each particle is respectively tieed up, position of w-th of particle when iterating to t step are updated according to following method It is expressed asIt determines position encoded when iterating to t+1 stepIt to determine and iterate to t+1 Particle P when stepwIn module belonging to each method, it is assumed that determine method fj, makeThe values of the i-th row jth column be 1, wherein j It is 1 to any one integer value between n, i is 1 to any one integer value between m, and other values of jth column are 0, i.e., Thus structural matrix
M such matrixes can be constructed altogetherWherein i is 1 to any one integer value between m, according to public affairs Formula (5) calculates each position encodedFitness valueWherein j is 1 to any one integer value between n, according to It is each position encoded that calculated fitness value calculates separately selectionProbability value
Then method fjWith probabilitySelecting module i thereby determines that method fjAffiliated module, and determine w-th of particle In module belonging to each method, i.e.,Value;
(9) if current the number of iterations t is equal to maximum number of iterations max or the LGBest of current particle group reaches Desired value 1, then the software module splitting scheme that particle corresponding to the gBest of global optimum position represents are that software module divides Optimal case, end loop;Otherwise, t=t+1 returns to (5) step.
The utility model has the advantages that
Currently, there are many method for solving software module partition problem, but traditional software module division methods are all letters Single clustering algorithm using some classics, it can be deduced that division result, but since software module partition problem is a np problem, The scale increase with software systems is clustered using conventional method, search space exponentially increases, using traditional excellent Change technology makes software module partition problem be unable to get effective solution.It the use of the heuristic based on search is to solve np problem Effective way, heuristic used at present mainly has: hill-climbing algorithm, simulated annealing, genetic algorithm, population are excellent The characteristics of changing algorithm etc., but when using these methods, not fully considering software module partition problem discrete solution space, makes Ideal division result cannot be obtained by obtaining.
Traditional Discrete Particle Swarm Optimization Algorithm (DPSO) be Kennedy and Eberhart in 1997 in particle swarm algorithm On the basis of for solves the problems, such as discrete space proposition, traditional discrete particle cluster algorithm continues to use substantially continuous particle swarm optimization algorithm Speed more new formula, i.e., speed still acts on continuous space, and position then utilizes sigmoid function by its discretization, but It is and not have from practical problem since location updating does not consider the difference of continuous quantity Yu discrete magnitude operation law The performance for efficiently using elementary particle colony optimization algorithm, so that optimizing effect is general.
Module partition problem based on particle swarm algorithm is exactly according to the call relation in software systems between method to every A method is clustered, and the structure of software systems is decomposed, make each inside modules have high cohesion, and module it Between have low coupling, keep the structure of software systems more reasonable, achieve the purpose that optimization software structure.In the present invention, Selection of the particle position per one-dimensional value only has 0,1 two discrete values, and 0, which represents the method, is not belonging to the module, and 1 represents the method category In the module, according to the dividing condition of current software module can redefine each method next time belonging to module, calculate and exist The one party fitness value owned by France in modules on the basis of software module divides at present, the high said module of fitness value is under The secondary probability for selecting the module is big;On the contrary, the low said module of fitness value selects the probability of the module small in next time.So The update of particle just more easily tends to optimal value, can accelerate to find the speed that the optimal module of software systems divides.This method Location updating selects modules to be soundd out respectively using each method, and new position is determined with different probability, improves algorithm Convergence rate, while simplify location updating operation.
Traditional discrete particle cluster algorithm does not account for the characteristics of software module partition problem, and location updating is not by software The evaluation criteria that module divides is taken into account, but blindness is searched in solution space, so that with conventional discrete particle swarm algorithm The convergence rate for solving software module partition problem is slow and computationally intensive, is unfavorable for carrying out the software of scale complex system Module divides.For this purpose, method of the invention is based on discrete particle cluster algorithm, in conjunction with the particularity of software module partition problem Conventional discrete particle swarm algorithm is improved, location updating is used using software modularity evaluation criteria as the location updating of foundation Mode makes each location updating all be more nearly optimal software module and divides, while the evaluation criteria that software module divides The software design principle of high cohesion, lower coupling is followed, fundamentally ensure that generation one is structurally reasonable, divide effectively software System structure.
Representative instance experimental result confirms the validity of this method: to software systems call graph as shown in Figure 2, dividing Software module division is not carried out with conventional discrete particle swarm algorithm (DPSO) and this method, fitness value becomes in 10 iterative process Change as shown in Figure 3.From experimental result as can be seen that proposed by the present invention drawn based on the software module for improving discrete particle cluster algorithm Compared with the software module division methods of conventional discrete particle swarm algorithm, method of the invention can find and be more nearly most for point method Excellent division result, method stability is good, fast convergence rate, is a kind of effectively software module partition method.
Detailed description of the invention
The flow chart of the invention of attached drawing 1.
Certain the software systems method call relational graph of attached drawing 2.
Attached drawing 3DPSO and this method adaptive value variation diagram.
Certain the software system module dividing condition figure of attached drawing 4.
Specific embodiment
By taking certain software systems as an example, it is the method call relational graph of the software systems as shown in Figure 2, illustrates the present invention The specific embodiment of disclosed software module division methods.
(1) to method call relationship graph code as shown in Figure 2, there are 10 methods in the software systems, these methods can To be expressed as F={ f with set F1,f2,...,fj,...,f10, j is any one integer value between 1 to 10, fjIndicating should J-th of method in software systems, and with one 10 × 10 two-dimensional matrix B coded representation,
(2) 3 modules are divided into the software systems, then the software systems after dividing by module can use set C It is expressed as C={ c1,c2,c3, respectively indicate c1,c2,c3Three modules.Module dividing condition coded representation to the software systems For one 3 × 10 two-dimensional matrix A, indicate 10 methods in software systems being divided into 3 modules.W-th particle Module initialization dividing condition coded representation isIterate to t step when software systems module dividing condition coded representation beWherein t is positive integer.
(3) parameter based on particle swarm algorithm is set, the quantity of particle is 5 in the parameter, and software systems are divided into Module number be 3, initialize each particle local optimum be 0, global optimum 0.
(4) each particle is initialized
Such as to P1Particle is initialized, and determines method f1Affiliated module, then random generation 1,2,3 three is random whole Number, it is assumed that the random number of generation is 3, then method f1Belong to the 3rd module c3.Respectively to F={ f1,f2,...,fj,...,f10} In each method generate random number, j be 1 to 10 between any one integer value, 10 random numbers of generation are respectively 3, 3,3,3,1,2,3,2,3,1, then it can determine P1The initialization of particle encodes are as follows:
Respectively to P2, P3, P4, P5Carry out initialization coding are as follows:
(5) the current fitness value of each particle is calculated
To calculate P1For the initialization fitness value of particle:
By method call matrix B, first calculating P1Method number in three modules of particle, N1=2;N2=2;N3=6; Module c1In include method f5And f10, module c2In include method f6And f8, module c3In include method f1、f2、f3、f4、f7、f9
Computing module ciIn method call module cjThe number of middle method are as follows:
Computing module ciCall number between internalist methodology are as follows:
After software systems carry out module division, i-th of module c is calculatediWith j-th of module cjBetween coupling εi,j:
Calculate i-th of module ciCohesion μi:
Calculate the fitness value of particle current location:
(6) for particle P1, by the fitness value of current fitness value 0.35307 and the particle local optimum position l1Best=0 is compared, and current location is preferable, then using the current location of particle as the local optimum position of the particle LocBest1=A1, local optimum fitness value l of the current fitness value of particle as the particle1Best=fitness1= MQ1=0.35307.
(7) for particle P1, by its local optimum fitness value l1The fitness value of Best and the global optimal location passed through LGBest is compared, if particle P1Local optimum l1Best is better than LGBest, then using its local optimum position as current The global optimum position gBest=LocBest of population1, the overall situation of the local optimum fitness value of the particle as population Adaptive optimal control angle value LGBest=l1Best=0.35307.
(8) position that more new particle is respectively tieed up, with particle P1The 3rd method f of middle determination3For affiliated module, it is assumed that method f3Belong to the 1st module c1, makeInCan then construct one it is position encodedAssuming that method f3Belong to the 2nd module c2, makeIn It then can be with structure Make one it is position encodedAssuming that method f3Belong to the 3rd module c3, makeInCan then construct one it is position encodedCalculate separately these three The fitness value of position:
It is each position encoded that selection is calculated separately according to calculated fitness valueProbability value:
Then method f3With 39.86% probability selection module c1, with 26.81% probability selection module c2, with 33.33% Probability selection module c3
According to the method described above, method f is calculated123.74% selecting the probability of three modules is respectively: 43.98%, 32.28%;Method f2Selecting the probability of three modules is respectively: 35.46%, 27.68%, 36.86%;Method f3Selection three The probability of module is respectively: 39.86%, 26.81%, 33.33%;Method f4Selecting the probability of three modules is respectively: 35.46%, 27.68%, 36.86%;Method f533.52% selecting the probability of three modules is respectively: 33.23%, 33.25%;Method f6Selecting the probability of three modules is respectively: 26.13%, 47.05%, 26.82%;Method f7Selection three The probability of module is respectively: 41.29%, 30.18%, 28.53%;Method f8Selecting the probability of three modules is respectively: 43.77%, 44.15%, 12.08%;Method f931.32% selecting the probability of three modules is respectively: 41.76%, 26.92%;Method f10Selecting the probability of three modules is respectively: 33.23%, 33.52%, 33.25%.
The parameter probability valuing that each module is selected according to each method calculated above obtains module dividing condition when t=1 Are as follows:Particle P at this time1The fitness value of current location are as follows:
(9) pass through 10 iteration, reach maximum number of iterations, then end loop, the optimal location of population is at this timeFinal module as software systems divides, as Fig. 4 shows.At this point, by the software comprising 10 methods System is divided into 3 modules As, B, C, includes method f in modules A1、f2、f3、f8、f9、f10;It include method f in module B4;Module C In include method f5、f6、f7;At this point, the fitness value that module divides is fitness=0.8437.
The module division of this software systems reaches high cohesion, and lower coupling is conducive to the maintenance and management in software systems later period.

Claims (2)

1. a kind of software module division methods, feature mainly comprise the steps that
(1) in the software systems that object oriented language is write, using the method in code as node, the calling between method is closed System is used as side, software systems is expressed as a figure, and store in the matrix form, if there is n method in the system, these methods F={ f can be expressed as with set F1,f2,...,fj,...,fn, j is 1 to any one integer value between n, fjIndicating should J-th of method in software systems, then the call relation in the software systems between method with the two-dimensional matrix B of a n × n into Row coded representation, if method fiCall method fj, then the element value of the i-th row jth column of B is 1, i.e. bij=1, if method fiNo Call method fj, then the element value of the i-th row jth column of B is 0, i.e. bij=0, according to the method described above, the method call of software systems Relationship coded representation are as follows:Wherein i and j is 1 to any one integer value between n;
(2) assume that the software systems are divided into m module, wherein m < < n, then the software system after dividing by module System can be expressed as C={ c with set C1,c2,...ci,...cm, i is 1 to any one integer value between m, ciIndicate soft I-th module of the part system after module divides, in discrete particle cluster algorithm, it is assumed that initial population scale N, in population W-th of particle PwIt indicates, then population can be indicated with set P, P={ P1,P2,...,Pw,...,PN, w is 1 between N Any one integer value, the two-dimensional matrix A for being a m × n to the module splitting scheme coded representations of the software systems, matrix Each column of A represent a method, and every a line represents a module being divided into, then w-th of particle is soft when iterating to t step The module dividing condition of part system byIn each elementValue determine that wherein i is 1 to any one integer between m Value, j is 1 to any one integer value between n, if method fjBelong to ciModule, thenIn the i-th row jth column element value It is 1, i.e.,And other element values of jth column are 0, i.e.,Wherein k be 1 to any one integer value between m and Not equal to i, then module dividing condition coded representation of w-th of particle when iterating to t step are as follows:N is the method number in the software systems, and m is the number of modules after software system module divides, t For iterative steps, wherein t is positive integer;
(3) parameter based on discrete particle cluster algorithm is set, the parameter includes the quantity N of particle in population, software system Unite the module number m divided, stopping criterion for iteration;
(4) each particle is initialized
Particle P in population PwInitial value using random generating mode initialize, it is specific as follows: assuming that for w-th of particle PwIn J-th of method fj, wherein j be 1 to any one integer value between n, then it is random to generate one 1 to random whole between m Number, when the integer generated at random is i, wherein i is 1 to any one integer value between m, represents particle PwJ-th of side It is owned by France in i-th of module, thenInAnd other element values of jth column are 0, i.e.,Wherein k is 1 between m Any one integer value and be not equal to i, can determine particle P in this waywIn each method said module;Coding In 1 number should have n, respectively represent module position selected by n method, all particles in population in the above way into Row initialization coding, enables the number of iterations t=1, starts to carry out software system module division;
(5) fitness value of each particle is calculated
Assuming that i-th of module ciIn method number NiIt indicates, wherein i is 1 to any one integer value between m, module ci With module cjBetween the call number of method calculated by method call matrix B, and use Ei,jIt indicates:
Module ciCall number M between internalist methodologyiIt indicates:
After software systems carry out module division, i-th of module ciWith j-th of module cjBetween coupling εi,jIt indicates:
I-th of module ciCohesion by μiIt indicates:
High cohesion, lower coupling are the standards that evaluation software module divides superiority and inferiority, use software module quality (Modularization Quality, abbreviation MQ) by the coupling between the cohesion and module of inside modules combine overall merit software module draw The superiority and inferiority divided, the module splitting scheme MQ that w-th of particle representswAssessment expression is carried out,
Wherein, m indicates software systems being divided into m module, and in optimization process, software systems coupling reduces as far as possible, Cohesion increases as far as possible, i.e. the value of MQ constantly increases, using function MQ as the fitness function in particle swarm algorithm, w-th The fitness value fitness of particle current locationwIt indicates;
(6) for w-th of particle, wherein N is population scale, and w is 1 to any one integer value between N, by current fitness The fitness value l of value and the particle local optimum positionwBest is compared, if its value is greater than lwBest, then by the current of particle Local optimum position LocBest of the position as the particlew=Aw, and office of the current fitness value of the particle as the particle Portion adaptive optimal control angle value lwBest=fitnessw
(7) for w-th of particle, wherein N is population scale, and w is 1 to any one integer value between N, by its local optimum Fitness value lwBest and the global fitness value LGBest for living through optimal location are compared, if w-th of particle PwPart Adaptive optimal control angle value lwBest is greater than LGBest, then using its local optimum position as the global optimum position of current particle group GBest=LocBestw, global optimum fitness value LGBest=of the local optimum fitness value of the particle as population lwBest;
(8) position that each particle is respectively tieed up is updated according to following method, position of w-th of particle when iterating to t step indicates ForIt determines position encoded when iterating to t+1 stepWhen determining that iterating to t+1 walks Particle PwIn module belonging to each method, it is assumed that determine method fj, makeThe i-th row jth column value be 1, wherein j be 1 To any one integer value between n, i is 1 to any one integer value between m, and other values of jth column are 0, i.e., Thus structural matrix
M such matrixes can be constructed altogetherWherein i is 1 to any one integer value between m, according to formula (5) It calculates each position encodedFitness valueWherein j is 1 to any one integer value between n, according to calculating It is each position encoded that fitness value out calculates separately selectionProbability value
Then method fjWith probabilitySelecting module i thereby determines that method fjAffiliated module, and determine every in w-th of particle Module belonging to a method, i.e.,Value;
(9) if current the number of iterations t is equal to maximum number of iterations max or the LGBest of current particle group reaches expectation Value 1, then the software module splitting scheme that particle corresponding to the gBest of global optimum position represents are that software module divides most Excellent scheme, end loop;Otherwise, t=t+1 returns to (5) step.
2. a kind of software module division methods according to claim 1, it is characterised in that: this method is applied to object-oriented During the software system module that language is write divides, with optimization software system structure.
CN201611140354.1A 2016-12-12 2016-12-12 A kind of software module division methods Active CN106775705B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611140354.1A CN106775705B (en) 2016-12-12 2016-12-12 A kind of software module division methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611140354.1A CN106775705B (en) 2016-12-12 2016-12-12 A kind of software module division methods

Publications (2)

Publication Number Publication Date
CN106775705A CN106775705A (en) 2017-05-31
CN106775705B true CN106775705B (en) 2019-10-11

Family

ID=58876070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611140354.1A Active CN106775705B (en) 2016-12-12 2016-12-12 A kind of software module division methods

Country Status (1)

Country Link
CN (1) CN106775705B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766076B (en) * 2017-11-07 2021-02-09 西安邮电大学 Software module clustering method for probability selection
CN109086050B (en) * 2018-07-04 2021-11-30 烽火通信科技股份有限公司 Method and system for analyzing module dependency relationship
CN111352650B (en) * 2020-02-25 2023-06-30 杭州电子科技大学 Software modularization multi-objective optimization method and system based on INSSGA-II
CN112270353B (en) * 2020-10-26 2022-11-01 西安邮电大学 Clustering method for multi-target group evolution software module
CN112416308A (en) * 2020-11-30 2021-02-26 上海汽车集团股份有限公司 Software optimization method and device and software architecture

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867090A (en) * 2012-09-13 2013-01-09 冶金自动化研究设计院 Parallel genetic algorithm steam pipe system model auto-calibration system based on TBB (threading building block)
CN103092662A (en) * 2013-02-04 2013-05-08 烽火通信科技股份有限公司 Software module upgrading method for terminal device based on embedded operating system
CN103164742A (en) * 2013-04-02 2013-06-19 南京邮电大学 Server performance prediction method based on particle swarm optimization nerve network
CN105138717A (en) * 2015-07-09 2015-12-09 上海电力学院 Transformer state evaluation method by optimizing neural network with dynamic mutation particle swarm
CN105281615A (en) * 2015-11-12 2016-01-27 广西师范大学 Method for optimizing brushless DC motor fuzzy controller based on improved particle swarm algorithm
CN105809356A (en) * 2016-03-14 2016-07-27 浪潮软件股份有限公司 Information system resource management method based on application integrated cloud platform

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867090A (en) * 2012-09-13 2013-01-09 冶金自动化研究设计院 Parallel genetic algorithm steam pipe system model auto-calibration system based on TBB (threading building block)
CN103092662A (en) * 2013-02-04 2013-05-08 烽火通信科技股份有限公司 Software module upgrading method for terminal device based on embedded operating system
CN103164742A (en) * 2013-04-02 2013-06-19 南京邮电大学 Server performance prediction method based on particle swarm optimization nerve network
CN105138717A (en) * 2015-07-09 2015-12-09 上海电力学院 Transformer state evaluation method by optimizing neural network with dynamic mutation particle swarm
CN105281615A (en) * 2015-11-12 2016-01-27 广西师范大学 Method for optimizing brushless DC motor fuzzy controller based on improved particle swarm algorithm
CN105809356A (en) * 2016-03-14 2016-07-27 浪潮软件股份有限公司 Information system resource management method based on application integrated cloud platform

Also Published As

Publication number Publication date
CN106775705A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106775705B (en) A kind of software module division methods
CN109948029B (en) Neural network self-adaptive depth Hash image searching method
CN112653142A (en) Wind power prediction method and system for optimizing depth transform network
Tsekouras et al. On training RBF neural networks using input–output fuzzy clustering and particle swarm optimization
CN101630161B (en) Intelligent system for complex industrial production and construction method thereof
CN113010547A (en) Database query optimization method and system based on graph neural network
CN101616074B (en) Multicast routing optimization method based on quantum evolution
CN106228235B (en) A kind of land utilization space Optimal Configuration Method for taking pattern Yu PROCESS COUPLING effect into account
CN110610019A (en) Dynamics analysis method of Markov jump system with partially unknown transition probability
CN115470889A (en) Network-on-chip autonomous optimal mapping exploration system and method based on reinforcement learning
Zhang et al. Reinforcement learning with actor-critic for knowledge graph reasoning
CN103577899A (en) Service composition method based on reliability prediction combined with QoS
CN113886460A (en) Low-bandwidth distributed deep learning method
CN107766076A (en) A kind of software module clustering method of probability selection
Yang et al. Forecasting time series with genetic programming based on least square method
Balazs et al. Hierarchical-interpolative fuzzy system construction by genetic and bacterial memetic programming approaches
AU2021104365A4 (en) A Method of Spatial Optimal Allocation of Land Resources Coupled with Dynamic Geographic Process
Dong et al. Scenario reduction network based on Wasserstein distance with regularization
Chen et al. An improved incomplete AP clustering algorithm based on K nearest neighbours
CN115527052A (en) Multi-view clustering method based on contrast prediction
Wang et al. Spatial queries based on learned index
CN116993027B (en) Improved water engineering joint scheduling optimization method
CN109711644A (en) Based on the fired power generating unit load optimal distribution method for improving pollen algorithm
CN115001978B (en) Cloud tenant virtual network intelligent mapping method based on reinforcement learning model
CN116303839B (en) Index calculation method for geospatial data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191219

Address after: 710000 room 2401, block B, Zhengxin building, Gaoxin 1st Road, hi tech Zone, Xi'an City, Shaanxi Province

Patentee after: Xi'an pengdi Information Technology Co., Ltd

Address before: 710000 No. 563 South Changan Road, Shaanxi, Xi'an

Patentee before: Xi'an University of Posts & Telecommunications