CN117149662A - Test method based on inertial weight chaotic particle swarm optimization technology - Google Patents

Test method based on inertial weight chaotic particle swarm optimization technology Download PDF

Info

Publication number
CN117149662A
CN117149662A CN202311406239.4A CN202311406239A CN117149662A CN 117149662 A CN117149662 A CN 117149662A CN 202311406239 A CN202311406239 A CN 202311406239A CN 117149662 A CN117149662 A CN 117149662A
Authority
CN
China
Prior art keywords
particle
software
iteration
test
particles
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311406239.4A
Other languages
Chinese (zh)
Inventor
孙军
李恒
笱光雄
王琴
孙浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yunta Information Technology Co ltd
Original Assignee
Shenzhen Yunta Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yunta Information Technology Co ltd filed Critical Shenzhen Yunta Information Technology Co ltd
Priority to CN202311406239.4A priority Critical patent/CN117149662A/en
Publication of CN117149662A publication Critical patent/CN117149662A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/08Computing arrangements based on specific mathematical models using chaos models or non-linear system models

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computer Hardware Design (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Nonlinear Science (AREA)
  • Algebra (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A testing method based on an inertial weight chaotic particle swarm optimization technology converts multi-objective optimization of resource allocation of tested software into single-objective optimization for dynamic solution, firstly, initialization is carried out, then coordinates and movement speeds of particles are iterated, in a population iteration process, fitness function values of all particles are calculated and compared with current individual extremum values, the extremum values are selected, the extremum values are updated, and a global extremum value obtained after the iteration is used as a software resource allocation matrix. For the initially obtained local extremum, the optimal solution is obtained through chaotic local search, and the problem that once the particle reaches the vicinity of the local optimal point in the motion process, the motion speed is slow, and the particle is easy to fall into the local optimal point is solved.

Description

Test method based on inertial weight chaotic particle swarm optimization technology
Technical Field
The application relates to the field of network computer software operation test, in particular to a test method based on an inertial weight chaotic particle swarm optimization technology.
Background
In recent years, the data information volume of wide area network/local area network is increasing, the volume of different software and its components, the information volume processed in unit time are also increasing, which puts higher demands on the functional module of computer software itself, task processing level. Therefore, testing of computer software is particularly important. The computer software running test generally comprises software resource allocation, running faults and other test contents, and how to use a universal automatic test platform and multiple big data test technologies to complete software test analysis of different computer equipment ports aiming at the software test resource utilization rate and the function execution efficiency becomes an important point of software test service attention.
The computer software test is generally aimed at different functional modules and execution programs, and is used for carrying out unit test, integration test and regression test of a system, and aims at carrying out centralized test of each program unit by collecting running state, data transmission and processing information of a certain test software client, wherein the centralized test comprises two schemes of black box test and white box test. The black box test surrounds software data flow, code statement coverage, branch point coverage and static statement of analysis code execution, and checks whether program interface connection and input and output data information are normal or not, and belongs to functional test of software. The white box test is to test the logic structure and logic execution path of the software program, test all host platform software by adopting an exhaustive path scheme, check the code statement coverage, logic structure and logic execution path of the software program, and set check points on different network nodes to check whether the actual running state and the expected state of the program are consistent.
The reasonable configuration of the serial-parallel software resources generally adopts the automatic elastic weight of the fuzzy neural network algorithm to dynamically allocate the running line and functional service resources of the computer software, so as to effectively reduce the problems of overlarge load of part of lines and overlarge software time delay and improve the rationality and adaptability of the software resource allocation and configuration. For the test of the dynamic allocation of the computer software resources, the serial and parallel load task transmission rates of the software are tested by using a resource allocation method supporting the multi-link access, a service system for multi-layer decision of the software tasks is constructed, the maximum rate of the task transmission of the upper layer is used as a reference, the resource allocation and transmission mode of the lower layer is reasonably set, and the allocation and utilization efficiency of the software cluster resources is effectively improved.
At present, a computer software test platform is built based on a host/target machine test technology and a BPSO particle swarm software test algorithm, a particle swarm is taken as a main line, the BPSO algorithm is taken as a big data information processing mechanism, software resource allocation and test analysis of input/output data processing are carried out, and according to a population adaptation degree function, the software test dynamic optimization problem is converted, the optimal value of the population particle position is updated, the results of serial-parallel software running test and resource allocation are obtained, and the efficiency and quality of the computer software test and data processing record are improved. However, the BPSO particle swarm software testing algorithm is prone to premature convergence, thereby affecting the efficiency and quality of the test.
Disclosure of Invention
The application provides a method and equipment for testing software resource allocation based on an inertial weight chaos particle swarm optimization technology, which are used for solving the problems that in the prior art, once particles reach the vicinity of a local optimal point in the motion process, the motion speed is slowed down and the particles fall into the local optimal point.
The first aspect of the present disclosure provides a method for testing software resource allocation based on an inertia weight chaos particle swarm optimization technique, which converts multi-objective optimization of resource allocation of software to be tested into single-objective optimization for dynamic solution, wherein in the dynamic solution process of resource allocation, the benefit index is U, the stability index is H, and the kth term U of the two indexes is calculated k 、h k The formula for normalization is shown in formula (1):
(1);
single-target adaptation built by this processThe stress level function is:(2) Wherein x is i Is particle(s)> Weight coefficients of U and H, respectively, and satisfy +.>+/>= 1;
The method comprises the following steps:
initializing: carrying out particle swarm initialization, individual extremum initialization and global extremum initialization on a data item set population tested by software, and setting the data scale of the software test asThe occupied memory space is d dimension, and the particles x in the z generation i Wherein is of the coordinates of (1)i = 1,2,⋯,m,The movement speed is expressed as formula (3): />,/>(3) Setting Z to represent the current iteration times, and setting the maximum iteration times Z, the initial value of the particle coordinates and the initial value of the particle movement speed, the maximum value and the minimum value of the inertia weight;
(2) The coordinates and the movement speed of the particles are iterated, along with the increase of the iteration times, the change directions of the coordinates and the movement speed of the particles in the data item set population are shown in the following formulas (4) and (5), and the calculated iteration times are z=z+1:
(4)
(5)
wherein c 1 、c 2 A motion factor representing the position of the particle at the optimal coordinates;P z ij 、G z ija random decimation factor representing the speed of particle motion; when the software tests the particle movement of the data item set population, the movement speed of the particle is restrained;
wherein:P z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) Is a particlei In the first placez When evolvingd The best position of itself in the dimensional space, i.e. the individual extremum, is noted as
P z ij = (P z i1,P z i2,P z i3,⋯,P z id) ;G z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) To all particles at the firstz The best position at the time of evolution, the global extremum, is denoted as G z ij= (G z i1, G z i2, G z i3,⋯, G z id ) The method comprises the steps of carrying out a first treatment on the surface of the rand1 and rand2 are random numbers between 0 and 1; the change formula of the inertia weight along with the iteration number z is as follows:
wherein: omega max And omega min Respectively represent the maximum value and the minimum value of omega;
(3) In the population iteration process, calculating the fitness function value of all particles, comparing the fitness function value with the current individual extremum, selecting a preferred value, and updating the individual extremum; comparing the self-adaptive degree function value of each particle with the global extremum, selecting a preferred value, and updating the global extremum;
(4) If the iteration number reaches Z, the iteration is terminated, otherwise, the iteration is continued until the iteration number reaches Z;
(5) Calculating the coordinate position and the movement speed of the particles in the Z iteration according to a formula (6), and calculating the optimal position and the single target adaptation degree function value of the particle population according to formulas (7) and (2):
(6)
(7);
(6) Global extremum obtained after iteration is completed, namely G z ijA matrix is allocated for the software resources.
Further, the sigmoid function is used to accelerate the particle velocity conversion and the particle position update, as shown in the formula (8) and the formula (9):
(8)
(9)
wherein the method comprises the steps ofRepresenting a random number +.>Representing an inertial factor, defining a particle movement velocity asAnd when the iteration number reaches Z, obtaining an optimal solution of the dynamic allocation of the software resources, as shown in a formula (9).
Optionally, before the dynamic solution is performed, a dynamic allocation model of serial-parallel software resources is built, and a plurality of resource blocks of the serial-parallel software system are set.
Optionally, the method sets the test data outlier and the boundary value around the collected test data information.
Further, the method obtains the functional resources of the software test, the task allocation time results of the data processing and the resource utilization rate of the software test.
A second aspect of the present disclosure provides a testing apparatus for software resource allocation based on an inertial weight chaos particle swarm optimization technique, the apparatus comprising:
single target fitness function module: the module converts multi-objective optimization of resource allocation of the tested software into single-objective optimization for dynamic solution, wherein the benefit index is U, the stability index is H, and the kth item U of the two indexes is obtained in the dynamic solution process of the resource allocation k 、h k The formula for normalization is shown in formula (1):
(1);
the single target fitness function constructed in this process is:
(2),
wherein x is i In the form of particles, the particles are, weight coefficients of U and H, respectively, and satisfy +.>+/>= 1;
An initialization module: carrying out particle swarm initialization and individual extremum initialization on data item set population tested by softwareInitialization and global extremum initialization, and setting the data scale of software test asThe occupied memory space is d dimension, and the particles x in the z generation i Wherein is of the coordinates of (1)i = 1,2,⋯,m,The movement speed is expressed as formula (3): /> (3) Setting Z to represent the current iteration times, and setting the maximum iteration times Z, the initial value of the particle coordinates and the initial value of the particle movement speed, the maximum value and the minimum value of the inertia weight;
and an iterative calculation module: the coordinates and the movement speed of the particles are iterated, along with the increase of the iteration times, the change directions of the coordinates and the movement speed of the particles in the data item set population are shown in the following formulas (4) and (5), and the calculated iteration times are z=z+1:
(4)
(5)
wherein c 1 、c 2 A motion factor representing the position of the particle at the optimal coordinates;P z ij 、G z ija random decimation factor representing the speed of particle motion; when the software tests the particle movement of the data item set population, the movement speed of the particle is restrained;
wherein:P z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) Is a particlei In the first placez When evolvingd The best position of itself in the dimensional space, i.e. the individual extremum, is noted as
P z ij = (P z i1,P z i2,P z i3,⋯,P z id) ;G z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) To all particles at the firstz The best position at the time of evolution, the global extremum, is denoted as G z ij= (G z i1, G z i2, G z i3,⋯, G z id ) The method comprises the steps of carrying out a first treatment on the surface of the rand1 and rand2 are random numbers between 0 and 1; the change formula of the inertia weight along with the iteration number z is as follows:
wherein: omega max And omega min Respectively represent the maximum value and the minimum value of omega;
and the extremum updating module is used for: in the population iteration process, calculating the fitness function value of all particles, comparing the fitness function value with the current individual extremum, selecting a preferred value, and updating the individual extremum; comparing the self-adaptive degree function value of each particle with the global extremum, selecting a preferred value, and updating the global extremum;
the iteration number control module: if the iteration number reaches Z, the iteration is terminated, otherwise, the iteration is continued until the iteration number reaches Z;
and an optimal value calculation module: calculating the coordinate position and the movement speed of the particles in the Z iteration according to a formula (6), and calculating the optimal position and the single target adaptation degree function value of the particle population according to formulas (7) and (2)
(6)
(7)
A resource allocation matrix acquisition module: the global extremum obtained after the iteration is finished is G z ijA software resource allocation matrix.
Further, the sigmoid function is used to accelerate the particle velocity conversion and the particle position update, as shown in the formula (8) and the formula (9):
(8)
(9)
wherein the method comprises the steps ofRepresenting a random number +.>Representing an inertial factor, defining a particle movement velocity asAnd when the iteration number reaches Z, obtaining an optimal solution of the dynamic allocation of the software resources, as shown in a formula (9).
Optionally, before the dynamic solution is performed, the initialization module establishes a dynamic allocation model of serial-parallel software resources, and sets a plurality of resource blocks of the serial-parallel software system.
Optionally, the initialization module sets abnormal values and boundary values of the test data around the collected test data information.
Optionally, the device can obtain the functional resource of the software test, the task allocation time result of the data processing and the resource utilization rate of the software test.
In the particle swarm algorithm, the particle velocity becomes slow once reaching the vicinity of the local optimum during the movement, and the particle tends to fall into the local optimum. The chaotic particle swarm algorithm combines chaotic optimization and a particle swarm optimization algorithm. Firstly, carrying out operation of a basic particle swarm optimization algorithm on an initialized particle swarm, and then obtaining an optimal solution for a initially obtained local extremum through chaotic local search; meanwhile, the sigmoid function is used for accelerating particle speed conversion and particle position updating, so that the resource allocation speed is accelerated.
Detailed Description
The following describes specific embodiments of the present disclosure in detail. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
The method for testing the software resource allocation based on the particle swarm optimization technology of the inertia weight chaos adopts a particle swarm algorithm of the software test, generally sets script use cases of abnormal values and boundary values of test data around collected test data information, and calculates each data individual adaptation value and optimal solution for the data item set population tested by the software. The method converts multi-objective optimization of resource allocation of the tested software into single-objective optimization for dynamic solution, wherein the benefit index is U, the stability index is H, and the kth item U of the two indexes is obtained in the dynamic solution process of the resource allocation k 、h k The formula for normalization is shown in formula (1):
(1);
the single target fitness function constructed in this process is:(2),
wherein x is i In the form of particles, the particles are, weight coefficients of U and H, respectively, and satisfy +.>+/>= 1;
The method comprises the following steps:
(1) Initializing: carrying out particle swarm initialization, individual extremum initialization and global extremum initialization on a data item set population tested by software, and setting the data scale of the software test asThe occupied memory space is d dimension, and the particles x in the z generation i Wherein is of the coordinates of (1)i = 1,2,⋯,m,The movement speed is expressed as formula (3): />,(3) Setting Z to represent the current iteration times, and setting the maximum iteration times Z, the initial value of the particle coordinates and the initial value of the particle movement speed, the maximum value and the minimum value of the inertia weight;
(2) The coordinates and the movement speed of the particles are iterated, along with the increase of the iteration times, the change directions of the coordinates and the movement speed of the particles in the data item set population are shown in the following formulas (4) and (5), and the calculated iteration times are z=z+1:
(4)
(5)
wherein c 1 、c 2 The motion factor of the particle at the optimal coordinate position is represented by [0,2.5 ] with the value range];P z ij 、G z ijRandom extraction factor representing particle movement speed, with value range of 0,1.5]The method comprises the steps of carrying out a first treatment on the surface of the When the software tests the particle movement of the data item set population, the movement speed of the particle is restrained;
wherein:P z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) Is a particlei In the first placez When evolvingd Self in dimensional spaceWhere there is the best fitness function value, namely the individual extremum, is recorded as
P z ij = (P z i1,P z i2,P z i3,⋯,P z id) ;G z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) To all particles at the firstz The best position at the time of evolution, the global extremum, is denoted as G z ij= (G z i1, G z i2, G z i3,⋯, G z id ) The method comprises the steps of carrying out a first treatment on the surface of the rand1 and rand2 are random numbers between 0 and 1; a first part of formula (1)“ω·vtij"is the inheritance of the particle to the front velocity, second part“c1· rand1·(P z ij - x z ij) "is" cognition "of particles, third part
“c2·rand2·(G z ij - x z ij )"is the sharing and collaboration of information between particles; omega is inertia weight, the size of the inertia weight is directly related to the accuracy degree of the search area, and the algorithm convergence is facilitated, so that the inertia weight is set from the maximum omega aiming at the phenomenon that the PSO algorithm is easy to converge early max Linearly decreasing to a minimum value omega min The change formula of the inertia weight along with the algorithm iteration number z is as follows:
wherein: omega max And omega min Respectively represent the maximum value and the minimum value of omega, generally omega max Take 0.9, omega min Taking 0.4;
in the particle swarm algorithm, the particle velocity becomes slow once reaching the vicinity of the local optimum during the movement, and the particle tends to fall into the local optimum. The chaotic particle swarm algorithm combines chaotic optimization and a particle swarm optimization algorithm. Firstly, carrying out operation of a basic particle swarm optimization algorithm on an initialized particle swarm, and then obtaining an optimal solution for a initially obtained local extremum through chaotic local search;
(3) In the population iteration process, calculating the fitness function value of all particles, comparing the fitness function value with the current individual extremum, selecting a preferred value, and updating the individual extremum; comparing the self-adaptive degree function value of each particle with the global extremum, selecting a preferred value, and updating the global extremum; comparing the current particle position with the optimal particle position, and comparing the self-adaption degree function values of the two particle positions;
(4) If the iteration number reaches Z, the iteration is terminated, otherwise, the iteration is continued until the iteration number reaches Z;
(5) Calculating the coordinate position and the movement speed of the particles in the Z iteration according to a formula (6), and calculating the optimal position and the single target adaptation degree function value of the particle population according to formulas (7) and (2):
(6)
(7);
(6) Global extremum obtained after iteration is completed, namely G z ijA matrix is allocated for the software resources.
In the operation process, a sigmoid function is used for accelerating the particle speed conversion and the particle position update, as shown in a formula (8) and a formula (9):
(8)
(9)
wherein the method comprises the steps ofRepresenting a random number +.>Representing an inertial factor, defining a particle movement velocity asAnd when the iteration number reaches Z, obtaining an optimal solution of the dynamic allocation of the software resources, as shown in a formula (9).
Before the dynamic solution is carried out, a dynamic allocation model of serial-parallel software resources is established, and a plurality of resource blocks of a serial-parallel software system are set. The method sets abnormal values and boundary values of test data around the collected test data information.
The method obtains the functional resources of the software test, the task allocation time results of the data processing and the resource utilization rate of the software test.
The method for testing the software resource allocation based on the particle swarm optimization technology with the inertia weight chaos can be realized in a computer simulation mode, and simulation software comprises corresponding functional modules:
single target fitness function module: the module converts multi-objective optimization of resource allocation of the tested software into single-objective optimization for dynamic solution, wherein the benefit index is U, the stability index is H, and the kth item U of the two indexes is obtained in the dynamic solution process of the resource allocation k 、h k The formula for normalization is shown in formula (1):
(1);
the single target fitness function constructed in this process is:(2),
wherein x is i In the form of particles, the particles are, weight coefficients of U and H, respectively, and satisfy +.>+/>= 1;
An initialization module: carrying out particle swarm initialization, individual extremum initialization and global extremum initialization on a data item set population tested by software, and setting the data scale of the software test asThe occupied memory space is d dimension, and the particles x in the z generation i Wherein is of the coordinates of (1)i = 1,2,⋯,m,The movement speed is expressed as formula (3): />,(3) Setting Z to represent the current iteration times, and setting the maximum iteration times Z, the initial value of the particle coordinates and the initial value of the particle movement speed, the maximum value and the minimum value of the inertia weight;
and an iterative calculation module: the coordinates and the movement speed of the particles are iterated, along with the increase of the iteration times, the change directions of the coordinates and the movement speed of the particles in the data item set population are shown in the following formulas (4) and (5), and the calculated iteration times are z=z+1:
(4)
(5)
wherein c 1 、c 2 Motion factor representing particle at optimal coordinate positionThe value range is [0,2.5 ]];P z ij 、G z ijRandom extraction factor representing particle movement speed, with value range of 0,1.5]The method comprises the steps of carrying out a first treatment on the surface of the When the software tests the particle movement of the data item set population, the movement speed of the particle is restrained;
wherein:P z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) Is a particlei In the first placez When evolvingd The best position of itself in dimensional space, i.e. the individual extremum, where there is the best fitness function value, is noted as
P z ij = (P z i1,P z i2,P z i3,⋯,P z id) ;G z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) To all particles at the firstz The best position at the time of evolution, the global extremum, is denoted as G z ij= (G z i1, G z i2, G z i3,⋯, G z id ) The method comprises the steps of carrying out a first treatment on the surface of the rand1 and rand2 are random numbers between 0 and 1; a first part of formula (1)“ω·vtij"is the inheritance of the particle to the front velocity, second part
“c1· rand1·(P z ij - x z ij) "is" cognition "of particles, third part
“c2·rand2·(G z ij - x z ij )"is the sharing and collaboration of information between particles; omega is inertia weight, the size of the inertia weight is directly related to the accuracy degree of the search area, and the algorithm convergence is facilitated, so that the inertia weight is set from the maximum omega aiming at the phenomenon that the PSO algorithm is easy to converge early max Linearly decreasing to a minimum value omega min The change formula of the inertia weight along with the algorithm iteration number z is as follows:
wherein: omega max And omega min Respectively represent the maximum value and the minimum value of omega, generally omega max Take 0.9, omega min Taking 0.4;
and the extremum updating module is used for: in the population iteration process, calculating the fitness function value of all particles, comparing the fitness function value with the current individual extremum, selecting a preferred value, and updating the individual extremum; comparing the self-adaptive degree function value of each particle with the global extremum, selecting a preferred value, and updating the global extremum; comparing the current particle position with the optimal particle position, and comparing the self-adaptive degree function values of the two particle positions,
the iteration number control module: if the iteration number reaches Z, the iteration is terminated, otherwise, the iteration is continued until the iteration number reaches Z;
and an optimal value calculation module: calculating the coordinate position and the movement speed of the particles in the Z iteration according to a formula (6), and calculating the optimal position and the single target adaptation degree function value of the particle population according to formulas (7) and (2)
(6)
(7)
A resource allocation matrix acquisition module: the global extremum obtained after the iteration is finished is G z ijA software resource allocation matrix.
In the operation process, a sigmoid function is used for accelerating the particle speed conversion and the particle position update, as shown in a formula (8) and a formula (9):
(8)
(9)
wherein the method comprises the steps ofRepresenting a random number +.>Representing an inertial factor, defining a particle movement velocity asAnd when the iteration number reaches Z, obtaining an optimal solution of the dynamic allocation of the software resources, as shown in a formula (9).
Before the dynamic solution is carried out, a dynamic allocation model of serial-parallel software resources is established, and a plurality of resource blocks of a serial-parallel software system are set. The method sets abnormal values and boundary values of test data around the collected test data information. The method obtains the functional resources of the software test, the task allocation time results of the data processing and the resource utilization rate of the software test.
The improved functions are realized by improving corresponding functional modules.
In order to verify objective effectiveness of software test data processing and resource dynamic allocation results, based on a particle swarm algorithm, an NS 2-alinone 2.26 software simulation tool is utilized to analyze experimental results of the software test. The simulation environment of the test process is Windows PC, the parameters of the computer equipment hardware are GenuineIntel (R) CPUT2080@2.67GHz CPU, 16GB memory and 1TB hard disk, the operating system is 64-bit Windows10, and all simulation tests are run on an NS 2-alinone 2.26 software tool. And obtaining functional resources of the software test, task allocation time results of data processing and resource utilization rate of the software test by using the software test of the particle swarm algorithm. From the allocation time of the software test function resource and the data processing task, the following can be obtained: with the increase of the software testing function resources and the data processing resources, the dynamic allocation and processing time of the resources is increased, when the software testing resources reach 300, the time spent for resource allocation is 14min, and when the software testing resources reach 700, the time spent for resource allocation is 22min, thereby indicating that the time spent for resource allocation testing of the software function service is not linear change while the quantity of the resources is continuously increased, and the dynamic allocation efficiency of the software resources under larger resource flow is higher.
And then, from the time of software data transmission and processing task allocation, when the software data processing resource amount reaches 300, the time spent for resource allocation is 24min, and when the software data processing resource amount reaches 700, the time spent for resource allocation is 31min, and the execution efficiency of the software data processing task is higher under the condition of larger data processing flow.
Meanwhile, according to the comparison result of the utilization rate of the software testing resources, the method comprises the following steps: with the increase of the test times, the utilization rate of software resource allocation, data transmission and processing tasks can generate continuous fluctuation change. The utilization rate of the software resource allocation fluctuates greatly, and the utilization rate is about 72% at the highest and about 41% at the lowest. The resource utilization rate of software data transmission and processing task execution maintains a steadily increasing trend, the lowest utilization rate is 58%, the highest utilization rate is about 82%, and the optimal test is achieved when the test times are 700 times.

