Method, device and equipment for fault generation environment simulation and storage medium
By generating text and image knowledge graphs, determining the fault type and simulating the fault generation environment, the problem of inefficient failure simulation in cloud-native problem scenarios is solved, and efficient failure environment simulation and testing is achieved.
Patent Information
- Application Number
- CN202411708366.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-11
AI Technical Summary
The failure simulation in cloud-native problem scenarios is inefficient, and testers need to build an environment and prepare data separately, which is very laborious and inefficient.
By obtaining text information and fault image information that describes the fault, generating text knowledge graphs and image knowledge graphs, determining the fault type, obtaining historical operation steps, and simulating the fault generation environment based on these steps.
It can simulate and build a faulty environment without manual participation, save manpower, improve testing efficiency, shorten test cycles, and save costs. The simulated environment is closer to the real scene.
Smart Images

Figure CN119807026A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of testing tools and instruments, and in particular to a method, a device, a equipment and a storage medium for simulating a fault generation environment. Background Art
[0002] Fault simulation generation is to simulate the possible fault conditions that may occur in the system, equipment or system operation through simulation technology, so as to conduct testing, training and verification in a risk-free environment, thereby locating problems and obtaining solutions to problems.
[0003] Fault simulation in related technologies is mainly used in problem testing scenarios for mechanical equipment, chip hardware, or software. It is not widely used in cloud-native problem scenarios. At the same time, fault reproduction requires testers to set up an environment and prepare data for the problem scenario separately. The workload is large and cumbersome, which greatly takes up the working time of testers and is inefficient. Summary of the invention
[0004] In view of this, the present invention provides a method, apparatus, device and storage medium for simulating a fault generation environment to solve the problem of low efficiency of fault simulation in cloud native problem scenarios.
[0005] In a first aspect, the present invention provides a method for simulating a fault generation environment, the method comprising: obtaining text information describing the fault and fault image information during the operation of a system where the fault occurs, and generating a text knowledge graph based on the text information; determining a fault type based on the text information and / or the fault image information, the fault type comprising a system functional fault; if the fault type is the system functional fault, obtaining historical operation steps through the text knowledge graph and the fault image information, and simulating a fault generation environment based on the historical operation steps.
[0006] In an optional embodiment, the generating of a text knowledge graph based on the text information includes: based on the text information, identifying fault operation steps, the relationship between the fault operation steps and detailed information of the fault operation steps; using the fault operation steps as nodes of the text knowledge graph, using the relationship between the fault operation steps as edges of the text knowledge graph, and using the detailed information of the fault operation steps as attributes of the text knowledge graph to generate the text knowledge graph.
[0007] In an optional embodiment, the historical operation steps are obtained through the text knowledge graph and the fault image information, including: recording multiple initial operation steps during the operation of the system where the fault occurs; identifying fault features in the fault image information; matching the fault features with nodes in the text knowledge graph to obtain matching nodes related to the fault features; and obtaining the historical operation steps based on the matching nodes and multiple initial operation steps.
[0008] In an optional embodiment, the aforementioned method for simulating a fault generation environment also includes: generating an image knowledge graph based on the fault image information; obtaining the node similarity between the text knowledge graph and the image knowledge graph; when the node similarity is higher than a preset threshold, obtaining graph information that is missing in the text knowledge graph and exists in the image knowledge graph, and supplementing the graph information to the text knowledge graph.
[0009] In an optional embodiment, the generating of an image knowledge graph based on the fault image information includes: obtaining a user interface feature image during operation of the system having the fault, annotating the user interface feature image to obtain an annotated image; training the annotated image based on a neural network model to obtain an image feature extraction model; inputting the fault image information into the image feature extraction model to obtain normal state features and fault state features contained in the fault image information; using the normal state features and the fault state features as nodes of the image knowledge graph, calculating the correlation between the normal state features and the fault state features, and using the correlation as edges of the image knowledge graph.
[0010] In an optional implementation, the fault type further includes a system performance fault, and the method further includes: if the fault type is the system performance fault, simulating a fault generation environment by using a system performance simulation tool.
[0011] In an optional implementation, the fault type also includes a system historical fault, and the method further includes: if the fault type is the system historical fault, reading the configuration in the system historical fault simulation library, and simulating the fault generation environment based on the configuration, the configuration including: a screen recording playback template and a virtual machine configuration template.
[0012] In a second aspect, the present invention provides a device for simulating a fault generation environment, the device comprising: an acquisition module, for acquiring text information describing the fault and / or fault image information during the operation of a system where the fault occurs, and generating a text knowledge graph based on the text information; a fault identification module, for determining the type of fault based on the text information and / or the fault image information, the fault type including a system functional fault; a fault simulation module, for obtaining historical operation steps through the text knowledge graph and the fault image information if the fault type is the system functional fault, and simulating the fault generation environment based on the historical operation steps.
[0013] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for simulating a fault generation environment according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0014] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for simulating a fault generation environment according to the first aspect or any corresponding embodiment thereof.
[0015] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for simulating a fault generation environment according to the first aspect or any corresponding embodiment thereof.
[0016] Based on the recognition and processing of text information describing the fault and fault image information, the fault type can be determined, and the scene or environment where the problem occurred can be restored from multiple channels and angles. The fault generation environment can also be simulated based on more information from the text and images, so that the simulated fault generation environment is closer to the actual scene. The fault generation environment can be simulated through the historical operation steps obtained through the text knowledge graph and fault image information, and the fault environment can be simulated without human participation, which can save manpower, improve test efficiency, shorten the test cycle and save costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1A schematic flow chart of a method for simulating a fault generation environment provided by an embodiment of the present invention is shown;
[0019] Figure 2 A schematic diagram of the generation process of a text knowledge graph is shown;
[0020] Figure 3 A schematic diagram of the process of extracting image features based on fault images is shown;
[0021] Figure 4 A schematic flow chart of another method for simulating a fault generation environment provided by an embodiment of the present invention is shown;
[0022] Figure 5 A schematic diagram of the structure of a device for simulating a fault generation environment is shown;
[0023] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0025] Fault simulation is a method of simulating fault behavior in computer systems or electronic devices. It is used to evaluate the performance, reliability and safety of the system under fault conditions, and to verify the system's response and recovery capabilities to faults.
[0026] Fault simulation in related technologies is mainly used in specific fields. For example, mechanical equipment uses customized tools and physical principles to set different parameters, initial conditions and environmental variables to simulate the behavior of the system under different fault conditions. Or it can simulate the fault environment through software platforms such as simulation software. These are fault simulation methods applied to hardware devices such as machinery, electronics, sensors, etc., which are less used in cloud native applications. However, in cloud native systems, each customer has independent resources and scenarios. When a fault occurs, testers need to arrange the environment recovery separately, which leads to low test efficiency.
[0027] According to an embodiment of the present invention, a method embodiment for simulating a fault generation environment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] In this embodiment, a method for simulating a fault generation environment is provided, which can be used in various terminals, such as mobile phones, tablet computers, desktop computers, or servers, etc. Figure 1 A schematic diagram of a method for simulating a fault generation environment provided by an embodiment of the present invention is shown. Figure 1 As shown, the process includes the following steps:
[0029] Step S101, obtain text information describing the fault and fault image information during the operation of the system where the fault occurs, and generate a text knowledge graph based on the text information.
[0030] In this step, the text information describing the fault can be the content represented by fields such as "cause of the problem" or "problem description" in the problem work order recorded in the work order system, and the fault object and specific fault event can be obtained through natural language processing. The work order information can be pre-processed by natural language processing technology to extract information related to the fault. The information related to the fault includes the fault type, fault cause, and fault symptoms. The work order information can be pre-processed by natural language processing technologies such as named entity recognition, relationship extraction, or event extraction.
[0031] The fault image information during the operation of the system where the fault occurs can be system graphical user interface (UI) image information of different types, different platforms or different modules. The fault image information can include different function buttons on the user interface sidebar; the jump page display features under different function buttons can include: virtual machine, network, disk or monitoring user interface; or command line features that need to be identified for operations in the container. The fault image information can determine the status prompts and display information under different errors, which can facilitate the location of the problem scenario.
[0032] Based on model statistics and supervised learning methods, entity recognition and relationship extraction can be performed on the description of the problem ticket to generate a text knowledge graph.
[0033] Step S102: determining the fault type based on the text information and / or the fault image information, the fault type including system function fault.
[0034] In this step, the fault image information in the "problem description" is feature-recognized to distinguish whether it is a platform interface operation or an operation in a cloud native container, and to preliminarily distinguish the problem type, problem platform, or module where the problem occurred. The fault type can be determined based on text information, fault image information, or both.
[0035] System function failures include: node failure, network failure, or storage failure. Node failure may cause the node to be unavailable, which may be due to hardware failure, network problem, or operating system problem, resulting in the unavailability of containers deployed in the node. Network failure may cause service unavailability, including internal cluster communication problems, cross-cluster communication problems, or service and external network connection problems. Storage failure may be a storage backend service failure, which may cause storage-dependent applications to fail to run normally.
[0036] Step S103: If the fault type is a system function fault, historical operation steps are obtained through the text knowledge graph and fault image information, and the fault generation environment is simulated based on the historical operation steps.
[0037] In this step, the fault features and information are determined based on the fault image information. Based on the fault features and information, the entities and relationships related to the fault are identified in the text knowledge graph. Through path search and reasoning on the text knowledge graph, the historical operation steps related to the fault are found, and the historical operation steps related to the fault are extracted from the text knowledge graph. The operations are performed in the order specified by the historical operation steps to simulate the fault generation environment. The extracted historical operation steps are verified based on the fault image information to ensure the accuracy of the historical operation steps.
[0038] The method for simulating a fault generation environment provided in the present embodiment determines the fault type based on the recognition and processing of text information describing the fault and fault image information, and can restore the scene or environment where the problem occurs from multiple paths and angles; it can also simulate the fault generation environment based on more information in the text and image, so that the simulated fault generation environment is closer to the actual scene; the fault generation environment is simulated through the historical operation steps obtained through the text knowledge graph and the fault image information, and the fault environment can be simulated without human participation, which can save manpower, improve test efficiency, shorten the test cycle and save costs.
[0039] In some optional embodiments, a text knowledge graph is generated based on text information, including: based on the text information, identifying fault operation steps, the relationship between the fault operation steps, and detailed information of the fault operation steps; using the fault operation steps as nodes of the text knowledge graph, the relationship between the fault operation steps as edges of the text knowledge graph, and the detailed information of the fault operation steps as attributes of the text knowledge graph to generate a text knowledge graph.
[0040] Figure 2 The figure shows the schematic diagram of the generation process of the text knowledge graph. Figure 2 As shown, in this embodiment, step S201, obtain text data, pre-process the text data; collect text data containing relevant systems, equipment or processes, and the text data includes: technical manuals, maintenance records, fault reports, etc. Pre-process these text data, including word segmentation, removal of stop words, and entity recognition, etc., to facilitate subsequent knowledge extraction.
[0041] Step S202, perform entity recognition based on the segmented text by using a model statistics method; use the identified fault operation steps as nodes of the text knowledge graph. Extract operation steps, keywords and relationships from the text information. Determine the entities in the text information, which include objects, functions or attributes, etc.; determine the actions in the text information, which include settings, configurations or verifications, etc.
[0042] Step S203, extract relations from the description of the problem ticket based on supervised learning methods; use the relations between the extracted fault operation steps as the edges of the text knowledge graph. Knowledge extraction refers to the process of extracting structured knowledge or information that can be processed by computers from text or other forms of data. It aims to convert unstructured or semi-structured data into structured knowledge representation for further analysis, search and application.
[0043] Step S204, generate a text knowledge graph; the text knowledge graph can be created based on the knowledge graph creation tool, and Neo4j can be selected as the knowledge graph creation tool. An entity-relationship-attribute model is established through the knowledge graph creation tool, and a model of entities (nodes), relationships (edges), and attributes is created based on the fault operation steps extracted from the text information, the relationships between the fault operation steps, and the detailed information of the fault operation steps, wherein the fault operation steps are used as nodes of the text knowledge graph, the relationships between the fault operation steps are used as edges of the text knowledge graph, and the detailed information of the fault operation steps are used as attributes of the text knowledge graph. Connect entities and establish relationships, represent each operation step as a node, and use connecting lines to represent the relationship between the steps, and add attributes to describe the detailed information of the operation steps represented by each node.
[0044] By converting expert knowledge into structured data through text knowledge graphs, automatic reasoning from fault symptoms to root causes can be achieved, which facilitates the reproduction of the fault environment and improves the system's response and recovery capabilities to faults.
[0045] In some optional embodiments, historical operation steps are obtained through text knowledge graphs and fault image information, including: recording multiple initial operation steps during the operation of the system where the fault occurs; identifying fault features in the fault image information; matching the fault features with nodes in the text knowledge graph to obtain nodes related to the fault features; and obtaining historical operation steps based on the nodes and multiple initial operation steps.
[0046] In this embodiment, when performing operations before the system fails, multiple initial operation steps can be recorded through the text knowledge graph, that is, the impact of each operation step performed by the system. This may include the creation of nodes in the text knowledge graph, the establishment or modification of connections, and the modification of various attributes. The historical data of the operation steps can be saved and stored as log files, database entries, or other forms of persistent storage.
[0047] Parse the fault image and extract the fault features. The fault features can be analyzed through data analysis to extract the normal state features and fault state features in the fault image. Data analysis can be achieved through machine learning. Through the fault image information and text knowledge graph, replay the system operation steps to simulate the generation of the fault environment. Based on the matching nodes and multiple initial operation steps in the text knowledge graph, the historical operation steps are gradually derived.
[0048] Before replaying the operation steps, ensure that the text knowledge graph is in the initial state without any operation records. Follow the historical reproduction steps of the multiple initial operation steps recorded, and step by step perform the recorded operations. For each operation step, create corresponding nodes, connections, or modify attributes in the text knowledge graph according to the recorded information. After the playback operation is completed, verify whether the state of the text knowledge graph is consistent with the recorded initial operation steps to ensure the accuracy and completeness of the playback operation. Upload the simulation steps of this system functional failure to the system historical failure simulation library to facilitate the rapid reproduction of subsequent failure simulations.
[0049] The text knowledge graph can accurately represent entities and their relationships. Combined with fault image information, it can accurately match fault features, thereby improving the accuracy of historical operation steps. Through the rapid retrieval and matching capabilities of the text knowledge graph, combined with image processing technology, it can quickly locate faults and give historical operation steps, greatly improving the efficiency of fault reproduction.
[0050] In some optional embodiments, the aforementioned method for simulating a fault generation environment also includes: generating an image knowledge graph based on fault image information; obtaining node similarities in the text knowledge graph and the image knowledge graph; when the node similarity is higher than a preset threshold, obtaining graph information that is missing in the text knowledge graph and exists in the image knowledge graph, and supplementing the graph information to the text knowledge graph.
[0051] In this embodiment, the text nodes can be converted into vector representations using word embedding or sentence embedding. For image nodes in the image knowledge graph, feature vectors are extracted using models such as convolutional neural networks. The similarity between text nodes and image nodes can be calculated based on metrics such as cosine similarity, Euclidean distance, and Pearson correlation coefficient to form a similarity matrix. In the similarity matrix, text-image node pairs whose node similarity is higher than a preset threshold are obtained, and the graph information that is missing in the text knowledge graph and exists in the image knowledge graph is added to the text knowledge graph.
[0052] In this way, by supplementing the text knowledge graph with the image knowledge graph, the fault environment can be reproduced more accurately and information omissions or misunderstandings can be reduced; when reproducing the fault environment through the text knowledge graph, combined with the image knowledge graph, the advantages of both can be fully utilized to improve the accuracy and efficiency of fault reproduction.
[0053] In some optional embodiments, an image knowledge graph is generated based on fault image information, including: obtaining a user interface feature image during operation of a system in which a fault occurs, annotating the user interface feature image to obtain an annotated image; training the annotated image based on a neural network model to obtain an image feature extraction model; inputting the fault image information into the image feature extraction model to obtain normal state features and fault state features contained in the fault image information; using the normal state features and the fault state features as nodes of the image knowledge graph, calculating the correlation between the normal state features and the fault state features, and using the correlation as the edge of the image knowledge graph.
[0054] In this embodiment, UI features of different types, platforms or modules in the system can be obtained and image-annotated. It can include important UI features of the entire link from the opening entry to the configuration entry of a function and the command line UI features in the container, as well as annotating all error prompts with various problem occurrence scenarios, which can be used for reverse inference and supplementary fault reproduction.
[0055] Since the U features of a faulty system may be small and not clustered, a neural network model can be used to train the labeled images. Figure 3 FIG. 2 shows a schematic diagram of the process of extracting image features based on fault images. Figure 3As shown, in step S301, the annotated image 31 is input into the neural network model 32, and the configuration of the model is continuously adjusted to obtain a higher-precision recognition capability. After the training of the neural network model 32 is completed, an image feature extraction model 33 is obtained. The trained image feature extraction model 33 is put into the actual work order system. The neural network model can be YOLOv3. In step S302, the fault image information 34 is input into the image feature extraction model 33 to obtain the normal state feature 35 and the fault state feature 36 contained in the fault image information 34. A screenshot of the system running during the fault, that is, the fault image information, is input into the image feature extraction model, and the fault feature is analyzed to obtain the normal state feature and the fault state feature.
[0056] The method of selecting a graph representation for normal state features and fault state features works based on a graph database. Represent normal state features or fault state features as nodes in the image knowledge graph, calculate the correlation between normal state features and fault state features, and use the correlation as the edge of the image knowledge graph. This can be achieved by comparing the distance of feature vectors, calculating cosine similarity, or using correlation analysis. If the similarity or correlation of two features exceeds a preset threshold, an edge can be established between the two. The weight of the edge can be determined based on the value of the similarity or correlation. The higher the value, the greater the weight, indicating a closer relationship between the two features. Add attributes to the nodes in the image knowledge graph to describe the detailed information of the image features.
[0057] In this way, by establishing an image knowledge graph based on the user interface features in the system, the state of the user interface when a fault occurs can be recorded, providing important clues for fault reproduction, which can improve the efficiency and accuracy of system fault reproduction.
[0058] In an optional implementation, the fault type also includes a system performance fault, and the aforementioned method for simulating a fault generation environment further includes: if the fault type is a system performance fault, simulating the fault generation environment by using a system performance simulation tool.
[0059] In this implementation, system performance failures may be simulated using chaos engineering tools.
[0060] In an optional embodiment, the fault type also includes system historical faults, and the aforementioned method for simulating a fault generation environment also includes: if the fault type is a system historical fault, reading the configuration in the system historical fault simulation library, and simulating the fault generation environment based on the configuration, the configuration includes: a screen recording playback template and a virtual machine configuration template.
[0061] In this implementation, for historical system failures, the existing virtual machine template configurations and other resource configurations in the simulation library can be read according to the historical failure simulation library, the problem node can be issued, and the corresponding functions can be checked. The screen recording and playback template can automatically generate a playback script through the screen recording function of the Google plug-in Katalon. The virtual machine configuration template can be a CRD template based on k8s, which can be automatically deployed through the k8s operator.
[0062] In this way, for historical system failures, it supports reusing the historical problem simulation library to quickly build and send a fault simulation environment, which can save processing time and fault location time.
[0063] In an optional implementation, the fault type also includes a system database fault, and the aforementioned method for simulating a fault generation environment also includes: when the fault type is a system database fault, the structured query language (SQL) of the problem field of the online database can be read and projected into the test environment.
[0064] In this way, for system database failures in the cloud-native environment, the fault generation environment can be quickly simulated.
[0065] Figure 4 FIG. 2 is a flow chart of another method for simulating a fault generation environment provided by an embodiment of the present invention. Figure 4 As shown, step S401, obtain the problem work order; step S402, perform knowledge extraction and feature extraction analysis based on the problem work order; step S403, determine the fault type based on the knowledge extraction and feature extraction analysis results, if the fault type is a system function fault, go to step S404, if the fault type is a system performance fault, go to step S405, if the fault type is a system history fault, go to step S406, if the fault type is a system database fault, go to step S407; step S404, the fault type is a system function fault, feature extraction is performed based on the fault image information in the problem work order, the framework scene is replayed, the replayed operation steps are obtained, and the text is supplemented based on the replayed operation steps Knowledge graph, go to step S408; step S408, determine whether there are operation steps executed in the container, if so, go to step S409, if not, end the process; step S409, perform optical character recognition on the command line, and inject the recognition result into the command line, step S405, the fault type is a system performance fault, simulate through relevant performance tools, simulate the fault generation environment, and end the process; step S406, the fault type is a system historical fault, and the fault generation environment simulation configuration is issued through the historical fault simulation library, and the process ends; step S407, the fault type is a system database fault, and the test environment is projected based on the structured query language where the fault occurs, and the process ends.
[0066] In this embodiment, a device for simulating a fault generation environment is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0067] This embodiment provides a device for simulating a fault generation environment. Figure 5 FIG. 1 shows a schematic diagram of the structure of a device for simulating a fault generation environment. Figure 5 As shown, including:
[0068] The acquisition module 501 is used to acquire text information describing the fault and / or fault image information during the operation of the system where the fault occurs, and generate a text knowledge graph based on the text information.
[0069] The fault identification module 502 is used to determine the fault type based on text information and / or fault image information, and the fault type includes system function failure.
[0070] The fault simulation module 503 is used to obtain historical operation steps through the text knowledge graph and fault image information if the fault type is a system function fault, and simulate the fault generation environment based on the historical operation steps.
[0071] In some optional implementations, the acquisition module includes:
[0072] An acquisition unit is used to identify the fault operation steps, the relationship between the fault operation steps and the detailed information of the fault operation steps based on text information; the fault operation steps are used as nodes of the text knowledge graph, the relationship between the fault operation steps are used as edges of the text knowledge graph, and the detailed information of the fault operation steps are used as attributes of the text knowledge graph to generate a text knowledge graph.
[0073] In some optional implementations, the fault simulation module includes:
[0074] The first fault simulation unit is used to record multiple initial operation steps during the operation of the system where the fault occurs; identify fault features in the fault image information; match the fault features with nodes in the text knowledge graph to obtain matching nodes related to the fault features; and obtain historical operation steps based on the matching nodes and multiple initial operation steps.
[0075] In some optional implementations, the aforementioned apparatus for simulating a fault generation environment further includes:
[0076] A supplementing module is used to generate an image knowledge graph based on fault image information; obtain the node similarity in the text knowledge graph and the image knowledge graph; when the node similarity is higher than a preset threshold, obtain the graph information that is missing in the text knowledge graph but exists in the image knowledge graph, and supplement the graph information to the text knowledge graph.
[0077] In some optional embodiments, the supplemental module includes:
[0078] The supplementary unit is used to obtain the user interface feature image during the operation of the system where the fault occurs, annotate the user interface feature image, and obtain the annotated image; train the annotated image based on the neural network model to obtain the image feature extraction model; input the fault image information into the image feature extraction model to obtain the normal state feature and the fault state feature contained in the fault image information; use the normal state feature and the fault state feature as nodes of the image knowledge graph, calculate the correlation between the normal state feature and the fault state feature, and use the correlation as the edge of the image knowledge graph.
[0079] In some optional implementations, the fault simulation module further includes:
[0080] The second fault simulation unit is used to simulate the fault generation environment through a system performance simulation tool if the fault type is a system performance fault.
[0081] In some optional implementations, the fault simulation module further includes:
[0082] The third fault simulation unit is used to read the configuration in the system history fault simulation library if the fault type is a system history fault, and generate an environment based on the configuration simulation fault. The configuration includes: a screen recording playback template and a virtual machine configuration template.
[0083] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0084] The device for simulating a fault generation environment in this embodiment is presented in the form of a functional unit, where the unit refers to an application specific integrated circuit (ASIC) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0085] The embodiment of the present invention also provides a computer device having the above Figure 5 The device shown is used for simulating a fault generation environment.
[0086] See also Figure 6 , Figure 6is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of a graphical user interface on an external input / output device (such as a display device coupled to an interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0087] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0088] The aforementioned memory 20 stores instructions executable by at least one processor 10, so that the aforementioned at least one processor 10 executes the method shown in the above embodiment.
[0089] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0090] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0091] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0092] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (such as a light emitting diode) and a tactile feedback device (such as a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0093] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0094] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0095] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for simulating a fault generation environment, characterized in that: The method comprises: Acquire text information describing the fault and fault image information during the operation of the system where the fault occurs, and generate a text knowledge graph based on the text information; Determine a fault type based on the text information and / or the fault image information, the fault type including a system function fault; If the fault type is the system function fault, historical operation steps are obtained through the text knowledge graph and the fault image information, and the fault generation environment is simulated based on the historical operation steps.
2. The method according to claim 1, characterized in that The generating of a text knowledge graph based on the text information includes: Based on the text information, identify the fault operation steps, the relationship between the fault operation steps and the detailed information of the fault operation steps; The text knowledge graph is generated by taking the fault operation steps as nodes of the text knowledge graph, taking the relationships between the fault operation steps as edges of the text knowledge graph, and taking the detailed information of the fault operation steps as attributes of the text knowledge graph.
3. The method according to claim 1 or 2, characterized in that: The obtaining of historical operation steps through the text knowledge graph and the fault image information includes: Recording a plurality of initial operation steps during operation of the system having the fault; Identifying fault features in the fault image information; Matching the fault feature with the nodes in the text knowledge graph to obtain matching nodes related to the fault feature; The historical operation steps are obtained based on the matching node and a plurality of the initial operation steps.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: Generate an image knowledge graph based on the fault image information; Obtaining node similarities in the text knowledge graph and the image knowledge graph; When the node similarity is higher than a preset threshold, the graph information that is missing from the text knowledge graph and exists in the image knowledge graph is obtained, and the graph information is supplemented to the text knowledge graph.
5. The method according to claim 4, characterized in that The generating an image knowledge graph based on the fault image information includes: Acquire a user interface characteristic image during operation of the system having the fault, and annotate the user interface characteristic image to obtain an annotated image; Training the labeled image based on a neural network model to obtain an image feature extraction model; Inputting the fault image information into the image feature extraction model to obtain normal state features and fault state features contained in the fault image information; The normal state feature and the fault state feature are used as nodes of the image knowledge graph, the correlation between the normal state feature and the fault state feature is calculated, and the correlation is used as an edge of the image knowledge graph.
6. The method according to claim 1, characterized in that The fault type also includes a system performance fault, and the method further includes: If the fault type is the system performance fault, the fault generation environment is simulated by a system performance simulation tool.
7. The method according to claim 1, characterized in that The fault type also includes a system history fault, and the method further includes: If the fault type is the system historical fault, the configuration in the system historical fault simulation library is read, and a fault generation environment is simulated based on the configuration, wherein the configuration includes: a screen recording playback template and a virtual machine configuration template.
8. A device for simulating a fault generation environment, characterized in that: The device comprises: An acquisition module, used to acquire text information describing the fault and / or fault image information during the operation of the system where the fault occurs, and generate a text knowledge graph based on the text information; A fault identification module, used to determine the type of fault based on the text information and / or the fault image information, wherein the type of fault includes a system function fault; A fault simulation module is used to obtain historical operation steps through the text knowledge graph and the fault image information if the fault type is the system function fault, and simulate the fault generation environment based on the historical operation steps.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for simulating a fault generation environment according to any one of claims 1 to 6 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for simulating a fault generation environment according to any one of claims 1 to 6.