CN115396335B - Industrial wireless network equipment access IPv6 test system and method based on micro-service - Google Patents

Industrial wireless network equipment access IPv6 test system and method based on micro-service Download PDF

Info

Publication number
CN115396335B
CN115396335B CN202210961111.3A CN202210961111A CN115396335B CN 115396335 B CN115396335 B CN 115396335B CN 202210961111 A CN202210961111 A CN 202210961111A CN 115396335 B CN115396335 B CN 115396335B
Authority
CN
China
Prior art keywords
test
service
bird nest
test case
micro
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
CN202210961111.3A
Other languages
Chinese (zh)
Other versions
CN115396335A (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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post 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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202210961111.3A priority Critical patent/CN115396335B/en
Publication of CN115396335A publication Critical patent/CN115396335A/en
Application granted granted Critical
Publication of CN115396335B publication Critical patent/CN115396335B/en
Priority to PCT/CN2023/096985 priority patent/WO2024032100A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/044Network management architectures or arrangements comprising hierarchical management structures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/16Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using machine learning or artificial intelligence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention relates to an industrial wireless network equipment access IPv6 test system and method based on micro-service, which belong to the field of network equipment test, a user logs in a test management system, creates a test item, fills in a PICS form and provides tested equipment for testers; the tester accesses the tested equipment into the tested network environment; the test management system generates a test case set and sorts the priority of the test cases in the test case set; the test management system executes test cases one by one and sends a test instruction to the test agent; the test agent accesses the IPv6 test environment to the industrial wireless network equipment according to the operation instruction to send a test flow; the industrial wireless network equipment is accessed into the network equipment in the IPv6 test environment to forward and respond the test flow to the test agent; the test agent uploads the result to a test management system based on a micro-service architecture; after all the test cases are executed, the test management system analyzes the test results to generate a test report.

Description

Industrial wireless network equipment access IPv6 test system and method based on micro-service
Technical Field
The invention belongs to the field of network equipment testing, and relates to an IPv6 access testing system and method for industrial wireless network equipment based on micro-service.
Background
In the field of industrial data acquisition, various industrial wireless network protocols are of a wide variety. Currently, various industrial wireless protocol standards such as WIA-PA, wirelessHART, 6LoWPAN and the like exist, and various proprietary industrial protocols are developed by various automation equipment production and integration merchants, so that the various protocol standards are not uniform and are not compatible with each other.
The advent of IPv6 provides a solution to the above-described problem. IPv6 is used as the next generation IP protocol, and provides necessary technical support and wide address resources for seamless connection of an IP network and an industrial network. The IPv6 technology innovation is applied to the field of industrial wireless networks, so that the problem of mass terminal access can be effectively solved, a huge network space and a data transmission channel are provided for networked intelligent transformation and upgrading, and interconnection and intercommunication among heterogeneous networks are promoted.
Before the industrial wireless network equipment is accessed to the IPv6, related tests should be carried out on the equipment, but the test research on the access of the industrial wireless network equipment to the IPv6 network is less nowadays, the test methods aiming at various network protocols are various, and the conventional single software architecture test method is difficult to meet the fusion and expansion requirements of various industrial wireless network access IPv6 test services.
Disclosure of Invention
In view of the above, the present invention is directed to a micro-service-based industrial wireless network device access IPv6 testing system and method.
In order to achieve the above purpose, the present invention provides the following technical solutions:
in one aspect, the invention provides an industrial wireless network device access IPv6 test system based on micro-service, which comprises a test management system, a test agent and a test environment based on micro-service architecture;
the test management system based on the micro-service architecture comprises an interaction layer, a forwarding layer, a service layer, a data layer and a treatment layer:
interaction layer: providing a human-computer interaction interface for a user based on the interaction interface of Web;
and (3) a forwarding layer: the service gateway is responsible for filtering and forwarding the request of the interaction layer, calling the service of the service layer and carrying out a load balancing function;
service layer: independent micro-services divided by functional modules are included, including: the system comprises a test resource management service module, a test implementation management service module, a test project management service module, a user management service module and a log management service module;
data layer: all data required by the normal operation of the system are saved;
treatment layer: improving reliability and fault tolerance of a micro-service system, comprising: the service registration and discovery module provides a function of managing each micro service instance; the service fusing module is used for preventing fault propagation through a fault transfer and system isolation means; the service link is tracked and monitored, and performance data on the micro-service call link is collected; the service configuration center centrally manages all configuration attribute files;
The test agent is used for analyzing the test instruction from the test management system based on the micro-service architecture, sending the data stream to the corresponding test environment, receiving the data stream from the test environment, processing the data stream, and uploading the data stream processing result interacted with the test environment to the test management system based on the micro-service architecture;
the test environments comprise a gateway test environment, a router test environment and a terminal test environment, which are respectively test environments built by a gateway, a router and a terminal to be accessed to an IPv6 network; the test environment comprises a standard wireless router, a wireless terminal, an IPv6 wireless border gateway, and a tested wireless router, a tested wireless terminal and a tested IPv6 wireless border gateway provided by a user.
Further, the test agent includes:
communication interface: providing a communication function with a test management system based on a micro-service architecture;
protocol standard: the protocol module which is the same as the tested industrial wireless network is embedded, so that the protocol consistency test can be carried out with the tested industrial wireless network;
test agent description: including useful information related to the test, including definition information of the test agent, driving test control information, and related parameter information;
Test driving: and the method is responsible for accessing the IPv6 test environment interaction test flow with the industrial wireless network equipment.
Further, each micro-service in the service layer specifically includes:
the test resource management service module comprises test case management and test data management, and is used for managing the access of the wireless network equipment with different protocols to the IPv6 test case, the data required by the test and the test result data;
the test implementation management service module comprises wireless access test management, test report management and test case implementation management; the wireless access test management accesses IPv6 test service to wireless network equipment of various protocols; the test report management comprises an adding and deleting operation function aiming at the test report; the test case implementation management comprises test case set optimization and test case execution functions;
the test item management service module comprises functions of creating, deleting, checking and maintaining states of test items;
the user management service module comprises the steps of checking, adding, deleting and distributing the authority of the user information;
the log management service module comprises an operation log and a test case execution log of a recording system.
On the other hand, the invention provides a micro-service-based industrial wireless network equipment access IPv6 test method, which comprises the following steps:
s1: a user logs in a test management system based on a micro-service architecture, creates test items, fills in a PICS form, and provides tested equipment for a tester;
s2: the tester accesses the tested equipment into the tested network environment according to the details in the test project;
s3: the test management system based on the micro-service architecture calls corresponding internal resources according to test items created by a user, calls wireless access test services to generate test case sets, calls a test case set optimization algorithm and ranks the test cases in the test case sets in priority;
s4: the test management system based on the micro-service architecture executes the test cases one by one according to the test case set and sends a test instruction to the test agent;
s5: the test agent accesses the IPv6 test environment to the industrial wireless network equipment according to the operation instruction to send a test flow;
s6: the industrial wireless network equipment is accessed into the network equipment in the IPv6 test environment to forward and respond the test flow, and finally the test flow is responded to the test agent;
s7: the test agent simply processes the responsive test flow and uploads the result to a test management system based on a micro-service architecture;
S8: after all the test cases are executed, the test management system based on the micro-service architecture analyzes the test results to generate a test report.
Further, the basis for the first acquisition of the test case set is that the PICS table part entry filled by the user comprises device_type_id field, protocol_type_id field and requirement_information field information; binding device_type_id field, protocol_type_id field, and requirement_information field information by the test case;
if the test item is not executed for the first time, the access test service sends a test case history execution record of the test item to the test case management service, and the test case management service calls a test case base from the database according to test_case_id field information of the test case history execution record.
Further, before optimizing the test case set, renumbering the test cases to obtain a test case numbering sequence;
the input of the test case set optimization algorithm is test case number x ij And the corresponding test case's test requirement coverage number
Figure BDA0003792907240000031
Test case history execution failure number +.>
Figure BDA0003792907240000032
The output is the optimized test case number sequence; the test case set optimization algorithm comprises the following steps:
S31: defining the test requirement coverage number and the historical failure number of the test case;
s32: initializing the test requirement coverage number and the historical failure number of the test case;
s33: judging whether or not there is
Figure BDA0003792907240000033
If not, the common sorting algorithm is used according to +.>
Figure BDA0003792907240000034
And (3) carrying out descending order on the sizes to obtain an optimized test case number sequence, and if the optimized test case number sequence exists, calling an improved multi-target cuckoo search algorithm to obtain the optimized test case number sequence.
Further, the improved multi-objective cuckoo-based search algorithm comprises the steps of:
a1: defining population scale, discovery probability and ending conditions;
a bird nest represents a numbered sequence of all test cases of a test case set, represents a possible solution, and is defined as:
Figure BDA0003792907240000041
wherein n represents the number of all bird nests, i.e., the population size; m represents the number of test cases of a test case set, namely the number of test case numbers; tMax represents the maximum number of iterations; x is x ij A j-th test case number indicating an i-th bird nest;
Figure BDA0003792907240000042
representing the ith nest after t iterations;
a population is defined as:
Figure BDA0003792907240000043
when executing a random walk mechanism, discarding part of bird nests with a certain probability, wherein the probability that a host of the bird nest discovers a cuckoo egg is pa, and defining an ending condition as whether the current iteration number is the maximum iteration number tMax or not;
A2: initializing a population and determining an fitness function;
a3: judging whether an ending condition is met, namely whether the maximum iteration time tMax is reached, if so, outputting an optimal bird nest, otherwise, executing the following circulation steps;
a4: generating a new bird nest and updating the population through a Lewy flight mechanism;
a5: generating a new bird nest and updating the population through a random walk mechanism;
a6: judging whether the mutation decision condition is met, if so, updating the iteration times, and returning to the step A4; if not, generating a new bird nest by using a mutation mechanism, updating the population, updating the iteration times, and returning to the step A4.
The mutation decision conditions were:
Figure BDA0003792907240000044
wherein γ represents the threshold of the mutation mechanism; u represents algebra to be traced;
triggering a mutation mechanism when the fitness value of the ith bird nest successive u generation is kept to be changed within a small range, and updating the population by using the current random walk mechanism
Figure BDA00037929072400000413
Decision making is performed as a t+1 generation population;
the mutation mechanism generates a new bird nest formula as follows:
Figure BDA0003792907240000045
in the formula ,
Figure BDA0003792907240000046
representing the bird nest obtained by the treatment; xθ represents a random mutation parameter;
carrying out asexual genetic mechanism repair treatment on the test case number of the new bird nest; computing population
Figure BDA00037929072400000414
Is set in the bird nest of (a)
Figure BDA0003792907240000047
Fitness value- >
Figure BDA0003792907240000048
Non-dominant solution set +.>
Figure BDA0003792907240000049
Comparison->
Figure BDA00037929072400000410
and />
Figure BDA00037929072400000411
The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure BDA00037929072400000412
In the target space according to
Figure BDA0003792907240000051
Find datum point +.>
Figure BDA0003792907240000052
Pair by pair comparison->
Figure BDA0003792907240000053
And datum point
Figure BDA0003792907240000054
Distance sum->
Figure BDA0003792907240000055
Is->
Figure BDA0003792907240000056
Is a distance of (2); keeping the bird nest with smaller distance to obtain new population
Figure BDA0003792907240000057
Bird nest after comparison and retention operations is noted as
Figure BDA0003792907240000058
Updating optimal bird nest->
Figure BDA0003792907240000059
Fitness value thereof
Figure BDA00037929072400000510
Updating optimal bird nest->
Figure BDA00037929072400000511
And its fitness value->
Figure BDA00037929072400000512
Further, the step A2 specifically includes the following steps:
initializing each bird nest in the population:
Figure BDA00037929072400000513
wherein randomPermutation (m) generates a random permutation function of size m for the ith initial bird nest, the initial population is
Figure BDA00037929072400000514
Taking maximized test requirement coverage rate and maximized historical execution failure rate as sequencing targets, wherein the maximized test requirement coverage rate means that the test cases cover more test requirements as soon as possible, and the maximized historical execution failure rate means that the test cases with defects found out have higher priority in the historical execution process;
the objective function of maximizing test demand coverage is:
Figure BDA00037929072400000515
wherein m represents the number of test cases of one test case set; x is x ij A j-th test case number indicating an i-th bird nest;
Figure BDA00037929072400000516
Representing the number of test requirements covered by a test case; RCS represents the number of test requirements covered by all test cases;
the objective function that maximizes the historical execution failure rate is:
Figure BDA00037929072400000517
in the formula ,
Figure BDA00037929072400000518
representing the historical execution failure number of one test case, and FCS represents the historical execution failure number of all the test cases;
bird nest objective function f (x) with maximized test requirement coverage and maximized historical execution failure rate as ranking targets i ) Expressed as:
f(x i )=[f 1 (x i ),f 2 (x i )]
taking the objective function as a fitness function, taking the value of the objective function as a fitness value, and obtaining a non-dominant solution set NDS of the initial population by the following formula (0)
Figure BDA00037929072400000519
wherein xa and xb Is two different bird nests, find NDS (0) Reference point (Max (f) 1 ),Max(f 2 ) Is marked as RP (0) Calculating a non-dominant solution nearest to the reference point as an initial population P (0) Optimal solution
Figure BDA0003792907240000061
Its fitness value->
Figure BDA0003792907240000062
Calculating the solution farthest from the reference point as the initial population P (0) Worst solution->
Figure BDA0003792907240000063
Its fitness value->
Figure BDA0003792907240000064
Further, the step A5 specifically includes the following steps:
optimal bird nest removal by utilizing Laiwei flight mechanism
Figure BDA0003792907240000065
Other bird nest positions thanAnd updating the state, wherein an initial updating formula is as follows:
Figure BDA0003792907240000066
wherein α represents a step control amount;
Figure BDA0003792907240000067
representing the ith nest after t iterations; / >
Figure BDA0003792907240000068
Is indicated at->
Figure BDA0003792907240000069
Generating a new bird nest through a Laiwei flight mechanism, wherein the new bird nest is a temporary updated version of the bird nest and is not a t+1 generation bird nest; />
Figure BDA00037929072400000610
Representing point-to-point multiplication; levy (β) represents a random search path, subject to Levy distribution;
the Levy random number is generated using the following formula:
Figure BDA00037929072400000611
wherein μ, v obeys a standard n-too-distribution;
Figure BDA00037929072400000612
adapting step size
Figure BDA00037929072400000613
The method comprises the following steps: />
Figure BDA00037929072400000614
in the formula ,
Figure BDA00037929072400000615
representing the step length of the ith nest in the t iteration populations; />
Figure BDA00037929072400000616
The representation is the fitness value of the ith bird nest in the t iteration populations; />
Figure BDA00037929072400000617
Representing an optimal bird nest fitness value in the t iteration populations;
Figure BDA00037929072400000618
representing the worst bird nest fitness value in the t iteration populations;
the improved Lewy flight update formula is:
Figure BDA00037929072400000619
rounding the test case number of the new bird nest, and replacing the out-of-range test case number and the repeated number with irrelevant values, and marking as a; the irrelevant values in the new bird nest are then derived from the old bird nest
Figure BDA00037929072400000620
Is obtained according to old bird nest->
Figure BDA00037929072400000621
Is the value order filling of the new bird nest; repairing new bird nest by asexual genetic mechanism to obtain bird nest>
Figure BDA00037929072400000622
Bird nest after calculation and repair
Figure BDA00037929072400000623
Is>
Figure BDA00037929072400000624
Get non-dominant solution set->
Figure BDA00037929072400000625
Comparison->
Figure BDA00037929072400000626
and />
Figure BDA00037929072400000627
The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +. >
Figure BDA00037929072400000628
In the target space according to ∈>
Figure BDA0003792907240000071
Find datum point +.>
Figure BDA0003792907240000072
Pair by pair comparison->
Figure BDA0003792907240000073
Is->
Figure BDA0003792907240000074
Distance sum->
Figure BDA0003792907240000075
And datum point
Figure BDA0003792907240000076
Is a distance of (2); keeping the bird nest with smaller distance to obtain new population +.>
Figure BDA0003792907240000077
Bird nest after comparison and retention operation is marked +.>
Figure BDA0003792907240000078
Updating optimal bird nest->
Figure BDA0003792907240000079
And its fitness value->
Figure BDA00037929072400000710
Updating optimal bird nest->
Figure BDA00037929072400000711
And its fitness value->
Figure BDA00037929072400000712
Further, the step A5 specifically includes the following steps:
the random walk mechanism is a process of simulating that a host of a bird nest has a certain probability that a bird nest may be abandoned after a cuckoo egg is found, and generating a new bird nest elsewhere, and the random walk mechanism produces a new bird nest on a line
Figure BDA00037929072400000713
The expression of (2) is as follows:
Figure BDA00037929072400000714
wherein ,
Figure BDA00037929072400000715
representing population->
Figure BDA00037929072400000716
Any of the 3 bird nests; epsilon represents 0,1]Random numbers in (a); pa represents the discovery probability; h (epsilon-pa) is a Hertius function, when (epsilon-pa) is more than or equal to 0, the function value is 1, otherwise, the function value is 0;
asexual genetic mechanism repair treatment is carried out on the test case number of the new bird nest to obtain a population
Figure BDA00037929072400000717
Computing population
Figure BDA00037929072400000718
Is->
Figure BDA00037929072400000719
Fitness value->
Figure BDA00037929072400000720
Non-dominant solution set +.>
Figure BDA00037929072400000721
Comparison->
Figure BDA00037929072400000722
and />
Figure BDA00037929072400000723
The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure BDA00037929072400000724
In the target space according to
Figure BDA00037929072400000725
Find datum point +.>
Figure BDA00037929072400000726
Pair by pair comparison- >
Figure BDA00037929072400000727
Is->
Figure BDA00037929072400000728
Distance sum->
Figure BDA00037929072400000729
Is->
Figure BDA00037929072400000730
Is a distance of (2); the one with smaller reserved distanceBird nest, obtaining new population
Figure BDA00037929072400000731
Bird nest after comparison and retention operations is noted as
Figure BDA00037929072400000732
Updating optimal bird nest->
Figure BDA00037929072400000733
Fitness value thereof
Figure BDA00037929072400000734
Updating optimal bird nest->
Figure BDA00037929072400000735
And its fitness value->
Figure BDA00037929072400000736
The invention has the beneficial effects that: according to the IPv6 testing system based on the micro services, the fusion and expansion requirements of various industrial wireless networks for accessing the IPv6 testing services are effectively met, each micro service only pays attention to one task and can well complete the task, the micro services can be independently deployed, the micro services are loosely coupled, and the services are mutually coordinated and matched. The micro-service architecture can provide great help for the deployment of test systems for the access of industrial wireless network devices to IPv 6.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and other advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the specification.
Drawings
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in the following preferred detail with reference to the accompanying drawings, in which:
FIG. 1 is an IPv6 test topology diagram of an industrial wireless network device access based on micro-services;
FIG. 2 is a diagram of an IPv6 test framework for access of industrial wireless network devices based on micro services;
FIG. 3 is an overall test workflow diagram;
FIG. 4 is a functional demand organization chart of a test management system based on a micro-service architecture;
FIG. 5 is a flow chart of test case acquisition;
FIG. 6 is a flowchart of a test case set optimization service routine;
FIG. 7 is a flow chart of a multi-objective cuckoo search algorithm based on improvement;
FIG. 8 is a target space diagram;
FIG. 9 is a schematic diagram of a asexual genetic mechanism repair process;
FIG. 10 is a flow chart of test case execution.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the illustrations provided in the following embodiments merely illustrate the basic idea of the present invention by way of illustration, and the following embodiments and features in the embodiments may be combined with each other without conflict.
Wherein the drawings are for illustrative purposes only and are shown in schematic, non-physical, and not intended to limit the invention; for the purpose of better illustrating embodiments of the invention, certain elements of the drawings may be omitted, enlarged or reduced and do not represent the size of the actual product; it will be appreciated by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numbers in the drawings of embodiments of the invention correspond to the same or similar components; in the description of the present invention, it should be understood that, if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc., that indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, it is only for convenience of describing the present invention and simplifying the description, but not for indicating or suggesting that the referred device or element must have a specific azimuth, be constructed and operated in a specific azimuth, so that the terms describing the positional relationship in the drawings are merely for exemplary illustration and should not be construed as limiting the present invention, and that the specific meaning of the above terms may be understood by those of ordinary skill in the art according to the specific circumstances.
Fig. 1 is a micro-service-based industrial wireless network device access IPv6 test topology, and as shown in the drawing, the micro-service-based industrial wireless network device access IPv6 test topology mainly includes two parts: testing service layer and tested network layer.
The test service layer consists of a user, a browser, an internet router, a test management system based on a micro-service architecture and the like:
(1) The user accesses the test management system based on the micro-service architecture through a browser, and the browser displays a human-computer interaction interface of the user. The user can register, log in, select test service, inquire test result and the like according to the man-machine interaction interface;
(2) The Internet router provides an Internet path for the browser equipment of the user, the test management system based on the micro-service architecture and the tested network layer, so that information interaction is realized;
(3) The test management system based on the micro-service architecture, which is deployed on the cloud server, can call an internal database according to the test service submitted by the user, send a test instruction to the tested network layer, analyze the test data and respond the test result to the browser.
The network layer to be tested consists of a test agent, a gateway test environment, a router test environment, a terminal test environment and the like:
(1) The test agent is capable of analyzing test instructions from a micro-service architecture based test management system, sending data streams to respective test environments, and receiving data streams from the test environments, and performing simple processing on the data streams. The test agent can upload the data stream processing result interacted with the test environment to a test management system based on a micro-service architecture;
(2) The gateway test environment, the router test environment and the terminal test environment are test environments respectively built for a gateway, a router and a terminal to be accessed to the IPv6 network. The test environment comprises standard wireless router, wireless terminal, IPv6 wireless border gateway and other devices, and the user provides the tested wireless router, the tested wireless terminal, the tested IPv6 wireless border gateway and other devices.
As shown in fig. 2, the micro-service-based test management system for accessing industrial wireless network equipment to an IPv6 test framework includes an interaction layer, a forwarding layer, a service layer, a data layer, and a management layer:
(1) The interaction layer is a Web-based interaction interface and provides a human-computer interaction interface for a user;
(2) The forwarding layer, namely the service gateway, is mainly responsible for filtering and forwarding requests of the interaction layer, calling services of the service layer, carrying out load balancing and the like;
(3) The service layer contains independent micro-services divided by each functional module, and comprises: test resource management service, test implementation management service, test project management service, user management service and log management service module;
(4) The data layer stores all data required by the normal operation of the system;
the governance layer mainly improves the reliability and fault tolerance of the micro service system, and comprises the following steps: the service registration and discovery module provides a function of managing each micro service instance; the service fusing module prevents avalanche effect caused by fault propagation through means of fault transfer, system isolation and the like; the service link tracking and monitoring collect performance data on the micro-service call link; the service configuration center can centrally manage all configuration attribute files.
The test agent is a bridge between a test management system based on a micro-service architecture and an industrial wireless network device accessing IPv6 test environment, and mainly comprises:
(1) A communication interface providing a communication function with a test management system based on a micro-service architecture;
(2) Protocol standard, embedded with the same protocol module as the tested industrial wireless network, can carry on the protocol consistency test with the tested industrial wireless network;
(3) A test agent description containing some useful information related to the test, such as definition information of the test agent, driving test control information, and related parameter information;
the test driver is mainly responsible for accessing the IPv6 test environment interaction test flow with the industrial wireless network equipment.
The overall test workflow is shown in fig. 3.
(1) The user needs to provide the tested equipment for the tester, and after the user creates a test project, the tester accesses the tested equipment into the tested network environment according to the details in the test project;
(2) The user fills in a protocol consistency statement (Protocol Implementation Conformance Statement, PICS) table on the browser, and selects the type of the device to be tested, the protocol type, the test requirement and the like according to the actual test requirement of the tested wireless network device. The PICS table structure is shown in table 1 and the test requirement table structure is shown in table 2.
TABLE 1
Figure BDA0003792907240000101
TABLE 2
Figure BDA0003792907240000102
(3) The test management system based on the micro-service architecture calls corresponding internal resources according to test items created by a user, calls wireless access test services to generate test case sets, calls a test case set optimization algorithm and ranks the test cases in the test case sets in priority;
(4) The test management system based on the micro-service architecture executes the test cases one by one according to the test case set and sends a test instruction to the test agent;
(5) The test agent accesses the IPv6 test environment to the industrial wireless network equipment according to the operation instruction to send a test flow;
(6) The industrial wireless network equipment is accessed into the network equipment in the IPv6 test environment to forward and respond the test flow, and finally the test flow is responded to the test agent;
(7) The test agent simply processes the responsive test flow and uploads the result to a test management system based on a micro-service architecture;
(8) After all the test cases are executed, the test management system based on the micro-service architecture analyzes the test results to generate a test report.
The functional requirement organization structure of the test management system based on the micro-service architecture is shown in fig. 4, and includes:
(1) Testing resource management functions
In order to facilitate the wireless network devices of different protocols to access the IPv6 test case, the data required by the test and the test result data, the test management system based on the micro-service architecture needs to have a test resource management function so as to facilitate the testers to add, delete and check the resources required by the test.
(2) Test implementation management function
Because of more wireless network protocols, different protocols have different characteristics and different implementation processes when wireless network devices with different protocols access the IPv6 test, and implementation operation related to the test case is an extremely important and complicated ring in the whole test, the test management system based on the micro-service architecture should have a test implementation management function.
The test implementation management functions include: wireless access test management including Wireless network device access IPv6 test services for various protocols, such as Wireless HART access test, WIA-PA access test, 6LoWPAN access test, etc.; the test report management comprises operation functions such as adding and deleting check aiming at the test report; the test case implementation management has the functions of test case set optimization, test case execution and the like.
(3) Test item management function
The user selects the test service by creating a test item from which the user also needs to view the test status when the test service is executed, and the test report generated when the test is completed needs to be obtained from the test item. Therefore, a test management system based on a micro-service architecture needs a test item management function. The test item management functions include test item creation, deletion, viewing, status maintenance, and the like.
(4) User management function
Aiming at the fact that in the actual test environment, the test management system based on the micro-service architecture has more personnel with use rights, the personnel are complex, a login function is required to be designed, the identity of an account and a password distributed by a user is verified, and the situation that no personnel or persons with unmatched rights enter the system is avoided. The user permission distribution is carried out by classifying and grading the accounts of the users, so that misoperation of common users is avoided, and the safety of the system is ensured to a certain extent. The user management functions comprise functions of user information viewing, user adding and deleting, user authority allocation and the like.
(5) Log management function
The test management system based on the micro-service architecture has a log management function, and is used for recording the operation and operation results of a system user on the system in detail, recording the execution process of test cases and the like, facilitating the searching and the responsibility tracking of the problems and solving the problems in time.
The flow of test case acquisition is shown in fig. 5, and the access test service invokes the test case from the database by invoking the test case management service, thereby acquiring a test case set. The access test service calls the test case optimizing service, prioritizes the test case sets through an optimizing algorithm, and then returns the optimized test case sets to the access test service.
The basis for the first acquisition of the test case set is that the PICS table part entry filled by the user comprises a device_type_id field, a protocol_type_id field and request_information field information. The test case binds the device_type_id field, the protocol_type_id field and the requirement_information field information when in design. The test case structure is shown in table 3.
TABLE 3 Table 3
Figure BDA0003792907240000121
If the test item is not executed for the first time, the access test service sends the test case history execution record of the test item to the test case management service. The test case history execution record structure is shown in table 4.
The test case management service calls the test case from the database according to the test_case_id field information of the test case history execution record.
TABLE 4 Table 4
Figure BDA0003792907240000122
Before the test case set optimizing service program is executed, the test case set which is called from the database by the test management system based on the micro service architecture is renumbered. And renumbering, namely if the test case set has m test cases, renumbering each test case from 1 to m to obtain a test case numbering sequence.
The input of the test case set optimization service program is test case number x ij And the corresponding test case's test requirement coverage number
Figure BDA0003792907240000123
Test case history execution failure number +.>
Figure BDA0003792907240000124
As shown in table 5. The output is the optimized test case number sequence.
TABLE 5
Figure BDA0003792907240000125
Figure BDA0003792907240000131
As shown in FIG. 6, the test case set optimization service program flow is that the program first determines whether the test item exists
Figure BDA0003792907240000132
Figure BDA0003792907240000133
If not, the common sorting algorithm is used according to +.>
Figure BDA0003792907240000134
And (3) carrying out descending order on the sizes to obtain an optimized test case number sequence, and if the optimized test case number sequence exists, calling an improved multi-target cuckoo search algorithm to obtain the optimized test case number sequence.
The flow of the improved multi-objective cuckoo search algorithm based on maximizing test demand coverage and maximizing historical execution failure rate is shown in fig. 7. Firstly, constructing a relation between a test case and a test target to construct an adaptability function, and guaranteeing the quality of an optimization result by means of global searching of a Lewy flight mechanism, local searching of a random walk mechanism, local mutation mechanism, local optimum prevention, and the like. The method comprises the following specific steps:
step one: define population size, discovery probability, end conditions, etc.
A bird nest represents a numbered sequence of all test cases of a test case set, represents a possible solution, and is defined as:
Figure BDA0003792907240000135
Wherein n represents the number of all bird nests, i.e., the population size;
m represents the number of test cases of a test case set, namely the number of test case numbers; tMax represents the maximum number of iterations; x is x ij A j-th test case number indicating an i-th bird nest;
Figure BDA0003792907240000136
representing the ith nest after t iterations;
a population is defined as:
Figure BDA0003792907240000137
the algorithm discards part of bird nests with a certain probability when executing a random walk mechanism, and the probability of finding cuckoo eggs by a host of the bird nests is pa. The end condition is defined as whether the current iteration number is the maximum iteration number tMax.
Step two: initializing population and determining fitness function
Each bird nest in the population is initialized.
Figure BDA0003792907240000138
Wherein randomPermutation (m) is a random permutation function of size m generated for the ith initial bird nest, then the initial population is
Figure BDA0003792907240000139
The algorithm takes maximized test requirement coverage rate and maximized historical execution failure rate as sequencing targets. Maximizing test requirement coverage means that test cases cover more test requirements as soon as possible, and maximizing historical execution failure rate means that test cases found to have defects should have higher priority in the historical execution process.
(1) Maximizing test demand coverage
In the test case set, the larger the number of test requirement covers of one test case, the more it should be arranged in the front position. The objective function to maximize the test demand coverage is shown in expression 4.
Figure BDA0003792907240000141
Wherein m represents the number of test cases of one test case set; x is x ij Jth test case number indicating ith bird nest
Figure BDA0003792907240000142
Representing the number of test requirements covered by a test case; the RCS represents the number of test requirements covered by all test cases.
In expression 4, the coverage requirement number of the test case is multiplied by the weight of the position where the test case is located, so that the bird nest with a larger coverage requirement number of the test case and a position earlier in the sequence can be more easily reserved.
(2) Maximizing historical execution failure rate
The larger the historical execution failure rate, the more times the test case fails in the execution history. It is generally considered that the test cases that have failed more times in the history execution have a greater chance of detecting defects when executed in a new version of the device, and therefore the test cases that have a higher history execution failure rate should be ranked in the front position. The objective function that maximizes the historical execution failure rate is shown in expression 5.
Figure BDA0003792907240000143
Wherein m represents the number of test cases of one test case set; x is x ij A j-th test case number indicating an i-th bird nest;
Figure BDA0003792907240000144
calendar representing a test caseHistory of execution failure number; FCS indicates the number of historical execution failures for all test cases.
The bird's nest objective function that maximizes test requirement coverage and maximizes historical execution failure rate as a ranking objective is denoted as f (x i )。
f(x i )=[f 1 (x i ),f 2 (x i )] (6)
(3) Pareto optimal concept
The concept of Pareto optimization is introduced here. Two different bird nests x a and xb If expression 7 is satisfied, then x is referred to as a Dominant x b
Figure BDA0003792907240000145
If there is no solution in the solution space that can dominate x, i.e., in all bird nests, then it is said that x is non-dominant and such a solution is called Pareto optimal solution. The multi-objective optimized solution is typically not the only solution, but a set of multiple Pareto optimal solutions, and this set is called the Pareto front. Since the objective function of the present test case set optimization algorithm is two, the Pareto front can be represented by two-dimensional coordinates as shown in fig. 8.
The algorithm takes the objective function as the fitness function, and the value of the objective function is the fitness value. Obtaining the non-dominant solution set NDS of the initial population according to expression 7 (0) . Finding NDS (0) Reference point (Max (f) 1 ),Max(f 2 ) Is marked as RP (0) . Calculating the non-dominant solution nearest to the reference point as the initial population P (0) Optimal solution
Figure BDA0003792907240000146
Its fitness value->
Figure BDA0003792907240000147
Calculating the solution farthest from the reference point as the initial population P (0) Worst solution->
Figure BDA0003792907240000148
Its fitness value->
Figure BDA0003792907240000149
Step three: whether or not the end condition is satisfied
The test case set optimization algorithm judges whether an end condition is met or not after each iteration, the end condition is the maximum iteration time tMax, if the current iteration time t reaches tMax, the optimal bird nest is output by jumping out of the loop, and if t is smaller than tMax, the loop content is executed.
Step four: the Lewy flight mechanism generates new bird nest and updates population
(1) New bird nest generated by Lewy flight mechanism
Optimal bird nest removal by utilizing Laiwei flight mechanism
Figure BDA0003792907240000151
Other bird nest positions and states are updated, and the initial update formula of the algorithm is shown in expression 8.
Figure BDA0003792907240000152
Wherein α represents a step control amount;
Figure BDA0003792907240000153
representing the ith nest after t iterations; />
Figure BDA0003792907240000154
Is indicated at->
Figure BDA0003792907240000155
Generating a new bird nest through a Laiwei flight mechanism, wherein the new bird nest is a temporary updated version of the bird nest and is not a t+1 generation bird nest; />
Figure BDA0003792907240000156
Representing point-to-pointMultiplication; levy (β) represents a random search path, subject to Levy distribution.
The lewy flight mechanism is a form of motion between short-range exploration and occasional long-range walking. The Lewy flight mechanism can expand the search range, increase the diversity of bird nests and easily jump out of local optimal points. For ease of calculation, levy random numbers are generated using expression 9:
Figure BDA0003792907240000157
Wherein μ, v represents the normal distribution compliant with the standard
Figure BDA0003792907240000158
To orient the possible solutions, i.e. each bird nest, towards the current optimal solution
Figure BDA0003792907240000159
The orientation of the bird nest approaches, improving expression 8 to:
Figure BDA00037929072400001510
the value of the step control amount α in expression 11 should be carefully selected because it controls the global search. If the value of α is too small, the possible solution will approach the current optimal solution and will be trapped in the locally optimal solution. If alpha is too large, the result may be out of range. Improving α to a dynamic adaptive step size will expand the initial search range and reduce the step size of later iterations, thereby improving convergence efficiency. Adaptive step size
Figure BDA00037929072400001511
As shown in expression 12
Figure BDA00037929072400001512
in the formula ,
Figure BDA00037929072400001513
representing the step length of the ith nest in the t iteration populations; />
Figure BDA00037929072400001514
Representing the fitness value of the ith bird nest in the t iteration populations; />
Figure BDA00037929072400001515
Representing an optimal bird nest fitness value in the t iteration populations;
Figure BDA00037929072400001516
representing the worst bird nest fitness value in the population after t iterations.
The improved lewy flight update formula is therefore expression 13.
Figure BDA0003792907240000161
(2) Asexual genetic mechanism for repairing new bird nest
New bird nest generated by Lewy flight mechanism
Figure BDA0003792907240000162
Invalid or out-of-range test case numbers are generated, and therefore, the test case numbers of the new bird nest need to be processed.
The test case number of the new bird nest is rounded first, and the out-of-range test case number and the repeated number are replaced by irrelevant values, which are recorded as the signs. The irrelevant values in the new bird nest are then derived from the old bird nest
Figure BDA0003792907240000163
Is obtained according to old bird nest->
Figure BDA0003792907240000164
Is filled with new birds in order of valueIrrelevant values for nests. Asexual genetic mechanism repair of new bird nest finally gets bird nest +.>
Figure BDA0003792907240000165
A schematic diagram of the repair process is shown in fig. 9.
(3) Calculating the fitness value of a new bird nest and updating the population
Bird nest after calculation and repair
Figure BDA0003792907240000166
Is>
Figure BDA0003792907240000167
Get non-dominant solution set->
Figure BDA0003792907240000168
Comparison->
Figure BDA0003792907240000169
and NDS(t) The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure BDA00037929072400001610
/>
In the target space according to
Figure BDA00037929072400001611
Find datum point +.>
Figure BDA00037929072400001612
Pair by pair comparison->
Figure BDA00037929072400001613
And datum point
Figure BDA00037929072400001614
Distance sum->
Figure BDA00037929072400001615
Is->
Figure BDA00037929072400001616
Is a distance of (3). Keeping the bird nest with smaller distance to obtain new population
Figure BDA00037929072400001617
Bird nest after comparison and retention operations is noted as
Figure BDA00037929072400001618
Updating optimal bird nest->
Figure BDA00037929072400001619
Fitness value thereof
Figure BDA00037929072400001620
Updating optimal bird nest->
Figure BDA00037929072400001621
And its fitness value->
Figure BDA00037929072400001622
Step five: random walk mechanism to generate new bird nest and update population
(1) Random walk mechanism to generate new bird nest
The random walk mechanism of the cuckoo algorithm is a process that a host simulating a bird nest has a certain probability that a bird nest can be abandoned after a cuckoo egg is found, and a new bird nest is generated elsewhere. Novel bird nest of production line of random walk machine
Figure BDA00037929072400001623
The expression of (2) is shown in expression 14:
Figure BDA00037929072400001624
wherein ,
Figure BDA00037929072400001625
representing population->
Figure BDA00037929072400001626
Any of the 3 bird nests; epsilon represents 0,1]Random numbers in (a); pa represents the discovery probability; h (ε -pa) represents a Uighur function, and when (ε -pa) is equal to or larger than 0, the function value is 1, otherwise, the function value is 0.
(2) Asexual genetic mechanism for repairing new bird nest
Because the new bird nest generated by the random walk mechanism generates invalid or out-of-range test case numbers, the test case numbers of the new bird nest need to be processed. The treatment process is similar to the process of the step (2) in the step four. After repairing all bird nests, obtaining a population
Figure BDA0003792907240000171
(3) Calculating the fitness value of a new bird nest and updating the population
Computing population
Figure BDA0003792907240000172
Is->
Figure BDA0003792907240000173
Fitness value->
Figure BDA0003792907240000174
Non-dominant solution set +.>
Figure BDA0003792907240000175
Comparison->
Figure BDA0003792907240000176
and />
Figure BDA0003792907240000177
The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure BDA0003792907240000178
In the target space according to
Figure BDA0003792907240000179
Find datum point +.>
Figure BDA00037929072400001710
Pair by pair comparison->
Figure BDA00037929072400001711
And datum point
Figure BDA00037929072400001712
Distance sum->
Figure BDA00037929072400001713
Is->
Figure BDA00037929072400001714
Is a distance of (3). Keeping the bird nest with smaller distance to obtain new population +>
Figure BDA00037929072400001715
Bird nest after comparison and retention operations is noted as
Figure BDA00037929072400001716
Updating optimal bird nest->
Figure BDA00037929072400001717
Fitness value thereof
Figure BDA00037929072400001718
Updating optimal bird nest->
Figure BDA00037929072400001719
And its fitness value->
Figure BDA00037929072400001720
Step six: judging whether the mutation decision condition is satisfied.
When the algorithm enters a later stage, bird nests generated by the Lewy flight mechanism and the random walk mechanism are close to old bird nests, and all bird nests are close to each other along with the increase of iteration times, so that the average difference of adaptability of the bird nests is not changed greatly, which indicates that the solution falls into local optimum. The scheme solves the problem of local optimum in the later stage by using a mutation mechanism.
To prevent the mutation mechanism from generating a new bird nest far from the old one, high quality bird nests are missed. Thus increasing the mutation decision conditions.
Figure BDA00037929072400001721
Wherein γ represents the threshold of the mutation mechanism; u represents the algebra to be traced.
The mutation mechanism is triggered when the fitness value of successive u-generation of the ith bird nest is kept to be changed within a small range. Attention to populations updated with current random walk mechanism
Figure BDA00037929072400001722
Decisions were made as t+1 generation populations.
Step seven: mutation mechanisms create new bird nests and update populations
(1) Mutation mechanism generates new bird nest
The mutation mechanism generates a new bird nest formula as shown in expression 16.
Figure BDA00037929072400001723
in the formula ,
Figure BDA00037929072400001724
the bird nest obtained by the treatment in the fifth step; xθ represents a random mutation parameter.
(2) Asexual genetic mechanism for repairing new bird nest
New bird nests generated by mutation mechanisms may be ineffective or generated Out-of-range test case numbers, therefore, the test case numbers of the new bird nest need to be processed. And in the fourth step of the treatment process, the process of the step (2) is similar. After repairing all bird nests, obtaining a population
Figure BDA00037929072400001725
(3) Calculating the fitness value of a new bird nest and updating the population
Computing population
Figure BDA00037929072400001726
Is->
Figure BDA00037929072400001727
Fitness value->
Figure BDA00037929072400001728
Non-dominant solution set +.>
Figure BDA00037929072400001729
Comparison->
Figure BDA0003792907240000181
and />
Figure BDA0003792907240000182
The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure BDA0003792907240000183
In the target space according to
Figure BDA0003792907240000184
Find datum point +.>
Figure BDA0003792907240000185
Pair by pair comparison->
Figure BDA0003792907240000186
And datum point
Figure BDA0003792907240000187
Distance sum->
Figure BDA0003792907240000188
Is->
Figure BDA0003792907240000189
Is a distance of (3). Keeping the bird nest with smaller distance to obtain new population +>
Figure BDA00037929072400001810
Bird nest after comparison and retention operations is noted as
Figure BDA00037929072400001811
Updating optimal bird nest->
Figure BDA00037929072400001812
Fitness value thereof
Figure BDA00037929072400001813
Updating optimal bird nest->
Figure BDA00037929072400001814
And its fitness value->
Figure BDA00037929072400001815
Step eight: updating iteration number
If the mutation decision condition is not satisfied, the population in the fifth step
Figure BDA00037929072400001816
As a population P iterated t+1 times (t+1) If mutation decision conditions are met, the population in step seven +.>
Figure BDA00037929072400001817
As a population P iterated t+1 times (t+1)
Step nine: output optimum bird nest
When the iteration number reaches tMax, outputting an optimal bird nest
Figure BDA00037929072400001818
The multi-objective cuckoo search algorithm based on the improvement ends.
After the test service is accessed to obtain the optimized test case set, execution of each test case is started, and the flow is shown in fig. 10. Accessing a test service to analyze the test cases in the test case set to obtain a plurality of test instructions, and forwarding the test instructions to a test agent through a service gateway; after receiving the test instruction, the test agent accesses the IPv6 test environment to the industrial wireless network equipment to send a test flow; the test flow is forwarded and processed by the equipment accessed into the IPv6 test environment by the industrial wireless network equipment, and finally the response test flow is received by the test agent; the test agent simply processes the response test flow, and uploads the test instruction execution result to the access test service through the service gateway. After the execution of the test instructions of the current test case is completed, the next test case is analyzed and the execution is started until the execution of all the test cases in the test case set is completed. The access test service then invokes the test report management service to generate a test report, and the test report is saved to the database.
Finally, it is noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the present invention, which is intended to be covered by the claims of the present invention.

