Fault task injection method and device, communication equipment, storage medium and program product

By determining the target injection conditions and selecting fault tasks that match the business system in chaos engineering, combining polling and random selection, and updating fault tasks based on historical fault frequencies and binding relationships, the lack of flexibility and diversity in traditional injection methods is solved. problem, achieving refined and controllable fault task injection.

CN118694668APending Publication Date: 2024-09-24CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410952677.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-09-24

Smart Images

  • Figure CN118694668A
    Figure CN118694668A
Patent Text Reader

Abstract

The invention relates to a fault task injection method and device, communication equipment, a storage medium and a program product, and relates to the technical field of communication. The method comprises the following steps: determining a target injection condition matched with the current service flow of a service system; selecting a target fault task from at least one candidate fault task corresponding to the target injection condition; and injecting the target fault task into the service system. According to the technology of the invention, the flexibility and diversity of target fault task injection in the business system are improved, and the matching degree of the injected target fault task and the current business flow of the business system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a fault task injection method, apparatus, communication equipment, storage medium and program product. Background Art

[0002] With the continuous development of computer networks, Internet business systems built on new technologies such as cloud computing and distributed computing have emerged in order to improve business processing efficiency and ensure system scalability. A highly available Internet business system is highly dependent on its own robustness, so performance testing of the business system is crucial.

[0003] Chaos engineering can support experiments guided by experience on distributed systems to observe system behavior and discover system defects, thereby simulating scenarios in which the system may become chaotic under unexpected conditions. However, traditional chaos engineering relies on manual experience to inject faulty tasks, which is relatively mechanical. Summary of the invention

[0004] Based on this, it is necessary to provide a fault task injection method, apparatus, communication equipment, storage medium and program product that can improve flexibility and diversity in response to the above technical problems.

[0005] In a first aspect, the present application provides a fault task injection method, comprising:

[0006] Determine the target injection conditions that match the current business traffic of the business system;

[0007] Selecting a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0008] Inject the target fault task into the business system.

[0009] In one of the embodiments, selecting the target fault task from at least one candidate fault task corresponding to the target injection condition includes: selecting the target fault task from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition.

[0010] In one of the embodiments, selecting the target fault task from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition includes: polling and selecting the target fault task from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition; or randomly selecting the target fault task from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition.

[0011] In one of the embodiments, the selection order is determined in the following manner: determining the correlation data between each of the candidate fault tasks and the target injection condition; and determining the selection order of each of the candidate fault tasks based on the correlation data of each of the candidate fault tasks.

[0012] In one of the embodiments, the selection order of each candidate fault task is determined based on the relevance data of each candidate fault task, including: generating a task identifier of the corresponding candidate fault task based on the relevance data of each candidate fault task; wherein the number of task identifiers of the candidate fault tasks increases monotonically with the corresponding relevance data; and arranging the candidate fault tasks in a preset order based on the number of task identifiers of each candidate fault task to obtain the selection order.

[0013] In one of the embodiments, the target fault task is randomly selected from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition, including: generating a selection random number according to the number of task identifiers included in the selection order; taking the candidate fault task corresponding to the target task identifier as the target fault task; wherein the target task identifier is a task identifier whose arrangement order in the selection order is the same as that of the selection random number.

[0014] In one of the embodiments, determining the correlation data between each of the candidate fault tasks and the target injection condition includes: obtaining the historical failure frequency of each of the candidate fault tasks causing failures under the target injection condition; and determining the correlation data between the corresponding candidate fault task and the target injection condition based on the historical failure frequency corresponding to each of the candidate fault tasks.

[0015] In one of the embodiments, after selecting a target fault task from at least one candidate fault task corresponding to the target injection condition, the method further includes: updating the target fault task according to a candidate fault task having a binding relationship with the target fault task.

[0016] In one of the embodiments, the binding relationship is determined in the following manner: classifying the at least one candidate fault task; and establishing a binding relationship between at least two candidate fault tasks of the same category.

[0017] In one of the embodiments, determining the target injection condition that matches the current business traffic of the business system includes: obtaining business attribute data of the current business traffic of the business system; selecting a target injection condition that matches the business attribute data from at least one candidate injection condition; wherein the business attribute data includes at least one of a business type, a business operation, and a protocol type.

[0018] In a second aspect, the present application provides a fault task injection device, comprising:

[0019] A first determination module is used to determine a target injection condition that matches the current business flow of the business system;

[0020] A selection module, configured to select a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0021] An injection module is used to inject the target fault task into the business system.

[0022] In a third aspect, the present application further provides a communication device, the communication device comprising a memory, a transceiver and a processor, the memory storing a computer program, the transceiver being used to receive data or send data under the control of the processor, and the processor implementing the following steps when executing the computer program:

[0023] Determine the target injection conditions that match the current business traffic of the business system;

[0024] Selecting a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0025] Inject the target fault task into the business system.

[0026] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0027] Determine the target injection conditions that match the current business traffic of the business system;

[0028] Selecting a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0029] Inject the target fault task into the business system.

[0030] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, which implements the following steps when executed by a processor:

[0031] Determine the target injection conditions that match the current business traffic of the business system;

[0032] Selecting a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0033] Inject the target fault task into the business system.

