Fault scene construction method and device
By building failure scenarios in the server and simulating failure scenarios in the production environment, the problem of R&D and operation and maintenance personnel having difficulty handling production environment failures in a timely manner is solved, thereby improving the security and efficiency of the production environment.
Patent Information
- Application Number
- CN202410339777.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-22
- Publication Date
- 2025-09-23
AI Technical Summary
In the Internet industry, when unexpected failures occur in the production environment, it is difficult for R&D personnel and operation and maintenance personnel to handle them in a timely manner, resulting in reduced security and efficiency of the production environment.
Build a fault scenario through the server, select target computing devices and inject uninjected fault events one by one until the communication network fails. Save the fault injection information and performance to simulate the fault scenario in the production environment.
It improves the safety of the production environment and the efficiency of production activities, ensuring that relevant staff can formulate plans in advance, handle faults in a timely manner, and ensure the normal progress of production activities.
Smart Images

Figure CN120686769A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for constructing a fault scenario. Background Art
[0002] In the Internet industry, the production environment formed by multiple computing devices often experiences failures during production activities. If an unexpected event occurs in the production environment or enters an unexpected state, that is, if any computing device in the production environment fails, it is difficult for R&D personnel and operation and maintenance personnel to handle the sudden failure in a timely manner without a contingency plan.
[0003] Currently, there is no technical means to simulate failure scenarios, allowing R&D and operation and maintenance personnel to make advance plans for failures that may occur in the production environment. As a result, sudden failures in the production environment prevent relevant staff from handling them correctly and in a timely manner, reducing the safety of the production environment and the efficiency of production activities, and affecting the normal progress of production activities. Summary of the Invention
[0004] In order to solve the above-mentioned problems in the prior art, the embodiments of the present application provide a method and device for constructing a fault scenario, which helps to improve the safety of the production environment and the efficiency of production activities.
[0005] In a first aspect, an embodiment of the present application provides a method for constructing a fault scenario, which is applied to a server, the server being connected to multiple computing devices, the server storing a set of fault events; the set of fault events including at least one fault event; the fault event being an operation that can cause a fault in a communication network formed by the multiple computing devices; the method comprising:
[0006] During the operation of the plurality of computing devices, the following steps are repeatedly performed:
[0007] Selecting a target computing device from the plurality of computing devices, the target computing device being any computing device other than the injection completed device, the injection completed device being a computing device into which all fault events in the set of fault events have been injected;
[0008] injecting the set of fault events into the target computing device one by one, except for the fault events that have not been injected into the target computing device, until a fault occurs in the communication network;
[0009] When a fault occurs, the fault injection information and fault manifestations of the multiple computing devices are saved as a fault scenario.
[0010] In a possible implementation, injecting the uninjected fault events in the set of fault events into the target computing device one by one includes:
[0011] Repeat the following steps:
[0012] selecting a first fault event from at least one fault event that has not been injected into the target computing device, and determining a fault event type of the first fault event;
[0013] If the fault event type of the first fault event is device type, injecting the first fault event into the target computing device and each computing device directly connected to the target computing device;
[0014] If the fault event type of the first fault event is a network type, the first fault event is injected into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device.
[0015] In a possible implementation, it is determined that the communication network fails in the following manner:
[0016] After injecting a device-type fault into the target computing device and each computing device directly connected to the target computing device, if any computing device among the plurality of computing devices fails, it is determined that the communication network fails; or
[0017] After injecting a network fault into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device, if a communication connection between any computing devices in the communication network fails, it is determined that the communication network fails.
[0018] In a possible implementation, before injecting the first fault event into the target computing device and each computing device directly connected to the target computing device, the method further includes:
[0019] Acquire an application that has a data call relationship with the target computing device, and determine a computing device on which the application is deployed;
[0020] The computing devices on which the application is deployed are regarded as respective computing devices directly connected to the target computing device.
[0021] In one possible implementation, the fault injection information includes an identifier of the computing device into which the fault event has been injected, and a fault event injected for each computing device; the fault manifestation is the manifestation of each computing device and the communication connection between computing devices after the fault occurs.
[0022] In a possible implementation, after saving the fault injection information and fault manifestations of the multiple computing devices when a fault occurs as a fault scenario, the method further includes:
[0023] Clear the fault events that have been injected into the multiple computing devices.
[0024] In a second aspect, an embodiment of the present application provides a fault scenario construction device, which is applied to a server, the server being connected to multiple computing devices, the server storing a set of fault events; the set of fault events including at least one fault event; the fault event being an operation that can cause a fault in a communication network formed by the multiple computing devices; the device comprising:
[0025] a determining unit, configured to select a target computing device from the plurality of computing devices during operation of the plurality of computing devices, the target computing device being any computing device other than an injection-completed device, the injection-completed device being a computing device into which all fault events in the set of fault events have been injected;
[0026] an injection unit, configured to inject the set of fault events into the target computing device one by one, except for the fault events that have not been injected into the target computing device, until a fault occurs in the communication network;
[0027] The storage unit is used to store the fault injection information and fault manifestations of the multiple computing devices when a fault occurs as a fault scenario.
[0028] In one possible implementation, the injection unit is used to:
[0029] Repeat the following steps:
[0030] Determining a fault event type of a first fault event; the first fault event being any fault event among at least one fault event that has not been injected into the target computing device;
[0031] If the fault event type of the first fault event is device type, injecting the first fault event into the target computing device and each computing device directly connected to the target computing device;
[0032] If the fault event type of the first fault event is a network type, the first fault event is injected into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device.
[0033] In a third aspect, an embodiment of the present application provides a server, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:
[0034] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the above-mentioned fault scenario construction method.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned fault scenario construction method is implemented.
[0036] The embodiment of the present application provides a fault scenario construction method and device, which can be executed by a server connected to multiple computing devices, and a fault event set is stored in the server, and the fault event set includes at least one fault event. During the operation of multiple computing devices, the server can repeatedly perform the following steps: select a target computing device from multiple computing devices, and inject fault events that have not been injected into the target computing device into the target computing device one by one until a fault occurs, and save the fault injection conditions of multiple computing devices when the fault occurs as a first fault scenario. Relevant staff can make plans for possible faults in the production environment through the constructed first fault scenario, so as to handle fault events in a timely manner according to the plan, thereby improving the safety of the production environment and the efficiency of production activities, and ensuring the normal progress of production activities. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of an application scenario of a fault scenario construction method provided in an embodiment of the present application;
[0038] Figure 2 A flowchart of a fault scenario construction method provided in an embodiment of the present application;
[0039] Figure 3 A flowchart of injecting a fault event into a target computing device provided by an embodiment of the present application;
[0040] Figure 4 A flowchart of a method for constructing a fault scenario executed by a server provided in an embodiment of the present application;
[0041] Figure 5 A structural block diagram of a fault scenario construction device provided in an embodiment of the present application;
[0042] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of this application more clear, this application will be further described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described herein are only some of the embodiments of this application, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this application without inventive effort are intended to fall within the scope of protection of this application.
[0044] It should be noted that the application scenarios described in the following embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0045] The following first briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limiting. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0046] Figure 1 A schematic diagram of an application scenario of a fault scenario construction method provided in an embodiment of the present application is shown. Figure 1 As shown, the fault scenario construction method provided in the embodiment of the present application can be applied to the server 100. The server 100 can be respectively connected to the computing device 200, the computing device 300, the computing device 400, and the computing device 500 in a wired or wireless manner. Each computing device can access the fault event set stored in the server 100. The fault event set stored in the server 100 may include at least one fault event. Each fault event in the at least one fault event can be classified as a device fault or a network fault. The fault event set included in the fault event set can be changed according to different test requirements or fault event updates. For example, the fault event set includes fault event A, fault event B, and fault event C. Due to technical updates, the tester discovered that fault event D may occur in the production environment. Therefore, fault event D can be added to the fault event set. If, during a certain fault scenario construction process, fault event A does not need to be tested, fault event A can be deleted from the fault event set. The number of fault events in the fault event set is not limited in this application.
[0047] In addition, computing device 200 is communicatively connected to computing device 300, computing device 300 is communicatively connected to computing device 400, and computing device 400 is communicatively connected to computing device 500. Taking computing device 200, computing device 300, and computing device 400 as examples, computing device 200 is directly connected to computing device 300, and computing device 200 may be the direct upstream device of computing device 300; computing device 400 is also directly connected to computing device 300, and computing device 400 may be the direct downstream device of computing device 300.
[0048] In one possible embodiment, these four computing devices and all communication connections that can connect two computing devices can constitute a communication network. It should be noted that the number of computing devices is not limited in this application, and there can be more computing devices or fewer computing devices. The same thing is that multiple computing devices are connected to the server 100, and any computing device among the multiple computing devices can have at least one communication connection. Multiple computing devices and multiple communication connections simultaneously constitute a communication network. After a fault event in the fault event set is injected into any computing device, any computing device or the communication connection between computing devices may fail.
[0049] Figure 2 The following shows a process of a fault scenario construction method provided by an embodiment of the present application, such as Figure 2 As shown, the method may include, during operation of multiple computing devices, repeatedly performing the following steps:
[0050] Step S201: Select a target computing device from multiple computing devices.
[0051] In one possible embodiment, the target computing device is any computing device other than the computing device into which all fault events in the fault event set have been injected. For example, if the fault event set includes fault event A and fault event B, and the plurality of computing devices include a first computing device, a second computing device, and a third computing device, if fault event A and fault event B have already been injected into the first computing device and the second computing device, then the third computing device can be considered the target computing device; if a fourth computing device that has also not been injected with fault event A and fault event B is added to the plurality of computing devices, then any computing device among the third and fourth computing devices can be considered the target computing device; if the first computing device is injected with fault event A and fault event B when serving as the target computing device, and fault event A and fault event B are injected into the first computing device serving as the target computing device, and fault event A and fault event B are also injected into the second computing device, but since fault event A and fault event B are not injected into the second computing device when serving as the target computing device, the second computing device can still be used as the target computing device for subsequent operations when determining the next target computing device.
[0052] Step S202 : injecting the set of fault events into the target computing device one by one, and injecting the fault events that have not been injected into the target computing device until a fault occurs in the communication network.
[0053] In a possible embodiment, the following steps may be repeated: Figure 3 The steps shown are used to inject the fault events in the fault event set that have not been injected into the target computing device one by one.
[0054] Step S2021: Select a first fault event from at least one fault event that has not been injected into the target computing device, and confirm the fault event type of the first fault event.
[0055] In a possible embodiment, the first fault event may be any fault event among at least one fault event that has not been injected into the target computing device. For example, if there are four fault events, namely fault event A, fault event B, fault event C and fault event D, if fault event A and fault event B have been injected into the target computing device, then any fault event among fault event C and fault event D can be considered as the first fault event. That is, fault event C can be the first fault event, and fault event D can also be the first fault event.
[0056] In a possible embodiment, all fault events stored in the fault event set may be classified as device faults or network faults. Therefore, the first fault event may be a device fault or a network fault.
[0057] Step S2022: determine whether the fault event type of the first fault event is a device type. If so, execute step S2023; if not, execute step S2024.
[0058] In one possible embodiment, if the fault event type of the first fault event is device-related, step S2023 is executed to implement a fault scenario for a device-related fault. For example, a device-related fault event may include simulating a CPU overload, an instruction set error, an execution unit failure, or injecting a memory error through software tools or hardware means.
[0059] In another possible embodiment, if the fault event type of the first fault event is not device-related, it can be determined that the fault event type of the first fault event is network-related, and step S2024 is executed to implement a fault scenario for a network-related fault. For example, a network-related fault event may include increasing the delay of data packet transmission and increasing the packet loss rate, which can be understood as intentionally discarding data packets in network transmission to simulate network instability.
[0060] Step S2023: inject a first fault event into the target computing device and each computing device directly connected to the target computing device.
[0061] In one possible embodiment, the target computing device and each computing device directly connected to the target computing device can be understood as the target computing device and its dependent devices. That is, during the process of injecting the first fault event, the target computing device and its dependent devices can be injected, that is, the first fault event can be injected into the target computing device and each computing device directly connected to the target computing device. It should be noted that during the process of injecting a fault event, the same fault event can be injected into the target computing device and each computing device directly connected to the target computing device. This helps to discover weak links and key dependencies in the communication network, makes it easier to plan fault recovery strategies, and improves the maintainability of the communication network.
[0062] Therefore, before executing step S2023, each computing device directly connected to the target computing device can be determined first. Applications that have a data call relationship with the target computing device can be obtained through static maintenance or through monitoring technologies such as trace, and the computing devices on which the applications are deployed can be determined. It can be considered that the computing devices on which the applications are deployed are all computing devices directly connected to the target computing device. The computing devices on which the applications are deployed can be determined by the server by reading the device management platform in the Infrastructure as a Service (IaaS) layer stored in the computing device, or by reading the publishing platform in the Platform as a Service (PaaS) layer stored in the computing device, or by reading the application inspection content in the Software as a Service (SaaS) layer stored in the computing device. The computing devices on which the applications are deployed can be determined through the IaaS layer, the PaaS layer, or the SaaS layer. This application does not limit the method for determining the computing devices on which the applications are deployed.
[0063] For example, if data B is stored on the target computing device, and both application A and application C have a data call relationship with data B, the computing devices for deploying application A and application C are determined respectively. If the device management platform in the IaaS layer can determine that the computing device for deploying application A is the first computing device and the computing device for deploying application C is the third computing device, then it can be determined that the computing devices directly connected to the target computing device are the first computing device and the third computing device.
[0064] In one possible embodiment, since the fault event type of the first fault event has been confirmed to be device-class, the first fault event can be injected into the target computing device and each computing device directly connected to the target computing device. For example, if the target computing device is a second computing device, and the computing devices directly connected to the second computing device include a first computing device and a third computing device, then while injecting the first fault event into the second computing device, the first fault event can also be injected into the first computing device and the third computing device.
[0065] Step S2024: inject a first fault event into the target computing device and any computing device among the computing devices that establish communication connections with the target computing device.
[0066] In a possible embodiment, since it has been confirmed that the fault event type of the first fault event is a network type, the call relationship can be first obtained through static maintenance or through monitoring technologies such as tracing, that is, the computing device that has a communication connection with the target computing device is found, and then the Internet Protocol (IP) information of the target computing device and the IP information of the computing device that has a communication connection with the target computing device are determined. Finally, based on the obtained IP information, the communication connection information between the target computing device and the computing device with a communication connection can still be determined through the relevant information recorded in the IaaS layer, PaaS layer, or SaaS layer.
[0067] In a possible embodiment, since it has been confirmed that the fault event type of the first fault event is a network type, the first fault event can be injected into the target computing device and any computing device that has a communication connection with the target computing device. For example, if the target computing device is the second computing device, and the computing devices that have a communication connection with the second computing device include the first computing device and the third computing device, then while injecting the first fault event into the second computing device, the first fault event can also be injected into the first computing device or the third computing device. It should be noted that in the process of injecting a fault event once, the same fault event can be injected into the target computing device and any computing device that has a communication connection with the target computing device. In this way, one of the communication connections associated with the target computing device can be observed, avoiding the situation where multiple communication connections fail at the same time, so that relevant staff can be more accurate in determining the fault location, thereby improving work efficiency.
[0068] In addition, since network-related fault events may include increasing the delay in data packet transmission and increasing the packet loss rate, if the communication network does not fail after the fault event is injected, the disturbance can be expanded according to the set step size until the communication network fails. For example, during a fault injection process, a fault event that increases the packet loss rate by 5% is injected into the target computing device and any computing device that has a communication connection with the target computing device, but the communication connection between the two computing devices injected with the fault event does not fail, then the disturbance can be gradually expanded according to a set step size, such as 1%, that is, a fault event that increases the packet loss rate by 6% is injected into the two computing devices injected with the fault event. If the communication connection still does not fail, the packet loss rate can continue to be increased by 1% for injection. After each fault event is injected, if no fault occurs, the packet loss rate can continue to be increased by 1% for injection until a fault occurs in the communication network. The value of the set step size is not limited in this application and can be different values such as 2% or 3%.
[0069] Step S2025, determine whether the communication network fails, if so, execute step S2026; if not, return to execute step S2021.
[0070] In one possible embodiment, if the fault event type of the first fault event is device-type, then after each injection of the first fault event, all computing devices in the communication network are observed. If any computing device fails, affecting the service process of the entire communication network and is unable to recover on its own, then it can be considered that a fault has occurred in the communication network, and step S2026 is executed. If all computing devices in the communication network have not failed for a period of time, or if any computing device fails but recovers on its own and does not affect the service process of the entire communication network, then it can be considered that no fault has occurred in the communication network, and the process returns to step S2021.
[0071] In another possible embodiment, if the fault event type of the first fault event is a network type, then after each injection of the first fault event, the communication connection between the two computing devices injected with the first fault event is observed to determine whether the communication network has failed. For example, if the first fault event is an increase in packet loss rate, then it can be detected whether the data information at the receiving end is complete. If the data information at the receiving end is incomplete, or even problems such as communication interruption occur, then it can be considered that the communication network has failed. If the data information at the receiving end is complete and the communication connection is normal, then it can be considered that the communication network has not failed. If the first fault event is an increase in delay, then it can be detected whether many data have timed out and retransmitted. If many timed out and retransmitted data have ... After confirming whether the communication network fails, if the communication network does not fail, the process returns to step S2021; if the communication network fails, the process continues to step S2026.
[0072] It should be noted that before returning to step S2021, it is possible to determine whether all fault events in the fault event set have been injected into the target computing device. If all fault events in the fault event set have been injected into the target computing device, another target computing device can be reselected from the multiple computing devices and step S2021 can be continued. If there are still fault events in the fault event set that have not been injected into the target computing device, the execution of step S2021 can be directly returned. For example, if the target computing device is a first computing device, and fault event A, fault event B, and fault event C are stored in the fault event set, if no fault occurs in the communication network after fault event A and fault event B are injected into the first computing device, fault event C can be injected into the first computing device. If no fault occurs in the communication network after fault event C is injected, a target computing device, such as a second computing device, can be reselected and the fault events stored in the fault event set can be injected into the second computing device in sequence.
[0073] Step S2026, stop injecting faults.
[0074] In a possible embodiment, it is determined that a fault occurs in the communication network, and therefore the injection of the fault into the communication network is stopped, and step S203 is executed.
[0075] Step S203 : When a fault occurs, the fault injection information and fault manifestations of the multiple computing devices are saved as a fault scenario.
[0076] In one possible embodiment, the fault injection information includes an identifier of the computing device into which the fault event has been injected, as well as the fault event injected for each computing device. The fault manifestation is the performance of each computing device and the communication connection between the computing devices after the fault occurs. For example, if a first fault event and a second fault event are injected into a first computing device and a second computing device at the same time, and then a fault occurs in the communication network, causing the second computing device to crash and become paralyzed, thereby affecting the service processes of the entire communication network, the fault injection information can be determined as follows: the first fault event and the second fault event were injected into the first computing device, and the first fault event and the second fault event were injected into the second computing device; the fault manifestation is the crash and paralysis of the second computing device.
[0077] In one possible implementation, after the fault scenario is saved, the fault events injected into multiple computing devices can be cleared so that the next fault scenario can be reconstructed. That is, after clearing the original fault event, step S201 can be returned to construct the next fault scenario.
[0078] In a specific embodiment, the process of a fault scenario construction method executed by the server can be as follows: Figure 4As shown, the following steps are included:
[0079] Step S401: Select a target computing device from multiple computing devices.
[0080] Step S402 : Select a first fault event from at least one fault event that has not been injected into the target computing device, and confirm the fault event type of the first fault event.
[0081] The first fault event is any fault event among the at least one fault event that has not been injected into the target computing device.
[0082] Step S403 , determining whether the fault event type of the first fault event is a device type, if so, executing step S404 ; if not, executing step S405 .
[0083] Step S404: inject a first fault event into the target computing device and each computing device directly connected to the target computing device.
[0084] Step S405 : injecting a first fault event into the target computing device and any computing device among the computing devices that establish communication connections with the target computing device.
[0085] Step S406, determining whether a communication network failure occurs, if so, executing step S407; if not, executing step S408.
[0086] Step S407 , stop injecting the fault, and save the fault injection information and fault manifestations of the multiple computing devices when the fault occurs as a fault scenario.
[0087] Step S408 , determining whether there is any fault event in the fault event set that has not been injected into the target computing device, if so, returning to step S402 ; if not, returning to step S401 .
[0088] Based on the same inventive concept, the present application also provides a fault scenario construction device, such as Figure 5 As shown, the fault scenario construction device 500 includes:
[0089] A determining unit 501 is configured to select a target computing device from the plurality of computing devices during operation of the plurality of computing devices, wherein the target computing device is any computing device other than an injection-completed device, and the injection-completed device is a computing device into which all fault events in the set of fault events have been injected;
[0090] An injection unit 502 is configured to inject the set of fault events into the target computing device one by one, except for the fault events that have not been injected into the target computing device, until a fault occurs in the communication network;
[0091] The saving unit 503 is configured to save the fault injection information and fault manifestations of the plurality of computing devices as a fault scenario when a fault occurs.
[0092] In some embodiments, the injection unit 502 is specifically configured to repeatedly perform the following steps:
[0093] selecting a first fault event from at least one fault event that has not been injected into the target computing device, and determining a fault event type of the first fault event;
[0094] If the fault event type of the first fault event is device type, injecting the first fault event into the target computing device and each computing device directly connected to the target computing device;
[0095] If the fault event type of the first fault event is a network type, the first fault event is injected into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device.
[0096] In some embodiments, the injection unit 502 is specifically configured to determine that a fault occurs in the communication network by:
[0097] After injecting a device-type fault into the target computing device and each computing device directly connected to the target computing device, if any computing device among the plurality of computing devices fails, it is determined that the communication network fails; or
[0098] After injecting a network fault into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device, if a communication connection between any computing devices in the communication network fails, it is determined that the communication network fails.
[0099] In some embodiments, the injection unit 502 is specifically configured to obtain an application that has a data call relationship with the target computing device and determine the computing device on which the application is deployed;
[0100] The computing devices on which the application is deployed are regarded as respective computing devices directly connected to the target computing device.
[0101] In some embodiments, the saving unit 503 is further configured to clear the fault events that have been injected into the plurality of computing devices.
[0102] Based on the same technical concept as the above method embodiment, the present application embodiment further provides a server, which can be used to implement the functions performed by the server in the above method embodiment, thereby achieving the beneficial effects possessed by the above method embodiment.
[0103] In some embodiments, the structure of the server 600 can be as follows Figure 6 As shown, it includes a processor 601 and a memory 602 connected to the processor 601. The processor 601 and the memory 602 can be connected to each other via a bus. The processor 601 can be a general-purpose processor, such as a microprocessor, or other conventional processors. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0104] Among them, the memory 602 can be used to store software programs and modules, and the processor 601 executes various functional applications and data processing of the server 600 by running the software programs and modules stored in the memory 602, such as the long transaction detection method provided in the embodiment of the present application.
[0105] The memory 602 may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application program, and the like; the data storage area may be used to store user data, etc. Furthermore, the memory 602 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state memory device.
[0106] The processor 601 in the server 600 is configured to execute computer instructions or programs stored in the memory 602 to perform the functions described in any of the above-described method embodiments. In some embodiments, the processor 601 may include one or more processing units, which may be independent devices or integrated into one or more processors. The processor 601 may also include a controller that generates operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0107] In one embodiment, the server 600 may further include a communication module, which may be the network card described above, for communicating with the server.
[0108] It should be understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the server. In other embodiments of this application, the chip may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0109] The present application also provides a computer program product comprising computer-executable instructions. In one embodiment, the computer-executable instructions are used to enable a computer to perform the functions of the above method embodiment.
[0110] Computer-executable instructions can be stored in a computer-readable storage medium. The present application also provides a computer-readable storage medium having executable instructions stored therein. In one embodiment, the computer-executable instructions are used to cause a computer to perform the functions of the above method embodiment.
[0111] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0112] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0113] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0115] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A fault scenario construction method, characterized in that: Applied to a server, the server is connected to a plurality of computing devices, the server stores a set of fault events; the set of fault events includes at least one fault event; The fault event is an operation that can cause a fault in the communication network formed by the plurality of computing devices; the method comprises: During the operation of the plurality of computing devices, the following steps are repeatedly performed: Selecting a target computing device from the plurality of computing devices, the target computing device being any computing device other than the injection completed device, the injection completed device being a computing device into which all fault events in the set of fault events have been injected; injecting the set of fault events into the target computing device one by one, except for the fault events that have not been injected into the target computing device, until a fault occurs in the communication network; When a fault occurs, the fault injection information and fault manifestations of the multiple computing devices are saved as a fault scenario.
2. The method according to claim 1, characterized in that The step of injecting the uninjected fault events in the set of fault events into the target computing device one by one includes: Repeat the following steps: selecting a first fault event from at least one fault event that has not been injected into the target computing device, and determining a fault event type of the first fault event; If the fault event type of the first fault event is device type, injecting the first fault event into the target computing device and each computing device directly connected to the target computing device; If the fault event type of the first fault event is a network type, the first fault event is injected into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device.
3. The method according to claim 2, characterized in that Determine that the communication network fails by: After injecting a device-type fault into the target computing device and each computing device directly connected to the target computing device, if any computing device among the plurality of computing devices fails, determining that the communication network fails; or, After injecting a network fault into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device, if a communication connection between any computing devices in the communication network fails, it is determined that the communication network fails.
4. The method according to claim 2, characterized in that Before injecting the first fault event into the target computing device and each computing device directly connected to the target computing device, the method further includes: Acquire an application that has a data call relationship with the target computing device, and determine a computing device on which the application is deployed; The computing devices on which the application is deployed are regarded as respective computing devices directly connected to the target computing device.
5. The method according to claim 1, wherein The fault injection information includes an identifier of the computing device into which the fault event has been injected, and a fault event injected for each computing device; the fault manifestation is the manifestation of each computing device and the communication connection between computing devices after the fault occurs.
6. The method according to claim 1, wherein After saving the fault injection information and fault manifestations of the plurality of computing devices when a fault occurs as a fault scenario, the method further includes: Clear the fault events that have been injected into the multiple computing devices.
7. A fault scenario construction device, characterized in that: Applied to a server, the server is connected to a plurality of computing devices, the server stores a set of fault events; the set of fault events includes at least one fault event; The failure event is an operation that can cause a failure in the communication network formed by the multiple computing devices; the apparatus comprises: a determining unit, configured to select a target computing device from the plurality of computing devices during operation of the plurality of computing devices, the target computing device being any computing device other than an injection-completed device, the injection-completed device being a computing device into which all fault events in the set of fault events have been injected; an injection unit, configured to inject the set of fault events into the target computing device one by one, except for the fault events that have not been injected into the target computing device, until a fault occurs in the communication network; The storage unit is used to store the fault injection information and fault manifestations of the multiple computing devices when a fault occurs as a fault scenario.
8. The device according to claim 7, characterized in that The injection unit is used for: Repeat the following steps: selecting a first fault event from at least one fault event that has not been injected into the target computing device, and determining a fault event type of the first fault event; If the fault event type of the first fault event is device type, injecting the first fault event into the target computing device and each computing device directly connected to the target computing device; If the fault event type of the first fault event is a network type, the first fault event is injected into the target computing device and any computing device among the computing devices that establish a communication connection with the target computing device.
9. A server, characterized in that: include: at least one processor, and a memory communicatively coupled to the at least one processor, wherein: The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
10. A computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Injecting Faults at Select Execution Points of Distributed Applications
CN104699601A
Automatic injection verification method and system for hardware fault of multi-control storage equipment
CN113687988A
Fault injection triggering method, device and equipment and readable storage medium
CN115632960A
Fault injection method and device, storage medium and terminal
CN116909787A
Fault analysis method and fault analysis device
CN117201270A