Claims (10)

1. An industrial wireless network device access IPv6 test system based on micro service is characterized in that: the system comprises a test management system based on a micro-service architecture, a test agent and a test environment;
the test management system based on the micro-service architecture comprises an interaction layer, a forwarding layer, a service layer, a data layer and a treatment layer:
interaction layer: providing a human-computer interaction interface for a user based on the interaction interface of Web;
and (3) a forwarding layer: the service gateway is responsible for filtering and forwarding the request of the interaction layer, calling the service of the service layer and carrying out a load balancing function;
service layer: independent micro-services divided by functional modules are included, including: the system comprises a test resource management service module, a test implementation management service module, a test project management service module, a user management service module and a log management service module;
Data layer: all data required by the normal operation of the system are saved;
treatment layer: improving reliability and fault tolerance of a micro-service system, comprising: the service registration and discovery module provides a function of managing each micro service instance; the service fusing module is used for preventing fault propagation through a fault transfer and system isolation means; the service link is tracked and monitored, and performance data on the micro-service call link is collected; the service configuration center centrally manages all configuration attribute files;
the test agent is used for analyzing the test instruction from the test management system based on the micro-service architecture, sending the data stream to the corresponding test environment, receiving the data stream from the test environment, processing the data stream, and uploading the data stream processing result interacted with the test environment to the test management system based on the micro-service architecture;
the test environments comprise a gateway test environment, a router test environment and a terminal test environment, which are respectively test environments built by a gateway, a router and a terminal to be accessed to an IPv6 network; the test environment comprises a standard wireless router, a wireless terminal, an IPv6 wireless border gateway, and a tested wireless router, a tested wireless terminal and a tested IPv6 wireless border gateway provided by a user.
2. The micro-service based industrial wireless network device access IPv6 test system of claim 1, wherein: the test agent includes:
communication interface: providing a communication function with a test management system based on a micro-service architecture;
protocol standard: the protocol module which is the same as the tested industrial wireless network is embedded, so that the protocol consistency test can be carried out with the tested industrial wireless network;
test agent description: including useful information related to the test, including definition information of the test agent, driving test control information, and related parameter information;
test driving: and the method is responsible for accessing the IPv6 test environment interaction test flow with the industrial wireless network equipment.
3. The micro-service based industrial wireless network device access IPv6 test system of claim 1, wherein: each micro-service in the service layer specifically comprises:
the test resource management service module comprises test case management and test data management, and is used for managing the access of the wireless network equipment with different protocols to the IPv6 test case, the data required by the test and the test result data;
the test implementation management service module comprises wireless access test management, test report management and test case implementation management; the wireless access test management accesses IPv6 test service to wireless network equipment of various protocols; the test report management comprises an adding and deleting operation function aiming at the test report; the test case implementation management comprises test case set optimization and test case execution functions;
The test item management service module comprises functions of creating, deleting, checking and maintaining states of test items;
the user management service module comprises the steps of checking, adding, deleting and distributing the authority of the user information;
the log management service module comprises an operation log and a test case execution log of a recording system.
4. An industrial wireless network equipment access IPv6 test method based on micro service is characterized in that: the method comprises the following steps:
s1: a user logs in a test management system based on a micro-service architecture, creates test items, fills in a PICS form, and provides tested equipment for a tester;
s2: the tester accesses the tested equipment into the tested network environment according to the details in the test project;
s3: the test management system based on the micro-service architecture calls corresponding internal resources according to test items created by a user, calls wireless access test services to generate test case sets, calls a test case set optimization algorithm and ranks the test cases in the test case sets in priority;
s4: the test management system based on the micro-service architecture executes the test cases one by one according to the test case set and sends a test instruction to the test agent;
S5: the test agent accesses the IPv6 test environment to the industrial wireless network equipment according to the operation instruction to send a test flow;
s6: the industrial wireless network equipment is accessed into the network equipment in the IPv6 test environment to forward and respond the test flow, and finally the test flow is responded to the test agent;
s7: the test agent simply processes the responsive test flow and uploads the result to a test management system based on a micro-service architecture;
s8: after all the test cases are executed, the test management system based on the micro-service architecture analyzes the test results to generate a test report.
5. The micro-service based industrial wireless network device access IPv6 testing method according to claim 4, wherein: the basis for the first acquisition of the test case set is PICS table part entry filled by a user, wherein the PICS table part entry comprises device_type_id field, protocol_type_id field and request_information field information; binding device_type_id field, protocol_type_id field, and requirement_information field information by the test case;
if the test item is not executed for the first time, the access test service sends a test case history execution record of the test item to the test case management service, and the test case management service calls a test case base from the database according to test_case_id field information of the test case history execution record.
6. The micro-service based industrial wireless network device access IPv6 testing method according to claim 4, wherein: renumbering the test cases before optimizing the test case set to obtain a test case numbering sequence;
the input of the test case set optimization algorithm is test case number x ij And the corresponding test case's test requirement coverage number
Figure FDA0003792907230000031
Test case history execution failure number +.>
Figure FDA0003792907230000032
The output is the optimized test case number sequence; the test case set optimization algorithm comprises the following steps:
s31: defining the test requirement coverage number and the historical failure number of the test case;
s32: initializing the test requirement coverage number and the historical failure number of the test case;
s33: judging whether or not there is
Figure FDA0003792907230000033
If not, the common sorting algorithm is used according to +.>
Figure FDA0003792907230000034
And (3) carrying out descending order on the sizes to obtain an optimized test case number sequence, and if the optimized test case number sequence exists, calling an improved multi-target cuckoo search algorithm to obtain the optimized test case number sequence.
7. The micro-service based industrial wireless network device access IPv6 testing method according to claim 6, wherein: the improved multi-objective cuckoo search algorithm comprises the following steps:
A1: defining population scale, discovery probability and ending conditions;
a bird nest represents a numbered sequence of all test cases of a test case set, represents a possible solution, and is defined as:
Figure FDA0003792907230000035
wherein n represents the number of all bird nests, i.e., the population size; m represents the number of test cases of a test case set, namely the number of test case numbers; tMax represents the maximum number of iterations; x is x ij A j-th test case number indicating an i-th bird nest;
Figure FDA0003792907230000036
representing the ith nest after t iterations;
a population is defined as:
Figure FDA0003792907230000037
when executing a random walk mechanism, discarding part of bird nests with a certain probability, wherein the probability that a host of the bird nest discovers a cuckoo egg is pa, and defining an ending condition as whether the current iteration number is the maximum iteration number tMax or not;
a2: initializing a population and determining an fitness function;
a3: judging whether an ending condition is met, namely whether the maximum iteration time tMax is reached, if so, outputting an optimal bird nest, otherwise, executing the following circulation steps;
a4: generating a new bird nest and updating the population through a Lewy flight mechanism;
a5: generating a new bird nest and updating the population through a random walk mechanism;
a6: judging whether the mutation decision condition is met, if so, updating the iteration times, and returning to the step A4; if not, generating a new bird nest by using a mutation mechanism, updating the population, updating the iteration times, and returning to the step A4.
The mutation decision conditions were:
Figure FDA0003792907230000041
wherein γ represents the threshold of the mutation mechanism; u represents algebra to be traced;
triggering a mutation mechanism when the fitness value of the ith bird nest successive u generation is kept to be changed within a small range, and updating the population by using the current random walk mechanism
Figure FDA00037929072300000415
Decision making is performed as a t+1 generation population;
the mutation mechanism generates a new bird nest formula as follows:
Figure FDA0003792907230000042
in the formula ,
Figure FDA0003792907230000043
representing the bird nest obtained by the treatment; xθ represents a random mutation parameter;
carrying out asexual genetic mechanism repair treatment on the test case number of the new bird nest; computing population
Figure FDA00037929072300000416
Is->
Figure FDA0003792907230000044
Fitness value->
Figure FDA0003792907230000045
Non-dominant solution set +.>
Figure FDA00037929072300000417
Comparison->
Figure FDA00037929072300000418
and />
Figure FDA00037929072300000419
The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure FDA00037929072300000420
In the target space according to
Figure FDA00037929072300000421
Find datum point +.>
Figure FDA00037929072300000422
Pair by pair comparison->
Figure FDA0003792907230000046
Is->
Figure FDA00037929072300000423
Distance sum->
Figure FDA0003792907230000047
Is->
Figure FDA00037929072300000425
Is a distance of (2); keeping the bird nest with smaller distance to obtain new population +.>
Figure FDA00037929072300000424
Bird nest after comparison and retention operations is noted as
Figure FDA0003792907230000048
Updating optimal bird nest->
Figure FDA0003792907230000049
And its fitness value->
Figure FDA00037929072300000410
Updating optimal bird nest->
Figure FDA00037929072300000411
And its fitness value->
Figure FDA00037929072300000412
8. The micro-service based industrial wireless network device access IPv6 testing method of claim 7, wherein: the step A2 specifically comprises the following steps:
Initializing each bird nest in the population:
Figure FDA00037929072300000413
wherein randomPermutation (m) generates a random permutation function of size m for the ith initial bird nest, the initial population is
Figure FDA00037929072300000414
Taking maximized test requirement coverage rate and maximized historical execution failure rate as sequencing targets, wherein the maximized test requirement coverage rate means that the test cases cover more test requirements as soon as possible, and the maximized historical execution failure rate means that the test cases with defects found out have higher priority in the historical execution process;
the objective function of maximizing test demand coverage is:
Figure FDA0003792907230000051
wherein m represents the number of test cases of one test case set; x is x ij A j-th test case number indicating an i-th bird nest;
Figure FDA0003792907230000052
representing the number of test requirements covered by a test case; RCS represents the number of test requirements covered by all test cases;
the objective function that maximizes the historical execution failure rate is:
Figure FDA0003792907230000053
in the formula ,
Figure FDA0003792907230000054
representing the historical execution failure number of one test case, and FCS represents the historical execution failure number of all the test cases;
bird nest objective function f (x) with maximized test requirement coverage and maximized historical execution failure rate as ranking targets i ) Expressed as:
f(x i )=[f 1 (x i ),f 2 (x i )]
Taking the objective function as a fitness function, taking the value of the objective function as a fitness value, and obtaining a non-dominant solution set NDS of the initial population by the following formula (0)
Figure FDA0003792907230000055
wherein xa and xb Is two different bird nests, find NDS (0) Reference point (Max (f) 1 ),Max(f 2 ) Is marked as RP (0) Calculating a non-dominant solution nearest to the reference point as an initial population P (0) Optimal solution
Figure FDA0003792907230000056
Its fitness value->
Figure FDA0003792907230000057
Calculating the solution farthest from the reference point as the initial population P (0) Worst solution->
Figure FDA0003792907230000058
Its fitness value->
Figure FDA0003792907230000059
9. The micro-service based industrial wireless network device access IPv6 testing method according to claim 8, wherein: the step A4 specifically comprises the following steps:
optimal bird nest removal by utilizing Laiwei flight mechanism
Figure FDA00037929072300000510
The position and the state of other bird nests are updated, and an initial updating formula is as follows: />
Figure FDA00037929072300000511
Wherein α represents a step control amount;
Figure FDA00037929072300000512
representing the ith nest after t iterations; />
Figure FDA00037929072300000513
Is indicated at->
Figure FDA00037929072300000514
New bird nest generated by Laiwei flight mechanismIs a temporary update version of the bird nest, and is not t+1 generation bird nest; />
Figure FDA00037929072300000515
Representing point-to-point multiplication; levy (β) represents a random search path, subject to Levy distribution;
the Levy random number is generated using the following formula:
Figure FDA00037929072300000516
wherein μ, v obeys a standard n-too-distribution;
Figure FDA0003792907230000061
adapting step size
Figure FDA0003792907230000062
The method comprises the following steps:
Figure FDA0003792907230000063
in the formula ,
Figure FDA0003792907230000064
representing the step length of the ith nest in the t iteration populations; />
Figure FDA0003792907230000065
The representation is the fitness value of the ith bird nest in the t iteration populations; />
Figure FDA0003792907230000066
Representing an optimal bird nest fitness value in the t iteration populations;
Figure FDA0003792907230000067
representing the worst bird nest fitness value in the t iteration populations;
the improved Lewy flight update formula is:
Figure FDA0003792907230000068
rounding the test case number of the new bird nest, and replacing the out-of-range test case number and the repeated number with irrelevant values, and marking as a; the irrelevant values in the new bird nest are then derived from the old bird nest
Figure FDA0003792907230000069
Is obtained according to old bird nest->
Figure FDA00037929072300000610
Is the value order filling of the new bird nest; repairing new bird nest by asexual genetic mechanism to obtain bird nest>
Figure FDA00037929072300000611
Bird nest after calculation and repair
Figure FDA00037929072300000612
Is>
Figure FDA00037929072300000613
Get non-dominant solution set->
Figure FDA00037929072300000624
Comparison of
Figure FDA00037929072300000631
and NDS(t) The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure FDA00037929072300000625
In the target space according to
Figure FDA00037929072300000630
Find datum point +.>
Figure FDA00037929072300000629
Pair by pair comparison->
Figure FDA00037929072300000614
Is->
Figure FDA00037929072300000626
Distance sum->
Figure FDA00037929072300000615
And datum point
Figure FDA00037929072300000627
Is a distance of (2); keeping the bird nest with smaller distance to obtain new population +.>
Figure FDA00037929072300000628
Bird nest after comparison and retention operation is marked +.>
Figure FDA00037929072300000616
Updating optimal bird nest->
Figure FDA00037929072300000617
And its fitness value->
Figure FDA00037929072300000618
Updating optimal bird nest- >
Figure FDA00037929072300000619
And its fitness value->
Figure FDA00037929072300000620
10. The micro-service based industrial wireless network device access IPv6 testing method according to claim 9, wherein: the step A5 specifically comprises the following steps:
the random walk mechanism is a process of simulating that a host of a bird nest has a certain probability that a bird nest may be abandoned after a cuckoo egg is found, and generating a new bird nest elsewhere, and the random walk mechanism produces a new bird nest on a line
Figure FDA00037929072300000621
The expression of (2) is as follows:
Figure FDA00037929072300000622
wherein ,
Figure FDA00037929072300000623
representing population->
Figure FDA00037929072300000632
Any of the 3 bird nests; epsilon represents 0,1]Random numbers in (a); pa represents the discovery probability; h (epsilon-pa) is a Hertius function, when (epsilon-pa) is more than or equal to 0, the function value is 1, otherwise, the function value is 0;
asexual genetic mechanism repair treatment is carried out on the test case number of the new bird nest to obtain a population
Figure FDA0003792907230000071
Computing population
Figure FDA0003792907230000072
Is->
Figure FDA0003792907230000073
Fitness value->
Figure FDA0003792907230000074
Non-dominant solution set +.>
Figure FDA0003792907230000075
Comparison of
Figure FDA0003792907230000076
and />
Figure FDA0003792907230000077
The dominant relationship of the solutions in (a) and updating the non-dominant solution set to +.>
Figure FDA0003792907230000078
In the target space according to
Figure FDA0003792907230000079
Find datum point +.>
Figure FDA00037929072300000710
Pair by pair comparison->
Figure FDA00037929072300000711
Is->
Figure FDA00037929072300000712
Distance sum->
Figure FDA00037929072300000713
Is->
Figure FDA00037929072300000714
Is a distance of (2); keeping the bird nest with smaller distance to obtain new population +.>
Figure FDA00037929072300000715
Bird nest after comparison and retention operations is noted as
Figure FDA00037929072300000716
Updating optimal bird nest- >
Figure FDA00037929072300000717
Fitness value thereof
Figure FDA00037929072300000718
Updating optimal bird nest->
Figure FDA00037929072300000719
And its fitness value->
Figure FDA00037929072300000720
/>
CN202210961111.3A 2022-08-11 2022-08-11 Industrial wireless network equipment access IPv6 test system and method based on micro-service Active CN115396335B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210961111.3A CN115396335B (en) 2022-08-11 2022-08-11 Industrial wireless network equipment access IPv6 test system and method based on micro-service
PCT/CN2023/096985 WO2024032100A1 (en) 2022-08-11 2023-05-30 Micro service-based test system and method for industrial wireless network device accessing ipv6

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210961111.3A CN115396335B (en) 2022-08-11 2022-08-11 Industrial wireless network equipment access IPv6 test system and method based on micro-service

