Simulation chaos test method and device based on generative adversarial network technology

The simulated chaos testing method using generative adversarial networks generates realistic test scenarios, addressing the inefficiencies of traditional chaos testing by eliminating the need for production simulation environments and enhancing test accuracy and efficiency.

CN119065972APending Publication Date: 2024-12-03SHANGHAI DRAGONNET TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411120240.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Existing chaos testing methods require deployment in a production environment or simulation environment, which is costly and disruptive, and there is a need for a more efficient and cost-effective method to evaluate system robustness and stability.

Method used

A simulated chaos testing method using generative adversarial network technology to generate realistic chaotic test samples without the need for a production simulation environment, by training a generative adversarial network model with production system data to simulate faults and test the system.

Benefits of technology

The method effectively simulates chaotic conditions, reducing operational risks and costs, improving test efficiency and accuracy, and enabling comprehensive evaluation of system performance and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065972A_ABST
    Figure CN119065972A_ABST
Patent Text Reader

Abstract

The invention relates to a simulated chaos test method and device based on a generative adversarial network technology, and the method comprises the steps: generating an initial state of a simulator through employing a generative adversarial network, simulating various abnormal conditions and nonlinear characteristics in a chaos environment, and carrying out the chaos test of the generated initial state through employing a chaos tester, and deep understanding and performance evaluation of the system under the abnormal condition are realized. Compared with the prior art, the method is simple in operation, does not need to deploy a production simulation environment, effectively avoids the production operation risk, saves the deployment cost of the production simulation environment, and can more comprehensively evaluate the robustness and stability of the application system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of system testing, and in particular to a simulated chaos testing method and device based on generative adversarial network technology. Background Art

[0002] As the complexity of software systems continues to increase, traditional testing methods can no longer meet the needs of comprehensive and effective testing of software systems. Chaos testing, as an emerging software testing method, introduces randomness and uncertainty into the system to discover potential defects and vulnerabilities.

[0003] The current chaos testing scheme adopts the model of test engineers submitting test plans to evaluate the robustness and reliability of the system in the production environment. The design of the test plan focuses on testing in the production environment or the built simulation environment. By executing a series of failure scenarios on multiple key components such as database, middleware, computing, storage and network, it aims to test the behavior of the system under abnormal or unstable conditions. During the test, the system uses load generators, network tools and fault injection mechanisms to create abnormal conditions such as network delays, service unavailability, high load, etc. to observe the response and resilience of the system. The existing chaos testing scheme architecture is as follows: Figure 1 shown.

[0004] The chaos testing method is that the test engineer designs the test scheme and plan according to the test requirements, and then submits it to the chaos testing system. After receiving the test scheme, the chaos testing system initiates chaos testing on the production system through the test tool as planned. By collecting and analyzing the test results, the chaos testing system evaluates the stability of the production system and discovers and locates potential system defects. Finally, the chaos testing system generates a detailed evaluation report, which provides targeted improvement and repair directions for the maintenance personnel of the production system to further improve the reliability and robustness of the system. The specific chaos testing scheme method is as follows: Figure 2 shown.

[0005] Existing chaos testing methods often need to be performed in a production environment or a production simulation environment. Performing them in a production environment will affect normal production operations, and building a production simulation environment is difficult and consumes a lot of manpower and material resources. Therefore, how to quickly deploy a test environment at low cost and reduce the impact of chaos testing on the production environment has become an urgent problem to be solved. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a simulated chaos testing method and device based on generative adversarial network technology. The method and device are simple to operate, do not require the deployment of a production simulation environment, effectively avoid production operation risks, and save the cost of deploying a production simulation environment. The method can more comprehensively evaluate the robustness and stability of the application system.

[0007] The purpose of the present invention can be achieved by the following technical solutions:

[0008] A simulated chaos testing method based on generative adversarial network technology, the method comprising:

[0009] Receive the chaos test plan and the component information and configuration information of the production system to be tested, and enter the component information and configuration information of the production system to be tested into the production system configuration library;

[0010] Train a generative adversarial network model based on data from the production system configuration library;