Claims (10)

1. A testing method based on an inertial weight chaotic particle swarm optimization technology converts multi-objective optimization of resource allocation of tested software into single-objective optimization for dynamic solution, wherein in the dynamic solution process of the resource allocation, the benefit index is U, the stability index is H, and the kth term U of the two indexes is calculated k 、h k The formula for normalization is shown in formula (1):
(1);
the single target fitness function constructed in this process is:(2) Wherein x is i Is particle(s)> Weight coefficients of U and H, respectively, and satisfy +.>+/> = 1;
The method comprises the following steps:
(1) Initializing: carrying out particle swarm initialization, individual extremum initialization and global extremum initialization on a data item set population tested by software, and setting the data scale of the software test asThe occupied memory space is d dimension, and the particles x in the z generation i Wherein is of the coordinates of (1)i = 1,2,⋯,(3):
(3),
Setting Z to represent the current iteration times, and setting the maximum iteration times Z, the initial value of the particle coordinates, the initial value of the particle motion speed, the maximum value of the inertia weight and the minimum value;
(2) The coordinates and the movement speed of the particles are iterated, along with the increase of the iteration times, the change directions of the coordinates and the movement speed of the particles in the data item set population are shown in the following formulas (4) and (5), and the calculated iteration times are z=z+1:
(4)
(5)
wherein c 1 、c 2 A motion factor representing the position of the particle at the optimal coordinates;P z ij 、G z ija random decimation factor representing the speed of particle motion; when the software tests the particle movement of the data item set population, the movement speed of the particle is restrained;
wherein:P z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) Is a particlei In the first placez When evolvingd In dimensional space asP z ij = (P z i1,P z i2,P z i3,⋯,P z id) ;G z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) To all particles at the firstz The best position at the time of evolution, the global extremum, is denoted as G z ij= (G z i1, G z i2, G z i3,⋯, G z id ) The method comprises the steps of carrying out a first treatment on the surface of the rand1 and rand2 are random numbers between 0 and 1; omega is inertial weight, and the change formula of the inertial weight along with the iteration number z is as follows:
wherein: omega max And omega min Respectively represent the maximum value and the minimum value of omega;
(3) In the population iteration process, calculating the fitness function value of all particles, comparing the fitness function value with the current individual extremum, selecting a preferred value, and updating the individual extremum; comparing the self-adaptive degree function value of each particle with the global extremum, selecting a preferred value, and updating the global extremum;
(4) If the iteration number reaches Z, the iteration is terminated, otherwise, the iteration is continued until the iteration number reaches Z;
(5) Calculating the coordinate position and the movement speed of the particles in the Z iteration according to a formula (6), and calculating the optimal position and the single target adaptation degree function value of the particle population according to formulas (7) and (2):
(6)
(7);
(6) Global extremum obtained after iteration is completed, namely G z ijA matrix is allocated for the software resources.
2. The test method based on the inertial weight chaotic particle swarm optimization technology according to claim 1, wherein a sigmoid function is used for accelerating particle velocity conversion and particle position update, as shown in a formula (8) and a formula (9):
(8)
(9)
wherein the method comprises the steps ofRepresenting a random number +.>Representing an inertial factor, defining a particle movement velocity of +.>Obtained when the number of iterations reaches ZThe optimal solution for dynamic allocation of software resources is shown in equation (9).
3. The test method based on the inertial weight chaotic particle swarm optimization technology according to claim 2, wherein a dynamic allocation model of serial-parallel software resources is established before the dynamic solution is performed, and a plurality of resource blocks of serial-parallel software systems are set.
4. The test method based on the inertial weight chaotic particle swarm optimization technology according to claim 3, wherein the test data abnormal value and the boundary value are set around the collected test data information.
5. The test method based on the inertial weight chaotic particle swarm optimization technology according to claim 4, wherein the functional resources of the software test, the task allocation time results of data processing and the resource utilization rate of the software test are obtained.
6. A testing device for software resource allocation based on an inertia weight chaos particle swarm optimization technology comprises:
single target fitness function module: the module converts multi-objective optimization of resource allocation of the tested software into single-objective optimization for dynamic solution, wherein the benefit index is U, the stability index is H, and the kth item U of the two indexes is obtained in the dynamic solution process of the resource allocation k 、h k The formula for normalization is shown in formula (1):
(1);
the single target fitness function constructed in this process is:(2),
wherein x is i In the form of particles, the particles are, weight coefficients of U and H, respectively, and satisfy +.>+/>=1; an initialization module: carrying out particle swarm initialization, individual extremum initialization and global extremum initialization on a data item set population of a software test, and setting the data scale of the software test as +.>The occupied memory space is d dimension, and the particles x in the z generation i Wherein is of the coordinates of (1)i = 1,2,⋯,m,The movement speed is expressed as formula (3): />,/>(3) Setting the number Z of previous iterations, and setting the maximum number Z of iterations, the initial value of the particle coordinates, the initial value of the particle motion speed, the maximum value and the minimum value of the inertia weight;
and an iterative calculation module: the coordinates and the movement speed of the particles are iterated, along with the increase of the iteration times, the change directions of the coordinates and the movement speed of the particles in the data item set population are shown in the following formulas (4) and (5), and the calculated iteration times are z=z+1:
(4)
(5)
wherein c 1 、c 2 A motion factor representing the position of the particle at the optimal coordinates;P z ij 、G z ija random decimation factor representing the speed of particle motion; when the software tests the particle movement of the data item set population, the movement speed of the particle is restrained;
wherein:P z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) Is a particlei In the first placez When evolvingd The best position of itself in the dimensional space, i.e. the individual extremum, is noted asP z ij = (P z i1,P z i2,P z i3,⋯,P z id) ;G z ij ( j = 1,2,⋯,d ; i = 1,2,⋯,m) To all particles at the firstz The best position at the time of evolution, the global extremum, is denoted as G z ij= (G z i1, G z i2, G z i3,⋯, G z id ) The method comprises the steps of carrying out a first treatment on the surface of the rand1 and rand2 are random numbers between 0 and 1; the change formula of the inertia weight along with the iteration number z is as follows:wherein: omega max And omega min Respectively represent the maximum value and the minimum value of omega;
and the extremum updating module is used for: in the population iteration process, calculating the fitness function value of all particles, comparing the fitness function value with the current individual extremum, selecting a preferred value, and updating the individual extremum; comparing the self-adaptive degree function value of each particle with the global extremum, selecting a preferred value, and updating the global extremum;
the iteration number control module: if the iteration number reaches Z, the iteration is terminated, otherwise, the iteration is continued until the iteration number reaches Z;
and an optimal value calculation module: calculating the coordinate position and the movement speed of the particles in the Z iteration according to a formula (6), and calculating the optimal position and the single target adaptation degree function value of the particle population according to formulas (7) and (2)
(6)
(7)
A resource allocation matrix acquisition module: the global extremum obtained after the iteration is finished is G z ijA software resource allocation matrix.
7. The test device for software resource allocation based on the particle swarm optimization technology of inertia weight chaos according to claim 6, wherein a sigmoid function is used to accelerate particle velocity conversion and particle location update, as shown in formula (8) and formula (9):
(8)
(9)
wherein the method comprises the steps ofRepresenting a random number +.>Representing an inertial factor, defining a particle movement velocity of +.>And when the iteration number reaches Z, obtaining an optimal solution of the dynamic allocation of the software resources, as shown in a formula (9).
8. The test device for software resource allocation based on the particle swarm optimization technology of inertia weight chaos according to claim 7, wherein the initialization module establishes a dynamic allocation model of serial-parallel software resources before the dynamic solution is performed, and sets a plurality of resource blocks of the serial-parallel software system.
9. The test device for software resource allocation based on the particle swarm optimization technology of inertia weight chaos according to claim 8, wherein the initialization module sets abnormal test data values and boundary values around the collected test data information.
10. The test device for software resource allocation based on the particle swarm optimization technology of inertia weight chaos according to claim 9, wherein the device can obtain the functional resources of the software test, the task allocation time result of data processing and the resource utilization rate of the software test.
CN202311406239.4A 2023-10-27 2023-10-27 Test method based on inertial weight chaotic particle swarm optimization technology Pending CN117149662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311406239.4A CN117149662A (en) 2023-10-27 2023-10-27 Test method based on inertial weight chaotic particle swarm optimization technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311406239.4A CN117149662A (en) 2023-10-27 2023-10-27 Test method based on inertial weight chaotic particle swarm optimization technology