[0034] The above-mentioned fault task injection method, device, communication equipment, storage medium and program product, by determining the target injection condition that matches the current business flow of the business system, make the target injection condition match the current business flow of the business system, and ensure the matching degree of the subsequently injected fault task with the current business flow. Further, from at least one candidate fault task corresponding to the target injection condition, the target fault task to be subsequently injected into the business system is selected, instead of directly injecting the fault task corresponding to the target injection condition into the business system, avoiding the mechanical injection of all fault tasks under the target injection condition into the business system, and improving the flexibility and diversity of fault task injection in the business system. In addition, through the flexible setting of the candidate injection condition, the injection of business faults can be flexibly and controllably performed according to the different granularities of the candidate injection condition, for example, it can be refined to the fault injection for a certain application or a certain pair of IP (Internet Protocol) addresses. The flow between the address further improves the flexibility and controllability of fault task injection in the business system. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of an application scenario of a fault task injection method in an embodiment;

[0036] Figure 2 A schematic diagram of a flow chart of a fault task injection method in one embodiment;

[0037] Figure 3 A flowchart of the steps of selecting a target fault task in one embodiment;

[0038] Figure 4 Schematic diagram of a flow chart of the updating steps of a target fault task in one embodiment;

[0039] Figure 5 A schematic diagram of a flow chart of a fault task injection method in another embodiment;

[0040] Figure 6 It is a structural block diagram of a fault task injection device in one embodiment;

[0041] Figure 7 FIG. 4 is a diagram showing the internal structure of a communication device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] The fault task injection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in the figure, the DPI (Deep Packet Inspection) system 110 obtains service traffic from the network end, and parses the service traffic to obtain a traffic parsing result; the control end 120 matches the target injection condition according to the traffic parsing result, and selects a target fault task from at least one candidate fault task corresponding to the target injection condition; the control end 120 injects the target fault task into the service system 130.

[0044] It should be noted that the control terminal 120 can be integrated with the DPI system 110 to reduce hardware deployment costs; or optionally, the control terminal 120 and the DPI system 110 are independently configured to achieve decoupling between different devices and facilitate maintenance of different devices.

[0045] In an alternative embodiment, if Figure 2 As shown, a fault task injection method is provided, which can be applied to Figure 1 The DPI system 110 shown can also be applied to the control terminal 120, or can be implemented by the interaction between the DPI system 110 and the control terminal 120. In this embodiment, the method includes the following steps:

[0046] S210, determining a target injection condition that matches the current service flow of the service system.

[0047] The business system is the system to be injected with fault tasks. The current business traffic may include network inflow traffic, that is, traffic flowing into the business system, or may include network outflow traffic, that is, traffic flowing out of the business system, and this application does not impose any limitation on this.

[0048] Among them, the injection condition can be understood as the trigger condition that needs to be met for fault injection. Exemplarily, the injection condition can be constructed based on at least one of basic business information and business quality indicators. Among them, the basic business information can include at least one of the basic attributes such as application name and business type. Among them, the business quality indicator can include at least one of the delay indicator, jitter indicator, packet loss indicator and business identification indicator. Optionally, the delay indicator can include at least one of RTT (Round-Trip Time), first screen opening delay, TCP (Transmission Control Protocol) link establishment delay and TCP first packet delay; jitter indicators can include at least one of packet interval and packet jitter; packet loss indicators can include at least one of retransmission times and retransmission size; business identification indicators can include at least one of HTTP (Hypertext Transfer Protocol) operation, end mark and Flag.

[0049] In an optional embodiment, the service attribute data of the current service flow of the service system may be obtained; and a target injection condition matching the service attribute data is selected from at least one candidate injection condition. The service attribute data describes the current service flow from at least one attribute dimension. The service attribute data may include at least one of a service type, a service operation, and a protocol type.

[0050] Exemplarily, the current business traffic of the business system can be parsed to obtain business attribute data of the current business traffic; each business attribute data is matched with at least one candidate injection condition by keyword; and the successfully matched candidate injection condition is used as the target injection condition. It should be noted that the above parsing operation can be implemented by using at least one of the traditional parsing operations, and this application does not impose any limitation on this.

[0051] For example, if there is a candidate injection condition defined as follows: the business type is type A, the business operation is the "POST" (send) operation under the HTTP operation, and the L4 protocol used is the TCP protocol, when the business attribute data obtained by parsing the current business traffic matches the above candidate injection condition, the above candidate injection condition will be used as the target injection condition.

[0052] It can be understood that the above technical solution introduces at least one business attribute data such as the business type, business operation and protocol type of the current business traffic as a selection basis, and selects a target injection condition from at least one candidate injection condition, so that the selected target injection condition can match the current business traffic of the business system, thereby improving the traffic matching between the injected fault task and the business system.

[0053] It is worth noting that the candidate injection conditions corresponding to different business systems may be the same or different, and this application does not impose any limitation on this. Optionally, the candidate injection conditions may be set differently according to the system category of the business system. Among them, the candidate injection conditions corresponding to different system categories may be set or adjusted by technicians according to needs or experience, or determined through a large number of experiments, and this application does not impose any limitation on this.

[0054] S220 , selecting a target fault task from at least one candidate fault task corresponding to the target injection condition.

[0055] Exemplarily, a correspondence between at least one candidate injection condition and at least one candidate fault task can be pre-set; when a target injection condition is selected from at least one candidate injection condition, at least one candidate fault task corresponding to the target injection condition is determined based on the above correspondence, and the target fault task is selected from the above candidate fault tasks.