[0011] Use the trained generative adversarial network model to generate simulated chaotic test samples;

[0012] Summarize the generated simulated chaos test samples and store them in the chaos vector library;

[0013] Test the simulated production system according to the chaos test plan, call the chaos vector library to query and retrieve chaos test samples, and generate test results based on the returned query results;

[0014] Among them, the generative adversarial network model includes a generator, a discriminator and a loss function.

[0015] Furthermore, the chaos test scheme includes information such as component ID, component IP address, service port and fault type. The component information includes the IP address, service port and component type of each component. The configuration information includes application configuration, cluster configuration, component configuration, host configuration, network configuration and storage configuration.

[0016] Furthermore, the generative adversarial network model training includes the following steps:

[0017] Obtain real production system configuration data and real historical fault data, and perform preprocessing;

[0018] Establish a generative adversarial network model and initialize the weight parameters of the generator and discriminator;

[0019] Iteratively train the generative adversarial network model;

[0020] Iteratively optimize the generative adversarial network model.

[0021] Furthermore, the real production system configuration data includes source components and associated components, the real historical fault data includes source fault types and associated abnormality types, and the preprocessing step includes:

[0022] Use one-hot encoding to represent the real historical fault data as different vectors one by one;

[0023] Organize the data into a hierarchical structure so that each source component corresponds to more than two associated components, and each source fault type corresponds to more than two associated exception types, and establish a mapping set of real production system configuration data and real historical fault data.

[0024] Furthermore, the generative adversarial network model training step includes:

[0025] Training the generator, inputting random noise vectors and source component data into the generator so that it outputs simulated chaotic system fault data. The loss function adjusts the generator parameters according to the output results so that the data generated by the generator is closer to the real historical fault data.

[0026] Training the discriminator, inputting real historical fault data and simulated chaotic system fault data generated by the generator into the discriminator, so that it can evaluate whether the input fault data is a real historical fault. The loss function adjusts the discriminator parameters according to the evaluation results to improve the discriminator's discrimination ability;

[0027] Iterative training is performed by repeatedly training the generator and the discriminator until the discriminator cannot accurately determine whether the simulated chaotic system fault data generated by the generator is real historical fault data.

[0028] Furthermore, the generative adversarial network model optimization step includes:

[0029] Input the real production system configuration data into the generator to generate simulated chaotic system fault data;

[0030] The simulated chaotic system fault data generated by the generator is input into the discriminator for discrimination to determine whether the data is true;

[0031] The discriminant results are fed back to the generator so that the generator can be iteratively optimized based on the results.

[0032] Furthermore, the steps of generating a simulated chaotic test sample by the generative adversarial network model are as follows:

[0033] Input a random noise vector and component information and configuration information of the production system to be tested into the trained generative adversarial network model, and output simulated chaotic system fault data, where the simulated chaotic system fault data consists of the fault state values ​​of the components of the production system to be tested and the probability of each component corresponding to different fault types, and each component corresponds to no less than 3 fault types;

[0034] Set a component failure threshold, and select components corresponding to component failure status values ​​greater than the threshold as failed components;

[0035] By comparing the probabilities of the fault types corresponding to the faulty components, the fault type with the highest probability is selected, and the faulty components and their corresponding fault types are obtained as the simulated chaos test sample output;

[0036] Repeat the above steps until no new simulated chaos test samples can be output.

[0037] Furthermore, a chaos test case is generated according to the chaos test scheme, and a chaos vector library is called according to the chaos test case to query and retrieve chaos test samples.

[0038] A simulated chaos test device based on generative adversarial network technology, comprising:

[0039] The production system configuration module stores the component information and configuration information of the production system to be tested;

[0040] The generative adversarial network training module trains the generative adversarial network model according to the data stored in the production system configuration module, and uses the trained generative adversarial network model to generate simulated chaos test samples and submit them to the chaos simulation module;

[0041] Chaos simulation module, accepts and summarizes simulated chaos test samples and generates a chaos vector library;