Publications (2)

Publication Number Publication Date
CN115396335A CN115396335A (en) 2022-11-25
CN115396335B true CN115396335B (en) 2023-05-16

Family

ID=84119553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210961111.3A Active CN115396335B (en) 2022-08-11 2022-08-11 Industrial wireless network equipment access IPv6 test system and method based on micro-service

Country Status (2)

Country Link
CN (1) CN115396335B (en)
WO (1) WO2024032100A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396335B (en) * 2022-08-11 2023-05-16 重庆邮电大学 Industrial wireless network equipment access IPv6 test system and method based on micro-service

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007025425A1 (en) * 2005-08-31 2007-03-08 Huawei Technologies Co., Ltd. A method for testing the service performance of the file transfer protocol
CN101808355A (en) * 2009-12-28 2010-08-18 重庆邮电大学 System and method for testing consistency of industrial wireless network protocol
CN101945043A (en) * 2010-09-06 2011-01-12 华南理工大学 Topology discovery system of next generation Internet based on IPv6 (Internet Protocol Version 6) and realizing method thereof
CN103746879A (en) * 2013-12-28 2014-04-23 国家电网公司 Testing system and method for consistency of IPv6 (Internet Protocol Version 6) protocol
CN104539483A (en) * 2014-12-31 2015-04-22 中国电子科技集团公司第五十研究所 Network testing system
CN104837150A (en) * 2015-06-03 2015-08-12 重庆邮电大学 Safety test system based on IPv6 wireless sensor network
CN110071822A (en) * 2019-03-14 2019-07-30 北京天地互连信息技术有限公司 A kind of test device and test method for 5G core-network infrastructure
CN113612658A (en) * 2021-08-02 2021-11-05 四川九州电子科技股份有限公司 Broadband network equipment test system and test method
CN114401211A (en) * 2022-01-17 2022-04-26 重庆邮电大学 Test system and test method for accessing industrial wireless network equipment to IPv6 network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IN2014CH01329A (en) * 2014-03-13 2015-09-18 Infosys Ltd
US11249887B2 (en) * 2019-08-27 2022-02-15 Nec Corporation Deep Q-network reinforcement learning for testing case selection and prioritization
CN115396335B (en) * 2022-08-11 2023-05-16 重庆邮电大学 Industrial wireless network equipment access IPv6 test system and method based on micro-service

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007025425A1 (en) * 2005-08-31 2007-03-08 Huawei Technologies Co., Ltd. A method for testing the service performance of the file transfer protocol
CN101808355A (en) * 2009-12-28 2010-08-18 重庆邮电大学 System and method for testing consistency of industrial wireless network protocol
CN101945043A (en) * 2010-09-06 2011-01-12 华南理工大学 Topology discovery system of next generation Internet based on IPv6 (Internet Protocol Version 6) and realizing method thereof
CN103746879A (en) * 2013-12-28 2014-04-23 国家电网公司 Testing system and method for consistency of IPv6 (Internet Protocol Version 6) protocol
CN104539483A (en) * 2014-12-31 2015-04-22 中国电子科技集团公司第五十研究所 Network testing system
CN104837150A (en) * 2015-06-03 2015-08-12 重庆邮电大学 Safety test system based on IPv6 wireless sensor network
CN110071822A (en) * 2019-03-14 2019-07-30 北京天地互连信息技术有限公司 A kind of test device and test method for 5G core-network infrastructure
CN113612658A (en) * 2021-08-02 2021-11-05 四川九州电子科技股份有限公司 Broadband network equipment test system and test method
CN114401211A (en) * 2022-01-17 2022-04-26 重庆邮电大学 Test system and test method for accessing industrial wireless network equipment to IPv6 network

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
"The Organization of Arrangements Set to Ensure Enterprise IPV6 Network Secure Work By Modern Switching Equipment Tools ".《2017 Dynamics of Systems, Mechanisms and Machines (Dynamics)》.2017,全文. *
"基于FPGA的IPv6网络测试系统设计".《中国优秀硕士学位论文全文数据库 信息科技辑》.2017,全文. *
"基于IPv6的物联网技术及其标准化研究";魏旻;《信息技术与标准化》;全文 *
IPv6协议一致性测试;张升;刘兴伟;郭闯;;西华大学学报(自然科学版)(第01期);全文 *
IPv6测试研究与实践;宋林健;李震;;中兴通讯技术(第02期);全文 *
基于Web的WIA-PA一致性测试系统的设计和实现;谢昊飞;李艳丽;罗志勇;韦鹏;;自动化与仪表(第09期);全文 *