[0056] Among them, the corresponding relationship between at least one candidate injection condition and at least one candidate fault task can be set by technical personnel according to needs or experience, or determined through a large number of experiments, and this application does not impose any limitation on this.

[0057] It should be noted that the candidate injection conditions and the candidate fault tasks may be in a one-to-one relationship, a many-to-one relationship, a one-to-many relationship, or a many-to-many relationship, and this application does not impose any limitation on this.

[0058] In a specific implementation, a fault information table may be pre-constructed, in which the corresponding relationships between different candidate injection conditions and corresponding candidate fault tasks are stored.

[0059] In an optional embodiment, the target fault task can be selected from at least one candidate fault task corresponding to the target injection condition by random selection or polling selection. It is worth noting that the target fault tasks selected in different situations can be the same or at least partially different, and the number of the selected target fault tasks is at least one, and this application does not impose any limitation on this.

[0060] In a specific implementation, a target fault task can be selected from at least one candidate fault task according to the matching between the target injection condition and each candidate fault task. For example, the matching can be presented in different dimensions such as semantic similarity, the degree of association between the condition and the fault, and this application does not make any limitation on this.

[0061] It should be noted that if the target injection condition is not determined, that is, the target injection condition determination fails, or the number of determined target injection conditions is 0, the target fault task selection operation in S220 is no longer performed. For example, if the current service flow is type B service, but the pre-set candidate injection conditions are all injection conditions for type A service, then the target injection condition matching type B service will not be determined.

[0062] S230, injecting a target fault task into the business system.

[0063] Optionally, a target fault task can be injected into the business system by calling a preset fault injection program, wherein the fault injection program can be set or adjusted by a technician according to needs or experience, or repeatedly determined through a large number of experiments, and this application does not impose any limitation on this.

[0064] Or optionally, a fault injection instruction is sent to the business system; the business system responds to the fault injection instruction and injects a target fault task into the system.

[0065] It should be noted that if the target fault task is not selected, that is, the selected target fault task is 0, or the target fault task selection fails, the fault task injection operation of S230 is no longer performed.

[0066] The embodiment of the present application determines a target injection condition that matches the current business traffic of the business system, so that the target injection condition can match the current business traffic of the business system, thereby ensuring the matching degree of the fault task subsequently injected with the current business traffic. Furthermore, from at least one candidate fault task corresponding to the target injection condition, a target fault task to be subsequently injected into the business system is selected, instead of directly injecting the fault task corresponding to the target injection condition into the business system, thereby avoiding the mechanical injection of all fault tasks under the target injection condition into the business system, and improving the flexibility and diversity of fault task injection in the business system. In addition, through the flexible setting of the candidate injection conditions, the injection of business faults can be flexibly and controllably performed according to the different granularities of the candidate injection conditions, for example, it can be refined to the fault injection for a certain application or a certain pair of IP addresses. The flexibility and controllability of fault task injection in the business system is further improved.

[0067] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment, in which the steps for selecting the target fault task are refined.

[0068] See also Figure 3 The steps for selecting the target fault task shown include:

[0069] S310 , selecting a target fault task from at least one candidate fault task according to a selection order of each candidate fault task corresponding to a target injection condition.

[0070] The selection order of each candidate fault task corresponding to the target injection condition can be set or adjusted by the technician according to the needs or experience, or set through a large number of experiments, and this application does not impose any restrictions on this. The selection order can be generated by generating a sequence of task identifiers including at least one candidate fault task, and presented by the order of arrangement of elements in the sequence. At least two task identifiers in the sequence can be the same or different, and this application does not impose any restrictions on this.

[0071] In an optional embodiment, the degree of correlation between the target injection condition and each candidate fault task corresponding to the target injection condition can also be introduced, and the selection order of each candidate fault task corresponding to the target injection condition can be determined according to the magnitude of the degree of correlation. Exemplarily, the selection order of the candidate fault tasks with a greater degree of correlation can be set relatively forward, and the selection order of the candidate fault tasks with a smaller degree of correlation can be set relatively backward. The degree of correlation can be qualitative description data or quantitative description data, and this application does not impose any limitation on this.

[0072] It should be noted that, when there are at least two candidate fault tasks with the same correlation degree, the selection order between the at least two candidate fault tasks may be manually specified or randomly set.

[0073] Exemplarily, the correlation data between each candidate fault task and the target injection condition can be determined; and the selection order of each candidate fault task is determined according to the correlation data of each candidate fault task. The correlation data is used to quantitatively describe the degree of correlation between the candidate fault task and the target injection condition. The higher the correlation data of the candidate fault task, the greater the degree of correlation between the candidate fault task and the target injection condition.

[0074] It is worth noting that, since the candidate fault tasks with a greater degree of correlation with the target injection condition will cause a relatively high frequency of faults when injected into the business system in this application or other business systems (e.g., business systems of the same business type), the candidate fault tasks with a lesser degree of correlation with the target injection condition will cause a relatively low frequency of faults when injected into the business system in this application or other business systems. Therefore, the correlation data between the candidate fault tasks and the target injection condition can be measured by introducing the fault frequency.

[0075] Optionally, the historical fault frequency of each candidate fault task causing a fault under the target injection condition may be obtained; and the correlation data between the corresponding candidate fault task and the target injection condition may be determined according to the historical fault frequency corresponding to each candidate fault task.