[0042] The chaos test module executes the chaos test according to the submitted chaos test plan, calls the chaos vector library through the chaos simulation module to query and retrieve the chaos test samples, and generates the test results according to the returned query results;

[0043] Among them, the generative adversarial network model includes a generator, a discriminator and a loss function.

[0044] Furthermore, the chaos simulation module includes a data receiving unit, a chaos vector library and a simulation query unit.

[0045] The data receiving unit is responsible for receiving the simulated chaotic test samples generated by the generative adversarial network model and sorting these samples;

[0046] The chaos vector library is responsible for storing the sorted data and providing storage and retrieval query services to simulate the state of the system in a chaotic environment;

[0047] The simulation query unit is responsible for vector library query, and queries the simulated chaos test samples through information including component ID, component IP address, service port and fault category.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] (1) By learning system configuration and behavior characteristics through the generative adversarial network model, the generator can automatically generate a realistic chaotic simulation environment that is close to the actual scenario. This not only avoids direct testing in the production environment, but also eliminates the need to deploy a production simulation environment, effectively avoiding production operation risks and saving the cost of deploying a production simulation environment.

[0050] (2) Generate the initial state of the chaos simulator by generative adversarial network simulation, which can greatly improve the efficiency and accuracy of the test. Use the chaos tester for testing and analysis, and you can more comprehensively evaluate the performance and stability of the application system.

[0051] (3) The degree of automation is high. Users only need to submit a chaos test plan and enter configuration operations to perform chaos testing. The present invention can be widely used in the testing and analysis of various chaotic systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is the architecture diagram of the existing chaos testing solution;

[0053] Figure 2 This is a diagram of the existing chaos testing solution method;

[0054] Figure 3 This is a flow chart of the simulated chaos testing method of the present invention;

[0055] Figure 4 Generate an iterative optimization flow chart of the adversarial network model for the present invention;

[0056] Figure 5 This is a schematic diagram of the chaos vector library of the present invention;

[0057] Figure 6 This is a diagram of the simulated chaos testing device based on the generative adversarial network technology of the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0059] Example 1

[0060] This embodiment proposes a simulated chaos testing method based on generative adversarial network technology. Figure 3 As shown, including:

[0061] S1, receiving the chaos test plan and the component information and configuration information of the production system to be tested, and entering the component information and configuration information of the production system to be tested into the production system configuration library;

[0062] S2, trains the generative adversarial network model based on the data in the production system configuration library;

[0063] S3, use the trained generative adversarial network model to generate simulated chaotic test samples;

[0064] S4, summarize the generated simulated chaos test samples and store them in the chaos vector library;

[0065] S5, testing the simulated production system according to the chaos test scheme, calling the chaos vector library to query and retrieve chaos test samples, and generating test results according to the returned query results.

[0066] Among them, the generative adversarial network model includes a generator, a discriminator and a loss function.

[0067] Furthermore, the chaos test scheme includes information such as component ID, component IP address, service port and fault type. The component information includes the IP address, service port and component type of each component. The component type can be subdivided into database, host, storage, middleware, network equipment and application, etc., in order to more accurately describe the system structure.

[0068] Configuration information can be divided into software configuration and hardware configuration. Software configuration refers to various settings related to software in the production system, including application configuration, cluster configuration, and component configuration. Hardware configuration involves settings related to hardware, including host configuration, network configuration, and storage configuration.

[0069] Furthermore, the model training includes the following steps:

[0070] Obtain data on source components, source fault types, associated components, and associated exception types, and perform preprocessing;

[0071] Establish a generative adversarial network model and initialize weight parameters;

[0072] The model is trained repeatedly through iterative training, and the model is continuously optimized through iterative optimization.

[0073] Furthermore, the data can be collected through logs of actual production systems, monitoring equipment, etc. This embodiment collects a large amount of real historical fault data, processes it, and generates adversarial model training. The data structure is as follows:

[0074] Source components are used to record the IP address and type of each source component in the system and to uniquely identify each component. The types include database, host, storage, middleware, network equipment, application, etc.

[0075] Source failure types are used to simulate failure types in system resources, services, networks, data, security, and environment.

