CN115529229A - Fault positioning method, device and equipment - Google Patents

Fault positioning method, device and equipment Download PDF

Info

Publication number
CN115529229A
CN115529229A CN202211399642.4A CN202211399642A CN115529229A CN 115529229 A CN115529229 A CN 115529229A CN 202211399642 A CN202211399642 A CN 202211399642A CN 115529229 A CN115529229 A CN 115529229A
Authority
CN
China
Prior art keywords
fault
interface
modules
module
interfaces
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211399642.4A
Other languages
Chinese (zh)
Inventor
罗晓峰
姜帆
林发全
李鲲杨
李博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211399642.4A priority Critical patent/CN115529229A/en
Publication of CN115529229A publication Critical patent/CN115529229A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The method, the device and the equipment for fault location provided by the embodiment of the application comprise the following steps: obtaining a relation map of a plurality of systems, wherein the system comprises a plurality of modules and interfaces provided by the modules, and the relation map comprises the interfaces provided by the modules in the systems, the interfaces called by the modules, the functions possessed by the modules and the dependency relationship among the interfaces; determining M fault modules and N fault interfaces in a plurality of systems, wherein M and N are integers which are greater than or equal to 0; and determining source fault nodes in a plurality of systems according to the relationship graph, the M fault modules and the N fault interfaces, wherein the source fault nodes comprise source fault modules and/or source fault interfaces. The efficiency of locating the trouble is improved.

Description