[0076] In the above optional embodiment, after faulty tasks are injected into different business systems, statistics can be collected based on the number of faults caused by the injected faulty tasks, and the fault frequencies of different faulty tasks under the corresponding injection conditions can be adaptively updated. Accordingly, when determining the correlation data, the historical fault frequencies of each candidate faulty task under the target injection conditions are searched and obtained, and based on the preset correlation determination function, the correlation data between the corresponding candidate faulty task and the target injection condition is determined based on the fault frequency of each candidate faulty task under the target injection condition. Among them, the correlation determination function is a monotonic function of the historical fault frequencies.

[0077] Specifically, if the correlation determination function is a monotonically increasing function, the higher the historical fault frequency, the higher the corresponding correlation data, and the earlier the selection order of the corresponding candidate fault task; the lower the historical fault frequency, the lower the corresponding correlation data, and the later the selection order of the corresponding candidate fault task. If the correlation determination function is a monotonically decreasing function, the higher the historical fault frequency, the lower the corresponding correlation data, and the later the selection order of the corresponding candidate fault task; the lower the historical fault frequency, the higher the corresponding correlation data, and the earlier the selection order of the corresponding candidate fault task. Usually, for ease of understanding, the correlation determination function will use a monotonically increasing function.

[0078] It can be understood that, in the selection order determined by the above method, the maximum order is the same as the total number of candidate fault tasks under the target injection condition, that is, if the candidate fault tasks under the target injection condition include task a, task b and task c, and the correlation data of task a, task b and task c with the target injection condition gradually decreases, then the selection order sequence [a, b, c] can be used to characterize the selection order between task a, task b and task c.

[0079] The selection order determined by the above method has a maximum selection order corresponding to the number of candidate fault tasks. In an optional embodiment, the selection order can also be determined by the number of candidate fault tasks that are sorted by the influence of the correlation data, thereby increasing the probability of candidate fault tasks with higher correlation data being injected into the business system and reducing the probability of candidate fault tasks with lower correlation data being injected into the business system.

[0080] Exemplarily, a task identifier of the corresponding candidate fault task can be generated based on the relevance data of each candidate fault task; wherein the number of task identifiers of the candidate fault tasks increases monotonically with the corresponding relevance data; and according to the number of task identifiers of each candidate fault task, each candidate fault task is arranged in a preset order to obtain a selection order.

[0081] Optionally, a quantity determination function can be constructed in advance with relevance data as the independent variable and the number of task identifiers as the dependent variable; accordingly, for each candidate fault task, the relevance data of the candidate fault task is input into the quantity determination function to obtain the number of task identifiers of the candidate fault task; according to the number of task identifiers of each candidate fault task, the candidate fault tasks are arranged in a preset order to obtain the selection order of each candidate fault task with duplicate task identifiers.

[0082] For example, if the candidate fault tasks under the target injection condition include task a, task b, and task c arranged in sequence, and the number of task identifiers corresponding to the correlation data of task a, task b, and task c with the target injection condition are 1, 2, and 4 respectively, then the selection order between task a, task b, and task c can be represented by the selection order sequence [a, b, b, c, c, c, c].

[0083] It should be noted that the execution device for determining the selection order and the execution device for executing the fault task injection method in this application may be the same as or different, and this application does not impose any limitation on this.

[0084] It can be understood that by introducing the historical fault frequency to determine the correlation data, the correlation data determination process is more convenient and quick, and the amount of data calculation is small. In addition, the historical fault frequency can relatively intuitively reflect the degree of association between the candidate fault task and the target injection condition, thereby improving the accuracy of the correlation data determination result, and then improving the rationality and accuracy of the selection order determination result.

[0085] In an optional embodiment, the target fault task can be selected from at least one candidate fault task by polling according to the selection order of each candidate fault task corresponding to the target injection condition. The advantage of this is that the selection process is convenient and fast, and different fault tasks can be injected relatively evenly during the entire fault task injection cycle of the business system, ensuring the comprehensiveness of the fault task injection.

[0086] In another optional embodiment, the target fault task may be randomly selected from at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition.

[0087] Optionally, a selection random number may be generated according to the task quantity of at least one candidate faulty task, and according to the selection order, the candidate faulty tasks having the same selection order as the selection random number may be used as target faulty tasks.

[0088] Or optionally, a selection random number can be generated according to the number of task identifiers included in the aforementioned selection order; the candidate fault task corresponding to the target task identifier is used as the target fault task; wherein the target task identifier is a task identifier whose arrangement order in the selection order is the same as the selection random number.

[0089] In a specific example, if the selection order corresponds to the order of elements of a task sequence containing task identifiers of different candidate fault tasks, the number of elements in the task sequence may be used as the number of task identifiers contained in the selection order.

[0090] Optionally, the number of tasks or the number of task identifiers can be used as the upper limit of the random number generation; the default value, such as 0, can be used as the lower limit of the random number generation; and any integer between the upper limit and the lower limit can be randomly selected as the random number.

[0091] The above technical solution introduces the selection of random numbers to select the target fault task. The selection process is convenient and quick to operate, and a certain degree of randomness can be introduced in the process of determining the target fault task, thereby improving the flexibility and diversity of fault task injection.

[0092] The embodiment of the present application introduces the selection order of each candidate fault task corresponding to the target injection condition, and selects the target fault task from at least one candidate fault task in an orderly manner, thereby ensuring the controllability of different candidate fault tasks being selected as target fault tasks during the target fault task selection process, facilitating the management and maintenance of the fault task injection process, and ensuring the comprehensiveness and flexibility of the selected target fault tasks.