[0076] Association components are used to record the IP address, service port, and type of the association components, and to establish association relationships between components. Types include database, host, storage, middleware, network equipment, and application. For example, the IP address is 192.168.1.2, the port number is 8080, and the type is host.

[0077] The associated exception type is used to simulate abnormal conditions of associated components, such as slow service response, unavailable service, and abnormal shutdown.

[0078] Furthermore, data preprocessing includes:

[0079] Each type of fault needs to be encoded into a digital vector. Using one-hot encoding, each fault type is represented as a vector in which only one element is 1 and the rest are 0, as shown in Table 1.

[0080] Table 1 Fault type data coding table

[0081]

[0082] Using one-hot encoding, each anomaly type is represented as a vector, which enables the network to clearly identify and distinguish different anomalies, as shown in Table 2.

[0083] Table 2. Data coding table of associated abnormality types

[0084] Data Types Data Description coding Slow response of associated component services Simulates a situation where the associated component service responds slowly. [0,0,1] The associated component cannot be served Simulates a situation where the associated component cannot provide service. [0,1,0] The associated component is closed abnormally Simulates the situation where the associated component is abnormally closed. [1,0,0]

[0085] In this embodiment, the data is organized into a hierarchical structure, where each source component corresponds to multiple associated components, and detailed configuration information is provided for each component. The configuration information includes software and hardware aspects, such as application configuration, cluster configuration, component configuration, host configuration, network configuration, and storage configuration. Such a hierarchical structure helps to simulate the complex relationships and configurations of different components in the system. In the generative adversarial network, a generative adversarial network model is constructed by specifying the fault type of the source component as input. The generator of this model is responsible for generating the fault results of the associated components as the output of the model.

[0086] The following is an example of a scenario that simulates chaos testing:

[0087] There is a main application component (source component A) and two key dependent components (B and C). If source component A experiences a resource failure (e.g. memory exhaustion), dependent components B and C may be affected, database B may face connection limits, and middleware C may experience cache invalidation or slow response.

[0088] In this example, the known components, configuration information, and source component failures are as follows:

[0089]

[0090] Information about associated component B:

[0091] IP address: 192.168.1.2

[0092] Service port: 8080

[0093] Component Type: Database

[0094] Configuration information:

[0095] Software Configuration:

[0096] Application configuration: {"maxConnections":50,"queryCacheSize":"128MB"}

[0097] Cluster configuration: {"nodes":5,"replicationFactor":3}

[0098] Component configuration: {"threads":16,"memoryLimit":"8GB"}

[0099] Hardware configuration:

[0100] Host configuration: {"CPU":"3GHz","RAM":"16GB"}

[0101] Network configuration: {"bandwidth":"2Gbps"}

[0102] Storage configuration: {"type":"HDD","capacity":"1TB"}

[0103] Information about associated component C:

[0104] IP address: 192.168.1.3

[0105] Service port: 8081

[0106] Component type: Middleware

[0107] Configuration information:

[0108] Software Configuration:

[0109] Application configuration: {"maxConnections":30,"cacheSize":"64MB"}

[0110] Cluster configuration: {"nodes":4,"replicationFactor":2}

[0111] Component configuration: {"threads":12,"memoryLimit":"6GB"}

[0112] Hardware configuration:

[0113] Host configuration: {"CPU":"4GHz","RAM":"32GB"}

[0114] Network configuration: {"bandwidth":"4Gbps"}

[0115] Storage configuration: {"type":"SSD","capacity":"512GB"}

[0116] The above values ​​are sequentially combined into an input vector, where the component type is represented by one-hot encoding, for example, application is represented by [1,0,0,0,0,0]. Configuration information is represented by specific values, and storage configuration type is one-hot encoded, for example, SSD is represented by [1,0]. The vectorized result of source component A is as follows:

[0117] [1,0,0,0,0,0,100,5000,3,2,8,4,2,8,1,1,0,256]

