Fault positioning method and device, equipment and storage medium
By building a directed acyclic graph and labeling nodes according to weight level, the problem of poor real-time and accuracy of fault positioning in the prior art is solved, and rapid visual attribution and accurate positioning of faults is achieved.
Patent Information
- Application Number
- CN202411334171.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art has poor real-time and accuracy in fault location, and it is impossible to quickly identify the cause of the fault, especially when multi-dimensional monitoring indicator data processing in advertising media systems.
By obtaining multiple monitoring indicator data of the alarm device, grouping according to preset grouping rules, building a directed acyclic graph, labeling nodes according to weight levels, determining the fault location, and improving the real-time and accuracy of troubleshooting.
It realizes rapid visual attribution of faults, improves real-time and accuracy of troubleshooting, and can quickly locate fault locations.
Smart Images

Figure CN119271494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault location, and in particular to a fault location method, device, equipment and storage medium. Background Art
[0002] With the development of advertising business, the advertising media system generates a large number of monitoring indicators in different dimensions, and the monitoring indicators in different dimensions are managed by different monitoring products. When a system failure occurs, it is necessary to analyze the multi-dimensional monitoring indicator data to identify the cause of the failure, which puts higher requirements on the real-time and accuracy of data processing.
[0003] Current mainstream monitoring solutions differentiate different monitoring standards from different perspectives. For example, from the perspective of microservice observability, they differentiate between monitoring in multiple dimensions such as log, trace, and metric. From the perspective of technical stratification, they differentiate between monitoring in different dimensions such as infrastructure, application services, and business indicators. Therefore, when a fault occurs, it is impossible to quickly locate and accurately identify the cause of the fault, and the real-time and accuracy of fault location are poor. Summary of the invention
[0004] The embodiment of the present invention provides a fault location method to solve the problem of poor real-time performance and accuracy of fault location in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides a fault location method, including:
[0006] When an abnormal alarm is detected in an alarm device, monitoring data of multiple monitoring indicators of the alarm device are obtained; wherein the monitoring indicators include at least one of a business indicator, a performance indicator and an abnormal error indicator;
[0007] The monitoring data is grouped according to a preset grouping rule to obtain a plurality of monitoring data groups;
[0008] Constructing each of the monitoring data sets into a directed acyclic graph;
[0009] The fault location of the alarm device is obtained according to all the directed acyclic graphs.
[0010] Furthermore, the monitoring data is grouped according to a preset grouping rule to obtain a plurality of monitoring data groups, including:
[0011] Dividing the monitoring data according to business logic to obtain monitoring data of multiple business components of each category of business; wherein the business component includes at least one of a front-end component, a back-end component, a middleware component, and an infrastructure component;
[0012] The monitoring data of each category of services are aggregated according to the original data format to obtain multiple monitoring data groups.
[0013] Furthermore, after grouping the monitoring data according to a preset grouping rule to obtain a plurality of monitoring data groups, the method further includes:
[0014] A corresponding label is added to each of the monitoring data groups to distinguish the monitoring data groups.
[0015] Further, constructing each monitoring data group into a directed acyclic graph includes:
[0016] Construct a directed acyclic graph for each monitoring data group according to the topological structure; wherein the nodes of the directed acyclic graph are the business components in the monitoring data group, and the edges of the directed acyclic graph are the dependency relationships between the business components.
[0017] Furthermore, after constructing each monitoring data group into a directed acyclic graph, the method further includes:
[0018] According to a preset weight rule, assigning different levels of weights to the business components in the directed acyclic graph;
[0019] The nodes corresponding to each of the business components are marked with different colors according to the weight level; wherein the height of the weight level is proportional to the depth of the color.
[0020] Furthermore, the preset weight rule is:
[0021] The weight level of the front-end component is the first level, the weight level of the back-end component is the second level, the weight level of the middleware component is the third level, and the weight level of the infrastructure component is the fourth level; wherein the fourth level is the highest level.
[0022] Further, obtaining the fault location of the alarm device according to all the directed acyclic graphs includes:
[0023] The darkest node among all nodes with the highest weight level in the directed acyclic graph is obtained, and the service component corresponding to the node is determined as the fault location of the alarm device.
[0024] In a second aspect, an embodiment of the present invention provides a fault location device, including:
[0025] A data acquisition module, used to acquire monitoring data of multiple monitoring indicators of the alarm device when an abnormal alarm is detected in the alarm device; wherein the monitoring indicator includes at least one of a business indicator, a performance indicator and an abnormal error indicator;
[0026] A data grouping module, used for grouping the monitoring data according to a preset grouping rule to obtain a plurality of monitoring data groups;
[0027] A directed acyclic graph construction module, used for constructing each monitoring data group into a directed acyclic graph;
[0028] A fault location module is used to obtain the fault location of the alarm device according to all the directed acyclic graphs.
[0029] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0030] Memory for storing computer programs;
[0031] A processor, configured to execute the computer program;
[0032] Wherein, when the processor executes the computer program, the fault location method described in any one of the first aspects above is implemented.
[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the fault location method described in any one of the first aspects above is implemented.
[0034] Compared with the prior art, a fault location method provided by an embodiment of the present invention has the beneficial effects of: obtaining monitoring data of multiple monitoring indicators of the alarm device when an abnormal alarm is detected in the alarm device; wherein the monitoring indicators include at least one of business indicators, performance indicators and abnormal error indicators; grouping the monitoring data according to preset grouping rules to obtain multiple monitoring data groups; constructing each of the monitoring data groups into a directed acyclic graph; obtaining the fault location of the alarm device according to all the directed acyclic graphs; by constructing a directed acyclic graph, the present invention can visualize and quickly attribute the fault module, thereby improving the real-time and accuracy of fault detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical features of the embodiments of the present invention, the drawings required for use in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 It is a flow chart of an embodiment of a fault location method provided by the present invention;
[0037] Figure 2is a schematic diagram of a directed acyclic graph of an embodiment of a fault location method provided by the present invention;
[0038] Figure 3 It is a structural schematic diagram of an embodiment of a fault locating device provided by the present invention;
[0039] Figure 4 It is a structural schematic diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] In a first aspect, an embodiment of the present invention provides a fault location method, see Figure 1 , which is a flow chart of an embodiment of a fault location method provided by the present invention.
[0042] like Figure 1 As shown, the method comprises the following steps:
[0043] S1: When an abnormal alarm is detected in an alarm device, monitoring data of multiple monitoring indicators of the alarm device are obtained; wherein the monitoring indicators include at least one of a business indicator, a performance indicator and an abnormal error indicator;
[0044] S2: grouping the monitoring data according to a preset grouping rule to obtain multiple monitoring data groups;
[0045] S3: constructing each monitoring data group into a directed acyclic graph;
[0046] S4: Obtain the fault location of the alarm device according to all the directed acyclic graphs.
[0047] In a specific implementation, when an abnormal alarm is detected in an alarm device, monitoring data of different types of monitoring indicators of the alarm device are obtained, including monitoring data of business indicators, performance indicators and abnormal error indicators, and the monitoring data are divided into multiple monitoring data groups. A directed acyclic graph is constructed for the monitoring data belonging to the same monitoring data group, and the fault location of the alarm device is determined according to the directed acyclic graph.
[0048] In summary, the present invention obtains monitoring data of multiple monitoring indicators of the alarm device when an abnormal alarm is detected in the alarm device; wherein the monitoring indicators include at least one of business indicators, performance indicators and abnormal error indicators; the monitoring data are grouped according to preset grouping rules to obtain multiple monitoring data groups; each of the monitoring data groups is constructed as a directed acyclic graph; the fault location of the alarm device is obtained according to all the directed acyclic graphs; the fault module can be visualized and quickly attributed to improve the real-time and accuracy of fault detection.
[0049] In an optional implementation, the monitoring data is grouped according to a preset grouping rule to obtain a plurality of monitoring data groups, including:
[0050] Dividing the monitoring data according to business logic to obtain monitoring data of multiple business components of each category of business; wherein the business component includes at least one of a front-end component, a back-end component, a middleware component, and an infrastructure component;
[0051] The monitoring data of each category of services are aggregated according to the original data format to obtain multiple monitoring data groups.
[0052] Specifically, based on the business logic and process, the acquired monitoring data is divided into multiple groups according to business categories, and multiple business components of the same business category are divided into the same group. Business components may include at least one of front-end components, back-end components, middleware components and infrastructure components. For example, user management-related services may include front-end functions such as user registration, login, and information modification, as well as back-end services such as user data processing and authority verification, and related middleware and infrastructure support. The monitoring data of these business components belong to the same business category. The present invention divides multiple business components of the same business category into the same group, which can reduce system switching of different business components during fault location and troubleshooting, and reduce the difficulty of troubleshooting using multiple systems.
[0053] Furthermore, the monitoring data of each category of business is homogenized, that is, the monitoring data is aggregated, and the original heterogeneous data format of the monitoring data is retained during the aggregation process, so as to facilitate subsequent analysis and processing while maintaining data characteristics.
[0054] In an optional implementation, after grouping the monitoring data according to a preset grouping rule to obtain a plurality of monitoring data groups, the method further includes:
[0055] A corresponding label is added to each of the monitoring data groups to distinguish the monitoring data groups.
[0056] Specifically, in order to distinguish different monitoring data groups, a label management tool is used to add corresponding labels to each monitoring data group. Monitoring data with the same label belong to the same monitoring data group. The form and content of the label can be determined by the alarm management personnel and are not specifically limited here.
[0057] In an optional implementation, constructing each monitoring data group into a directed acyclic graph includes:
[0058] Construct a directed acyclic graph for each monitoring data group according to the topological structure; wherein the nodes of the directed acyclic graph are the business components in the monitoring data group, and the edges of the directed acyclic graph are the dependency relationships between the business components.
[0059] Specifically, the monitoring data of the same group is constructed into a directed acyclic graph according to the topological structure. The nodes of the directed acyclic graph are the business components in the monitoring data group, namely the front-end components, back-end components, middleware components and infrastructure components. The dependencies between these business components are determined. The dependencies can be direct or indirect, and the dependencies are used as the edges of the directed acyclic graph.
[0060] In an optional implementation, after constructing each monitoring data group into a directed acyclic graph, the method further includes:
[0061] According to a preset weight rule, assigning different levels of weights to the business components in the directed acyclic graph;
[0062] The nodes corresponding to each of the business components are marked with different colors according to the weight level; wherein the height of the weight level is proportional to the depth of the color.
[0063] Specifically, according to the preset weight rules, a weight level is assigned to each business component. The level can reflect the service level of the business component in the system. The deeper the service level, the higher the corresponding weight level. Corresponding colors are selected for different weight levels. The higher the weight level, the darker the corresponding color.
[0064] In an optional implementation, the preset weight rule is:
[0065] The weight level of the front-end component is the first level, the weight level of the back-end component is the second level, the weight level of the middleware component is the third level, and the weight level of the infrastructure component is the fourth level; wherein the fourth level is the highest level.
[0066] Specifically, the weight level of the front-end component is set to the first level, the weight level of the back-end component is set to the second level, the weight level of the middleware component is set to the third level, and the weight level of the infrastructure component is set to the fourth level, where the fourth level is the highest level. Exemplarily, the weights of the first level, the second level, the third level, and the fourth level can be allocated in a ratio of 1:2:3:4.
[0067] In an optional implementation manner, obtaining the fault location of the alarm device according to all the directed acyclic graphs includes:
[0068] The darkest node among all nodes with the highest weight level in the directed acyclic graph is obtained, and the service component corresponding to the node is determined as the fault location of the alarm device.
[0069] Specifically, in order to determine the fault location of the alarm device, first find all nodes with the highest weight level in the directed acyclic graph, then further select the darkest node from these nodes, and determine the service component corresponding to the selected node as the fault location of the alarm device. For example, see Figure 2 , is a directed acyclic graph of a monitoring data set, according to Figure 2 The directed acyclic graph can determine the fault location of the alarm equipment fault as a database.
[0070] In a second aspect, an embodiment of the present invention provides a fault location device, see Figure 3 , which is a structural schematic diagram of an embodiment of a fault locating device provided by the present invention.
[0071] like Figure 3 As shown, the device comprises:
[0072] The data acquisition module 21 is used to acquire monitoring data of multiple monitoring indicators of the alarm device when an abnormal alarm is detected in the alarm device; wherein the monitoring indicator includes at least one of a business indicator, a performance indicator and an abnormal error indicator;
[0073] The data grouping module 22 is used to group the monitoring data according to a preset grouping rule to obtain a plurality of monitoring data groups;
[0074] A directed acyclic graph construction module 23, used for constructing each monitoring data group into a directed acyclic graph;
[0075] The fault location module 24 is used to obtain the fault location of the alarm device according to all the directed acyclic graphs.
[0076] In an optional implementation, the data grouping module 22 is further configured to:
[0077] Dividing the monitoring data according to business logic to obtain monitoring data of multiple business components of each category of business; wherein the business component includes at least one of a front-end component, a back-end component, a middleware component, and an infrastructure component;
[0078] The monitoring data of each category of services are aggregated according to the original data format to obtain multiple monitoring data groups.
[0079] In an optional embodiment, the device further includes a label module, and the label module includes:
[0080] A corresponding label is added to each of the monitoring data groups to distinguish the monitoring data groups.
[0081] In an optional implementation, the directed acyclic graph construction module 23 is further used for:
[0082] Construct a directed acyclic graph for each monitoring data group according to the topological structure; wherein the nodes of the directed acyclic graph are the business components in the monitoring data group, and the edges of the directed acyclic graph are the dependency relationships between the business components.
[0083] In an optional implementation, the device further includes a color labeling module, and the color labeling module is used to:
[0084] According to a preset weight rule, assigning different levels of weights to the business components in the directed acyclic graph;
[0085] The nodes corresponding to each of the business components are marked with different colors according to the weight level; wherein the height of the weight level is proportional to the depth of the color.
[0086] In an optional implementation, the preset weight rule is:
[0087] The weight level of the front-end component is the first level, the weight level of the back-end component is the second level, the weight level of the middleware component is the third level, and the weight level of the infrastructure component is the fourth level; wherein the fourth level is the highest level.
[0088] In an optional implementation, the fault location module 24 is further configured to:
[0089] The darkest node among all nodes with the highest weight level in the directed acyclic graph is obtained, and the service component corresponding to the node is determined as the fault location of the alarm device.
[0090] In a third aspect, an embodiment of the present invention provides an electronic device, see Figure 4, which is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0091] like Figure 4 As shown, the device includes:
[0092] A memory 31, used for storing computer programs;
[0093] A processor 32, configured to execute the computer program;
[0094] Wherein, when the processor 32 executes the computer program, the fault location method as described in any of the above embodiments is implemented.
[0095] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0096] The processor 32 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0097] The memory 31 can be used to store the computer program and / or module, and the processor 32 realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory 31, and calling the data stored in the memory 31. The memory 31 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 31 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0098] It should be noted that the above electronic device includes, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 4 The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device, and may include more components than shown in the figure, or a combination of certain components, or different components.
[0099] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the fault location method described in any of the above embodiments is implemented.
[0100] It should be understood that the present invention can implement all or part of the processes in the above-mentioned fault location method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned fault location method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0101] The above description is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited thereto. It should be pointed out that for those skilled in the art, several equivalent obvious variations and / or equivalent substitutions can be made without departing from the technical principles of the present invention. These obvious variations and / or equivalent substitutions should also be regarded as the protection scope of the present invention.
Claims
1. A fault location method, characterized in that: include: When an abnormal alarm is detected in an alarm device, monitoring data of multiple monitoring indicators of the alarm device are obtained; wherein the monitoring indicators include at least one of a business indicator, a performance indicator and an abnormal error indicator; The monitoring data is grouped according to a preset grouping rule to obtain a plurality of monitoring data groups; Constructing each of the monitoring data sets into a directed acyclic graph; The fault location of the alarm device is obtained according to all the directed acyclic graphs.
2. The fault location method according to claim 1, characterized in that: The monitoring data is grouped according to a preset grouping rule to obtain a plurality of monitoring data groups, including: Dividing the monitoring data according to business logic to obtain monitoring data of multiple business components of each category of business; wherein the business component includes at least one of a front-end component, a back-end component, a middleware component, and an infrastructure component; The monitoring data of each category of services are aggregated according to the original data format to obtain multiple monitoring data groups.
3. The fault location method according to claim 1, characterized in that: After the monitoring data is grouped according to a preset grouping rule to obtain a plurality of monitoring data groups, the method further includes: A corresponding label is added to each of the monitoring data groups to distinguish the monitoring data groups.
4. The fault location method according to claim 1, characterized in that: The step of constructing each monitoring data group into a directed acyclic graph comprises: Construct a directed acyclic graph for each monitoring data group according to the topological structure; wherein the nodes of the directed acyclic graph are the business components in the monitoring data group, and the edges of the directed acyclic graph are the dependency relationships between the business components.
5. The fault location method according to claim 2, characterized in that: After constructing each monitoring data group into a directed acyclic graph, the method further includes: According to a preset weight rule, assigning different levels of weights to the business components in the directed acyclic graph; The nodes corresponding to each of the business components are marked with different colors according to the weight level; wherein the height of the weight level is proportional to the depth of the color.
6. The fault location method according to claim 5, characterized in that: The preset weight rule is: The weight level of the front-end component is the first level, the weight level of the back-end component is the second level, the weight level of the middleware component is the third level, and the weight level of the infrastructure component is the fourth level; wherein the fourth level is the highest level.
7. The fault location method according to claim 1, characterized in that: The obtaining the fault location of the alarm device according to all the directed acyclic graphs includes: The darkest node among all nodes of the highest weight level in the directed acyclic graph is obtained, and the service component corresponding to the node is determined as the fault location of the alarm device.
8. A fault location device, characterized in that: include: A data acquisition module, used to acquire monitoring data of multiple monitoring indicators of the alarm device when an abnormal alarm is detected in the alarm device; wherein the monitoring indicator includes at least one of a business indicator, a performance indicator and an abnormal error indicator; A data grouping module, used for grouping the monitoring data according to a preset grouping rule to obtain a plurality of monitoring data groups; A directed acyclic graph construction module, used for constructing each monitoring data group into a directed acyclic graph; A fault location module is used to obtain the fault location of the alarm device according to all the directed acyclic graphs.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program; Wherein, when the processor executes the computer program, the fault location method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the fault locating method according to any one of claims 1 to 7 is implemented.