[0093] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, after selecting the target fault task, an update mechanism for the target fault task is introduced to enrich the diversity of the target fault task.

[0094] See also Figure 4 The update steps of the target failure task shown include:

[0095] S410: Update the target fault task according to the candidate fault tasks that have a binding relationship with the target fault task.

[0096] The binding relationship may be a compatible relationship or a mutually exclusive relationship. Candidate fault tasks with a compatible relationship may exist simultaneously in the same business system; candidate fault tasks with a mutually exclusive relationship are prohibited from existing simultaneously in the same business system. The binding relationship may be set or adjusted by a technician according to needs or experience, or determined through a large number of tests, and this application does not impose any limitation on this.

[0097] Exemplarily, if the binding relationship is a compatible relationship, the candidate fault tasks that have a binding relationship with the target fault task can be added to the existing target fault tasks to update the target fault tasks; if the binding relationship is a mutually exclusive relationship, other target fault tasks that have a binding relationship with any target fault task can be removed from the existing target fault tasks. It should be noted that which one or more of the target fault tasks with a mutually exclusive relationship are to be removed, or which target fault tasks of the target fault tasks with a mutually exclusive relationship are to be retained, can be determined randomly or by polling, and this application does not impose any limitation on this.

[0098] It is understandable that in order to improve the convenience and efficiency of the binding relationship determination process and reduce the interference caused by human subjective factors, in an optional embodiment, a binding relationship can be automatically established between different candidate fault tasks based on the association between different candidate fault tasks.

[0099] Exemplarily, at least one candidate fault task may be classified; and a binding relationship may be established between at least two candidate fault tasks of the same category. The advantage of this is that the convenience and efficiency of establishing the binding relationship are improved, while the influence of human subjective factors is reduced, and the accuracy of the binding relationship establishment result is improved.

[0100] Among them, at least one traditional classification method can be used to classify at least one candidate fault task, and this application does not impose any limitation on this.

[0101] In a specific implementation, task attribute data of at least one candidate fault task can be obtained; feature encoding is performed on each task attribute data to obtain task attribute features; and based on a preset classification algorithm, each candidate fault task is classified according to the task attribute features of each candidate fault task. Among them, the feature encoding method can be implemented using at least one traditional encoding method, which is not limited in this application, such as one-hot encoding, etc.; the preset classification algorithm can be a K-means algorithm.

[0102] The task attribute data may include at least one of relevance data, fault category, impact data, recovery capability data and duration data. For the relevance data, please refer to the relevant description of the above embodiment, which will not be repeated here. The fault category may include at least one of network category, server hardware category, server software category and fault operation category, etc., and the present application does not make any limitation on this. The impact data is used to characterize the impact of the candidate fault task on the business system, which can be determined based on at least one of the business impact scope, business impact time and equipment impact ratio. For example, the impact data may include at least one of no impact, slight impact, medium impact, severe impact and service unavailability. The recovery capability data is used to characterize the recovery difficulty of the candidate fault task, which can be determined based on the recovery time (Recovery Time Objective, RTO). The duration data is used to characterize the duration of the candidate fault task, which can be determined based on the fault duration (Recovery Point Objective, RPO) or the duration type. The duration type may include at least one of continuous, instantaneous and intermittent. The duration type may be set or adjusted by the technician according to the needs or experience, or implemented by a preset classification algorithm, and the present application does not make any limitation on this.

[0103] Specifically, from at least one candidate fault task, randomly select K center point tasks as the center points of the clustering clusters; for each non-center point task in at least one candidate fault task, determine the task attribute characteristics of the non-center point task and the difference data between the task attribute characteristics of each center point task; add the non-center point task to the clustering cluster where the center point task corresponding to the minimum value of the difference data is located. After all non-center point tasks are clustered, redetermine the center point of each clustering cluster as a new center point task, and redetermine the non-center point task in at least one candidate fault task; return to execute the difference data determination step for each non-center point task until the clustering termination condition is met; divide each candidate fault task in the same clustering cluster into the same category; divide each candidate fault task in different clustering clusters into different categories. Among them, K is a positive number greater than 1; the difference data can be a spatial distance, for example, it can be a Euclidean distance, and this application does not impose any limitation on this.

[0104] Optionally, for candidate fault tasks of the same category, a compatibility relationship is established between the candidate fault tasks.

[0105] Or optionally, for different categories of candidate faulty tasks, if there are candidate faulty tasks in the corresponding clusters that cannot exist simultaneously in the same service system, a mutually exclusive relationship is established between the candidate faulty tasks in different clusters.

[0106] The embodiment of the present application introduces a binding relationship to update the target fault task as a supplement or secondary screening of the selected target fault task, thereby ensuring the accuracy and rationality of the target fault task, thereby improving the rationality and universality of chaos engineering for the business system.

[0107] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, Figure 1 Based on the application scenario shown, the fault task injection process is described in detail.

[0108] See also Figure 5 The fault task injection method shown includes:

[0109] S510, the DPI system analyzes the current business process of the business system to obtain business attribute data.

[0110] The service attribute data includes at least one of service type, service operation and protocol type.

[0111] S520, the DPI system sends the service attribute data to the control end.

[0112] S530, the control end searches for a candidate injection condition that matches the service attribute data from a pre-established fault information table as a target injection condition.

[0113] The fault information table can be found in the following table:

[0114]

[0115] It should be noted that the values ​​corresponding to the different task attribute data in the above fault information table can be calculated using the determination method of the above embodiment, which will not be repeated in this embodiment. Among them, x and y are both preset values, which can be set or adjusted by technicians according to needs or experience, or repeatedly determined through a large number of experiments, and this application does not make any limitation on this.

[0116] S540, the control end selects a target fault task from the candidate fault tasks corresponding to the target injection condition.

[0117] In an optional embodiment, a preset number of target fault tasks may be selected from the candidate fault tasks corresponding to the target injection condition in turn according to a preset order. The preset number may be set or adjusted by a technician according to needs or experience, or determined through a large number of experiments, and this application does not impose any limitation on this.

[0118] In another optional embodiment, the correlation data between each candidate fault task corresponding to the target injection condition and the target injection condition can be obtained; based on a monotonically increasing quantity determination function with the correlation data as the independent variable and the number of task identifiers as the dependent variable, the correlation data of each candidate fault task is used as input data to determine the number of task identifiers of the corresponding candidate fault tasks; the task identifiers of each candidate fault task are arranged according to a preset order of each candidate fault task to obtain a selection order of each candidate fault task; and a preset number of target fault tasks are selected in turn from each candidate fault task corresponding to the target injection condition according to the aforementioned selection order.

[0119] For example, if the candidate fault tasks under the target injection condition include sequentially arranged tasks a, b, and c. Among them, the correlation data between task a and the target injection condition is 1, the correlation data between task b and the target injection condition is 2, and the correlation data between task c and the target injection condition is 4, that is, a_weight=1, b_weight=2, c_weight=4, then the following selection order sequence [a, b, b, c, c, c, c] is constructed. Accordingly, the target fault tasks are selected in turn according to the arrangement order in the selection order sequence.

[0120] In another optional embodiment, a random function can be used to generate any integer between 0 and N as a selected random number, where N is the number of tasks of each candidate fault task corresponding to the target injection condition; and in a preset order, the candidate fault tasks arranged in the order of the selected random number are used as target fault tasks.

[0121] In another optional embodiment, the correlation data between each candidate fault task corresponding to the target injection condition and the target injection condition can be obtained; based on a monotonically increasing quantity determination function with the correlation data as the independent variable and the number of task identifiers as the dependent variable, the correlation data of each candidate fault task is used as input data to determine the number of task identifiers of the corresponding candidate fault tasks; the task identifiers of each candidate fault task are arranged according to the preset order of each candidate fault task to obtain the selection order of each candidate fault task; according to the pre-order selection order, the candidate fault task whose arrangement order is a selected random number is used as the target fault task.

[0122] For example, if the candidate fault tasks under the target injection condition include sequentially arranged tasks a, b, and c. Among them, the correlation data between task a and the target injection condition is 1, the correlation data between task b and the target injection condition is 2, and the correlation data between task c and the target injection condition is 4, that is, a_weight=1, b_weight=2, c_weight=4, then the following selection order sequence [a, b, b, c, c, c, c] is constructed. Accordingly, an integer random number less than 7 is generated, and the random number is used as an index to select the target fault task under the corresponding index from the selection order sequence.

[0123] S550, the control end adds the candidate fault tasks in the fault information table that have a binding relationship with the target fault task to the target fault task.

[0124] S560, the control end calls the fault injection program to inject the target fault task into the business system.

[0125] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0126] Based on the same inventive concept, the embodiment of the present application also provides a fault task injection device for implementing the fault task injection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more fault task injection device embodiments provided below can refer to the limitations of the fault task injection method above, and will not be repeated here.

[0127] In one embodiment, Figure 6 As shown, a fault task injection device is provided, comprising: a first determination module 610, a selection module 620 and an injection module 630. Among them,

[0128] A first determination module 610 is used to determine a target injection condition that matches the current service flow of the service system;

[0129] A selection module 620, configured to select a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0130] The injection module 630 is used to inject a target fault task into the business system.

[0131] In one embodiment, the selection module 620 is specifically configured to select a target fault task from at least one candidate fault task according to a selection order of each candidate fault task corresponding to the target injection condition.

[0132] In one embodiment, the selection module 620 includes: a polling selection unit, which is used to poll and select a target fault task from at least one candidate fault task according to the selection order of each candidate fault task corresponding to the target injection condition; and a random selection unit, which is used to randomly select a target fault task from at least one candidate fault task according to the selection order of each candidate fault task corresponding to the target injection condition.

[0133] In one of the embodiments, the device further includes: a second determination module for determining correlation data between each candidate fault task and the target injection condition; and a third determination module for determining a selection order of each candidate fault task based on the correlation data of each candidate fault task.

[0134] In one embodiment, the third determination module includes: a first generation unit, used to generate a task identifier of the corresponding candidate fault task based on the relevance data of each candidate fault task; wherein the number of task identifiers of the candidate fault tasks increases monotonically with the corresponding relevance data; and an arrangement unit, used to arrange the candidate fault tasks in a preset order according to the number of task identifiers of each candidate fault task to obtain a selection order.

[0135] In one embodiment, the random selection unit includes: a second generation unit, used to generate a selection random number according to the number of task identifiers included in the selection order; a first determination unit, used to use the candidate fault task corresponding to the target task identifier as the target fault task; wherein the target task identifier is a task identifier whose arrangement order in the selection order is the same as the selection random number.