[0118] The information of each component is an 18-dimensional vector. The number of source components is limited to 1, and the number of associated components is limited to 10. For configurations that do not exist, the corresponding value is recorded as 0. Assume that the fault type of source component A is resource fault. According to the code in b, its corresponding code is [1,0,0,0,0,0], which is placed at the front of the vector. In this way, the simulated state vector of the generated adversarial network input is a 204-dimensional vector.

[0119] Furthermore, the generative adversarial network model includes a generator, a discriminator and a loss function.

[0120] Generator:

[0121] The generator mainly generates the initial state of the chaos simulator based on an iterative method, and modifies the initial state of the chaos simulator according to the judgment result of the discriminator.

[0122] Input: a random noise vector (usually uniform or normal distribution), and the 204-dimensional vector after data processing in the above example.

[0123] Output: Each of the 10 associated components may be faulty or not, represented by 1 and 0 respectively. Each of the 10 associated components corresponds to 3 types of faults. That is, the output is 40-dimensional, representing a simulated chaotic system state vector, which is similar to the state of the real system.

[0124] Discriminator:

[0125] Input: A system state vector (can be real or generated by a generator).

[0126] Output: A binary value indicating whether the input state vector is real or generated.

[0127] Loss function:

[0128] The loss function of the generative adversarial network is a function used to measure the performance between the generator and the discriminator. The generator aims to generate realistic samples, while the discriminator tries to distinguish between real samples and generated samples. In this scheme, the loss function is designed to encourage the generator to generate realistic chaotic test samples and make it difficult for the discriminator to distinguish these generated samples from the real system state. This scheme uses binary cross entropy as the loss function, which is expressed by the following formula:

[0129]

[0130] D(x) represents the output of the discriminator for the real system state after the chaos test, that is, the probability that the real sample is judged as true.

[0131] G(z) represents the samples generated by the generator through the input system configuration, source component failure type and random noise.

[0132] P data (x) represents the distribution of real samples, that is, the probability density function of real data.

[0133] P z (z) represents the distribution of the random noise z of the generator input, that is, the probability density function of the generator input noise.

[0134] E represents the expected operation, which is a weighted average of all possible values.

[0135] The loss function is divided into two parts. The first part hopes to maximize the discriminator's probability of distinguishing the true system state logD(x), and the second part hopes to maximize the discriminator's probability of distinguishing the chaotic test samples generated by the generator log(1-D(G(z))). When training a generative adversarial network, by minimizing the loss of the generator and the discriminator, we achieve the following goals:

[0136] The generator is made to generate realistic chaos test samples so as to simulate the real system state in chaos testing.

[0137] Make it difficult for the discriminator to clearly distinguish between generated samples and real samples, so as to ensure that the samples generated by the generator are highly realistic.

[0138] Furthermore, the iterative training of the generative adversarial network model includes:

[0139] Step 1: Data preparation. Prepare the source component vector, including configuration information, fault type code and associated component information, to form a 204-dimensional input vector.

[0140] Step 2: Initialize the network. Initialize the weight parameters of the generator and discriminator.

[0141] Step 3: Train the generator. The generator receives the random noise vector and the source component vector, and outputs the state vector of the simulated chaotic system. The generator parameters are adjusted through the loss function to make the generated state closer to the real system.

[0142] Step 4: Train the discriminator. The discriminator evaluates the authenticity of real and generated samples and adjusts parameters to improve the discrimination ability.

[0143] Step 5: Iterative training. Perform steps 3 and 4 iteratively for multiple times to gradually improve the performance of the generator and discriminator.

[0144] After multiple iterations of training, the state vector generated by the generator is realistic enough that the discriminator cannot accurately distinguish the authenticity. At this point, the generator has learned the characteristics of the chaotic system. Finally, the generator can generate chaotic test samples that are close to the real state based on the real configuration data.

[0145] Furthermore, the iterative optimization process of generating adversarial network model is as follows Figure 4 As shown, including:

[0146] Step 1: Learning and training. The generative adversarial model is trained with real production system configuration data and real historical failure data.

[0147] Step 2: Generate sample data. After training is completed, the generator of the generative adversarial network generates chaotic test sample data based on the actual production configuration data.

