Disclosure of Invention
In view of the foregoing, it is desirable to provide a fault detection method, apparatus, system, computer device, computer readable storage medium, and computer program product.
In a first aspect, the present application provides a fault detection method, including:
Responding to a terminal sending a fault diagnosis request, and acquiring attribute information of a target call corresponding to the fault diagnosis request;
Obtaining a matching result according to the matching relation between the attribute information and a preset fault diagnosis result table;
If the matching result is a target diagnosis result corresponding to the attribute information, feeding back the target diagnosis result to the terminal;
If the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to a packet capturing request, and capturing packets in the communication data stream of the target call which is reinitiated to obtain a packet capturing result; and the packet grabbing result is used for fault detection to obtain a target diagnosis result.
In one embodiment, before the responding to the terminal sends the fault diagnosis request and obtains the attribute information of the target call corresponding to the fault diagnosis request, the method further includes:
responding to an expansion request of a fault diagnosis result table, and acquiring information to be added; the information to be added comprises fault description information and diagnosis results corresponding to the fault description information;
determining whether the fault description information exists in the fault diagnosis result table;
If the fault description information does not exist in the fault diagnosis result table, storing the fault description information and the diagnosis result;
And if the fault description information exists in the fault diagnosis result table, refreshing the diagnosis result corresponding to the fault description information to the fault diagnosis result table.
In one embodiment, the attribute information includes a calling number, a called number, a call unique identifier, and a call time;
Obtaining a matching result according to the matching relationship between the attribute information and a preset fault diagnosis result table, wherein the matching result comprises the following steps:
Determining target fault description information of the target call in a log record according to the calling number, the called number, the call unique identifier and the call time;
and determining whether a target diagnosis result corresponding to the target fault description information exists in a fault diagnosis result table through a regular matching algorithm, and obtaining a matching result.
In one embodiment, the determining, by a regular matching algorithm, whether the target diagnosis result corresponding to the target fault description information exists in the fault diagnosis result table includes:
traversing the fault description information in the fault diagnosis result table through a regular matching algorithm, and determining whether the target fault description information exists or not;
and determining the existence of the target diagnosis result according to the existence of the target fault description information.
In one embodiment, if the matching result is that there is no target diagnosis result corresponding to the attribute information, responding to a packet capturing request, and capturing a packet in the communication data stream of the target call initiated again, to obtain a packet capturing result, including:
If the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to a packet capturing request, and judging whether the current process number exceeds a preset threshold value;
if the number of the current processes does not exceed the preset threshold, analyzing the packet capturing request according to a preset packet capturing tool and constructing a packet capturing command;
And executing the packet grabbing command, and grabbing the packet in the reinitiated target call data stream to obtain a packet grabbing result.
In one embodiment, before the responding to the terminal sends the fault diagnosis request and obtains the attribute information of the target call corresponding to the fault diagnosis request, the method further includes:
Responding to a test packet capturing request, capturing packets in a communication data stream of a test call of a pre-configured fault test scene, and responding to a terminal sending a test diagnosis request to acquire attribute information of the test call corresponding to the test diagnosis request;
detecting whether the packet capturing file exists or not and whether target fault description information corresponding to the attribute information of the test call exists or not;
under the condition that fault description information corresponding to the attribute information of the test call exists, matching is carried out in a fault diagnosis result table according to the target fault description information, so that a test diagnosis result is obtained;
And if the test diagnosis result is consistent with a preset reference diagnosis result and the packet capturing file and the target fault description information exist, determining that the fault detection method passes the test.
In a second aspect, the present application also provides a fault detection device, including:
The first acquisition module is used for responding to a terminal to send a fault diagnosis request and acquiring attribute information of a target call corresponding to the fault diagnosis request;
The first matching module is used for obtaining a matching result according to the matching relationship between the attribute information and a preset fault diagnosis result table;
the feedback module is used for feeding back the target diagnosis result to the terminal if the matching result is the target diagnosis result corresponding to the attribute information;
The packet capturing module is used for capturing packets in the communication data stream of the target call initiated again in response to the packet capturing request if the matching result is that the target diagnosis result corresponding to the attribute information does not exist, so as to obtain a packet capturing result; and the packet grabbing result is used for fault detection to obtain a target diagnosis result.
In one embodiment, the apparatus further comprises:
The second acquisition module is used for responding to the expansion request of the fault diagnosis result table and acquiring information to be added; the information to be added comprises fault description information and diagnosis results corresponding to the fault description information;
the first determining module is used for determining whether the fault description information exists in the fault diagnosis result table or not;
The storage module is used for storing the fault description information and the diagnosis result if the fault description information does not exist in the fault diagnosis result table;
And the refreshing module is used for refreshing the diagnosis result corresponding to the fault description information to the fault diagnosis result table if the fault description information exists in the fault diagnosis result table.
In one embodiment, the attribute information includes a calling number, a called number, a call unique identifier, and a call time; the first matching module is specifically configured to:
Determining target fault description information of the target call in a log record according to the calling number, the called number, the call unique identifier and the call time;
and determining whether a target diagnosis result corresponding to the target fault description information exists in a fault diagnosis result table through a regular matching algorithm, and obtaining a matching result.
In one embodiment, the first matching module is specifically configured to:
traversing the fault description information in the fault diagnosis result table through a regular matching algorithm, and determining whether the target fault description information exists or not;
and determining the existence of the target diagnosis result according to the existence of the target fault description information.
In one embodiment, the packet grabbing module is specifically configured to:
If the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to a packet capturing request, and judging whether the current process number exceeds a preset threshold value;
if the number of the current processes does not exceed the preset threshold, analyzing the packet capturing request according to a preset packet capturing tool and constructing a packet capturing command;
And executing the packet grabbing command, and grabbing the packet in the reinitiated target call data stream to obtain a packet grabbing result.
In one embodiment, the apparatus further comprises:
The test module is used for responding to a test packet grabbing request, grabbing packets in a communication data stream of a test call of a pre-configured fault test scene, responding to a terminal sending a test diagnosis request, and acquiring attribute information of the test call corresponding to the test diagnosis request;
the detection module is used for detecting whether the packet capturing file exists or not and whether target fault description information corresponding to the attribute information of the test call exists or not;
The second matching module is used for matching in a fault diagnosis result table according to the target fault description information under the condition that the fault description information corresponding to the attribute information of the test call exists, so as to obtain a test diagnosis result;
And the second determining module is used for determining that the fault detection method passes the test if the test diagnosis result is consistent with the preset reference diagnosis result and the packet capture file and the target fault description information exist.
In a third aspect, the present application also provides a fault detection device, including:
The terminal is used for initiating a fault diagnosis request and reporting attribute information of the target call;
the server is used for responding to the terminal to send a fault diagnosis request and acquiring attribute information of a target call corresponding to the fault diagnosis request; obtaining a matching result according to the matching relation between the attribute information and a preset fault diagnosis result table; if the matching result is a target diagnosis result corresponding to the attribute information, feeding back the target diagnosis result to the terminal; if the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to a packet capturing request, and capturing packets in the communication data stream of the target call which is reinitiated to obtain a packet capturing result; and the packet grabbing result is used for fault detection to obtain a target diagnosis result.
In a fourth aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
Responding to a terminal sending a fault diagnosis request, and acquiring attribute information of a target call corresponding to the fault diagnosis request;
Obtaining a matching result according to the matching relation between the attribute information and a preset fault diagnosis result table;
If the matching result is a target diagnosis result corresponding to the attribute information, feeding back the target diagnosis result to the terminal;
If the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to a packet capturing request, and capturing packets in the communication data stream of the target call which is reinitiated to obtain a packet capturing result; and the packet grabbing result is used for fault detection to obtain a target diagnosis result.
In a fifth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Responding to a terminal sending a fault diagnosis request, and acquiring attribute information of a target call corresponding to the fault diagnosis request;
Obtaining a matching result according to the matching relation between the attribute information and a preset fault diagnosis result table;
If the matching result is a target diagnosis result corresponding to the attribute information, feeding back the target diagnosis result to the terminal;
If the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to a packet capturing request, and capturing packets in the communication data stream of the target call which is reinitiated to obtain a packet capturing result; and the packet grabbing result is used for fault detection to obtain a target diagnosis result.
In a sixth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
Responding to a terminal sending a fault diagnosis request, and acquiring attribute information of a target call corresponding to the fault diagnosis request;
Obtaining a matching result according to the matching relation between the attribute information and a preset fault diagnosis result table;
If the matching result is a target diagnosis result corresponding to the attribute information, feeding back the target diagnosis result to the terminal;
If the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to a packet capturing request, and capturing packets in the communication data stream of the target call which is reinitiated to obtain a packet capturing result; and the packet grabbing result is used for fault detection to obtain a target diagnosis result.
According to the fault detection method, the device, the system, the computer equipment, the storage medium and the computer program product, the attribute information sent by the terminal is obtained in response to the fault diagnosis request of the terminal, the target diagnosis result of the target call is matched in the fault diagnosis result table through the attribute information, when the target diagnosis result corresponding to the attribute information exists in the fault diagnosis result table, the target diagnosis result is fed back to the terminal, so that the operation and maintenance personnel can be prevented from manually checking when arriving at the site, and the timeliness of fault diagnosis is improved; when the target diagnosis result corresponding to the attribute information does not exist in the fault diagnosis result table, responding to a packet grabbing request of the terminal, grabbing packets in the communication data stream of the re-initiated target call, and repeating the problem at the first time to obtain a packet grabbing result of the sporadic problem site, wherein the seat personnel autonomously performs fault detection of the voice network communication by using the terminal, so that the fault detection of the voice network communication and the timeliness of the packet grabbing are improved, and further the fault detection accuracy of the voice network communication is improved.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The fault detection method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 responds to the terminal 102 to send a fault diagnosis request, and the server 104 acquires attribute information of a target call corresponding to the fault diagnosis request; the server 104 obtains a matching result according to the matching relation between the attribute information and a preset fault diagnosis result table; if the matching result is a target diagnosis result corresponding to the existence attribute information, the server 104 feeds back the target diagnosis result to the terminal 102; if the matching result is a target diagnosis result corresponding to the non-existence attribute information, the server 104 responds to the packet capturing request to capture packets in the communication data stream of the re-initiated target call, and a packet capturing result is obtained; the packet grabbing result is used for fault detection, and a target diagnosis result is obtained. The terminal 102 may be, but not limited to, various personal computers, notebook computers, and tablet computers, and the server 104 may be an nmginx server (an engine x server, a high-performance HTTP and reverse proxy web server), which may be implemented by a separate server or a server cluster formed by a plurality of servers.
In an exemplary embodiment, as shown in fig. 2, a fault detection method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps 202 to 208.
Wherein:
step 202, responding to a terminal sending a fault diagnosis request, and acquiring attribute information of a target call corresponding to the fault diagnosis request.
In the embodiment of the application, as shown in fig. 1, in a daily call task of an agent, the agent initiates an http call request through an agent interface, the http call request is sent to a voice gateway through middleware, freeswitch (a telephone switching platform) and an operating system of a terminal, and sent to a called device through a large network at a PSTN (Public Switched Telephone Network ) side, and the called device returns a response to complete the call task. Before the attendant performs the call tasks, freeswitch-based call center servers, including the call platform floor, middleware layer, and upper business layer (i.e., seat management), need to be created and services started.
The terminal is used by the seat personnel and comprises a seat interface for inputting attribute information of a call, and initiating a packet grabbing request and a diagnosis request. The agent personnel can execute the call task through the agent interface, and in the process of executing the daily call task by the agent personnel, if the condition of call failure occurs, the agent personnel inputs the attribute information of the target call through the agent interface of the terminal and clicks the diagnosis button of the agent interface, and a fault diagnosis request and the attribute information of the target call corresponding to the fault diagnosis request are sent to the server, wherein the target call is the call task with the call failure.
After receiving the fault diagnosis request, the server responds to the fault diagnosis request, acquires the attribute information of the target call corresponding to the fault aiming at the request, and carries out subsequent fault detection according to the attribute information of the target call.
In an alternative embodiment, a "diagnosis" button and a "capture package" button in the agent interface of the terminal are both associated with RESTful api (REpresentational STATE TRANSFER Application Programming Interface, presentation layer transition application interface) of the server, the "diagnosis" button is used to send a diagnosis request to the server, and the "capture package" button is used to prompt the agent to perform a capture package operation and send a capture package request to the server.
And 204, obtaining a matching result according to the matching relation between the attribute information and the preset fault diagnosis result table.
In the embodiment of the application, the default fault diagnosis result table is stored in the server, and the server can obtain the diagnosis result according to the matching relation between the attribute information and the fault diagnosis result table.
The server determines a target fault diagnosis result corresponding to the target attribute information in the corresponding relation between each attribute information and the fault diagnosis result contained in the preset fault diagnosis result table, specifically, the server performs index value matching in the fault diagnosis result table through the received attribute information of the target call as an index to obtain a matching result between the attribute information and the fault diagnosis result, and the matching result represents whether the target diagnosis result corresponding to the attribute information exists in the fault diagnosis result table.
The fault result table may be a hash table, and the attribute information and the diagnosis result corresponding to the attribute information are stored through the hash table. The diagnostic result (value) in the fault diagnostic result table may store description information of the diagnostic result corresponding to the attribute information, and at this time, the matching relationship between the attribute information included in the fault diagnostic result table and the diagnostic result may be one-to-one correspondence. Alternatively, the diagnostic results in the fault result table may be stored in a linked list, tree or other data structure at the location, and the matching relationship between the attribute information and the diagnostic results may be one-to-many.
In an optional embodiment, if the matching result is that the target diagnosis result corresponding to the attribute information exists in the fault diagnosis result table, the server may further obtain the target diagnosis result corresponding to the attribute information.
Step 206. And if the matching result is the target diagnosis result corresponding to the existence attribute information, feeding back the target diagnosis result to the terminal.
In the embodiment of the application, if the matching result is the target diagnosis result corresponding to the presence attribute information, the reason of the call failure currently encountered by the seat personnel is described as being in the fault diagnosis result table, and the server returns the reason of the call failure, namely the target diagnosis result corresponding to the attribute information of the target call in the fault diagnosis result table to the seat interface of the terminal.
And step 208, if the matching result is that the target diagnosis result corresponding to the attribute information does not exist, responding to the packet capturing request, and capturing the packet in the communication data stream of the re-initiated target call to obtain the packet capturing result.
The packet grabbing result is used for fault detection, and a target diagnosis result is obtained.
In the embodiment of the application, if the matching result is the target diagnosis result corresponding to the non-existence attribute information, the server cannot obtain the diagnosis result of the current target call only through the fault diagnosis table, namely, an effective call failure reason cannot be returned to the terminal. At the moment, the seat personnel can click a 'packet grabbing' button in the seat interface and reinitiate the target call, and click a 'packet grabbing' button after the call is overtime to finish packet grabbing.
And the server responds to the packet capturing request of the terminal, executes the packet capturing task in the communication data stream of the re-initiated target call, obtains a packet capturing result, and stores the packet capturing result in a file form. The developer can determine the target diagnosis result of the target call according to the packet capturing result. Specifically, the server captures network data packets in the communication data stream according to a configured packet capturing tool, where the packet capturing tool may be tcpdump (a packet capturing tool), and the configuration of the packet capturing tool includes configuration filtering rules, for example, specific IP addresses, ports, protocols, and other network data packets meeting the conditions, where the data packets may include RTP (Real-time Transport Protocol ) data streams, SIP (Session initialization Protocol, session initiation protocol messages) and SDP (Session Description Protocol, session description information), RTCP (Real-time ControlProtocol, real-time transport control protocol) messages, network layer and transport layer data, and the like.
In an alternative embodiment, a server needs to be created to run the backend service before the fault diagnosis method is applied. Taking an nmginx server as an example for illustration, the creation of the nmginx server includes downloading, compiling and installing an nmginx source code, and configuring and starting the nmginx, for example, configuring an Nginx. Conf file, including an html file proxy directory, a logs log directory, and a sbin binary file directory, and placing user. Html (seat interface) and admin. Html (administrator interface) under the html proxy file path of the previous step, and configuring the listening ports 80 and 8089 respectively. And finally testing the Nginx server, and determining that the Nginx server is successfully created when the seat interface can be displayed by accessing the public network IP and the manager interface can be displayed by accessing the public network IP 8089.
In the fault diagnosis method, the attribute information sent by the terminal is obtained in response to the fault diagnosis request of the terminal, the target diagnosis result of the target call is matched in the fault diagnosis result table through the attribute information, and when the target diagnosis result corresponding to the attribute information exists in the fault diagnosis result table, the target diagnosis result is fed back to the terminal, so that the operation and maintenance personnel can be prevented from manually checking when arriving at the site, and the timeliness of fault diagnosis is improved; when the target diagnosis result corresponding to the attribute information does not exist in the fault diagnosis result table, responding to a packet grabbing request of the terminal, grabbing packets in the communication data stream of the re-initiated target call, and repeating the problem at the first time to obtain a packet grabbing result of the sporadic problem site, wherein the seat personnel autonomously performs fault detection of the voice network communication by using the terminal, so that the fault detection of the voice network communication and the timeliness of the packet grabbing are improved, and further the fault detection accuracy of the voice network communication is improved.
In an exemplary embodiment, as shown in fig. 3, steps 302 to 306 are further included before step 202. Wherein:
And 302, responding to an expansion request of a fault diagnosis result table, and acquiring information to be added.
The information to be added comprises fault description information and diagnosis results corresponding to the fault description information.
In the embodiment of the present application, as shown in the following table 1, the fault diagnosis result table includes common fault description information, that is, keys, and each fault description information includes a corresponding diagnosis result, that is, a key value corresponding to a key, and optionally, the fault diagnosis result table may be a hash table. The terminal further includes an administrator interface, as shown in fig. 4, where the administrator interface is configured to invoke an administrator API to obtain freeswitch a configuration directory, a public network IP network card name and extension, update fault description information and a diagnosis result in a fault diagnosis result table, and set freeswitch relevant parameters of the call platform.
TABLE 1
Step 304, determining whether fault description information exists in the fault diagnosis result table.
In the embodiment of the application, the server determines whether the fault description information in the information to be added exists in a fault diagnosis result table stored in the server through an OS shell (command program), specifically, the server determines whether the same key as the information to be added exists in the fault diagnosis result table through the matching of the key in the information to be added in the key in the fault diagnosis result table.
And 306, if the fault description information does not exist in the fault diagnosis result table, storing the fault description information and the diagnosis result.
In the embodiment of the application, if the fault description information in the information to be added does not exist in the fault diagnosis result table stored in the server, that is, the server does not retrieve the fault description information in the information to be added in the fault diagnosis result table, the server stores the fault description information and the diagnosis result in the fault diagnosis result table in a supplementary manner, so that the expansion of the fault diagnosis result table is realized.
Step 308, if the fault description information exists in the fault diagnosis result table, refreshing the diagnosis result corresponding to the fault description information to the fault diagnosis result table.
In the embodiment of the application, if the fault description information in the information to be added exists in the fault diagnosis result table stored in the server, that is, the server retrieves the same field as the fault description information in the information to be added in the fault diagnosis result table, the server updates the diagnosis result in the information to be added to the diagnosis result corresponding to the field.
In this embodiment, the information to be added is saved or updated to the fault diagnosis result table through the expansion request of the fault diagnosis result table, so that the fault description information in the fault diagnosis result table can be enriched, the use scenario of the fault diagnosis method is further expanded, and the effectiveness of the fault diagnosis method can be improved.
In one exemplary embodiment, the attribute information includes a calling number, a called number, a call unique identifier, and a call time; as shown in fig. 5, step 204 includes steps 502 through 504. Wherein:
step 502, determining the target fault description information of the target call in the log record according to the calling number, the called number, the call unique identifier and the call time.
In the embodiment of the application, the agent personnel reports the attribute information through the agent interface, as shown in fig. 6, wherein the attribute information comprises a calling number, a called number, a date and time (i.e. calling time) and a uuid (i.e. calling unique identifier).
When the seat personnel uses the terminal to carry out the call task, the relevant information description of each call task is stored in the server to form a log record. After receiving the attribute information of the target call, the server filters in the log record according to the calling number, the called number, the unique calling identifier and the calling time to obtain target fault description information corresponding to the attribute information of the target call.
Step 504, determining whether a target diagnosis result corresponding to the target fault description information exists in the fault diagnosis result table through a regular matching algorithm, and obtaining a matching result.
In the embodiment of the application, an administrator API in a server performs matching of the key in the information to be added in the key of the fault diagnosis result table through a regular matching algorithm, namely, judges whether the key matched with the information to be added exists in the fault diagnosis result table, further determines whether a target diagnosis result corresponding to target fault description information exists in the fault diagnosis result table, and obtains a target diagnosis result corresponding to the target fault description information exists in the fault diagnosis result table or a target diagnosis result corresponding to the target fault description information does not exist in the fault diagnosis result table.
In this embodiment, accuracy target fault description information is determined in the log record through the calling number, the called number, the unique calling identifier and the calling time, and a matching result of the target call and the target diagnosis result is determined according to the target fault description information, so that whether to grasp a packet can be determined according to the matching result, the fault diagnosis is adapted to more scenes, and the accuracy of the fault diagnosis is improved.
In an exemplary embodiment, as shown in FIG. 7, step 504 includes steps 702 through 704.
Wherein:
step 702, traversing the fault description information in the fault diagnosis result table through a regular matching algorithm, and determining whether target fault description information exists.
In the embodiment of the application, a server traverses the total fault description information in a fault diagnosis result table according to a regular matching algorithm, determines whether target fault description information exists in the total fault description information, specifically, the server matches the key in the fault diagnosis result table through the key in the log record of the target call, and determines whether the target fault description information exists according to whether the key which is the same as the target call exists in the fault diagnosis result table.
Step 704, determining the existence of the target diagnosis result according to the existence of the target fault description information.
In the embodiment of the application, since the fault description information in the fault diagnosis result table is correlated with the diagnosis result, the server only needs to determine whether the fault description information corresponding to the target fault description information exists in the fault diagnosis result table, namely, determine whether the key corresponding to the target call in the log record exists in the fault diagnosis result table, and then the existence condition of the target diagnosis result can be obtained.
In this embodiment, the existence condition of the target diagnosis result is determined according to the existence condition of the target fault description information, so that the efficiency of judging the target diagnosis result by the server can be improved, and the efficiency of fault detection is further improved.
In an exemplary embodiment, as shown in FIG. 8, step 208 includes steps 802 through 806.
Wherein:
Step 802, if the matching result is that there is no target diagnosis result corresponding to the attribute information, responding to the packet capturing request, and judging whether the current process number exceeds a preset threshold.
In the embodiment of the application, when the matching result is that the target diagnosis result corresponding to the implementation information does not exist, the seat interface cannot display the target diagnosis result of the target call, and at the moment, the seat personnel can click the 'packet grabbing' button to initiate a packet grabbing request.
The server responds to the packet grabbing request, and firstly judges whether the current process number of the packet grabbing tool exceeds a preset threshold value.
Step 804, if the number of current processes does not exceed the preset threshold, analyzing the packet capturing request according to the preset packet capturing tool and constructing a packet capturing command.
The preset bale plucker may be tcpdump.
In the embodiment of the application, under the condition that the current process number of tcpdump does not exceed the preset threshold, the server calls a tcpdump command to analyze a packet grabbing request and constructs a packet grabbing command, for example, according to a data packet source IP address, a data packet destination IP address and a network segment IP address to be grabbed obtained by analysis.
And step 806, executing a packet grabbing command, and grabbing the packet in the reinitiated target call data stream to obtain a packet grabbing result.
In the embodiment of the application, the server executes the packet capturing command through the OS shell command, captures a packet in the target call data stream re-initiated by the seat personnel, obtains a packet capturing result, and stores the packet capturing result in a file form, for example, the stored packet capturing file name can be a calling uuid.
In this embodiment, when the matching result is a target diagnosis result corresponding to the absence of attribute information, the packet capturing command is executed to reproduce the fault problem of the target call, so as to obtain the on-site packet capturing result, improve the timeliness of capturing the packet, and perform fault detection through the on-site packet capturing result, so that the fault detection accuracy of voice network communication can be improved.
In an exemplary embodiment, the fault detection method may need to be tested before it is applied, as shown in fig. 9, and steps 902 to 908 may be further included before step 202. Wherein:
And step 902, responding to a test packet capturing request, capturing packets in a communication data stream of a test call of a pre-configured fault test scene, responding to a terminal sending a test diagnosis request, and acquiring attribute information of the test call corresponding to the seat interface test diagnosis request.
In the embodiment of the application, the pre-configured fault test scene can be a normal call scene and a call failure scene caused by different reasons, for example, the call failure scene can be a scene that the called equipment is set to be in a flight mode or is powered off, the called equipment is not answered after being called, the wrong called number is set to carry out outbound, and the called equipment refuses to answer and disconnect a voice gateway after being called.
The seat personnel clicks a 'packet grabbing' button to initiate a packet grabbing request, outbound is carried out according to a pre-configured fault test scene, after the display fails, the 'packet grabbing ending' button is clicked, the attribute information of the test call is input, and a test diagnosis request is initiated.
The method comprises the steps that a server responds to a test packet grabbing request to grab packets in a communication data stream of a test call of a pre-configured fault test scene, and the server responds to a terminal to send a test diagnosis request to acquire attribute information of the test call corresponding to the test diagnosis request.
Step 904, detecting whether a packet capturing file exists or not, and whether target fault description information corresponding to the attribute information of the test call exists or not.
In the embodiment of the application, the server detects whether the packet capturing file and the target fault description information are successfully stored in the server according to the storage path of the target fault description information filtered out from the log information and the storage path of the packet capturing file in the diagnosis set by the administrator interface.
Step 906, under the condition that the fault description information corresponding to the attribute information of the test call exists, matching is performed in a fault diagnosis result table according to the target fault description information, and a test diagnosis result is obtained.
In the embodiment of the application, the server performs target fault description information matching on the test call in the fault diagnosis result table to obtain the diagnosis result in the fault diagnosis result table as the test diagnosis result.
Step 908, if the test diagnosis result is consistent with the preset reference diagnosis result and the packet capturing file and the target fault description information exist, determining that the fault detection method passes the test.
In the embodiment of the application, if the test diagnosis result is consistent with the preset reference diagnosis result and the target fault description information exists, the fact that the preset reference diagnosis result can be correctly displayed on the seat interface of the terminal is indicated, and in the server of the embodiment, the data processing test of the target diagnosis result is determined to pass according to the fault diagnosis result table; if the server has a packet capturing file, it is explained that the server of the embodiment can implement a packet capturing command. Therefore, when the test diagnosis result is consistent with the preset reference diagnosis result and the packet capturing file and the target fault description information exist, the fault detection method is determined to pass the test.
In contrast, if the test diagnosis result is consistent with the preset reference diagnosis result, the packet capturing file and the target fault description information are abnormal, the fault detection method is determined to be failed in test, and further debugging is needed to be carried out on the fault detection method.
In this embodiment, the fault detection method is tested through a pre-configured fault test scenario, so that an abnormal function of the fault detection method can be determined when the test fails, and the validity of the fault detection method is ensured and the accuracy of the fault detection method in application is improved through the test of the fault detection method.
In an exemplary embodiment, as shown in fig. 10, a fault detection system is provided, where a terminal is configured to initiate a fault diagnosis request and report attribute information of a target call;
The server is used for responding to the terminal to send a fault diagnosis request and acquiring attribute information of a target call corresponding to the fault diagnosis request; obtaining a matching result according to the matching relation between the attribute information and a preset fault diagnosis result table; if the matching result is a target diagnosis result corresponding to the existence attribute information, feeding back the target diagnosis result to the terminal; if the matching result is a target diagnosis result corresponding to the non-existence attribute information, responding to a packet capturing request, and capturing a packet in the communication data stream of the re-initiated target call to obtain a packet capturing result; the packet grabbing result is used for fault detection, and a target diagnosis result is obtained.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a fault detection device for realizing the fault detection method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the fault detection device provided below may refer to the limitation of the fault detection method hereinabove, and will not be repeated herein.
In one exemplary embodiment, as shown in fig. 11, there is provided a fault detection apparatus 1100 comprising: a first obtaining module 1101, a first matching module 1002, a feedback module 1003, and a packet grabbing module 1104, wherein:
The first obtaining module 1101 is configured to obtain attribute information of a target call corresponding to a fault diagnosis request in response to the terminal sending the fault diagnosis request;
The first matching module 1102 is configured to obtain a matching result according to a matching relationship between the attribute information and a preset fault diagnosis result table;
the feedback module 1103 is configured to feed back the target diagnosis result to the terminal if the matching result is the target diagnosis result corresponding to the presence attribute information;
The packet capturing module 1104 is configured to respond to the packet capturing request if the matching result is a target diagnosis result corresponding to the absence of the attribute information, and capture a packet in the communication data stream of the re-initiated target call, so as to obtain a packet capturing result; the packet grabbing result is used for fault detection, and a target diagnosis result is obtained.
In one embodiment, the apparatus 1100 further comprises:
The second acquisition module is used for responding to the expansion request of the fault diagnosis result table and acquiring information to be added; the information to be added comprises fault description information and diagnosis results corresponding to the fault description information;
the first determining module is used for determining whether fault description information exists in the fault diagnosis result table or not;
The storage module is used for storing the fault description information and the diagnosis result if the fault description information does not exist in the fault diagnosis result table;
And the refreshing module is used for refreshing the diagnosis result corresponding to the fault description information to the fault diagnosis result table if the fault description information exists in the fault diagnosis result table.
In one embodiment, the attribute information includes a calling number, a called number, a call unique identifier, and a call time; the first matching module 1102 is specifically configured to:
determining target fault description information of a target call in a log record according to the calling number, the called number, the unique calling identifier and the calling time;
and determining whether a target diagnosis result corresponding to the target fault description information exists in the fault diagnosis result table through a regular matching algorithm, and obtaining a matching result.
In one embodiment, the first matching module 1102 is specifically configured to:
Traversing the fault description information in the fault diagnosis result table through a regular matching algorithm, and determining whether target fault description information exists or not;
and determining the existence of the target diagnosis result according to the existence of the target fault description information.
In one embodiment, the bale plucker module 1104 is specifically configured to:
if the matching result is a target diagnosis result corresponding to the non-existence attribute information, responding to the packet capturing request, and judging whether the current process quantity exceeds a preset threshold value;
if the number of the current processes does not exceed the preset threshold, analyzing a packet grabbing request according to a preset packet grabbing tool and constructing a packet grabbing command;
executing the packet grabbing command, and grabbing the packet in the reinitiated target call data stream to obtain a packet grabbing result.
In one embodiment, the apparatus 1100 further comprises:
The test module is used for responding to the test packet grabbing request, grabbing packets in a communication data stream of a test call of a pre-configured fault test scene, responding to the terminal sending a test diagnosis request, and acquiring attribute information of the test call corresponding to the test diagnosis request;
The detection module is used for detecting whether a packet capturing file exists or not and whether target fault description information corresponding to the attribute information of the test call exists or not;
the second matching module is used for matching in a fault diagnosis result table according to the target fault description information under the condition that the fault description information corresponding to the attribute information of the test call exists, so as to obtain a test diagnosis result;
And the second determining module is used for determining that the fault detection method passes the test if the test diagnosis result is consistent with the preset reference diagnosis result and the packet capturing file and the target fault description information exist.
The respective modules in the above-described fault detection device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 12. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing a fault diagnosis result table. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a fault detection method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor performing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.