[0136] In one of the embodiments, the second determination module includes: a second acquisition unit, used to obtain the historical failure frequency of each candidate failure task causing failure under the target injection condition; a second determination unit, used to determine the correlation data between the corresponding candidate failure task and the target injection condition based on the historical failure frequency corresponding to each candidate failure task.

[0137] In one of the embodiments, the device further includes an updating module for updating the target fault task according to the candidate fault tasks having a binding relationship with the target fault task after selecting the target fault task from at least one candidate fault task corresponding to the target injection condition.

[0138] In one of the embodiments, the device further includes a classification module for classifying at least one candidate fault task; and an establishment module for establishing a binding relationship between at least two candidate fault tasks of the same category.

[0139] In one of the embodiments, the first determination module includes: a second acquisition unit, used to obtain business attribute data of the current business traffic of the business system; a condition selection unit, used to select a target injection condition that matches the business attribute data from at least one candidate injection condition; wherein the business attribute data includes at least one of a business type, a business operation and a protocol type.

[0140] Each module in the above-mentioned fault task injection device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the communication device in the form of hardware, or can be stored in the memory in the communication device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0141] In one embodiment, a communication device is provided. The communication device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The communication device includes a processor, a memory, a network interface and a transceiver connected through a system bus. Among them, the processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The transceiver of the communication device is used to perform operations of receiving data or sending data under the control of the processor. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the communication device is used to store data such as uplink text messages and downlink text messages. The network interface of the communication device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a fault task injection method is implemented.

[0142] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the communication device to which the scheme of the present application is applied. The specific communication device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0143] In one embodiment, a communication device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the processing logic in the computer program, the following steps are implemented:

[0144] Determine the target injection conditions that match the current business traffic of the business system;

[0145] Selecting a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0146] Inject target fault tasks into the business system.

[0147] In one embodiment, when the processor executes the processing logic in the computer program, the processor further implements the following steps: selecting a target fault task from at least one candidate fault task according to the selection order of each candidate fault task corresponding to the target injection condition.

[0148] In one embodiment, when the processor executes the processing logic in the computer program, the following steps are also implemented: according to the selection order of each candidate fault task corresponding to the target injection condition, polling and selecting the target fault task from at least one candidate fault task; or, according to the selection order of each candidate fault task corresponding to the target injection condition, randomly selecting the target fault task from at least one candidate fault task.

[0149] In one embodiment, when the processor executes the processing logic in the computer program, the following steps are also implemented: determining the correlation data between each candidate fault task and the target injection condition; and determining the selection order of each candidate fault task according to the correlation data of each candidate fault task.

[0150] In one embodiment, when the processor executes the processing logic in the computer program, the following steps are also implemented: based on the relevance data of each candidate fault task, a task identifier of the corresponding candidate fault task is generated; wherein the number of task identifiers of the candidate fault tasks increases monotonically with the corresponding relevance data; and based on the number of task identifiers of each candidate fault task, the candidate fault tasks are arranged in a preset order to obtain a selection order.

[0151] In one embodiment, when the processor executes the processing logic in the computer program, it also implements the following steps: generating a selection random number based on the number of task identifiers included in the selection order; taking the candidate fault task corresponding to the target task identifier as the target fault task; wherein the target task identifier is a task identifier whose arrangement order in the selection order is the same as the selection random number.

[0152] In one embodiment, when the processor executes the processing logic in the computer program, the following steps are also implemented: obtaining the historical failure frequency of each candidate failure task causing failure under the target injection condition; and determining the correlation data between the corresponding candidate failure task and the target injection condition based on the historical failure frequency corresponding to each candidate failure task.

[0153] In one embodiment, when the processor executes the processing logic in the computer program, the processor further implements the following steps: updating the target fault task according to the candidate fault tasks that have a binding relationship with the target fault task.

[0154] In one embodiment, when the processor executes the processing logic in the computer program, the processor further implements the following steps: classifying at least one candidate fault task; and establishing a binding relationship between at least two candidate fault tasks of the same category.

[0155] In one embodiment, when the processor executes the processing logic in the computer program, it also implements the following steps: obtaining business attribute data of the current business traffic of the business system; selecting a target injection condition that matches the business attribute data from at least one candidate injection condition; wherein the business attribute data includes at least one of a business type, a business operation, and a protocol type.

[0156] In one embodiment, a computer readable storage medium or a computer program product is provided, on which a computer program is stored, and when the processing logic in the computer program is executed by a processor, the following steps are implemented:

[0157] Determine the target injection conditions that match the current business traffic of the business system;

[0158] Selecting a target fault task from at least one candidate fault task corresponding to the target injection condition;

[0159] Inject target fault tasks into the business system.

[0160] In one embodiment, when the processing logic in the computer program is executed by the processor, the following steps are further implemented: selecting a target fault task from at least one candidate fault task according to the selection order of each candidate fault task corresponding to the target injection condition.

[0161] In one embodiment, when the processing logic in the computer program is executed by the processor, the following steps are also implemented: according to the selection order of each candidate fault task corresponding to the target injection condition, polling and selecting the target fault task from at least one candidate fault task; or, according to the selection order of each candidate fault task corresponding to the target injection condition, randomly selecting the target fault task from at least one candidate fault task.