[0148] Step 3: Data discrimination. The discriminator of the generative adversarial network determines whether the sample data is true.

[0149] Step 4: Result feedback: The generator receives the discriminator’s judgment result on the data it generates.

[0150] Step 5: Model optimization. The generator is iteratively optimized based on the discrimination results.

[0151] This process learns from the real production system configuration and historical fault data, and the generative adversarial network model is continuously optimized during the training phase to form an evolving chaos test model. This closed-loop process implements an efficient chaos test method and provides a reliable means of evaluating and improving the system stability of the production environment.

[0152] Furthermore, the steps of generating a simulated chaotic test sample by the generative adversarial network model are as follows:

[0153] Step 1: Data preparation. Prepare the source component vector of the real system, including configuration information, fault type coding, and associated component information, to form a 204-dimensional input vector.

[0154] Step 2: Generator application. Use the trained generator to input the random noise vector and the real system source component vector to generate the state vector of the simulated chaotic system.

[0155] Step 3: Output the chaotic test sample. The simulated state vector output by the generator is 40-dimensional, including the fault states of 10 associated components and the probability of each associated component corresponding to 3 fault types.

[0156] Assume that the output result is [0.58, 0.35, 0.53, 0.26, 0.30, 0.28, 0.47, 0.66, 0.80, 0.06, 0.22, 0.35, 0.43, 0.13, 0.21, 0.65, 0.45, 0.09, 0.46, 0.24, 0.69, 0.07, 0.00, 0.40, 0.60, 0.34, 0.66, 0.01, 0.39, 0.29, 0.31, 0.04, 0.44, 0.52, 0.19, 0.16, 0.64, 0.47, 0.20, 0.33]. In this result, set the component failure threshold to p1 (assume it is 0.5). The component with a value greater than p1 in the first 10 dimensions is determined to be a faulty component, assuming it is component 1. Then find the corresponding positions of the three fault types corresponding to component 1, that is, [0.22, 0.35, 0.43]. The maximum value is the fault type corresponding to the component. In this example, the component associated with fault 3 is abnormally closed.

[0157] All generated chaos test samples are stored in the chaos vector library.

[0158] Chaos vector library Figure 5 As shown, storage and retrieval query services are provided according to a specific data structure. This library stores key data such as basic information of components and fault lists, which are used to simulate the state of the system in a chaotic environment.

[0159] The vector library data sample is as follows:

[0160] Fault source: Generator version v1

[0161] Source component A information:

[0162] IP address: 192.168.1.1

[0163] Component Type: Application

[0164] Configuration information:

[0165] Software Configuration:

[0166] Application configuration: {"maxRequests":100,"timeout":5000}

[0167] Cluster configuration: {"nodes":3,"replicationFactor":2}

[0168] Component configuration: {"threads":8,"memoryLimit":"4GB"}

[0169] Hardware configuration:

[0170] Host configuration: {"CPU":"2GHz","RAM":"8GB"}

[0171] Network configuration: {"bandwidth":"1Gbps"}

[0172] Storage configuration: {"type":"SSD","capacity":"256GB"}

[0173] Fault type: Service fault

[0174] Information about associated component B:

[0175] IP address: 192.168.1.2

[0176] Service port: 8080

[0177] Component Type: Database

[0178] Configuration information:

[0179] Software Configuration:

[0180] Application configuration: {"maxConnections":50,"queryCacheSize":"128MB"}

[0181] Cluster configuration: {"nodes":5,"replicationFactor":3}

[0182] Component configuration: {"threads":16,"memoryLimit":"8GB"}

[0183] Hardware configuration:

[0184] Host configuration: {"CPU":"3GHz","RAM":"16GB"}

[0185] Network configuration: {"bandwidth":"2Gbps"}

[0186] Storage configuration: {"type":"HDD","capacity":"1TB"}

[0187] Fault type: Slow response of associated component service

[0188] Information about associated component C:

[0189] IP address: 192.168.1.3

[0190] Service port: 8081

[0191] Component type: Middleware

[0192] Configuration information:

[0193] Software Configuration:

[0194] Application configuration: {"maxConnections":30,"cacheSize":"64MB"}