Publications (1)

Publication Number Publication Date
CN117149662A true CN117149662A (en) 2023-12-01

Family

ID=88902931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311406239.4A Pending CN117149662A (en) 2023-10-27 2023-10-27 Test method based on inertial weight chaotic particle swarm optimization technology

Country Status (1)

Country Link
CN (1) CN117149662A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133258A (en) * 2016-12-01 2018-06-08 南京理工大学 A kind of mixing global optimization method
CN108376116A (en) * 2018-01-31 2018-08-07 浙江理工大学 Based on the method for generating test case for improving particle cluster algorithm
CN108493951A (en) * 2018-03-21 2018-09-04 中南大学 A kind of multi-objective reactive optimization method based on Chaos particle swarm optimization algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133258A (en) * 2016-12-01 2018-06-08 南京理工大学 A kind of mixing global optimization method
CN108376116A (en) * 2018-01-31 2018-08-07 浙江理工大学 Based on the method for generating test case for improving particle cluster algorithm
CN108493951A (en) * 2018-03-21 2018-09-04 中南大学 A kind of multi-objective reactive optimization method based on Chaos particle swarm optimization algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
元尼东珠 等: "串并行软件测试资源动态分配方法仿真", 计算机仿真, vol. 37, no. 9, pages 250 - 337 *
罗超 等: "计算机软件测试方法的研究分析", 《长江信息通信》, no. 02, pages 83 - 85 *
薛文: "一种改进惯性权重的粒子群优化算法", 《现代信息科技》, vol. 7, no. 20, pages 88 - 91 *