Also Published As

Publication number Publication date
CN115396335A (en) 2022-11-25
WO2024032100A1 (en) 2024-02-15

Similar Documents

Publication Publication Date Title
CN108833197B (en) Active detection method and detection platform based on cloud
CN110022230B (en) Deep reinforcement learning-based service chain parallel deployment method and device
CN115396335B (en) Industrial wireless network equipment access IPv6 test system and method based on micro-service
CN107807983A (en) A kind of parallel processing framework and design method for supporting extensive Dynamic Graph data query
CN106371902A (en) A system to place virtual machines onto servers based upon backup runtime constraints
CN112073237B (en) Large-scale target network construction method in cloud edge architecture
Debbabi et al. Controlling self-organising software applications with archetypes
Andrade et al. Performance and availability trade-offs in fog–cloud iot environments
Syberfeldt et al. Real-world simulation-based manufacturing optimization using cuckoo search
Abdulazeez et al. Offloading mechanisms based on reinforcement learning and deep learning algorithms in the fog computing environment
Forti et al. Osmotic management of distributed complex systems: a declarative decentralised approach
CN110490316A (en) Based on the training managing method of neural network model training system, training system
Bogatyrev et al. Reliability and probability of timely servicing in a cluster of heterogeneous flow of query functionality
Azimi et al. Performance management in clustered edge architectures using particle swarm optimization
CN111107163B (en) User demand change-oriented micro-service self-adaption method and system
Mahato Load balanced transaction scheduling in on-demand computing using cuckoo search-ant colony optimization
Bacchiani et al. Low-latency anomaly detection on the edge-cloud continuum for Industry 4.0 applications: The SEAWALL case study
Mitropoulou et al. Anomaly Detection in Cloud Computing using Knowledge Graph Embedding and Machine Learning Mechanisms
Iakushkin Intellectual scaling in a distributed cloud application architecture: A message classification algorithm
Dworzak et al. Federated autonomous orchestration in fog computing systems
Asheralieva et al. Ultra-Reliable Low-Latency Slicing in Space-Air-Ground Multi-Access Edge Computing Networks for Next-Generation Internet of Things and Mobile Applications
Mahato et al. Reliability analysis in grid system considering load
Ogasawara et al. A P2P approach to many tasks computing for scientific workflows
CN112579293A (en) Comprehensive verification method of distributed computing system
Navaz et al. Load Balancing in P2P Networks using Random Walk Algorithm

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