[0195] Cluster configuration: {"nodes":4,"replicationFactor":2}

[0196] Component configuration: {"threads":12,"memoryLimit":"6GB"}

[0197] Hardware configuration:

[0198] Host configuration: {"CPU":"4GHz","RAM":"32GB"}

[0199] Network configuration: {"bandwidth":"4Gbps"}

[0200] Storage configuration: {"type":"SSD","capacity":"512GB"}

[0201] Fault type: The associated component cannot be used.

[0202] The vector library stores information such as the IP, port, and configuration of source components and associated components, specifies the anomaly type of the source component, and the anomaly type of the associated component generated by the generative adversarial network or in real scenarios.

[0203] Furthermore, the chaos test scheme includes information such as component ID, component IP address, service port and fault type. The chaos tester generates chaos test cases according to the scheme, calls the chaos vector library according to the chaos test cases to query and retrieve chaos test samples for simulation testing, and generates test results.

[0204] Example 2

[0205] This embodiment is based on the simulated chaos test method based on the generative adversarial network technology disclosed in the above embodiment 1, and proposes a simulated chaos test device based on the generative adversarial network technology. The device is composed as follows: Figure 6 As shown, including:

[0206] Production system configuration module 1, storing component information and configuration information of the production system to be tested;

[0207] Generative adversarial network training module 2, which trains the generative adversarial network model according to the data in the production system configuration module 1, and uses the trained generative adversarial network model to generate simulated chaos test samples, and submits them to the chaos simulation module;

[0208] Chaos simulation module 3 generates a chaos vector library according to the submitted simulated chaos test samples, and provides query and retrieval of simulated data for chaos test module 4;

[0209] Chaos testing module 4 executes chaos testing according to the submitted chaos testing plan, calls the chaos vector library through chaos simulation module 3 to query and retrieve chaos testing samples, generates test results according to the returned query results, analyzes and evaluates the production system according to the test results, and feeds back the results to the production system maintenance personnel.

[0210] Among them, the generative adversarial network model 2 includes a generator 21, a discriminator 22 and a loss function.

[0211] Furthermore, the chaos simulation module 3 includes a data receiving unit, a chaos vector library and a simulation query unit.

[0212] The data receiving unit is responsible for receiving the simulated chaotic test samples generated by the generative adversarial network model and sorting these samples;

[0213] The chaos vector library is responsible for storing the sorted data and providing storage and retrieval query services to simulate the state of the system in a chaotic environment;

[0214] The simulation query unit is responsible for vector library query, and queries the simulated chaos test samples through information including component ID, component IP address, service port and fault category;

[0215] Chaos Simulator Module 3 is a key tool that helps Chaos Tester Module 4 simulate the state of the system under different abnormal and chaotic conditions, and provide targeted query services to support comprehensive evaluation of chaos testing

[0216] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A simulated chaos testing method based on generative adversarial network technology, characterized in that: The method comprises: Receive the chaos test plan and the component information and configuration information of the production system to be tested, and enter the component information and configuration information of the production system to be tested into the production system configuration library; Train a generative adversarial network model based on data from the production system configuration library; Use the trained generative adversarial network model to generate simulated chaotic test samples; Summarize the generated simulated chaos test samples and store them in the chaos vector library; Test the simulated production system according to the chaos test plan, call the chaos vector library to query and retrieve chaos test samples, and generate test results based on the returned query results; Among them, the generative adversarial network model includes a generator, a discriminator and a loss function.

2. The simulated chaos testing method based on generative adversarial network technology according to claim 1 is characterized in that: The chaos test scheme includes information such as component ID, component IP address, service port and fault type. The component information includes the IP address, service port and component type of each component. The configuration information includes application configuration, cluster configuration, component configuration, host configuration, network configuration and storage configuration.

3. The simulated chaos testing method based on generative adversarial network technology according to claim 1 is characterized in that: The generative adversarial network model training comprises the following steps: Obtain real production system configuration data and real historical fault data, and perform preprocessing; Establish a generative adversarial network model and initialize the weight parameters of the generator and discriminator; Iteratively train the generative adversarial network model; Iteratively optimize the generative adversarial network model.

4. The simulated chaos testing method based on generative adversarial network technology according to claim 3 is characterized in that: The real production system configuration data includes source components and associated components, and the real historical fault data includes source fault types and associated abnormality types. The preprocessing steps include: Use one-hot encoding to represent the real historical fault data as different vectors one by one; Organize the data into a hierarchical structure so that each source component corresponds to more than two associated components, and each source fault type corresponds to more than two associated exception types, and establish a mapping set of real production system configuration data and real historical fault data.

5. The simulated chaos testing method based on generative adversarial network technology according to claim 3 is characterized in that: The iterative training of the generative adversarial network model comprises: Training the generator, inputting random noise vectors and source component data into the generator so that it outputs simulated chaotic system fault data. The loss function adjusts the generator parameters according to the output results so that the data generated by the generator is closer to the real historical fault data. Training the discriminator, inputting real historical fault data and simulated chaotic system fault data generated by the generator into the discriminator, so that it can evaluate whether the input fault data is a real historical fault. The loss function adjusts the discriminator parameters according to the evaluation results to improve the discriminator's discrimination ability; Iterative training is performed to repeatedly train the generator and the discriminator until the discriminator cannot accurately determine whether the simulated chaotic system fault data generated by the generator is real historical fault data.

6. The simulated chaos testing method based on generative adversarial network technology according to claim 3 is characterized in that: The iterative optimization generation adversarial network model comprises: Input the real production system configuration data into the generator to generate simulated chaotic system fault data; The simulated chaotic system fault data generated by the generator is input into the discriminator for discrimination to determine whether the data is true; The discriminant results are fed back to the generator so that the generator can be iteratively optimized based on the results.

7. The simulated chaos testing method based on generative adversarial network technology according to claim 1 is characterized in that: The steps of generating a simulated chaotic test sample using the generative adversarial network model are as follows: Input a random noise vector and component information and configuration information of the production system to be tested into the trained generative adversarial network model, and output simulated chaotic system fault data, where the simulated chaotic system fault data consists of the fault state values ​​of the components of the production system to be tested and the probability of each component corresponding to different fault types, and each component corresponds to no less than 3 fault types; Set a component failure threshold, and select components corresponding to component failure status values ​​greater than the threshold as failed components; By comparing the probabilities of the fault types corresponding to the faulty components, the fault type with the highest probability is selected, and the faulty components and their corresponding fault types are obtained as the simulated chaos test sample output; Repeat the above steps until no new simulated chaos test samples can be output.

8. The simulated chaos testing method based on generative adversarial network technology according to claim 1 is characterized in that: Generate chaos test cases according to the chaos test plan, and call the chaos vector library to query and retrieve chaos test samples according to the chaos test cases.

9. A simulated chaos test device based on generative adversarial network technology, characterized in that: include: The production system configuration module stores the component information and configuration information of the production system to be tested; The generative adversarial network training module trains the generative adversarial network model according to the data stored in the production system configuration module, and uses the trained generative adversarial network model to generate simulated chaos test samples and submit them to the chaos simulation module; Chaos simulation module, accepts and summarizes simulated chaos test samples and generates a chaos vector library; The chaos test module executes the chaos test according to the submitted chaos test plan, calls the chaos vector library through the chaos simulation module to query and retrieve the chaos test samples, and generates the test results according to the returned query results; Among them, the generative adversarial network model includes a generator, a discriminator and a loss function.

10. The simulated chaos testing device based on generative adversarial network technology according to claim 9, characterized in that: The chaos simulation module includes a data receiving unit, a chaos vector library and a simulation query unit. The data receiving unit is responsible for receiving the simulated chaotic test samples generated by the generative adversarial network model and sorting these samples; The chaos vector library is responsible for storing the sorted data and providing storage and retrieval query services to simulate the state of the system in a chaotic environment; The simulation query unit is responsible for vector library query, and queries the simulated chaos test samples through information including component ID, component IP address, service port and fault category.