[0162] In one embodiment, when the processing logic in the computer program is executed by the processor, the following steps are also implemented: determining the correlation data between each candidate fault task and the target injection condition; and determining the selection order of each candidate fault task based on the correlation data of each candidate fault task.

[0163] In one embodiment, the processing logic in the computer program also implements the following steps when executed by the processor: generating a task identifier of the corresponding candidate fault task based on the relevance data of each candidate fault task; wherein the number of task identifiers of the candidate fault tasks increases monotonically with the corresponding relevance data; and arranging the candidate fault tasks in a preset order based on the number of task identifiers of each candidate fault task to obtain a selection order.

[0164] In one embodiment, the processing logic in the computer program also implements the following steps when executed by the processor: generating a selection random number based on the number of task identifiers included in the selection order; taking the candidate fault task corresponding to the target task identifier as the target fault task; wherein the target task identifier is a task identifier whose arrangement order in the selection order is the same as the selection random number.

[0165] In one embodiment, when the processing logic in the computer program is executed by the processor, the following steps are also implemented: obtaining the historical failure frequency of each candidate failure task causing failure under the target injection condition; and determining the correlation data between the corresponding candidate failure task and the target injection condition based on the historical failure frequency corresponding to each candidate failure task.

[0166] In one embodiment, when the processing logic in the computer program is executed by the processor, the following steps are further implemented: updating the target fault task according to the candidate fault tasks that have a binding relationship with the target fault task.

[0167] In one embodiment, when the processing logic in the computer program is executed by the processor, the following steps are further implemented: classifying at least one candidate fault task; and establishing a binding relationship between at least two candidate fault tasks of the same category.

[0168] In one embodiment, the processing logic in the computer program also implements the following steps when executed by the processor: obtaining business attribute data of the current business traffic of the business system; selecting a target injection condition that matches the business attribute data from at least one candidate injection condition; wherein the business attribute data includes at least one of a business type, a business operation, and a protocol type.

[0169] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0170] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0172] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A fault task injection method, It is characterized in that include: Determine the target injection conditions that match the current business traffic of the business system; Selecting a target fault task from at least one candidate fault task corresponding to the target injection condition; Inject the target fault task into the business system.

2. The method according to claim 1, It is characterized in that The selecting a target fault task from at least one candidate fault task corresponding to the target injection condition comprises: The target fault task is selected from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition.

3. The method according to claim 2, It is characterized in that The selecting the target fault task from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition comprises: Selecting the target fault task by polling from the at least one candidate fault task according to the selection order of each candidate fault task corresponding to the target injection condition; or The target fault task is randomly selected from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition.

4. The method according to claim 2, It is characterized in that The selection order is determined in the following manner: Determining correlation data between each of the candidate fault tasks and the target injection condition; The selection order of each of the candidate fault tasks is determined according to the relevance data of each of the candidate fault tasks.

5. The method according to claim 4, It is characterized in that The step of determining the selection order of each of the candidate fault tasks according to the correlation data of each of the candidate fault tasks comprises: Generate a task identifier of the corresponding candidate fault task according to the relevance data of each candidate fault task; wherein the number of task identifiers of the candidate fault tasks increases monotonically with the corresponding relevance data; According to the number of task identifiers of the candidate fault tasks, the candidate fault tasks are arranged in a preset order to obtain the selection order.

6. The method according to claim 5, It is characterized in that The step of randomly selecting the target fault task from the at least one candidate fault task according to the selection order of the candidate fault tasks corresponding to the target injection condition comprises: Generate a selection random number according to the number of task identifiers included in the selection sequence; Using the candidate fault task corresponding to the target task identifier as the target fault task; Among them, the target task identifier is a task identifier whose arrangement order under the selection sequence is the same as the selected random number.

7. The method according to claim 4, It is characterized in that The determining of the correlation data between each of the candidate fault tasks and the target injection condition includes: Obtaining the historical failure frequency of each of the candidate failure tasks causing failures under the target injection conditions; According to the historical fault frequencies corresponding to each of the candidate fault tasks, correlation data between the corresponding candidate fault tasks and the target injection condition is determined.

8. The method according to any one of claims 1 to 7, It is characterized in that After selecting a target fault task from at least one candidate fault task corresponding to the target injection condition, the method further includes: The target fault task is updated according to the candidate fault tasks that have a binding relationship with the target fault task.

9. The method according to claim 8, It is characterized in that The binding relationship is determined in the following manner: classifying the at least one candidate faulty task; A binding relationship is established between at least two candidate fault tasks of the same category.

10. The method according to any one of claims 1 to 7, It is characterized in that The determining of the target injection condition matching the current service flow of the service system includes: Acquire business attribute data of current business traffic of the business system; Selecting a target injection condition that matches the service attribute data from at least one candidate injection condition; The service attribute data includes at least one of service type, service operation and protocol type.

11. A fault task injection device, It is characterized in that include: A first determination module is used to determine a target injection condition that matches the current business flow of the business system; A selection module, configured to select a target fault task from at least one candidate fault task corresponding to the target injection condition; An injection module is used to inject the target fault task into the business system.

12. A communication device comprising a memory, a transceiver and a processor, wherein the memory stores a computer program, It is characterized in that The transceiver is used to receive data or send data under the control of the processor, and the processor implements the steps of any one of claims 1-10 when executing the computer program.

13. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

14. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.