Fault positioning method, device and equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a fault positioning method, device and equipment.
Background
The system is directed to any Internet Technology (IT) system network cluster, which may include a plurality of systems, and the plurality of systems may perform business processing through correlation and cooperation. In the process of performing service processing, if one of the systems fails, normal operation of the associated systems may be affected, thereby causing abnormal service processing.
In the related art, a relational database can be used to record system information corresponding to each system, wherein the system information includes a plurality of modules included in each system, a plurality of interfaces provided by each module to the outside, and a plurality of interfaces called by each module; generating a corresponding relation data table of each system according to the system information; and acquiring the incidence relation among the systems according to the relation data table among the systems, and performing fault positioning analysis on the system with the fault based on the incidence relation. In the above process, since each system may have a multilayer association relationship, when performing fault location analysis on a faulty system based on the multilayer association relationship, it is necessary to obtain relationship data tables corresponding to multiple systems and it is not possible to directly see the association relationship among the multiple systems, which results in low efficiency of locating faults.
Disclosure of Invention
The embodiment of the application provides a fault positioning method, a fault positioning device and fault positioning equipment, which can be used for quickly positioning a source fault node based on traversal of a plurality of system relationship maps which are constructed in advance, so that the efficiency of positioning a fault is improved.
In a first aspect, an embodiment of the present application provides a fault location method, where the method includes:
obtaining a relationship map of a plurality of systems, wherein the system comprises a plurality of modules and interfaces provided by the modules, and the relationship map comprises the interfaces provided by the modules in the systems, the interfaces called by the modules, the functions possessed by the modules and the dependency relationship among the interfaces;
determining M fault modules and N fault interfaces in a plurality of systems, wherein M and N are integers which are greater than or equal to 0;
determining source fault nodes in the plurality of systems according to the relationship graph, the M fault modules and the N fault interfaces, wherein the source fault nodes comprise source fault modules and/or source fault interfaces.
In one possible embodiment, determining a source failure node in the plurality of systems according to the relationship graph, the M failure modules, and the N failure interfaces includes:
determining a result set according to the relation map and the M fault modules;
determining an interface set according to the relationship map, the M fault modules and the N fault interfaces, wherein the interface set comprises at least one fault interface;
and updating the interface set and the result set according to the relation graph until the interface set is empty, and determining the module or the interface in the result set as the source fault node.
In one possible implementation, determining a result set according to the relationship graph and the M failure modules includes:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if it is determined according to the relationship map that the ith fault function does not call an interface provided by other modules, or the fault of the ith fault function is caused by the module where the ith fault function is located, adding the module where the ith fault function is located to the result set;
wherein, the i is sequentially selected from 1, 2, 3, \8230, 8230, and K until the result set is obtained.
In one possible embodiment, determining an interface set according to the relationship map, the M failure modules, and the N failure interfaces includes:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if the interface provided by other modules is determined to be called by the ith fault function according to the relationship map, adding the interface in the fault state called by the ith fault function to the interface set;
wherein, the i is sequentially selected from 1, 2, 3, 8230, 8230and K until the interface set is obtained.
In a possible implementation manner, updating the interface set and the result set according to the relationship graph until the interface set is empty, and determining a module or an interface in the result set as the source failure node includes:
acquiring an ith interface from the interface set, deleting the ith interface from the interface set, and updating the result set or the interface set according to the relation map;
and determining a module or an interface in the module set as the source fault node until the interface set is empty, wherein i is 1, 2, 3, \8230;, and the module or the interface in the module set is determined as the source fault node.
In a possible embodiment, updating the result set or the interface set according to the relationship graph includes:
if the ith interface is determined not to depend on interfaces provided by other modules according to the relation map, or the fault of the ith interface is caused by the module where the ith interface is located, adding the ith interface and the module where the ith interface is located to the result set;
and if the i interface is determined to depend on the interface to be selected provided by other modules according to the relation map, if the interface to be selected is in a fault state, adding the interface to be selected to the interface set.
In one possible embodiment, obtaining a relationship map for a plurality of systems includes:
if the relation map exists in a preset storage space, acquiring the relation map in the preset storage space;
if the relationship map does not exist in the preset storage space, acquiring system information of each system in a plurality of systems, calling information among the systems and a dependency relationship among interfaces, and generating the relationship map according to the system information, the calling information and the dependency relationship, wherein the system information comprises: module information of modules in the system, interface information of interfaces corresponding to the modules and function information of each module; the calling information includes information of the interface called by each module.
In a second aspect, an embodiment of the present application provides a fault location apparatus, which includes an obtaining module and a determining module, where,
the acquisition module is used for acquiring a relationship map of a plurality of systems, the systems comprise a plurality of modules and interfaces provided by the modules, and the relationship map comprises the interfaces provided by the modules in the systems, the interfaces called by the modules, the functions of the modules and the dependency relationship among the interfaces;
the determining module is used for determining M fault modules and N fault interfaces in a plurality of systems, wherein M and N are integers which are greater than or equal to 0;
the determining module is further configured to determine a source fault node in the plurality of systems according to the relationship graph, the M fault modules, and the N fault interfaces, where the source fault node includes a source fault module and/or a source fault interface.
In a possible implementation, the determining module is specifically configured to:
determining a result set according to the relation map and the M fault modules;
determining an interface set according to the relationship map, the M fault modules and the N fault interfaces, wherein the interface set comprises at least one fault interface;
and updating the interface set and the result set according to the relation graph until the interface set is empty, and determining a module or an interface in the result set as the source fault node.
In a possible implementation, the determining module is specifically configured to:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if it is determined according to the relationship map that the ith fault function does not call an interface provided by other modules, or the fault of the ith fault function is caused by the module where the ith fault function is located, adding the module where the ith fault function is located to the result set;
wherein, the i is sequentially selected from 1, 2, 3, 8230, 8230and K until the result set is obtained.
In a possible implementation manner, the determining module is specifically further configured to:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if the interface provided by other modules is determined to be called by the ith fault function according to the relationship map, adding the interface in the fault state called by the ith fault function to the interface set;
wherein, the i is sequentially selected from 1, 2, 3, 8230, 8230and K until the interface set is obtained.
In a possible implementation manner, the determining module is specifically further configured to:
acquiring an ith interface from the interface set, deleting the ith interface from the interface set, and updating the result set or the interface set according to the relation map;
and determining a module or an interface in the module set as the source fault node until the interface set is empty, wherein i is 1, 2, 3, \8230;, and the module or the interface in the module set is determined as the source fault node.
In a possible implementation manner, the determining module is specifically further configured to:
if the ith interface is determined not to depend on interfaces provided by other modules according to the relation map, or the fault of the ith interface is caused by the module where the ith interface is located, adding the ith interface and the module where the ith interface is located to the result set;
and if the i interface is determined to depend on the interface to be selected provided by other modules according to the relation map, if the interface to be selected is in a fault state, adding the interface to be selected to the interface set.
In a possible implementation manner, the obtaining module is specifically configured to:
if the relation map exists in a preset storage space, acquiring the relation map in the preset storage space;
if the relationship graph does not exist in the preset storage space, obtaining system information of each system in a plurality of systems, calling information among the plurality of systems and a dependency relationship among interfaces, and generating the relationship graph according to the plurality of system information, the calling information and the dependency relationship, wherein the system information comprises: module information of modules in the system, interface information of interfaces corresponding to the modules and function information of each module; the calling information includes information of the interface called by each module.
In a third aspect, an embodiment of the present application provides a fault location device, including: a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory to implement the method according to any of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the method of any one of the first aspect when the computer-executable instructions are executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of the first aspect.
According to the fault positioning method, the fault positioning device and the fault positioning equipment, the relation maps of a plurality of systems can be obtained; and determining M faulty modules and N faulty interfaces in the plurality of systems; and determining source fault nodes in a plurality of systems according to the relationship graph, the M fault modules and the N fault interfaces. In the process, the source fault node can be quickly positioned according to the M fault modules, the N fault interfaces and the traversal of the relationship maps of the plurality of pre-constructed systems, so that the efficiency of positioning the fault is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a fault location method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a method for obtaining a relationship graph according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a relationship graph provided in an embodiment of the present application;
fig. 5 is a schematic flowchart of another fault location method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a fault location device according to an embodiment of the present application;
fig. 7 is a schematic hardware structure diagram of a fault location device according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of example in the drawings and will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. Referring to fig. 1, the fault location device 101 is included, a determination module and a preset storage space are arranged in the fault location device 101, and a relationship map is stored in the preset storage space.
The fault locating device 101 may be configured to obtain system fault information and determine a source fault node according to the system fault information. The specific treatment process is as follows: the fault locating device 101 may first obtain system fault information through a determining device, and determine a plurality of fault modules and a plurality of fault interfaces in a plurality of systems according to the system fault information; and determining source fault nodes in a plurality of systems according to the relation maps in the preset storage space, the plurality of fault modules and the plurality of fault interfaces.
In the related art, a relational database can be used to record system information corresponding to each system, wherein the system information includes a plurality of modules included in each system, a plurality of interfaces externally provided by each module, and a plurality of interfaces called by each module; generating a corresponding relation data table of each system according to the system information; and acquiring the incidence relation among the systems according to the relation data table among the systems, and performing fault positioning analysis on the system with the fault based on the incidence relation. In the above process, each system may have a multilayer association relationship, and when performing fault location analysis on a faulty system based on the multilayer association relationship, it is necessary to obtain relationship data tables corresponding to multiple systems and it is not possible to directly see the association relationships among the multiple systems, which results in low efficiency in locating faults.
In the embodiment of the application, M fault modules and N fault interfaces can be determined in a plurality of systems according to a plurality of pieces of system fault information, and a source fault node can be quickly positioned according to the M fault modules and the N fault interfaces and based on traversal of a pre-constructed relationship graph of the plurality of systems, so that the efficiency of positioning faults is improved.
The method described in the present application will be described below with reference to specific examples. It should be noted that the following embodiments may exist alone or in combination with each other, and the description of the same or similar contents is not repeated in different embodiments.
Fig. 2 is a schematic flow chart of a fault location method according to an embodiment of the present disclosure. Referring to fig. 2, the method may include:
s201, obtaining relationship maps of a plurality of systems.
The execution main body of the embodiment of the application can be fault positioning equipment and also can be a fault positioning device arranged in the fault positioning equipment. The fault locating device can be realized by software, and also can be realized by the combination of software and hardware.
The system may include a plurality of modules and interfaces provided by the modules, and the relationship map includes the interfaces provided by the modules in the system, the interfaces called by the modules, the functions provided by the modules, and the dependencies between the interfaces.
The interface is a service which is opened to the outside by the module and can be called by other modules. One module can correspond to a plurality of interfaces, and the interfaces are mutually independent and respectively provide services for the outside. The interface may be real-time, quasi-real-time, non-real-time. For example, the online interface may be a real-time or near real-time interface.
One module may have a plurality of functions, for example, for the service management system module, it may have a user login function and various service management functions.
If the interface A needs to depend on the interface B when in use, the user can realize a certain function, which indicates that a dependency relationship exists between the interface A and the interface B, and the dependency relationship can be expressed as (interface A) - [ dependency ] - > (interface B).
It should be noted that, in the embodiment shown in fig. 3, a process of obtaining the relationship maps of a plurality of systems is described in detail.
S202, determining M fault modules and N fault interfaces in a plurality of systems.
Wherein M and N are integers greater than or equal to 0.
For any one module X, the module X may provide multiple interfaces, and the module may have multiple functions. And if any function of the module X fails or any interface fails, determining the module X as a failed module. For example, when the server of the module 1 goes down to cause the system to be unable to continue working and thus unable to implement a certain function, the module 1 is determined as a failed module. Optionally, if the module 1 is a faulty module and the module ID corresponding to the module 1 is 001, the faulty module may be represented as: (X: module 1{ Module ID:001 }).
For any interface Y, if the response time length of the interface Y to the service request exceeds the agreed threshold value or the returned data format is wrong in the using process, the interface Y is determined as a fault interface. Optionally, IF the interface 1 is a faulty interface and the interface ID corresponding to the interface 1 is IF001, the faulty interface may be represented as: (Y: interface 1{ interface ID: IF001 }).
Optionally, the fault module and the fault interface may be determined as follows: acquiring a plurality of pieces of system fault information, wherein the system fault information can comprise time when a fault occurs, a fault object and a fault reason, and the fault object can comprise a fault module and/or a fault interface; and determining M fault modules and N fault interfaces in the plurality of systems according to the plurality of pieces of system fault information.
And S203, determining source fault nodes in a plurality of systems according to the relation map, the M fault modules and the N fault interfaces.
The source failure node includes a source failure module and/or a source failure interface.
Optionally, the source failure node may be determined by: determining a result set according to the relation map and the M fault modules; determining an interface set according to the relationship map, the M fault modules and the N fault interfaces, wherein the interface set comprises at least one fault interface; and updating the interface set and the result set according to the relation graph until the interface set is empty, and determining the module or the interface in the result set as a source fault node.
The fault positioning method provided by the embodiment of the application can be realized by acquiring the relationship maps of a plurality of systems; determining M fault modules and N fault interfaces in a plurality of systems according to system fault information; and determining a source fault module in a plurality of systems according to the relationship map, the M fault modules and the N fault interfaces. In the process, the system fault information of the fault module can be acquired, and the source fault module can be quickly positioned on the basis of traversing the relationship maps of a plurality of pre-constructed systems, so that the efficiency of positioning the fault module is improved.
Fig. 3 is a schematic diagram of a method for obtaining a relationship graph according to an embodiment of the present application. Referring to fig. 3, the method may include:
s301, judging whether a relation map exists in a preset storage space.
If yes, executing S302;
if not, executing S303-S306.
S302, obtaining a relation map in a preset storage space.
Optionally, the preset storage space may be a database, and the database storing the relationship map in the present application may be selected according to an actual situation, which is not limited herein.
S303, system information of each system in the plurality of systems is obtained.
The system information may include: module information of modules in the system, interface information of interfaces corresponding to the modules, and function information of each module. Alternatively, the system information for each of the plurality of systems may be obtained from source data of the IT system network, which may be relational database data, text data, or other types of data.
Module information may include module identification number (ID), module name, and other descriptive information, among others. The following illustrates the module information in conjunction with table 1:
TABLE 1
Module ID Module name Other illustrative information
001 Core transaction system module Transaction function of various accounts
002 Online transaction system module Online transaction function
123 Credit management system module Credit flow management and control function
The interface information may include an interface ID, an affiliated module ID, an interface name, and other explanatory messages. The interface information will be described below by way of example with reference to table 2.
TABLE 2
Interface ID The module ID of the module Interface name Other illustrative information
IF001 001 Query interface Querying accounts
IF002 002 Transfer interface Transfer transactions
There is a provisioning relationship between the modules and the interfaces. Module a may provide interface B externally for other modules to call, that is, a provides B, and this providing relationship may be represented as (module a) - [ provide ] - > (interface B).
For example, referring to table 2, for the module 001, it may provide the interface IF001 to the outside to implement the function of querying the account, that is, the module 001 provides the interface IF001, which may be expressed as (module 001) - [ provide ] - > (interface IF 001).
The function information may include a function ID, an affiliated module ID, a function name, and other explanatory messages. The function information will be described below by way of example with reference to table 3.
TABLE 3
Function ID The module ID of the module Function name Other illustrative information
F001 001 File downloading function Downloading personal files
F002 002 Login function User login
There is an ownership relationship between the modules and the functions. Module a may possess function B, i.e., module a possesses function B, and such an ownership relationship may be expressed as (module a) - [ owned ] - > (function B).
For example, referring to table 3, regarding the module 001, it can have the function F001, that is, the module 001 has the function F001, which is represented as (module 001) - [ own ] - > (function F001).
S304, obtaining calling information among a plurality of systems.
The call information may include information of the interface called by each module. The call information can be reflected by the function information of the function provided in each module and the interface information used by the function.
If interface C is needed when function B is implemented, it indicates that there is a correspondence between function B and interface C, and this correspondence may be referred to as a consumption relationship. Namely, function B consumes interface C, denoted as (function B) - [ consume ] - > (interface C).
The consumption relationship between the function and the plurality of interfaces consumed by the function can be determined by acquiring the consumption relationship information corresponding to any function. Alternatively, the consumption relationship information may include a function ID, a function consumed interface ID, and other explanatory information.
For example, the consumption relationship information may be shown in the following table:
TABLE 4
Function ID Function consumption interface ID Other illustrative information
F001 IF003 Is free of
F002 IF004 Is free of
F003 IF003 Is free of
Referring to table 4, for example, for function F001, it needs to use interface IF003 when it is implemented, that is, function F001 consumes interface IF003, which can be expressed as (function F001) - [ consume ] - > (interface IF 003).
S305, obtaining the dependency relationship among the interfaces.
The dependency relationship between the interface and the plurality of interfaces on which the interface depends can be determined by acquiring the dependency relationship information corresponding to any interface. Optionally, the dependency information may include the interface ID, the interface ID relied upon, and other declarative information.
For example, the dependency information may be as shown in the following table:
TABLE 5
Interface ID Dependent interface ID Other illustrative information
IF001 IF003 Is free of
IF002 IF004 Is free of
Referring to table 5, for example, for interface IF001, which needs to depend on interface IF003 when in use, the query function can be realized by that interface IF001 depends on interface IF003, which can be expressed as (interface IF 001) - [ dependent ] - > (interface IF 003).
S305, generating a relation graph according to the system information, the calling information and the dependency relation.
The relationship graph may include a plurality of systems, interfaces provided by the modules in the systems, interfaces called by the modules, functions provided by the modules, and dependencies between the interfaces.
The generated relational map will be described below with reference to fig. 4.
Fig. 4 is a schematic diagram of a relationship map provided in an embodiment of the present application. Referring to fig. 4, the relationship map includes 2 systems, system 1 and system 2.
The system 1 includes 2 modules, module 001 and module 002. Module 001 may provide interface IF001, and module 1 has function F001; module 002 may provide interface IF002 and module 2 may have function F002. System 2 includes 2 modules, module 003 and module 004, respectively. Module 002 can provide interface IF003, and module 1 has function F003; module 004 may provide interface IF004 and module 2 is provided with function F004.
In the relationship graph shown in fig. 4, each module may be represented as a module node, each interface may be represented as an interface node, and each function may be represented as a function node. These nodes can be used to represent and store entity data, and each node should have a unique identification attribute. For example, a module node may be used to represent and store module information corresponding to the module, and the identity of the module node may be a module ID corresponding to the module.
Referring to fig. 4, the module node and the interface node, the module node and the function node, the function node and the interface node, and the different interface nodes may be connected by a connection line having a direction. In the relationship graph, each connecting line with a direction may represent a directed edge, and the directed edge may be used to represent a providing relationship between the module node and the interface node, an owning relationship between the module node and the function node, a consuming relationship between the function node and the interface node, and a dependent relationship between the interface node and the interface node. For example, the module 001 points to the directed edge of the interface IF001, which may be used to represent the provisioning relationship between the module 001 and the interface IF 001; this directed edge, where module 001 points to function F001, may be used to represent the ownership between module 001 and function F001; function F001 points to this directed edge of interface IF003, which can be used to represent the consumption relationship between function F001 and interface IF 003; interface IF001 points to this directed edge of interface IF003 may be used to represent the dependency between interface IF001 and interface IF 003.
And S306, storing the generated relation map into a preset storage space.
The method for obtaining the relationship graph provided by the embodiment of the application can generate the relationship graph according to the system information, the calling information and the dependency relationship among the interfaces by obtaining the system information of each system in the systems, the calling information among the systems and the dependency relationship among the interfaces. Through the relationship map, the corresponding relationship among the system, the functions, the modules and the interfaces and the association relationship among the module nodes and the interface nodes can be clearly seen, so that the follow-up tracking and positioning of a plurality of fault nodes with association relationship are facilitated.
Next, a fault location method provided in the embodiment of the present application is described in detail with reference to fig. 5.
Fig. 5 is a schematic flowchart of another fault location method according to an embodiment of the present application. Referring to fig. 5, the method may include:
s501, determining M fault modules and N fault interfaces in a plurality of systems.
Wherein M and N are integers greater than or equal to 0.
It should be noted that the execution process of S501 may refer to the execution process of S202, and is not described herein again.
And S502, determining K fault functions in the M fault modules.
Wherein K is an integer greater than or equal to 1.
Alternatively, one failure module may correspond to one or more failure functions. For any fault module X, the set of fault functions corresponding to the fault module X can be represented as { Y } i | fault module X- [ holds]->Function Y i And function Y i Fault }, where Y is i For any fault function corresponding to the fault module X, i is 1, 2, 3, \8230;, K in sequence.
S503, if it is determined that the ith fault function does not call the interface provided by other modules according to the relationship map, or the fault of the ith fault function is caused by the module where the ith fault function is located, adding the module where the ith fault function is located to the result set.
The result set may include a failed module and a failed interface.
Optionally, before executing step S503, the relationship map needs to be acquired in the preset storage space, and a specific execution process of acquiring the relationship map is executed with reference to the steps in the embodiment of fig. 3.
If it is determined that the ith fault function does not call an interface provided by another module according to the relationship map, the module in which the ith fault function is located may be determined as a fault module and added to the result set. For example, referring to the relationship graph shown in fig. 4, assuming that the function F003 is a failure function, since the function F003 does not call the interfaces provided by other modules, the module 003 in which the function F003 is located may be determined as a failure module and added to the result set.
If the fault of the ith fault function is caused by the module where the ith fault function is located, the module where the ith fault function is located may be determined as a fault module and added to the result set. For example, referring to the relationship graph shown in fig. 4, assuming that function F001 fails due to module 001 failing, module 001 may be determined as the failed module and added to the result set.
Optionally, step S503 may be repeatedly performed, i sequentially takes 1, 2, 3, 8230, and K, until a result set is obtained.
S504, if the interface provided by the other module called by the ith fault function is determined according to the relation map, the interface in the fault state called by the ith fault function is added to the interface set.
The interface set includes at least one failed interface.
For example, referring to the relationship diagram shown in fig. 4, assuming that function F002 is a failed function, function F002 has a consuming relationship with interface IF004, indicating that function F002 needs to call interface IF004 provided by module 004 when implemented, then interface IF004 can be added to the interface set when interface IF004 is in a failed state.
Optionally, step S504 may be repeatedly executed, i sequentially takes 1, 2, 3, \8230;, K, until an interface set is obtained.
And S505, acquiring the ith interface from the interface set, and deleting the ith interface from the interface set.
Optionally, after the interface set is obtained, the ith interface in the interface combination may be selected as the current interface, an interface node corresponding to the ith interface is found in the relationship graph, the relationship graph is sequentially traversed by the interface node, and the ith interface is deleted from the interface set.
After the ith interface is obtained, the result set and the interface set may be updated according to the relationship map, and the specific implementation manner is referred to in S506 to S507.
S506, if the i-th interface is determined not to depend on the interfaces provided by other modules according to the relation map, or if the fault of the i-th interface is caused by the module where the i-th interface is located, adding the i-th interface and the module where the i-th interface is located to the result set.
If the ith interface is determined not to depend on the interfaces provided by other modules according to the relationship map, the ith interface can be determined as a fault interface, the module where the ith interface is located is determined as a fault module, and the modules where the ith interface and the ith interface are located are added to the result set. For example, referring to the relationship diagram shown in fig. 4, assuming that the ith interface is interface IF003, since interface IF003 is independent of the interfaces provided by other modules, interface IF003 can be identified as a faulty interface, module 003 in which interface IF003 is located can be identified as a faulty module, and interface IF003 and module 003 can be added to the result set.
If the fault of the ith interface is caused by the module where the ith interface is located, the ith interface may be determined as a faulty interface, the module where the ith interface is located may be determined as a faulty module, and the modules where the ith interface and the ith interface are located may be added to the result set. For example, referring to the relationship graph shown in fig. 4, assuming that interface IF001 fails due to module 001 failing, interface IF001 may be determined to be a failed interface, module 001 may be determined to be a failed module, and interface IF001 and module 001 may be added to the result set.
And S507, if the i-th interface is determined to depend on the interface to be selected provided by other modules according to the relation map, if the interface to be selected is in a fault state, adding the interface to be selected to the interface set.
And if the interface to be selected is not in a fault state, returning to reselect the next interface of the ith interface in the interface set, repeatedly executing the steps S505 to S507, and sequentially selecting 1, 2, 3, 8230, and determining the module or the interface in the module set as a source fault node until the interface set is empty.
For example, referring to the relationship graph shown in fig. 4, assuming that the ith interface is interface IF001, and there is a dependency relationship between interface IF001 and interface IF003 provided by module 003, then interface IF003 can be regarded as the interface to be selected; judging whether interface IF003 is in a fault state, IF interface IF003 is in the fault state, indicating that interface IF003 is a fault interface, and adding interface IF003 to an interface set; IF the interface IF003 is not in the fault state, returning to reselect the next interface of the ith interface in the interface set, repeatedly executing the steps S505 to S507, and determining the modules or the interfaces in the module set as source fault nodes until the interface set is empty, wherein i sequentially selects 1, 2, 3, \8230, and determining the modules or the interfaces in the module set as source fault nodes.
According to the fault positioning method provided by the embodiment of the application, M fault modules and N fault interfaces can be determined in a plurality of systems according to a plurality of pieces of system fault information, and a source fault node can be quickly positioned according to the M fault modules and the N fault interfaces and based on traversal of the relationship maps of the plurality of systems which are constructed in advance, so that the efficiency of positioning faults is improved.
Fig. 6 is a schematic structural diagram of a fault location device according to an embodiment of the present application. Referring to fig. 6, the fault location device 10 includes an obtaining module 11 and a determining module 12, wherein,
the obtaining module 11 is configured to obtain a relationship map of a plurality of systems, where the system includes a plurality of modules and interfaces provided by the modules, and the relationship map includes the interfaces provided by the modules in the systems, the interfaces called by the modules, functions possessed by the modules, and dependency relationships between the interfaces;
the determining module 12 is configured to determine M fault modules and N fault interfaces in a plurality of systems, where M and N are integers greater than or equal to 0;
the determining module 12 is further configured to determine a source fault node in the multiple systems according to the relationship graph, the M fault modules, and the N fault interfaces, where the source fault node includes a source fault module and/or a source fault interface.
The fault location device provided in the embodiment of the present application may implement the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects are similar, which are not described herein again.
Optionally, the determining module 12 is specifically configured to:
determining a result set according to the relation map and the M fault modules;
determining an interface set according to the relationship map, the M fault modules and the N fault interfaces, wherein the interface set comprises at least one fault interface;
and updating the interface set and the result set according to the relation graph until the interface set is empty, and determining a module or an interface in the result set as the source fault node.
Optionally, the determining module 12 is specifically configured to:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if it is determined according to the relationship map that the ith fault function does not call an interface provided by other modules, or the fault of the ith fault function is caused by the module where the ith fault function is located, adding the module where the ith fault function is located to the result set;
wherein, the i is sequentially selected from 1, 2, 3, 8230, 8230and K until the result set is obtained.
Optionally, the determining module 12 is further specifically configured to:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if the interface provided by other modules is determined to be called by the ith fault function according to the relationship map, adding the interface in the fault state called by the ith fault function to the interface set;
wherein, the i is sequentially selected from 1, 2, 3, 8230, 8230and K until the interface set is obtained.
Optionally, the determining module 12 is further specifically configured to:
acquiring an ith interface in the interface set, deleting the ith interface in the interface set, and updating the result set or the interface set according to the relation map;
and determining a module or an interface in the module set as the source fault node until the interface set is empty, wherein i is 1, 2, 3, \8230;, and the module or the interface in the module set is determined as the source fault node.
Optionally, the determining module 12 is further specifically configured to:
if the ith interface is determined not to depend on interfaces provided by other modules according to the relation map, or the fault of the ith interface is caused by the module where the ith interface is located, adding the ith interface and the module where the ith interface is located to the result set;
and if the i interface is determined to depend on the interface to be selected provided by other modules according to the relation map, if the interface to be selected is in a fault state, adding the interface to be selected to the interface set.
Optionally, the obtaining module 11 is specifically configured to:
if the relation map exists in a preset storage space, acquiring the relation map in the preset storage space;
if the relationship map does not exist in the preset storage space, acquiring system information of each system in a plurality of systems, calling information among the systems and a dependency relationship among interfaces, and generating the relationship map according to the system information, the calling information and the dependency relationship, wherein the system information comprises: module information of modules in the system, interface information of interfaces corresponding to the modules and function information of each module; the calling information includes information of the interface called by each module.
Fig. 7 is a schematic hardware structure diagram of a fault location device according to an embodiment of the present application. Referring to fig. 7, the fault locating device 20 may include a processor 21 and a memory 22. Wherein the processor 21 and the memory 22 may be in communication; illustratively, the processor 21 and the memory 22 communicate via a communication bus 23.
The memory 22 is used for storing computer execution instructions;
the processor 21 is configured to execute the computer-executable instructions stored in the memory 22, so that the processor 21 executes the fault location method as shown in the above-mentioned method embodiments.
Optionally, fault locating device 20 may also include a communication interface, which may include a transmitter and/or a receiver.
Optionally, the Processor may be a Central Processing Unit (CPU), or may be another general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
The embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, the computer-readable storage medium is used to implement the fault location method described in the foregoing method embodiment.
An embodiment of the present application provides a computer program product, which includes instructions that, when executed, cause a computer to execute the above fault location method.
All or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable memory. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (magnetic tape), floppy disk (flexible disk), optical disk (optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for convenience of description and distinction and are not intended to limit the scope of the embodiments of the present application.
In this application, the terms "include," "includes," and variations thereof may refer to non-limiting inclusions; the term "or" and variations thereof may mean "and/or". The terms "first," "second," and the like in this application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. In the present application, "a plurality" means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.

Claims (10)

1. A method of fault location, comprising:
obtaining a relationship map of a plurality of systems, wherein the system comprises a plurality of modules and interfaces provided by the modules, and the relationship map comprises the interfaces provided by the modules in the systems, the interfaces called by the modules, the functions possessed by the modules and the dependency relationship among the interfaces;
determining M fault modules and N fault interfaces in a plurality of systems, wherein M and N are integers which are greater than or equal to 0;
and determining source fault nodes in the plurality of systems according to the relationship graph, the M fault modules and the N fault interfaces, wherein the source fault nodes comprise source fault modules and/or source fault interfaces.
2. The method of claim 1, wherein determining a source failure node in the plurality of systems according to the relationship graph, the M failure modules, and the N failure interfaces comprises:
determining a result set according to the relation map and the M fault modules;
determining an interface set according to the relationship map, the M fault modules and the N fault interfaces, wherein the interface set comprises at least one fault interface;
and updating the interface set and the result set according to the relation graph until the interface set is empty, and determining a module or an interface in the result set as the source fault node.
3. The method of claim 2, wherein determining a result set from the relationship graph and the M failure modules comprises:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if it is determined according to the relationship map that the ith fault function does not call interfaces provided by other modules, or the fault of the ith fault function is caused by the module where the ith fault function is located, adding the module where the ith fault function is located to the result set;
wherein, the i is sequentially selected from 1, 2, 3, \8230, 8230, and K until the result set is obtained.
4. The method according to claim 2 or 3, wherein determining an interface set according to the relationship graph, the M failure modules and the N failure interfaces comprises:
determining K fault functions in the M fault modules, wherein K is an integer greater than or equal to 1;
if the interface provided by other modules is determined to be called by the ith fault function according to the relationship map, adding the interface in the fault state called by the ith fault function to the interface set;
and (3) sequentially selecting 1, 2, 3, \8230;, and K until the interface set is obtained.
5. The method according to any one of claims 2 to 4, wherein updating the interface set and the result set according to the relationship graph until the interface set is empty, and determining a module or an interface in the result set as the source failure node comprises:
acquiring an ith interface in the interface set, deleting the ith interface in the interface set, and updating the result set or the interface set according to the relation map;
and determining the modules or the interfaces in the module set as the source fault nodes until the interface set is empty, wherein i is 1, 2, 3, \8230:.
6. The method of claim 5, wherein updating the result set or the interface set according to the relationship graph comprises:
if the ith interface is determined not to depend on interfaces provided by other modules according to the relation map, or the fault of the ith interface is caused by the module where the ith interface is located, adding the ith interface and the module where the ith interface is located to the result set;
and if the i-th interface is determined to depend on the interface to be selected provided by other modules according to the relation map, if the interface to be selected is in a fault state, adding the interface to be selected to the interface set.
7. The method according to any one of claims 1-6, wherein obtaining a relationship map for a plurality of systems comprises:
if the relation map exists in a preset storage space, acquiring the relation map in the preset storage space;
if the relationship map does not exist in the preset storage space, acquiring system information of each system in a plurality of systems, calling information among the systems and a dependency relationship among interfaces, and generating the relationship map according to the system information, the calling information and the dependency relationship, wherein the system information comprises: module information of modules in the system, interface information of interfaces corresponding to the modules and function information of each module; the calling information includes information of the interface called by each module.
8. A fault locating device, characterized in that the device comprises: an acquisition module and a determination module, wherein,
the obtaining module is used for obtaining a relationship map of a plurality of systems, the systems comprise a plurality of modules and interfaces provided by the modules, and the relationship map comprises the interfaces provided by the modules in the systems, the interfaces called by the modules, functions possessed by the modules and dependency relations among the interfaces;
the determining module is used for determining M fault modules and N fault interfaces in a plurality of systems, wherein M and N are integers which are greater than or equal to 0;
the determining module is further configured to determine a source fault node in the plurality of systems according to the relationship graph, the M fault modules, and the N fault interfaces, where the source fault node includes a source fault module and/or a source fault interface.
9. A fault locating device, comprising: a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, perform the method of any one of claims 1 to 7.
CN202211399642.4A 2022-11-09 2022-11-09 Fault positioning method, device and equipment Pending CN115529229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211399642.4A CN115529229A (en) 2022-11-09 2022-11-09 Fault positioning method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211399642.4A CN115529229A (en) 2022-11-09 2022-11-09 Fault positioning method, device and equipment

Publications (1)

Publication Number Publication Date
CN115529229A true CN115529229A (en) 2022-12-27

Family

ID=84705275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211399642.4A Pending CN115529229A (en) 2022-11-09 2022-11-09 Fault positioning method, device and equipment

Country Status (1)

Country Link
CN (1) CN115529229A (en)

Similar Documents

Publication Publication Date Title
CN109617646B (en) Message conversion method and device, computer equipment and computer readable storage medium
CN109840837B (en) Financial data processing method and device, computer readable medium and electronic equipment
CN110135590B (en) Information processing method, information processing apparatus, information processing medium, and electronic device
CN110751458B (en) Business approval method, device and system
CN114691658A (en) Data backtracking method and device, electronic equipment and storage medium
US20150317336A1 (en) Data reconstruction
CN111666344A (en) Heterogeneous data synchronization method and device
CN113360210A (en) Data reconciliation method and device, computer equipment and storage medium
CN115529229A (en) Fault positioning method, device and equipment
CN110930253A (en) Intelligent contract internal main key generation method and device, computer equipment and storage medium
CN115858668A (en) Distributed transaction processing method, device, electronic device and storage medium
CN114518848A (en) Hierarchical storage system, and method, apparatus, device, and medium for processing storage data
CN116166737A (en) Resource topological graph generation method and device, electronic equipment and readable storage medium
CN112527473A (en) Distributed transaction processing method and device
CN113691403A (en) Topological node configuration method, related device and computer program product
CN111429125A (en) Account management method and device, storage medium and electronic equipment
CN106775854B (en) Method and device for generating configuration file
CN111882430B (en) Intelligent scheduling method and device for banking system
CN108763247B (en) Method and device for processing user request in data migration process
CN114327293B (en) Data reading method, device, equipment and storage medium
CN110825606B (en) Data operation method, device and central station system
CN111752951B (en) Database table processing method and device
CN114615169A (en) Path monitoring method, device and computer readable storage medium
KR102110483B1 (en) Apparatus and method for data processing
CN115567478A (en) Mail generating and sending method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination