Experimental template recommendation method and device, electronic equipment, storage medium and product
Patent Information
- Application Number
- CN202211058699.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-08-30
AI Technical Summary
然而,这样依赖人工查询信息以及人工对设计经验的转译,不仅会导致混沌实验的实验效率低,而且还会影响混沌实验的实验准确率
[0034]通过对混沌实验的至少一个实验模板进行打标签,从而建立各实验模板与用于指示扰动组件的标签的关联关系,然后在后续进行混沌实验时,通过确定待实验的目标功能组件的、包括目标扰动组件的架构信息,以基于架构信息和关联关系,推荐对应目标功能组件的至少一个候选实验模板。如此,通过将混沌实验的设计经验进行标注,从而在系统对混沌实验对象的架构进行感知后,根据架构信息确定对应的标注,进而通过标注确定设计经验,从而有效的提高了混沌实验的实验产出以及实验质量。
Smart Images

Figure CN117667653B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for recommending experimental templates. Background Technology
[0002] Chaos experiments in related technologies typically involve manually retrieving design experience from the first chaos experiment with the same architectural characteristics of the experimental object, using methods such as instant messaging or verbal communication. This retrieved design experience is then translated into an experimental plan for execution. However, this reliance on manual information retrieval and translation of design experience not only leads to low experimental efficiency but also affects the accuracy of chaos experiments. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for recommending experimental templates, which can improve the experimental efficiency and accuracy of chaos experiments.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides a method for recommending experimental templates, including:
[0006] Obtain at least one experimental template for a chaos experiment, and at least one perturbation factor corresponding to each experimental template;
[0007] Based on the at least one perturbation factor, a label corresponding to each of the experimental templates is determined; wherein, the experimental template includes the injection method of each of the perturbation factors, and the label is used to indicate the perturbation component corresponding to the at least one perturbation factor;
[0008] Establish the association relationship between each experimental template and the label;
[0009] Obtain the target functional component to be experimented on in the target application, and perform architectural analysis on the target functional component to obtain the architectural information of the target functional component. The architectural information includes at least one target perturbation component on which the experiment on the target functional component depends.
[0010] Based on the aforementioned relationships and the architectural information, at least one candidate experimental template corresponding to the target functional component is recommended.
[0011] This application provides a device for recommending experimental templates, comprising:
[0012] The acquisition module is used to acquire at least one experimental template for the chaos experiment and at least one perturbation factor corresponding to each experimental template.
[0013] A determining module is used to determine the label corresponding to each of the experimental templates based on the at least one perturbation factor; wherein, the experimental template includes the injection method of each of the perturbation factors, and the label is used to indicate the perturbation component corresponding to the at least one perturbation factor;
[0014] A construction module is used to construct the association relationship between each experimental template and the label;
[0015] An architecture analysis module is used to obtain the target functional component to be experimented on in the target application, and to perform architecture analysis on the target functional component to obtain the architecture information of the target functional component. The architecture information includes at least one target perturbation component on which the experiment on the target functional component depends.
[0016] The recommendation module is used to recommend at least one candidate experimental template corresponding to the target functional component based on the association relationship and the architecture information.
[0017] In the above scheme, the acquisition module is further configured to receive a labeling instruction for the chaos experiment sent by the first terminal. The labeling instruction carries the functional components tested in the chaos experiment, at least one perturbation factor corresponding to the functional components, and the injection method of each perturbation factor corresponding to the functional components. The labeling instruction is used to instruct at least one experimental template of the chaos experiment to be labeled respectively. The labeling instruction is parsed to obtain the functional components of the chaos experiment, the at least one perturbation factor, and the injection method of each perturbation factor corresponding to the functional components. Based on the functional components, the at least one perturbation factor, and the corresponding injection method, at least one experimental template of the chaos experiment is constructed, and at least one perturbation factor corresponding to each experimental template is determined.
[0018] In the above scheme, the determining module is further used to analyze each of the perturbation factors and the injection method to obtain the perturbation component corresponding to each of the experimental templates; and to construct a label corresponding to each of the experimental templates based on the perturbation component.
[0019] In the above scheme, the acquisition module is further configured to acquire at least one experimental template of the chaos experiment sent by the first terminal, each experimental template carrying at least one perturbation factor; and to analyze the experimental template to obtain at least one perturbation factor corresponding to the experimental template.
[0020] In the above scheme, the experimental template also carries candidate labels and an injection method for at least one perturbation factor corresponding to the experimental template; the determining module is further used to analyze the at least one perturbation factor and the injection method to obtain the perturbation component corresponding to each experimental template; and adjust the candidate labels according to the perturbation component to obtain the labels corresponding to each experimental template.
[0021] In the above scheme, the architecture analysis module is further configured to receive an experimental instruction sent by the second terminal, the experimental instruction carrying an identifier of the target functional component to be tested in the target application; wherein, the experimental instruction is used to instruct a chaos experiment to be performed on the target functional component; the experimental instruction is analyzed to obtain the identifier of the target functional component, and based on the identifier, the target functional component to be tested in the target application is determined.
[0022] In the above scheme, the recommendation module is further configured to determine at least one candidate experiment template corresponding to the target functional component based on the association relationship and the architecture information; and send the at least one candidate experiment template to the second terminal so that the second terminal displays the recommended at least one candidate experiment template.
[0023] In the above scheme, the architecture analysis module is further configured to obtain architecture information of at least one candidate functional component, wherein the architecture information corresponds one-to-one with the candidate functional component; perform architecture analysis on the target functional component to obtain the architecture features of the target functional component; determine the candidate architecture features corresponding to each of the candidate functional components based on the architecture information of the at least one candidate functional component; match the architecture features with the candidate architecture features; and when a match is successful, use the architecture information of the candidate functional component corresponding to the corresponding candidate architecture feature as the architecture information of the target functional component.
[0024] In the above scheme, the recommendation module is further configured to determine the target label corresponding to the target functional component based on the at least one target perturbation component in the architecture information; select at least one candidate experimental template corresponding to the target perturbation component from at least one experimental template based on the target label and the association relationship, and recommend the at least one candidate experimental template.
[0025] In the above scheme, the device further includes a selection module, which is used to respond to the selection instruction sent by the second terminal for the candidate experimental template, determine at least one selected candidate experimental template as a target experimental template; and generate an experimental plan for the target functional component based on each target experimental template, wherein the experimental plan corresponds one-to-one with the target experimental template, so as to conduct experiments on the target functional component based on each experimental plan.
[0026] In the above scheme, the device further includes a modification module, which is used to send at least one experimental plan of the target functional component and receive returned modification information for the target experimental plan in the at least one experimental plan; based on the modification information, the target experimental plan is adjusted to obtain a new experimental plan.
[0027] In the above scheme, the device further includes an experimental information sending module, which is used to send the experimental plan corresponding to each of the target experimental templates to the second terminal; receive an editing request from the second terminal for the experimental information of the target experimental plan among the multiple experimental plans, the experimental information including at least one perturbation factor included in the target experimental template corresponding to the target experimental plan, and the injection method of each perturbation factor; and in response to the editing request, send the experimental information to the second terminal so that the second terminal displays the experimental information of the target experimental plan.
[0028] This application provides an electronic device, including:
[0029] Memory, used to store executable instructions;
[0030] The processor, when executing executable instructions stored in the memory, implements the recommended method of the experimental template provided in the embodiments of this application.
[0031] This application provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor will execute the recommended method of the experimental template provided in this application.
[0032] This application provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the recommended method of the experimental template provided in this application.
[0033] The embodiments of this application have the following beneficial effects:
[0034] By labeling at least one experimental template for chaos experiments, an association is established between each experimental template and a label used to indicate the perturbation component. Then, during subsequent chaos experiments, by determining the architectural information of the target functional component to be experimented on, including the target perturbation component, at least one candidate experimental template for the corresponding target functional component is recommended based on the architectural information and the association. In this way, by labeling the design experience of chaos experiments, the system can perceive the architecture of the chaos experiment object, determine the corresponding labels based on the architectural information, and then determine the design experience through the labels, thereby effectively improving the experimental output and quality of chaos experiments. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the architecture of the recommendation system 100 for experimental templates provided in this application embodiment;
[0036] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0037] Figure 3 This is a flowchart illustrating the recommended method for the experimental template provided in the embodiments of this application;
[0038] Figure 4 This is a schematic diagram of the method for injecting disturbance factors provided in the embodiments of this application;
[0039] Figure 5 This is a schematic diagram of the experimental information input interface provided in the embodiments of this application;
[0040] Figure 6 This is a schematic diagram illustrating the architecture information of the target functional components provided in the embodiments of this application;
[0041] Figure 7 This is a schematic diagram illustrating the recommended candidate experiment templates provided in the embodiments of this application;
[0042] Figure 8 These are schematic diagrams illustrating the various experimental plans provided in the embodiments of this application;
[0043] Figure 9 This is a schematic diagram illustrating the experimental information provided in the embodiments of this application;
[0044] Figure 10 This is a flowchart illustrating the recommended method for the experimental template provided in the embodiments of this application;
[0045] Figure 11 This is a flowchart illustrating the recommended method for the experimental template provided in the embodiments of this application;
[0046] Figure 12This is a schematic diagram of the architecture of the recommended method for the experimental template provided in the embodiments of this application;
[0047] Figure 13 This is a flowchart illustrating the recommended method for the experimental template provided in the embodiments of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0050] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0052] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0053] 1) Architectural characteristics refer to the application's dependencies on the infrastructure and the characteristics of dependencies between components. For example, the application may use a three-campus deployment architecture or depend on a certain message middleware.
[0054] 2) Client: Also known as user terminal, it refers to the program that provides local services to users in contrast to the server. Except for some applications that can only run locally, it is generally installed on ordinary client machines and needs to cooperate with the server to run. That is, there needs to be a corresponding server and service program in the network to provide the corresponding services. Thus, a specific communication connection needs to be established between the client and the server to ensure the normal operation of the application.
[0055] 3) Architecture awareness refers to automatically perceiving the characteristics of system architecture through certain technical means.
[0056] 4) Experiment template refers to a standardized format for describing chaos engineering experiments. This format allows the template to be used in multiple applications to generate multiple experiment instances in batches.
[0057] 5) Expert labeling refers to the process by which architecture experts label the attributes of experimental templates so that the chaotic system can recommend relevant experimental templates based on these labels.
[0058] 6) Chaos experiments, an effective means of proactively identifying online stability risks, are a methodology for conducting experiments on systems in a production environment to proactively identify system vulnerabilities. Chaos experiments drive stability building through experimentation, relying on various controllable destructive experiments to expose system problems in advance and avoid serious consequences when failures occur.
[0059] 7) Structured Query Language (SQL) is the standard language for relational databases, used to access and manipulate database systems.
[0060] 8) MySQL is an open-source, cross-platform database management system based on SQL queries.
[0061] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the experimental template recommendation system 100 provided in this application embodiment. To realize the application scenario of experimental template recommendation (for example, the application scenario of experimental template recommendation can be to first obtain the experimental templates sent by the first terminal after the chaos experiment expert has conducted chaos experiments on the functional components, determine the tags corresponding to each experimental template, and build the association relationship between the experimental templates and the tags, so that when the chaos engineer conducts experiments on the target functional components such as the cache module, the cache module to be tested sent by the second terminal is obtained, and the tags corresponding to the cache module are determined by performing architectural analysis on the cache module, thereby determining at least one candidate to be recommended based on the association relationship). (Select an experimental template). The first terminal (terminal 400-1 is shown as an example) and the second terminal (terminal 400-2 is shown as an example) are connected to the server 200 through a network 300. The network 300 can be a wide area network or a local area network, or a combination of both. The first terminal 400-1 is used by the user to use client 401, which is displayed on the display interface (display interface 401-1 is shown as an example). The second terminal 400-2 is used by the user to use client 402, which is displayed on the display interface (display interface 402-1 is shown as an example). The first terminal 400-1, the second terminal 400-2, and the server 200 are interconnected through a wired or wireless network.
[0062] The first terminal 400-1 is used to obtain at least one experimental template of the chaos experiment and at least one perturbation factor corresponding to each experimental template, and send at least one experimental template of the chaos experiment and at least one perturbation factor corresponding to each experimental template to the server 200.
[0063] Server 200 is used to: obtain at least one experimental template of the chaos experiment sent by the first terminal 400-1, and at least one perturbation factor corresponding to each experimental template; determine the label corresponding to each experimental template based on at least one perturbation factor; wherein, the experimental template includes the injection method of each perturbation factor, and the label is used to indicate the perturbation component corresponding to at least one perturbation factor; and construct the association relationship between each experimental template and the label respectively.
[0064] The second terminal 400-2 is used to obtain the target functional component to be tested in the target application and send the target functional component to be tested in the target application to the server 200.
[0065] Server 200 is also used to: obtain the target functional component to be tested in the target application sent by the second terminal 400-2; perform architectural analysis on the target functional component to obtain the architectural information of the target functional component, including at least one target perturbation component on which the experiment is conducted; recommend at least one candidate experimental template for the corresponding target functional component based on the correlation and architectural information; and send at least one candidate experimental template for the corresponding target functional component to the second terminal 400-2.
[0066] The second terminal 400-2 is also used to receive at least one candidate experimental template for the corresponding target functional component sent by the server 200, and to present at least one candidate experimental template.
[0067] In some embodiments, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The first terminal 400-1 and the second terminal 400-2 can be smartphones, tablets, laptops, desktop computers, set-top boxes, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices, smart speakers, and smartwatches), but are not limited to these. The terminal devices and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0068] See Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. In practical applications, the electronic device can be... Figure 1 The server 200, the first terminal 400-1, or the second terminal 400-2 shown are described in the following references. Figure 2 , Figure 2 The illustrated electronic device includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 440.
[0069] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0070] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0071] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0072] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0073] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0074] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0075] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.
[0076] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;
[0077] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.
[0078] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 A recommended device 455 for experimental templates stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, including the following software modules: acquisition module 4551, determination module 4552, construction module 4553, architecture analysis module 4554, and recommendation module 4555. These modules are logically connected and can therefore be arbitrarily combined or further split according to their implemented functions. The functions of each module will be described below.
[0079] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the recommended apparatus for the experimental template provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the recommended method of the experimental template provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0080] In some embodiments, the terminal or server can implement the recommended method of the experimental template provided in this application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP or a web browser APP; it can also be a mini-program, that is, a program that only needs to be downloaded into the browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plugin.
[0081] Based on the above description of the experimental template recommendation system and electronic device provided in the embodiments of this application, the experimental template recommendation method provided in the embodiments of this application is described below. In actual implementation, the experimental template recommendation method provided in the embodiments of this application can be implemented by the terminal or the server alone, or by the terminal and the server working together, so that... Figure 1 The recommended method for executing the experimental template provided in this application embodiment by server 200 alone will be used as an example for illustration. See also Figure 3 , Figure 3 This is a flowchart illustrating the recommended method for the experimental template provided in the embodiments of this application, which will be combined with... Figure 3 The steps shown are explained.
[0082] Step 101: The server obtains at least one experimental template for the chaos experiment, and at least one perturbation factor corresponding to each experimental template.
[0083] In practice, the server obtains at least one experimental template for the chaos experiment, and at least one perturbation factor corresponding to each experimental template, directly or indirectly from the first terminal. It should be noted that the first terminal can be the terminal where the chaos experiment is conducted by the first chaos engineer, i.e., a chaos expert. The perturbation factor can be used to simulate damage to the application or the electronic device running the application. Different types of perturbation factors are used to damage different types of components of the application or the electronic device running the application, causing the application or the electronic device running the application to malfunction. For example, perturbation factors can be used to disturb the memory components of the application or the electronic device running the application, causing memory failure; or perturbation factors can be used to disturb the CPU components of the electronic device running the application, causing the electronic device running the application to crash, etc.
[0084] In other words, a disturbance factor is an influencing factor that causes an application or the electronic device on which the application runs to malfunction, such as deleting a specific mode, stopping a specific thread, or deleting a specific thread. For example, when the disturbance factor is deleting a specific thread, the traffic entry point of a certain functional component in the application, such as a payment component, is closed, thereby simulating the application scenario when the functional component malfunctions; when the disturbance factor is adding a specific thread, the resources allocated to the application are reduced, thereby simulating the application scenario when the application crashes; or when the disturbance factor is stopping a specific thread, the application scenario when the electronic device on which the application runs loses power is simulated.
[0085] Next, the process of obtaining at least one experimental template for a chaotic experiment directly or indirectly from the first terminal, and at least one perturbation factor corresponding to each experimental template, will be explained.
[0086] In some embodiments, the process of indirectly obtaining at least one experimental template of a chaos experiment and at least one perturbation factor corresponding to each experimental template from a first terminal specifically includes: receiving a labeling instruction for the chaos experiment sent by the first terminal, wherein the labeling instruction carries the functional component being tested in the chaos experiment, at least one perturbation factor corresponding to the functional component, and the injection method of each perturbation factor of the corresponding functional component; wherein the labeling instruction is used to instruct the labeling of at least one experimental template of the chaos experiment respectively; parsing the labeling instruction to obtain the functional component of the chaos experiment, at least one perturbation factor, and the injection method of each perturbation factor of the corresponding functional component; constructing at least one experimental template of the chaos experiment based on the functional component, at least one perturbation factor, and the corresponding injection method, and determining at least one perturbation factor corresponding to each experimental template.
[0087] In actual implementation, after the first terminal completes the chaos experiment, it presents a labeling function item for labeling the chaos experiment. Then, in response to the trigger operation of the function item, it generates a labeling instruction for the chaos experiment and sends the labeling instruction to the server so that the server can obtain at least one experimental template of the chaos experiment and at least one perturbation factor corresponding to each experimental template based on the labeling instruction.
[0088] It should be noted that the functional components of a chaos experiment can be applications or modules of the electronic device on which the application runs. For example, when conducting a chaos experiment on a payment application, the functional component could be a payment module or a collection module within the payment application. The injection method for each perturbation factor corresponding to the functional component is an arrangement of at least one perturbation factor, such as a serial or parallel processing method in a chaos experiment. This arrangement of perturbation factors through injection is used to execute the experiment targeting the functional module. For example, see [link to relevant documentation]. Figure 4 , Figure 4 This is a schematic diagram of the injection method of disturbance factors provided in the embodiments of this application, based on Figure 4 The functional component is a cache + MySQL component. Dashed boxes 401, 402, 403, and 404 represent various perturbation factors. The perturbation factors of Experiment Group-1, Experiment Group-2, and Experiment Group-3 are processed in series, while the perturbation factors in Experiment Group-2 (dashed boxes 402 and 403) are processed in parallel. By arranging the perturbation factors, experiments targeting the cache + MySQL component can be performed.
[0089] In other embodiments, the process of directly obtaining at least one experimental template of a chaotic experiment and at least one perturbation factor corresponding to each experimental template from the first terminal specifically includes: obtaining at least one experimental template of a chaotic experiment sent by the first terminal, each experimental template carrying at least one perturbation factor; and analyzing the experimental template to obtain at least one perturbation factor corresponding to the experimental template.
[0090] In actual implementation, after completing the chaos experiment, the first terminal presents a template generation function for the chaos experiment. Then, in response to the trigger operation of the function, it generates an experimental template for the chaos experiment and sends the experimental template carrying at least one perturbation factor to the server so that the server can obtain at least one experimental template for the chaos experiment and at least one perturbation factor corresponding to each experimental template.
[0091] Step 102: Based on at least one perturbation factor, determine the label corresponding to each experimental template; wherein, the experimental template includes the injection method of each perturbation factor, and the label is used to indicate the perturbation component corresponding to at least one perturbation factor.
[0092] Among them, the disturbance component can be a functional component that causes corresponding faults due to various disturbance factors and the injection method of each disturbance factor, that is, the experimental object targeted by the chaos experiment.
[0093] It should be noted that, due to the differences in the acquisition process of experimental templates and the perturbation factors corresponding to each experimental template, the process for determining the labels corresponding to each experimental template also differs.
[0094] Next, based on the differences in the acquisition process of the experimental templates and the perturbation factors corresponding to each experimental template, the process of determining the labels corresponding to each experimental template will be explained.
[0095] In some embodiments, when at least one experimental template of a chaos experiment and at least one perturbation factor corresponding to each experimental template are indirectly obtained from a first terminal, the process of determining the label corresponding to each experimental template based on at least one perturbation factor specifically includes: analyzing each perturbation factor and the injection method to obtain the perturbation component corresponding to each experimental template; and constructing the label corresponding to each experimental template based on the perturbation component.
[0096] In actual implementation, each disturbance factor and its injection method are analyzed to identify the functional components, i.e., disturbance components, that cause corresponding faults due to each disturbance factor and its injection method. Based on these disturbance components, the corresponding experimental templates are labeled. See below for further details. Figure 4 The dashed box 405 contains the label corresponding to the experimental template, based on Figure 4When analyzing the various disturbance factors and injection methods, it is determined that the functional component that causes the corresponding failure due to the various disturbance factors and injection methods is the cache + MySQL component. Thus, the label of the experimental template is determined to be the cache component and MySQL. Then, based on this label, the corresponding experimental template is annotated.
[0097] In other embodiments, when at least one experimental template of a chaos experiment and at least one perturbation factor corresponding to each experimental template are directly obtained from the first terminal, the experimental template also carries candidate labels and the injection method of at least one perturbation factor corresponding to the experimental template. Therefore, the process of determining the label corresponding to each experimental template based on at least one perturbation factor specifically includes analyzing at least one perturbation factor and injection method to obtain the perturbation component corresponding to each experimental template; and adjusting the candidate labels according to the perturbation component to obtain the label corresponding to each experimental template.
[0098] In practice, the first terminal, after generating an experimental template for the chaos experiment, also presents a label input field for the experimental template. In response to input in this field, the terminal labels the experimental template, obtaining candidate labels. The experimental template, carrying at least one perturbation factor, candidate labels, and the injection method of at least one perturbation factor corresponding to the experimental template, is then sent to the server. The server determines the label for each experimental template based on the at least one perturbation factor, candidate labels, and the injection method of at least one perturbation factor corresponding to the experimental template. For example, see [link to example]. Figure 4 When the first terminal identifies the candidate label for the experimental template as a cache component, it sends the experimental template, which carries at least one perturbation factor, the candidate label, and the injection method of at least one perturbation factor corresponding to the experimental template, to the server. Upon receiving the experimental template, the server analyzes at least one perturbation factor and the injection method to obtain the perturbation component corresponding to each experimental template, namely the cache component and MySQL. Based on the perturbation component, the server adjusts the candidate label, i.e., the cache component, by adding a label to the experimental template, and finally obtains the label corresponding to the experimental template, i.e., the cache component and MySQL.
[0099] Step 103: Construct the association between each experimental template and label.
[0100] In actual implementation, since different experimental templates may correspond to the same label, after determining the label corresponding to each experimental template, the association between each experimental template and the label is constructed. For example, when the experimental template is a full-load traffic experiment for three campuses, the label corresponding to the experimental template is "three-campus deployment". When the experimental template is a traffic shutdown experiment for one of the three campuses, the label corresponding to the experimental template is still "three-campus deployment". Based on this, after determining the labels corresponding to the above two experimental templates, a many-to-one association between these two experimental templates and the label "three-campus deployment" is constructed.
[0101] Step 104: Obtain the target functional component to be experimented on in the target application, and perform architectural analysis on the target functional component to obtain the architectural information of the target functional component. The architectural information includes at least one target perturbation component that is relied upon when experimenting on the target functional component.
[0102] In practice, the server obtains the target functional component to be experimented on in the target application based on the second terminal. It should be noted that the second terminal is the terminal used by subsequent chaos engineers to conduct the corresponding chaos experiments. Specifically, the process of obtaining the target functional component to be experimented on in the target application includes: receiving an experiment command sent by the second terminal, the experiment command carrying the identifier of the target functional component to be experimented on in the target application; wherein, the experiment command is used to instruct the performance of a chaos experiment on the target functional component; analyzing the experiment command to obtain the identifier of the target functional component, and determining the target functional component to be experimented on in the target application based on the identifier.
[0103] In practice, when subsequent chaos engineers conduct corresponding chaos experiments, the second terminal presents an interface for inputting experimental information. For example, see [link to example]. Figure 5 , Figure 5 This is a schematic diagram of the experimental information input interface provided in the embodiments of this application, based on Figure 5 The experiment information interface includes at least an experiment plan name input field, a creator input field, an experiment target selection field, and a selection function item for selecting the experiment target, i.e., the module, as shown in the dashed box 501. The second terminal responds to the input operation on the experiment plan name input field to determine the plan name of the chaos experiment, such as the three-campus deployment experiment plan of the xxx application. Then, in response to the input operation on the creator input field, it determines the creator of the chaos experiment, such as the xxx chaos engineer. Next, in response to the trigger operation on the selection function item, it presents at least one candidate module. Finally, in response to the selection operation on the target module among the at least one candidate module, it uses the selected candidate module as the target module to be experimented on as the target functional component to be experimented on.
[0104] It should be noted that after selecting the target functional component, experimental instructions carrying the corresponding identifier for that component can be automatically generated. Alternatively, a confirmation function can be presented to confirm the completion of the target functional component selection (i.e., to confirm the experiment on the selected component). Figure 5 As shown in the dashed box 502, in response to the triggering operation for the confirmation function item, an experimental instruction carrying an identifier corresponding to the target functional component is generated. After generating the experimental instruction carrying the identifier corresponding to the target functional component, the experimental instruction is sent to the server so that the server performs a chaos experiment on the target functional component.
[0105] In actual implementation, after receiving the experimental instructions, the server analyzes the instructions to obtain the identifier of the target functional component, and then selects the target functional component to be tested from multiple functional components in the target application based on the identifier.
[0106] In practical implementation, after determining the target functional component to be experimented with, the server performs architectural analysis on the target functional component to obtain its architectural information. Specifically, this includes: acquiring the architectural information of at least one candidate functional component, with each architectural information corresponding to a candidate functional component; performing architectural analysis on the target functional component to obtain its architectural features; and selecting the corresponding architectural information of the target functional component from the architectural information of the at least one candidate functional component based on its architectural features. Specifically, the process of selecting the corresponding architectural information of the target functional component from the architectural information of the at least one candidate functional component based on its architectural features involves: determining candidate architectural features for each candidate functional component based on the architectural information of the at least one candidate functional component; matching the architectural features with the candidate architectural features; and when a match is successful, using the architectural information of the candidate functional component corresponding to the corresponding candidate architectural feature as the architectural information of the corresponding target functional component.
[0107] It should be noted that the architectural features here are used to indicate components in the application that are related to the target functional component, and the relationships between the target functional component and these components. These relationships include at least strong dependencies and weak dependencies. Therefore, the target perturbation component included in the architectural information includes both strongly dependent components that have a strong dependency on the target functional component and weakly dependent components that have a weak dependency on the target functional component. In some embodiments, in addition to perturbation components, the architectural information may also include the deployment method of the experiment; for example, the deployment method of the experiment may be a two-campus deployment or a three-campus deployment.
[0108] For example, see Figure 6 , Figure 6This is a schematic diagram illustrating the architecture information of the target functional components provided in the embodiments of this application, based on... Figure 6 The architecture information of the target functional components includes the target perturbation components as strongly dependent components, namely the cache component and MySQL, and the weakly dependent components, namely the message middleware and the log component. Here, the architecture information of the target functional components also includes the deployment method of the experiment, namely the three-campus deployment.
[0109] It should be noted that the server can directly obtain the architecture information of at least one candidate functional component from other platforms or systems such as cloud deployment platforms, configuration management systems, or publishing systems. It can also obtain the architecture association data of at least one candidate functional component from other platforms or systems, and then analyze the architecture association data to determine the architecture information of the corresponding at least one candidate functional component.
[0110] Step 105: Based on the relationship and architecture information, recommend at least one candidate experimental template for the corresponding target functional component.
[0111] In practical implementation, after determining the association information and architecture information, the process of recommending at least one candidate experimental template for the corresponding target functional component based on the association and architecture information specifically includes: determining the target label for the corresponding target functional component based on at least one target perturbation component in the architecture information; selecting at least one candidate experimental template for the corresponding target perturbation component from at least one experimental template based on the target label and the association, and recommending at least one candidate experimental template. Here, the process of selecting at least one candidate experimental template for the corresponding target perturbation component from at least one experimental template based on the target label and the association specifically includes: matching the determined target label with the label corresponding to each experimental template; when a match is successful, using the experimental template corresponding to the corresponding label as a candidate experimental template for the corresponding target functional component.
[0112] For example, such as Figure 6 As shown, at least one target perturbation component in the architecture information is a three-campus deployment, a caching component, MySQL, a message middleware, and a log component. Therefore, the target labels of the corresponding target functional components are also three-campus deployment, a caching component, MySQL, a message middleware, and a log component. Based on the target components and their relationships, at least one candidate experimental template for the corresponding target perturbation component is selected from at least one experimental template, including four candidate experimental templates: three-campus deployment architecture experiment, cache + MySQL component experiment, message middleware experiment, and log component experiment.
[0113] In practical implementation, after determining at least one candidate experimental template, the candidate experimental template can be sent to a second terminal so that the second terminal can display the candidate experimental template. Specifically, after determining the association information and architecture information, the process of recommending at least one candidate experimental template corresponding to the target functional component based on the association relationship and architecture information includes: determining at least one candidate experimental template corresponding to the target functional component based on the association relationship and architecture information; and sending at least one candidate experimental template to the second terminal so that the second terminal can display the recommended at least one candidate experimental template. For example, see [link to example]. Figure 7 , Figure 7 This is a schematic diagram illustrating the recommended candidate experiment templates provided in the embodiments of this application, based on... Figure 7 After receiving the four candidate experiment templates, including the three-campus deployment architecture experiment, the cache + MySQL component experiment, the message middleware experiment, and the log component experiment, the second terminal displays these four candidate experiment templates.
[0114] In some embodiments, the second terminal can also select at least one recommended candidate experimental template. Specifically, after recommending at least one candidate experimental template corresponding to the target functional component based on the association relationship and the architecture information, in response to the selection instruction for the candidate experimental template sent by the second terminal, the selected at least one candidate experimental template can be determined as the target experimental template. Based on each target experimental template, an experimental plan for the target functional component is generated, and the experimental plan corresponds one-to-one with the target experimental template, so as to conduct experiments on the target functional component based on each experimental plan.
[0115] In practical implementation, the second terminal, in response to the selection operation of the target experimental template among at least one candidate experimental templates, generates a selection instruction for the candidate experimental template and sends the selection instruction to the server, so that the server determines the target experimental template based on the selection instruction. For example, see [link to example]. Figure 7 ,based on Figure 7 The second terminal also displays experimental template options as shown in the dashed box 701, thereby determining the target experimental template in response to a trigger operation for the experimental template option corresponding to the target experimental template among at least one candidate experimental template. Here, trigger operations can be performed on all four options, thereby determining the four corresponding candidate experimental templates as the target experimental template.
[0116] It should be noted that after receiving the selection operation for the target experimental template from at least one candidate experimental template, the second terminal refers to... Figure 7The second terminal can also display a return function item, such as the dashed box 702, for reselecting the experimental target, i.e., the target functional component, and a confirmation function item, such as the dashed box 703, for confirming the completion of the target experimental template selection. In response to the trigger operation of the confirmation function item, a selection instruction for the candidate experimental template is generated, and then the selection instruction is sent to the server so that the server determines the target experimental template based on the selection instruction.
[0117] In some embodiments, after generating an experimental plan for a target functional component based on each target experimental template, the experimental plan can be adjusted. Specifically, at least one experimental plan for the target functional component is sent to a second terminal, and modification information for the target experimental plan in the at least one experimental plan is received from the second terminal. Based on the modification information, the target experimental plan is adjusted to obtain a new experimental plan.
[0118] In practice, after sending at least one experimental plan for the target functional component to the second terminal, the second terminal displays each experimental plan for the target functional component; for example, see [link to example]. Figure 8 , Figure 8 These are schematic diagrams illustrating the various experimental plans provided in the embodiments of this application, based on Figure 8 The second terminal displays as follows Figure 8 The system provides multiple experimental plans, and in response to a modification operation on a target experimental plan in at least one of the experimental plans, determines the modification information for the target experimental plan in at least one of the experimental plans, and sends the modification information for the target experimental plan in at least one of the experimental plans to the server, so that the server adjusts the target experimental plan based on the modification information to obtain a new experimental plan.
[0119] It should be noted that the process of determining the modification information for the target experimental plan in at least one experimental plan is based on the experimental information of the target experimental plan. Specifically, at least one experimental plan for the target functional component is sent to the second terminal; an editing request for the experimental information of the target experimental plan in multiple experimental plans is received from the second terminal. The experimental information includes at least one perturbation factor included in the target experimental template corresponding to the target experimental plan, and the injection method of each perturbation factor; in response to the editing request, the experimental information is sent to the second terminal so that the second terminal can display the experimental information of the target experimental plan.
[0120] In actual implementation, the second terminal displays each experimental plan for the target functional component, and also displays editing function items for the experimental information corresponding to each experimental plan. In response to a triggered operation on the editing function item corresponding to the target experimental plan in at least one experimental plan, it generates an editing request for the experimental information of the target experimental plan among multiple experimental plans, and sends the editing request to the server. For example, see [link to example]. Figure 8 ,based on Figure 8 The dashed box 801 contains the editing function items for the experimental information corresponding to each experimental plan. When the target experimental plan is a three-campus deployment characteristic experimental plan, in response to the trigger operation of the editing function item corresponding to the target experimental plan, an editing request for the experimental information of the target experimental plan is generated, the editing request is sent to the server, and the experimental information returned by the server is received and displayed. See [link to documentation]. Figure 9 , Figure 9 This is a schematic diagram illustrating the experimental information provided in the embodiments of this application, based on Figure 9 After displaying the experimental information of the three-campus deployment characteristic experimental plan, the second terminal can modify the corresponding experimental plan.
[0121] In some embodiments, the process of determining modification information for a target experimental plan in at least one experimental plan may also involve receiving a modification request for experimental information sent by a second terminal after generating an experimental plan for a target functional component based on each target experimental template, the modification request carrying new experimental information for the target experimental plan; in response to the modification request, modifying the target experimental plan according to the new experimental information to obtain a new experimental plan for the target functional component, so as to conduct experiments on the target functional component based on the new experimental plan.
[0122] In actual implementation, after displaying the experimental information of the target experimental plan, the second terminal responds to the modification instruction for the experimental information and modifies the experimental information to obtain new experimental information. Here, the second terminal also displays a modification information confirmation function to confirm the completion of the modification. In response to the trigger operation of the modification information confirmation function, it generates a modification request carrying the new experimental information for the target experimental plan and sends the modification request to the server. The server responds to the modification request and modifies the target experimental plan according to the new experimental information to obtain a new experimental plan for the target functional component, so as to conduct experiments on the target functional component based on the new experimental plan.
[0123] The following section continues to describe the recommended method for the experimental template provided in the embodiments of this application. (See also...) Figure 10 , Figure 10 This is a flowchart illustrating the recommended method for the experimental template provided in this application embodiment, based on... Figure 10The recommended method for the experimental template provided in this application embodiment is implemented collaboratively by the terminal and the server.
[0124] Step 201: The first client responds to the upload operation of at least one experimental template of the chaos experiment and obtains each experimental template carrying at least one perturbation factor.
[0125] In practice, the first client can be a recommended client for the experimental templates set on the terminal. The experimental templates can be selected by the user after conducting multiple chaos experiments. Based on the human-computer interaction interface of the client, the upload function in the human-computer interaction interface is triggered, so that the client presents a selection interface for at least one experimental template on the human-computer interaction interface. Based on the selection interface, the user uploads at least one experimental template of chaos experiment from the local terminal, so that the client obtains at least one experimental template of the uploaded chaos experiment.
[0126] Step 202: The first client sends each experimental template carrying at least one perturbation factor to the server.
[0127] Step 203: The server obtains at least one experimental template for the chaos experiment, and at least one perturbation factor corresponding to each experimental template.
[0128] Step 204: Determine the label corresponding to each experimental template based on at least one perturbation factor.
[0129] The experimental template includes the injection method of each perturbation factor, and the label is used to indicate the perturbation component corresponding to at least one perturbation factor.
[0130] Step 205: Construct the association between each experimental template and label.
[0131] Step 206: The second client responds to the upload operation for the target functional component to be tested in the target application and obtains the target functional component to be tested in the target application.
[0132] Step 207: In response to the experimental instruction for the target functional component, send the experimental instruction to the server.
[0133] In practice, the experimental instructions for the target functional component can be automatically generated by the client under certain triggering conditions. For example, after the client obtains the target functional component to be tested in the target application, it will automatically generate experimental instructions for the target functional component. Alternatively, the instructions can be sent to the client by other devices that are connected to the terminal, or they can be generated by the user based on the client's human-computer interaction interface after triggering the corresponding confirmation function item, such as the confirmation function item used to determine whether to conduct an experiment on the target functional component.
[0134] Step 208: The server receives the experimental instruction carrying the identifier of the corresponding target functional component.
[0135] Step 209: Analyze the experimental instructions to obtain the identifier of the target functional component, and based on the identifier, select the target functional component to be tested from multiple functional components in the target application.
[0136] Step 210: Perform architectural analysis on the target functional components to obtain their architectural information.
[0137] Step 211: Based on the relationship and architecture information, determine at least one candidate experimental template for the corresponding target functional component.
[0138] Step 212: Send at least one candidate experiment template to the second terminal.
[0139] Step 213: The second client receives at least one candidate experiment template and displays at least one recommended candidate experiment template.
[0140] In practice, the second client can display at least one recommended candidate experimental template in its human-computer interaction interface, save the recommended candidate experimental template locally on the terminal, and send the recommended candidate experimental template to other devices connected to the terminal. This allows researchers to determine the target experimental template based on at least one candidate template, and then generate a corresponding experimental plan based on the target experimental template.
[0141] By applying the embodiments described above, at least one experimental template for chaos experiments is labeled to establish an association between each experimental template and a label used to indicate the perturbation component. Then, during subsequent chaos experiments, the architecture information of the target functional component to be experimented on, including the target perturbation component, is determined. Based on the architecture information and the association, at least one candidate experimental template for the corresponding target functional component is recommended. Thus, by labeling the design experience of chaos experiments, after the system perceives the architecture of the chaos experiment object, it determines the corresponding label based on the architecture information, and then determines the design experience through the labeling, thereby effectively improving the experimental output and quality of chaos experiments.
[0142] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0143] The experimental process of chaos experiments in related technologies is roughly divided into two stages. The first stage, the 0-1 stage, is when the first chaos engineer conducts a chaos experiment on an application with specific architectural characteristics. Specifically, the architectural characteristics that the application depends on are first determined manually, and then an experimental plan is created for each architectural characteristic and the chaos experiment is executed. The second stage, the 1-100 stage, is when subsequent chaos engineers conduct experiments on the application of similar architectural characteristics. Specifically, the architectural characteristics that the application depends on are first determined manually; then, based on the architectural characteristics, the design experience of the first chaos engineer is obtained through instant messaging or verbal communication; finally, the design experience is transformed into an experimental plan and the chaos plan is executed.
[0144] However, for the above process, different chaos engineers need to manually search for information, which is a human-search-for-information scenario, resulting in low efficiency. At the same time, relying on human translation of experience means that the information fidelity varies from person to person, and misjudgments may occur.
[0145] Based on this, this application provides a method for recommending experimental templates. By standardizing design experience and automatically recommending experimental templates, it solves the problem of over-reliance on manual labor in the 1-100 stage, which prevents the transformation of experimental results into industrial production capabilities. This method features high automation, high efficiency, and low cost. Specifically, it not only standardizes the description of chaotic experiments to make them universal and achieve batch replication, but also transforms manual design experience into the system's experimental design capabilities by automatically perceiving the system's architecture and associating it with expert labeling of historical experimental templates. This enables the recommendation of experimental templates in similar scenarios, reducing experimental design costs.
[0146] Next, the technical solution of this application will be described in detail from the product side. Here, this technical solution mainly realizes the labeling and recommendation capabilities of the experimental template. See [link to relevant documentation]. Figure 11 , Figure 11 This is a flowchart illustrating the recommended method for the experimental template provided in this application embodiment, based on... Figure 11 The method for recommending experimental templates provided in this application is implemented through steps 1101 to 1110. It should be noted that after completing the first chaos experiment on an architectural feature, the architecture expert (the user on the first terminal) can identify the architectural features of this experimental plan (tag it). This allows subsequent chaos engineers (the users on the second terminal) to automatically generate at least one experimental plan by analyzing the architectural features (architectural information) of the experimental object (target functional component) after creating an experimental plan. Here, after generating at least one experimental plan, editing functions for modifying the corresponding experimental plan can also be presented, such as... Figure 8As shown, this allows chaos engineers to view the corresponding experimental plan based on the trigger operation of the edit function item, and make modifications as needed.
[0147] Next, the technical solution of this application will be described in detail from a technical perspective.
[0148] First, the architecture of the technical solution in this application will be described, see [link to relevant documentation]. Figure 12 , Figure 12 This is a schematic diagram of the architecture of the recommended method for the experimental template provided in the embodiments of this application, based on Figure 12 The experimental template recommendation method provided in this application is implemented by the front-end and the chaos system. Here, the chaos system includes a gateway layer, a domain layer, and a data layer. Thus, based on the above architecture, the experimental template recommendation method provided in this application is implemented.
[0149] Secondly, the process of the technical solution in this application is explained, see [link to relevant documentation]. Figure 13 , Figure 13 This is a flowchart illustrating the method for recommending experimental templates provided in this application embodiment. Based on step 13, steps 1301 to 1309 are the process of architecture experts marking the experimental template; steps 1310 to 1313 are the process of the chaotic system automatically parsing the architectural characteristics of the application to be tested; step 1314 is the process of automatically generating multiple experimental plans; and steps 1315 to 1317 are the process of starting the experimental plan. Based on this, the method for recommending experimental templates provided in this application embodiment is implemented through steps 1301 to 1317.
[0150] Regarding the process of the architecture expert tagging the experimental template, specifically, firstly, the first terminal receives at least one architecture feature tag written by the architecture expert based on the existing architecture characteristics, and writes the at least one architecture feature tag into the tag library; then, in response to the web page trigger operation, based on the historical experimental plans, the experimental plan applicable to the specific architecture characteristics is extracted into an experimental template, and the architecture feature tag is affixed. Specifically, the process of affixing the architecture feature tag involves retrieving at least one architecture feature tag from the tag library and displaying at least one architecture feature tag in a list for the architecture expert to select; finally, in response to the selection operation of the target architecture feature tag among the multiple architecture feature tags in the list, the target architecture feature tag is used as the final architecture feature tag of the extracted experimental template, and the relationship between the tag and the template is stored.
[0151] Regarding the process of the chaotic system automatically parsing the architectural characteristics of the application to be tested, specifically, the second terminal first responds to the experiment plan creation command (triggered by the chaos engineer's operation on the page to create the experiment plan) and automatically creates the experiment plan, so that the chaotic system (i.e. the experiment service) requests the architecture awareness system to obtain the architectural characteristics of the application to be tested, parses the architectural characteristics, obtains the corresponding tags, and then matches the corresponding experiment template according to the tags, so as to recommend the corresponding experiment template to the chaos engineer.
[0152] Specifically, regarding the process of automatically generating multiple test plans, after determining the corresponding test template, the chaos system automatically generates multiple test plans for the application under test by filling the name of the application under test into the fields corresponding to the test template. One test plan is generated for each tag.
[0153] Specifically, in response to the chaos engineer's initiation of multiple experimental plans, the experimental service requests the fault atom scheduling service to execute the experimental plan content. Then, the fault atom scheduling service further breaks down the fault atoms (disturbance factors) and sends them to the fault atom execution service to run the specific injection action (injecting fault atoms according to the specific injection method).
[0154] In this way, not only is human experience in chaos experiments transformed into system capabilities, and individual experimental results can be mass-produced through industrialization, effectively improving the overall output of chaos experiments; but also, through the system's automatic architecture perception, human error can be prevented, effectively improving the quality of chaos experiments.
[0155] By applying the embodiments described above, at least one experimental template for chaos experiments is labeled to establish an association between each experimental template and a label used to indicate the perturbation component. Then, during subsequent chaos experiments, the architecture information of the target functional component to be experimented on, including the target perturbation component, is determined. Based on the architecture information and the association, at least one candidate experimental template for the corresponding target functional component is recommended. Thus, by labeling the design experience of chaos experiments, after the system perceives the architecture of the chaos experiment object, it determines the corresponding label based on the architecture information, and then determines the design experience through the labeling, thereby effectively improving the experimental output and quality of chaos experiments.
[0156] The following description continues to illustrate the exemplary structure of the recommended device 455 for the experimental template provided in the embodiments of this application as a software module. In some embodiments, such as Figure 3 As shown, the software modules in the recommended device 455 of the experimental template stored in the memory 440 may include:
[0157] The acquisition module 4551 is used to acquire at least one experimental template for the chaos experiment and at least one perturbation factor corresponding to each experimental template.
[0158] The determining module 4552 is used to determine the label corresponding to each of the experimental templates based on the at least one perturbation factor; wherein, the experimental template includes the injection method of each of the perturbation factors, and the label is used to indicate the perturbation component corresponding to the at least one perturbation factor;
[0159] Module 4553 is used to construct the association between each experimental template and the label respectively;
[0160] Architecture analysis module 4554 is used to obtain the target functional component to be experimented on in the target application, and to perform architecture analysis on the target functional component to obtain the architecture information of the target functional component. The architecture information includes at least one target perturbation component on which the experiment on the target functional component depends.
[0161] The recommendation module 4555 is used to recommend at least one candidate experimental template corresponding to the target functional component based on the association relationship and the architecture information.
[0162] In some embodiments, the acquisition module 4551 is further configured to receive a labeling instruction for the chaos experiment sent by the first terminal, the labeling instruction carrying the functional components tested in the chaos experiment, at least one perturbation factor corresponding to the functional components, and the injection method of each perturbation factor corresponding to the functional components; wherein, the labeling instruction is used to instruct at least one experimental template of the chaos experiment to be labeled respectively; the labeling instruction is parsed to obtain the functional components of the chaos experiment, the at least one perturbation factor, and the injection method of each perturbation factor corresponding to the functional components; based on the functional components, the at least one perturbation factor, and the corresponding injection method, at least one experimental template of the chaos experiment is constructed, and at least one perturbation factor corresponding to each experimental template is determined.
[0163] In some embodiments, the determining module 4552 is further configured to analyze each of the perturbation factors and the injection method to obtain the perturbation component corresponding to each of the experimental templates; and to construct a label corresponding to each of the experimental templates based on the perturbation component.
[0164] In some embodiments, the acquisition module 4551 is further configured to acquire at least one experimental template of the chaos experiment sent by the first terminal, each experimental template carrying at least one perturbation factor; and to analyze the experimental template to obtain at least one perturbation factor corresponding to the experimental template.
[0165] In some embodiments, the experimental template further carries candidate labels and an injection method for at least one perturbation factor corresponding to the experimental template; the determining module 4552 is further configured to analyze the at least one perturbation factor and the injection method to obtain a perturbation component corresponding to each experimental template; and adjust the candidate labels according to the perturbation component to obtain a label corresponding to each experimental template.
[0166] In some embodiments, the architecture analysis module 4554 is further configured to receive an experimental instruction sent by a second terminal, the experimental instruction carrying an identifier of the target functional component to be tested in the target application; wherein the experimental instruction is used to instruct a chaos experiment to be performed on the target functional component; the experimental instruction is analyzed to obtain the identifier of the target functional component, and based on the identifier, the target functional component to be tested in the target application is determined.
[0167] In some embodiments, the recommendation module 4555 is further configured to determine at least one candidate experimental template corresponding to the target functional component based on the association relationship and the architecture information; and send the at least one candidate experimental template to the second terminal so that the second terminal displays the recommended at least one candidate experimental template.
[0168] In some embodiments, the architecture analysis module 4554 is further configured to: acquire architecture information of at least one candidate functional component, wherein the architecture information corresponds one-to-one with the candidate functional component; perform architecture analysis on the target functional component to obtain the architecture features of the target functional component; determine candidate architecture features corresponding to each of the candidate functional components based on the architecture information of the at least one candidate functional component; match the architecture features with the candidate architecture features; and when a match is successful, use the architecture information of the candidate functional component corresponding to the corresponding candidate architecture feature as the architecture information of the target functional component.
[0169] In some embodiments, the recommendation module 4555 is further configured to determine a target label corresponding to the target functional component based on the at least one target perturbation component in the architecture information; select at least one candidate experimental template corresponding to the target perturbation component from at least one experimental template based on the target label and the association relationship, and recommend the at least one candidate experimental template.
[0170] In some embodiments, the apparatus further includes a selection module, which is configured to, in response to a selection instruction sent by a second terminal for the candidate experimental template, determine at least one selected candidate experimental template as a target experimental template; and, based on each target experimental template, generate an experimental plan for the target functional component, wherein the experimental plan corresponds one-to-one with the target experimental template, so as to conduct experiments on the target functional component based on each experimental plan.
[0171] In some embodiments, the apparatus further includes a modification module, which is configured to send at least one experimental plan of the target functional component and receive returned modification information for the target experimental plan in the at least one experimental plan; and adjust the target experimental plan based on the modification information to obtain a new experimental plan.
[0172] In some embodiments, the device further includes an experiment information sending module, which is configured to send the experiment plan corresponding to each of the target experiment templates to a second terminal; receive an editing request from the second terminal for the experiment information of a target experiment plan among the multiple experiment plans, the experiment information including at least one perturbation factor included in the target experiment template corresponding to the target experiment plan, and the injection method of each perturbation factor; and in response to the editing request, send the experiment information to the second terminal so that the second terminal displays the experiment information of the target experiment plan.
[0173] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the recommended method of the experimental template described above in this application.
[0174] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to execute the recommended method of the experimental template provided in this application, for example... Figure 3 The recommended method for the experimental template shown.
[0175] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0176] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0177] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0178] As an example, executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0179] In summary, the embodiments of this application have the following beneficial effects:
[0180] By annotating the design experience of chaos experiments, the system can perceive the architecture of the chaos experiment object, determine the corresponding annotation based on the architecture information, and then determine the design experience through the annotation, thereby effectively improving the experimental output and experimental quality of chaos experiments.
[0181] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A method for recommending experimental templates, characterized in that, The method includes: Obtain at least one experimental template for a chaos experiment, and at least one perturbation factor corresponding to each experimental template, wherein the perturbation factor is an influencing factor that causes the application or the electronic device on which the application runs to malfunction. Based on the at least one perturbation factor, a label corresponding to each of the experimental templates is determined; wherein, the experimental template includes the injection method of each of the perturbation factors, and the label is used to indicate the perturbation component corresponding to the at least one perturbation factor, and the perturbation component is a functional component that causes a corresponding failure due to each of the perturbation factors and the injection method of each of the perturbation factors; Establish the association relationship between each experimental template and the label; Obtain the target functional component to be experimented on in the target application, and perform architectural analysis on the target functional component to obtain the architectural information of the target functional component. The architectural information includes at least one target perturbation component on which the experiment on the target functional component depends. Based on the at least one target perturbation component in the architecture information, determine the target label corresponding to the target functional component; Based on the target label and the association, at least one candidate experimental template corresponding to the target perturbation component is selected from at least one experimental template, and the at least one candidate experimental template is recommended.
2. The method as described in claim 1, characterized in that, The acquisition of at least one experimental template for the chaotic experiment, and at least one perturbation factor corresponding to each experimental template, includes: The system receives a labeling instruction sent by a first terminal for the chaos experiment. The labeling instruction carries the functional components tested in the chaos experiment, at least one perturbation factor corresponding to the functional components, and the injection method of each perturbation factor corresponding to the functional components. The labeling instruction is used to instruct at least one experimental template of the chaos experiment to be labeled respectively. The annotation instructions are parsed to obtain the functional components of the chaos experiment, the at least one perturbation factor, and the injection method of each perturbation factor corresponding to the functional components; Based on the functional components, the at least one perturbation factor, and the corresponding injection method, at least one experimental template for the chaos experiment is constructed, and at least one perturbation factor corresponding to each experimental template is determined.
3. The method as described in claim 2, wherein determining the label corresponding to each experimental template based on the at least one perturbation factor includes: By analyzing each of the aforementioned perturbation factors and the aforementioned injection methods, the perturbation components corresponding to each of the aforementioned experimental templates are obtained; Based on the perturbation component, labels corresponding to each of the experimental templates are constructed.
4. The method as described in claim 1, characterized in that, Obtain at least one experimental template for a chaos experiment, and at least one perturbation factor corresponding to each experimental template, including: Obtain at least one experimental template of the chaos experiment sent by the first terminal, wherein each experimental template carries at least one perturbation factor; The experimental template was analyzed to obtain at least one perturbation factor corresponding to the experimental template.
5. The method as described in claim 4, characterized in that, The experimental template also carries candidate labels and an injection method for at least one perturbation factor corresponding to the experimental template; The step of determining the label corresponding to at least one experimental template of the chaotic experiment based on the at least one perturbation factor includes: Analyze the at least one perturbation factor and the injection method to obtain the perturbation component corresponding to each experimental template; Based on the perturbation component, the candidate labels are adjusted to obtain labels corresponding to each experimental template.
6. The method as described in claim 1, characterized in that, The acquisition of the target functional components to be tested in the target application includes: The system receives an experimental instruction sent by a second terminal, the experimental instruction carrying an identifier of the target functional component to be tested in the target application; wherein the experimental instruction is used to instruct a chaos experiment to be performed on the target functional component. The experimental instructions are analyzed to obtain the identifier of the target functional component, and based on the identifier, the target functional component to be tested in the target application is determined.
7. The method as described in claim 6, characterized in that, Based on the aforementioned relationships and the architecture information, at least one candidate experimental template corresponding to the target functional component is recommended, including: Based on the aforementioned relationship and the aforementioned architecture information, at least one candidate experimental template corresponding to the target functional component is determined; The at least one candidate experiment template is sent to the second terminal so that the second terminal displays the recommended at least one candidate experiment template.
8. The method as described in claim 1, characterized in that, The step of performing architectural analysis on the target functional component to obtain the architectural information of the target functional component includes: Obtain the architecture information of at least one candidate functional component, wherein the architecture information corresponds one-to-one with the candidate functional component; An architectural analysis is performed on the target functional component to obtain its architectural characteristics. Based on the architecture information of the at least one candidate functional component, determine the candidate architecture features corresponding to each of the candidate functional components; Match the architectural features with the candidate architectural features; When a match is successful, the architecture information of the candidate functional component corresponding to the corresponding candidate architecture feature is used as the architecture information of the target functional component.
9. The method as described in claim 1, characterized in that, After recommending at least one candidate experimental template corresponding to the target functional component based on the association relationship and the architecture information, the method further includes: In response to the selection instruction for the candidate experimental template sent by the second terminal, at least one selected candidate experimental template is determined as the target experimental template; Based on each of the target experiment templates, an experiment plan is generated for the target functional component. The experiment plan corresponds one-to-one with the target experiment template, so as to conduct experiments on the target functional component based on each of the experiment plans.
10. The method as described in claim 9, characterized in that, After generating an experiment plan for the target functional component based on each of the target experiment templates, the method further includes: Send at least one experimental plan for the target functional component and receive the returned modification information for the target experimental plan in the at least one experimental plan; Based on the modified information, the target experimental plan is adjusted to obtain a new experimental plan.
11. The method as described in claim 9, characterized in that, After generating an experiment plan for the target functional component based on each of the target experiment templates, the method further includes: Send the experimental plans corresponding to each of the target experimental templates to the second terminal; The system receives an editing request from the second terminal for the experimental information of a target experimental plan among the multiple experimental plans. The experimental information includes at least one perturbation factor included in the target experimental template corresponding to the target experimental plan, and the injection method of each perturbation factor. In response to the editing request, the experimental information is sent to the second terminal so that the second terminal displays the experimental information of the target experimental plan.
12. A device for recommending experimental templates, characterized in that, The device includes: The acquisition module is used to acquire at least one experimental template for a chaos experiment and at least one perturbation factor corresponding to each experimental template, wherein the perturbation factor is an influencing factor that causes the application or the electronic device on which the application runs to malfunction. A determining module is used to determine the label corresponding to each of the experimental templates based on the at least one perturbation factor; wherein, the experimental template includes the injection method of each of the perturbation factors, and the label is used to indicate the perturbation component corresponding to the at least one perturbation factor, and the perturbation component is a functional component that causes a corresponding fault due to each of the perturbation factors and the injection method of each of the perturbation factors; A construction module is used to construct the association relationship between each experimental template and the label; An architecture analysis module is used to obtain the target functional component to be experimented on in the target application, and to perform architecture analysis on the target functional component to obtain the architecture information of the target functional component. The architecture information includes at least one target perturbation component on which the experiment on the target functional component depends. The recommendation module is used to determine the target label corresponding to the target functional component based on the at least one target perturbation component in the architecture information; and to select at least one candidate experimental template corresponding to the target perturbation component from at least one experimental template based on the target label and the association relationship, and to recommend the at least one candidate experimental template.
13. The apparatus as claimed in claim 12, characterized in that, The acquisition module is further configured to receive a labeling instruction for the chaos experiment sent by the first terminal. The labeling instruction carries the functional components tested in the chaos experiment, at least one perturbation factor corresponding to the functional components, and the injection method of each perturbation factor corresponding to the functional components. The labeling instruction is used to instruct at least one experimental template of the chaos experiment to be labeled respectively. The labeling instruction is parsed to obtain the functional components of the chaos experiment, the at least one perturbation factor, and the injection method of each perturbation factor corresponding to the functional components. Based on the functional components, the at least one perturbation factor, and the corresponding injection method, at least one experimental template of the chaos experiment is constructed, and at least one perturbation factor corresponding to each experimental template is determined.
14. The apparatus as claimed in claim 12, characterized in that, The determining module is further configured to analyze each of the perturbation factors and the injection method to obtain the perturbation components corresponding to each of the experimental templates; and to construct labels corresponding to each of the experimental templates based on the perturbation components.
15. The apparatus as claimed in claim 12, characterized in that, The acquisition module is further configured to acquire at least one experimental template of the chaos experiment sent by the first terminal, each experimental template carrying at least one perturbation factor; and to analyze the experimental template to obtain at least one perturbation factor corresponding to the experimental template.
16. The apparatus as claimed in claim 12, characterized in that, The experimental template also carries candidate labels and an injection method for at least one perturbation factor corresponding to the experimental template; the determining module is further used to analyze the at least one perturbation factor and the injection method to obtain the perturbation component corresponding to each experimental template; and adjust the candidate labels according to the perturbation component to obtain the label corresponding to each experimental template.
17. The apparatus as claimed in claim 12, characterized in that, The architecture analysis module is further configured to receive an experimental instruction sent by a second terminal, the experimental instruction carrying an identifier of the target functional component to be tested in the target application; wherein, the experimental instruction is used to instruct a chaos experiment to be performed on the target functional component; the experimental instruction is analyzed to obtain the identifier of the target functional component, and based on the identifier, the target functional component to be tested in the target application is determined.
18. An electronic device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the recommended method of the experimental template according to any one of claims 1 to 11.
19. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they implement the recommended method of the experimental template according to any one of claims 1 to 11.
20. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, the recommended method for implementing the experimental template according to any one of claims 1 to 11 is provided.
Citation Information
Patent Citations
Fault injection method and device
CN114880157A
Fault injection service
US10986013B1