Similar Documents

Publication Publication Date Title
CN113011602B (en) Federal model training method and device, electronic equipment and storage medium
CN110515739B (en) Deep learning neural network model load calculation method, device, equipment and medium
Jin et al. A framework for evolutionary optimization with approximate fitness functions
EP4080416A1 (en) Adaptive search method and apparatus for neural network
CN115437795B (en) Video memory recalculation optimization method and system for heterogeneous GPU cluster load perception
CN112685841B (en) Finite element modeling and correcting method and system for structure with connection relation
CN112949820A (en) Cognitive anti-interference target detection method based on generation of countermeasure network
CN111709350B (en) Low-frequency oscillation modal parameter identification method and system based on FCM clustering
Pan et al. A multi-objective clustering evolutionary algorithm for multi-workflow computation offloading in mobile edge computing
CN113283186A (en) Universal grid self-adaption method for CFD
CN111030089B (en) Method and system for optimizing PSS (Power System stabilizer) parameters based on moth fire suppression optimization algorithm
CN113971416A (en) Cable early fault identification method
CN110515845B (en) Combined test case optimization generation method based on improved IPO strategy
CN116701001B (en) Target task allocation method and device, electronic equipment and storage medium
CN117149662A (en) Test method based on inertial weight chaotic particle swarm optimization technology
Li et al. An improved binary quantum-behaved particle swarm optimization algorithm for knapsack problems
Wang et al. Learning regularity for evolutionary multiobjective search: A generative model-based approach
Zhang et al. Multi-objective optimization problems using cooperative evolvement particle swarm optimizer
CN114970856A (en) Model pruning method, device, equipment and storage medium based on hardware characteristics
CN116011272A (en) Multi-variable multi-target level optimization method for engine suspension system
CN112883651B (en) System-level testability design multi-objective optimization method based on improved PBI method
Zhang et al. Repeatable multi-dimensional virtual network embedding in cloud service platform
CN115220818A (en) Real-time dependency task unloading method based on deep reinforcement learning
CN114064235A (en) Multitask teaching and learning optimization method, system and equipment
CN109117352A (en) Server performance prediction technique and device

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