Fault detection method, device, platform, equipment and medium
By entering configuration information in the video surveillance networking system, automatically detecting the registration and authentication status of the monitoring equipment and streaming operation, the problem of low access troubleshooting of monitoring equipment in the video surveillance networking system is solved, and automated fault detection is realized, improving Troubleshooting efficiency and reduce the professional requirements of operation and maintenance personnel.
Patent Information
- Application Number
- CN202310797220.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-06-30
AI Technical Summary
During the access process of monitoring equipment, existing video surveillance networking systems often fail to display the video screen normally due to various reasons, and rely on operation and maintenance personnel to manually check inefficient and professional capabilities, making it difficult to quickly resolve faults.
By entering configuration information on the terminal device, including the log file path of the signaling service and the media stream network address of the monitoring device to be connected to the network, the registration and authentication status of the monitoring device and the streaming operation are automatically detected, the target instruction is generated and sent to the signaling Service, obtain data packets between the monitoring device and the streaming media service, and determine the cause of the failure.
It realizes automated fault detection, improves troubleshooting efficiency, reduces the requirements for the professional capabilities of operation and maintenance personnel, and reduces the dependence on human troubleshooting.
Smart Images

Figure CN119232877A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of monitoring, and in particular to a fault detection method, device, platform, equipment and medium. Background Art
[0002] The use of video surveillance networking systems (such as the GB28181 platform) can achieve convenient management of surveillance equipment, real-time viewing, and video playback. The surveillance equipment can be connected to the GB28181 platform through configuration, but during the connection process, the video surveillance screen often cannot be displayed normally due to various reasons. In related technologies, it is usually necessary to rely on the experience of operation and maintenance personnel to check the possible causes of the failure one by one, but this method is both inefficient and requires high professional ability of operation and maintenance personnel. Summary of the invention
[0003] The present invention provides a fault detection method, device, platform, equipment and medium to solve the deficiencies in the related art.
[0004] According to a first aspect of an embodiment of the present invention, a fault detection method is provided, which is applied to a video surveillance networking system, wherein the video surveillance networking system includes a signaling server and a streaming media server, and the video surveillance networking system is connected to a monitoring device to be networked and a terminal device, respectively, and the method includes:
[0005] Determine configuration information based on the user's input operation on the terminal device, the configuration information including the log file path of the signaling service and the network address information of the media stream of the monitoring device to be connected to the network;
[0006] Determine the registration and authentication status of the monitoring device to be connected to the network according to the log file pointed to by the log file path;
[0007] In the case where the registration authentication is successful, a target instruction for acquiring the media stream of the monitoring device to be connected to the network is generated based on the network address information, and the target instruction is sent to the signaling service, so that the signaling service forwards the target instruction to the monitoring device to be connected to the network;
[0008] The data packets between the monitoring device to be connected to the network and the streaming media service are obtained, and it is determined whether the monitoring device to be connected to the network performs a streaming operation according to the acquisition result.
[0009] In some embodiments, determining the registration authentication status of the to-be-networked monitoring device according to the log file pointed to by the log file path includes:
[0010] Searching for a first keyword in the log file pointed to by the log file path, and if the first keyword is not found, determining that the monitoring device to be connected to the network has not been registered and authenticated, the first keyword being used to characterize unauthorized response information sent by the signaling service;
[0011] If the first keyword is searched, searching the log file for a second keyword, where the second keyword is used to characterize the registration request received by the signaling service;
[0012] If the second keyword is not searched, it is determined that the registration and authentication of the monitoring device to be connected to the network has failed. If the second keyword is searched, it is determined that the registration and authentication of the monitoring device to be connected to the network has succeeded.
[0013] In some embodiments, the network address information includes a video real-time preview address;
[0014] The generating, based on the network address information, a target instruction for acquiring the media stream of the monitoring device to be networked comprises:
[0015] Using a specified instruction to call the video real-time preview address, generating a preview instruction for previewing the media stream of the monitoring device to be connected to the network;
[0016] After sending the target instruction to the signaling service, the method further includes:
[0017] Searching for a third keyword in the log file of the signaling service, where the third keyword is used to indicate that the signaling service receives response information of the monitoring device to be connected to the network to the preview instruction;
[0018] The response result of the monitoring device to be connected to the network to the preview instruction is determined according to the search result.
[0019] In some embodiments, the network address information includes a video playback address;
[0020] The target instruction of simulating obtaining the media stream of the monitoring device to be networked based on the network address information includes:
[0021] The video playback address is called by a specified instruction to generate a video playback instruction for acquiring the media stream of the monitoring device to be connected to the network;
[0022] After sending the target instruction to the signaling service, the method further includes:
[0023] Searching for a fourth keyword in the log file of the signaling service, where the fourth keyword is used to indicate that the signaling service receives response information of the monitoring device to be networked to the video playback instruction;
[0024] The response result of the monitoring device to be connected to the network to the video playback instruction is determined according to the search result.
[0025] In some embodiments, the configuration information further includes a service name of the signaling service and a service name of the streaming media service, and the method further includes:
[0026] Acquire process information that matches the service name of the signaling service to determine the startup state of the signaling service; acquire process information that matches the service name of the streaming media service to determine the startup state of the streaming media service.
[0027] In some embodiments, the configuration information further includes a port number opened by the signaling service, and the method further includes:
[0028] Detect the open state of the port corresponding to the port number in the signaling service.
[0029] In some embodiments, the terminal device has a display screen, and the method further includes:
[0030] Send prompt information to the terminal device so that the terminal device displays the prompt information on the display screen, wherein the prompt information is used to indicate the fault detection result.
[0031] According to a second aspect of an embodiment of the present invention, a fault detection device is provided, which is applied to a video surveillance networking system, wherein the video surveillance networking system includes a signaling server and a streaming media server, and the video surveillance networking system is connected to a monitoring device to be networked and a terminal device, respectively, and the device includes:
[0032] An acquisition unit, configured to determine configuration information based on an input operation of a user on the terminal device, the configuration information including a log file path of a signaling service and network address information of a media stream of the monitoring device to be connected to the network;
[0033] A detection unit, used to determine the registration authentication status of the monitoring device to be connected to the network according to the log file pointed to by the log file path;
[0034] A simulation unit, configured to generate a target instruction for acquiring a media stream of the monitoring device to be connected to the network based on the network address information when the registration and authentication is successful, and send the target instruction to the signaling service so that the signaling service forwards the target instruction to the monitoring device to be connected to the network;
[0035] The detection unit is further used to obtain data packets between the monitoring device to be connected to the network and the streaming media service, and determine whether the monitoring device to be connected to the network performs a streaming operation based on the acquisition result.
[0036] According to a third aspect of an embodiment of the present invention, a fault detection platform is provided, the platform comprising a video surveillance networking system, a monitoring device to be networked and a terminal device, the video surveillance networking system comprising a signaling server and a streaming media server;
[0037] The terminal device receives configuration information input by a user, wherein the configuration information includes a log file path of the signaling service and network address information for obtaining a media stream of the monitoring device to be connected to the network;
[0038] The video surveillance networking system determines the registration authentication status of the monitoring device to be networked according to the log file pointed to by the log file path;
[0039] When the registration and authentication is successful, the video surveillance networking system generates a target instruction for acquiring the media stream of the monitoring device to be networked based on the network address information, and sends the target instruction to the signaling service, so that the signaling service forwards the target instruction to the monitoring device to be networked;
[0040] The video surveillance networking system obtains data packets between the monitoring device to be networked and the streaming media service, and determines whether the monitoring device to be networked performs a streaming operation according to the acquisition result.
[0041] According to a fourth aspect of an embodiment of the present invention, there is provided a computing device, including:
[0042] processor;
[0043] a memory for storing processor-executable instructions;
[0044] The processor implements any of the above methods by running the executable instructions.
[0045] According to a fifth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, any of the methods described above is implemented.
[0046] According to the above embodiments, the present invention determines the log file path of the signaling service and the network address information of the media stream of the monitoring device to be networked based on the input operation of the user on the terminal device; determines the registration and authentication status of the monitoring device to be networked according to the log file pointed to by the log file path; in the case of successful registration and authentication, generates a target instruction for obtaining the media stream of the monitoring device to be networked based on the network address information, and sends the target instruction to the signaling service, so that the signaling service forwards the target instruction to the monitoring device to be networked, obtains the data packet between the monitoring device to be networked and the streaming media service, and determines whether the monitoring device to be networked performs the streaming operation according to the acquisition result. The present invention can automatically troubleshoot the fault factors after the user inputs the configuration information. Compared with the related technology that relies on manual troubleshooting by operation and maintenance personnel, it can improve work efficiency and reduce the requirements for operation and maintenance personnel.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] Figure 1 The diagram is a schematic diagram of the architecture of a monitoring device connected to a video monitoring network system according to an embodiment of the present invention.
[0050] Figure 2 The diagram is a schematic diagram showing the interaction between the fault detection service and other devices according to an embodiment of the present invention.
[0051] Figure 3 FIG. 4 is a flow chart of a fault detection method according to an embodiment of the present invention.
[0052] Figure 4 This is an example flow chart of a fault detection method provided by an embodiment of the present invention.
[0053] Figure 5 It is a schematic diagram of a fault detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0055] The present invention is applied to a video monitoring networking system, which comprises a signaling server implementing a SIP (Session Initiation Protocol) protocol and a streaming media server responsible for processing a media stream. Figure 1 FIG. 1 is a schematic diagram of an architecture of a monitoring device connected to a video monitoring network system according to an embodiment of the present invention. Figure 1 As shown, the video surveillance networking system is connected to the monitoring device and the Web terminal respectively. The monitoring device refers to a device that supports the national standard protocol. For example, the monitoring device may include a network video recorder (NVR) and an IP camera (IP Camera, IPC).
[0056] The signaling service provided by the signaling server is a proxy for communication between monitoring devices and Web terminals in the network. The signaling service has a fixed IP address or domain name. After the monitoring device is registered with the signaling server, the administrator can manage the monitoring device by sending instructions to the signaling server.
[0057] The streaming service provided by the streaming server is a proxy for video transmission. The streaming service receives the media stream sent by the monitoring device and forwards it to the Web terminal. The monitoring device can send the media stream to the streaming server through the RTP protocol. The monitoring video connected to the streaming server can be distributed through multiple protocols (such as RTMP, RTP, HLS, HTTP) for video preview and integration into other business systems.
[0058] By configuring the following parameters, you can connect the monitoring device to the video monitoring network system: enable a specific protocol (such as the GB28181 protocol), enter the signaling server's ID, domain name, address, port, and the SIP user's authentication ID and password, etc.
[0059] After the monitoring device is connected to the video monitoring network system, it interacts with the signaling server through the SIP protocol. After authorization, the video receiver Web terminal sends instructions to the monitoring device. After receiving the instructions, the monitoring device pushes the audio and video data to the streaming media server according to the instructions. After the streaming media server encodes and decodes the data, it is sent to the video receiver Web terminal. In other words, since the monitoring device can include multiple network cameras, the Web terminal user can issue a video viewing instruction for the specified network camera. The instruction is sent to the network hard disk recorder through the signaling server. After receiving the instruction, the network hard disk recorder pushes the video stream of the specified network camera to the streaming media server. The streaming media server encodes and decodes the video stream and pushes it to the Web terminal user to complete the real-time video playback.
[0060] When monitoring equipment is connected to a video monitoring network system, the video monitoring screen often cannot be displayed normally due to various reasons, such as the network camera does not enable support for the national standard GB / T28181, the address and port of the signaling server are not correctly configured, and the network firewall where the monitoring equipment is located causes the port to be blocked. In the related technology, the factors that may cause the video monitoring screen to not be displayed normally are checked one by one based on the experience of the operation and maintenance personnel. This method is not only inefficient but also requires high professional ability of the operation and maintenance personnel. For example, when the video monitoring network system is a GB28181 platform, the operation and maintenance personnel need to have professional knowledge of the GB28181 platform when performing fault detection.
[0061] In view of this, the present invention provides a fault detection method applied to a video surveillance networking system, in which the fault detection process is implemented through program code, for example, it can be implemented by using a shell script, and the commands used for fault detection are written in the shell script. When the shell script is run in the video surveillance networking system, a fault detection service can be provided.
[0062] Figure 2 FIG. 1 is a schematic diagram showing the interaction between the fault detection service and other devices according to an embodiment of the present invention. Figure 2 As shown, the fault detection service is connected to the signaling service for communication, and the terminal device interacts with the fault detection service through a designated interface (eg, a VGA interface).
[0063] The fault detection service receives the configuration information input by the user through the terminal device, analyzes the log file of the signaling service to troubleshoot possible faults in the process of monitoring equipment accessing the signaling service, and outputs prompt information representing the fault detection results to the terminal device for the operation and maintenance personnel to correct the configuration of the monitoring equipment according to the prompt information. Using this method to detect faults that occur during the process of monitoring equipment accessing the video surveillance network system can reduce the business requirements for operation and maintenance personnel, and transform the manual troubleshooting method into automated fault detection, which helps to improve the efficiency of troubleshooting.
[0064] In the present invention, the monitoring device that has not been successfully connected due to a fault is called a monitoring device to be connected to the network. The video monitoring networking system is connected to the monitoring device to be connected to the network and the terminal device respectively. The following embodiments will illustrate the fault detection method provided by the present invention in conjunction with the accompanying drawings.
[0065] Figure 3 is a flow chart of a fault detection method according to an embodiment of the present invention. Figure 3 As shown, the fault detection method provided by the present invention may include the following steps 301 to 304.
[0066] In step 301, configuration information is determined based on an input operation of a user on the terminal device.
[0067] The configuration information includes the log file path of the signaling service and the network address information of the media stream of the monitoring device to be connected to the network. The configuration information input by the user via the terminal device is obtained.
[0068] In this embodiment, a uniform resource locator (URL) is used to represent the network address of the media stream of the monitoring device to be connected to the network.
[0069] In step 302, the registration authentication status of the monitoring device to be connected to the network is determined according to the log file pointed to by the log file path.
[0070] According to the log file path of the signaling service, the log file generated by the process of the monitoring device to be connected to the network accessing the signaling service can be obtained, and keywords related to registration and authentication are searched in the log file, and the registration and authentication status of the monitoring device to be connected to the network is determined according to the search results.
[0071] In step 303, when the registration authentication is successful, a target instruction for acquiring the media stream of the monitoring device to be connected to the network is generated based on the network address information, and the target instruction is sent to the signaling service, so that the signaling service forwards the target instruction to the monitoring device to be connected to the network.
[0072] When the registration and authentication is successful, the Web terminal can be simulated to send a target instruction for obtaining the media stream to the monitoring device to be connected to the network, that is, a target instruction for obtaining the media stream of the monitoring device to be connected to the network is generated according to the network address, and the generated target instruction is sent to the signaling service to detect the response status of the monitoring device to be connected to the network when the Web terminal interacts with the signaling service.
[0073] In step 304, data packets between the monitoring device to be connected to the network and the streaming media service are obtained, and it is determined whether the monitoring device to be connected to the network performs a streaming operation according to the acquisition result.
[0074] After the signaling service forwards the target instruction to the monitoring device to be connected to the network, in theory, the monitoring device to be connected to the network will push the stream to the streaming media service in response to the target instruction. Therefore, it is possible to determine whether the monitoring device to be connected to the network is pushing the stream by obtaining the data packet between the monitoring device to be connected to the streaming media service. If the data packet is obtained, it means that the monitoring device to be connected to the network has performed the push stream operation, that is, the connection between the monitoring device to be connected to the streaming media service is successful; if the data packet is not obtained, it means that the monitoring device to be connected to the network has not performed the push stream operation, that is, the connection between the monitoring device to be connected to the streaming media service has failed.
[0075] For example, the tcpdump tool may be used to capture data packets between the monitoring device to be connected to the network and the streaming media service to determine whether the monitoring device to be connected to the network is streaming.
[0076] The fault detection method provided by the present invention uses scripts to check factors that cause faults one by one. Compared with manual troubleshooting by operation and maintenance personnel, it can not only improve work efficiency but also reduce business requirements for operation and maintenance personnel.
[0077] In some embodiments, a first keyword is searched in the log file pointed to by the log file path. If the first keyword is not found, it is determined that the monitoring device to be connected to the network has not been registered and authenticated; if the first keyword is found, a second keyword is searched in the log file; if the second keyword is not found, it is determined that the registration and authentication of the monitoring device to be connected to the network has failed; if the second keyword is found, it is determined that the registration and authentication of the monitoring device to be connected to the network has succeeded.
[0078] A log file generated in real time by the signaling service is obtained according to the log file path, and a first keyword and a second keyword are respectively searched in the log file, where the first keyword is used to characterize unauthorized response information sent by the signaling service, and the second keyword is used to characterize a registration request received by the signaling service. In the SIP protocol, the first keyword is "SIP / 2.0 401Unauthorized", and the second keyword is "CSeq:{n}REGISTER".
[0079] Those skilled in the art should understand that the first keyword and the second keyword may be determined according to the protocol used, and the present invention is not limited to this.
[0080] The terminal device in this embodiment has a display screen. During the fault detection process, prompt information can be sent to the terminal device so that the terminal device displays the prompt information on the display screen. The prompt information is used to indicate the fault detection result.
[0081] For example, the first keyword is searched in the log file. If the first keyword is not found, a prompt message is sent to the terminal device: the monitoring device has not sent the registration information, please check the configuration information of the monitoring device!
[0082] The first keyword is repeatedly searched in the latest acquired log file according to the interval time. When the first keyword is found in the log file, the second keyword is searched in the log file. If the second keyword is found, a prompt message is sent to the terminal device: the monitoring device registration authentication is successful. If the second keyword is not found, the second keyword is repeatedly searched in the latest acquired log file according to the interval time.
[0083] The video surveillance networking system in the present invention provides a variety of functions for Web terminal users, such as real-time video preview function, video playback function, video playback pause function, video playback resume function, and video playback double-speed play function. When it is detected that the registration and authentication of the monitoring device to be networked is successful, the instruction to start any of the above functions can be issued by simulating the Web terminal user to detect the response status of the monitoring device to be networked when the Web terminal interacts with the signaling service.
[0084] The following embodiments illustrate the detection process of the video real-time preview function and the video playback function in the above functions.
[0085] In some embodiments, the network address information may include a real-time video preview address. In this case, the target instruction for obtaining the media stream of the monitoring device to be connected to the network based on the network address information may include: using a specified instruction to call the real-time video preview address to generate a preview instruction for previewing the media stream of the monitoring device to be connected to the network.
[0086] After sending the target instruction to the signaling service, the method further includes: searching for a third keyword in a log file of the signaling service; and determining a response result of the monitoring device to be connected to the network to the preview instruction according to the search result.
[0087] The third keyword is used to represent that the signaling service receives the response information of the monitoring device to be connected to the network to the preview instruction. For example, the third keyword may be "CSeq:[:digit:]INVITE".
[0088] According to the third keyword searched in the log file, the response result of the preview command is determined. If the device responds abnormally, a prompt message is sent to the terminal device: The video real-time preview device responds failed!
[0089] This embodiment simulates a Web terminal to send a video real-time preview instruction, and analyzes the response result of the monitoring device to be connected to the network to determine whether the monitoring device to be connected to the network can normally execute the video real-time preview instruction.
[0090] In some embodiments, the network address information may include a video playback address; in this case, the target instruction for simulating obtaining the media stream of the monitoring device to be connected to the network based on the network address information may include: using a specified instruction to call the video playback address to generate a video playback instruction for obtaining the media stream of the monitoring device to be connected to the network.
[0091] After sending the target instruction to the signaling service, the method further includes: searching for a fourth keyword in a log file of the signaling service; and determining a response result of the monitoring device to be connected to the network to the video playback instruction based on the search result.
[0092] The fourth keyword is used to represent the response information received by the signaling service to the video playback instruction of the monitoring device to be connected to the network. For example, the fourth keyword may be "Session Name(s): Playback".
[0093] Search the fourth keyword in the log file of the signaling service, and determine the response result of the monitoring device to be connected to the video playback instruction according to the response status of the fourth keyword. If the device responds abnormally, send a prompt message to the terminal device: The video playback device responds abnormally!
[0094] This embodiment simulates a Web terminal to send a video playback preview instruction, and analyzes the response result of the monitoring device to be connected to the network to determine whether the monitoring device to be connected to the network can normally execute the video playback preview instruction.
[0095] Those skilled in the art should understand that the specific content of the above prompt information can be specifically set according to actual needs, and the present invention is not limited to this.
[0096] The above-mentioned embodiment is used to detect whether a fault occurs on the monitoring device to be connected to the network. In some scenarios, there may be a fault on the video monitoring networking system, i.e., the service end, which causes the monitoring device to be connected to the network to be unable to successfully access. Therefore, fault detection can be performed on the signaling service and the streaming media service.
[0097] In some embodiments, the configuration information may also include a service name of the signaling service and a service name of the streaming service, and the method further includes: obtaining process information that matches the service name of the signaling service to determine the startup status of the signaling service; obtaining process information that matches the service name of the streaming service to determine the startup status of the streaming service.
[0098] That is, if the process information matching the service name of the signaling service is obtained, it can be determined that the signaling service is in the started state; if the process information matching the service name of the signaling service is not obtained, it can be determined that the signaling service is in the closed state. Similarly, if the process information matching the service name of the streaming service is obtained, it can be determined that the streaming service is in the started state; if the process information matching the service name of the streaming service is not obtained, it can be determined that the streaming service is in the closed state.
[0099] For example, you can use the ps-ef|grep command to verify whether the signaling service and streaming media service are started normally.
[0100] In some embodiments, the configuration information may further include a port number opened by the signaling service, and the method may further include: detecting an open state of a port corresponding to the port number in the signaling service.
[0101] For example, you can use the netstat command or the lsof command to check whether the port open to the outside world by the signaling service is open.
[0102] The present invention monitors the log file of the signaling service, and by extracting keywords from the log file, it can be determined whether the monitoring device is currently connected to the video monitoring network system, and whether the interaction with the video monitoring network system is normal. In addition, the information of the process of the monitoring device accessing the video monitoring network system can be output to the display screen of the terminal device in real time for the operation and maintenance personnel to troubleshoot the fault.
[0103] Figure 4 is an example flow chart of a fault detection method provided by an embodiment of the present invention, such as Figure 4 As shown, in one implementation, the fault detection method may include the following steps 401 to 408 .
[0104] In step 401, configuration information input by a user through a terminal device is received.
[0105] After the fault detection service is started, the terminal device can display on the display screen: Please enter the service name of the SIP signaling service! Receive the user's input operation and store it. For example, the received input information can be stored in a variable named SIP_SERVICE_NAME.
[0106] After receiving the service name of the SIP signaling service, the terminal device displays on the display screen: Please enter the streaming media service name! Receive the user's input operation and store it. For example, the received input information can be stored in a variable named ZLM_SERVICE_NAME.
[0107] After receiving the streaming media service name, the terminal device displays on the screen: Please enter the port that the SIP service needs to open, and multiple ports are spliced with commas! Receive the user's input operation and store it. For example, the received input information can be stored in a variable named PORT.
[0108] After receiving the port that needs to be opened by the SIP service, the terminal device displays on the screen: Please enter the log file path of the SIP signaling service! Receive the user's input operation and store it. For example, the received input information can be stored in a variable named SIP_LOG_PATH.
[0109] After receiving the SIP signaling service log file path, the terminal device displays on the display screen: Please enter the video real-time preview address! Receive the user's input operation and store it. For example, the received input information can be stored in a variable named PLAY_URL.
[0110] After receiving the video real-time preview address, the terminal device displays on the display screen: Please enter the video playback address! Receive the user's input operation and store it. For example, the received input information can be stored in a variable named PLAYBACK_URL.
[0111] Those skilled in the art should understand that the above configuration information can be acquired once or in multiple times, and the above example does not limit the method for acquiring the configuration information.
[0112] In step 402, it is detected whether the signaling service and the streaming media service are started.
[0113] Use the command ps-ef|grep$SIP_SERVICE_NAME to check whether the signaling service is started normally. If not, the prompt message will be output: SIP service is not started normally! Otherwise, the prompt message will be output: SIP signaling service is started!
[0114] If the signaling service is not started normally, execute the ps-ef|grep command again after a preset interval.
[0115] $SIP_SERVICE_NAME verifies whether the SIP service is started normally.
[0116] Use the command ps-ef|grep$ZLM_SERVICE_NAME to check whether the streaming media service is started normally. If not, the prompt message will be output: The streaming media service is not started normally! Otherwise, the prompt message will be output: The streaming media service is started!
[0117] If the streaming service is not started normally, execute the ps-ef|grep command again after a preset time interval.
[0118] $ZLM_SERVICE_NAME verifies whether the streaming media service is started normally.
[0119] In step 403, it is detected whether the port of the signaling service is open.
[0120] Split the variable PORT by commas and loop through it. Use the command lsof to check whether the current port is open. If it is not open, it will output a prompt message: Local port $PORT is not open! Otherwise, it will output a prompt message: Local port $PORT is open.
[0121] In step 404, the log file of the SIP signaling service is monitored based on the log file path.
[0122] In step 405, the registration and authentication process of the monitoring device is detected.
[0123] Search the first keyword "SIP / 2.0 401Unauthorized" in the log file. If it is not found, a prompt message will be output: The monitoring device did not send the registration information. Please check the configuration information of the monitoring device! Repeat the search for the first keyword after the set interval.
[0124] After searching for the first keyword, search the log file for the second keyword "CSeq:{n}
[0125] REGISTER", if found, a prompt message will be output: the monitoring device registration and authentication is successful. Otherwise, the second keyword will be searched repeatedly after a set interval.
[0126] In step 406, the simulated video is previewed in real time.
[0127] Use curl command to call the video real-time preview address PLAY_URL. After the command is issued, search for the third keyword "CSeq:[:digit:]INVITE" in the log file of the SIP signaling service to obtain the response result of the preview command. If the device responds abnormally, the prompt message is output: Video real-time preview device response failed!
[0128] In step 407, it is detected whether the monitoring device is streaming.
[0129] Start the tcpdump packet capture tool. If the packet capture tool fails to start, a prompt message is output: tcpdump failed to start! Otherwise, a prompt message is output: tcpdump started successfully! After executing the video real-time preview instruction in step 406, the data packets of the monitoring device and the streaming media service are captured.
[0130] If no data packet is captured, it means that the monitoring device has not pushed the video stream. In this case, a prompt message is output: The monitoring device has not pushed the stream!
[0131] If the data packet is captured, it means that the monitoring device has pushed the video stream. In this case, the prompt message is output: The monitoring device has pushed the stream!
[0132] In step 408, video playback is simulated.
[0133] Use curl command to call the video playback address PLAYBACK_URL. After the command is issued, search the response status of the fourth keyword "Session Name(s): Playback" in the log file of the signaling service. If the device responds abnormally, output prompt information: The video playback device responds abnormally! At the same time, combined with step 407, obtain the data packet when the monitoring device responds to the video playback command to perform the push operation. If the data packet is not obtained, it means that the monitoring device has not pushed the video stream, and then output the prompt information: The monitoring device has not pushed the stream! If the data packet is obtained, it means that the monitoring device has pushed the video stream, then output the prompt information: The monitoring device has pushed the stream!
[0134] Steps 406 and 408 are used to detect whether the monitoring device responds to the signaling service after the Web terminal sends the instruction, and step 407 is used to detect whether the monitoring device pushes the stream after the Web terminal sends the instruction and the monitoring device responds to the signaling service. During the interaction between the Web terminal and the signaling service, by obtaining the data packet, it can be determined that the monitoring device does not correctly respond to the video real-time preview instruction and the fault in the video playback instruction.
[0135] The present invention also provides a fault detection device, which is applied to a video monitoring networking system, wherein the video monitoring networking system includes a signaling server and a streaming media server, and the video monitoring networking system is connected to a monitoring device to be networked and a terminal device respectively. Figure 5 is a schematic diagram of a fault detection device provided by an embodiment of the present invention, such as Figure 5 As shown, the device comprises:
[0136] An acquisition unit 501 is used to determine configuration information based on an input operation of a user on the terminal device, wherein the configuration information includes a log file path of a signaling service and network address information of a media stream of the monitoring device to be connected to the network;
[0137] The detection unit 502 is used to determine the registration authentication status of the monitoring device to be connected to the network according to the log file pointed to by the log file path;
[0138] The simulation unit 503 is used to generate a target instruction for acquiring the media stream of the monitoring device to be connected to the network based on the network address information when the registration authentication is successful, and send the target instruction to the signaling service so that the signaling service forwards the target instruction to the monitoring device to be connected to the network;
[0139] The detection unit 502 is further configured to obtain data packets between the monitoring device to be connected to the network and the streaming media service, and determine whether the monitoring device to be connected to the network performs a streaming operation according to the acquisition result.
[0140] In some embodiments, the detection unit 502 is specifically used to search for a first keyword in the log file pointed to by the log file path, and if the first keyword is not found, it is determined that the monitoring device to be networked has not been registered and authenticated, and the first keyword is used to represent the unauthorized response information sent by the signaling service;
[0141] If the first keyword is searched, searching the log file for a second keyword, where the second keyword is used to characterize the registration request received by the signaling service;
[0142] If the second keyword is not searched, it is determined that the registration and authentication of the monitoring device to be connected to the network has failed. If the second keyword is searched, it is determined that the registration and authentication of the monitoring device to be connected to the network has succeeded.
[0143] In some embodiments, after sending the target instruction to the signaling service, the detection unit 502 is further configured to:
[0144] Searching for a third keyword in the log file of the signaling service, where the third keyword is used to indicate that the signaling service receives response information of the monitoring device to be connected to the network to the preview instruction;
[0145] The response result of the monitoring device to be connected to the network to the preview instruction is determined according to the search result.
[0146] In some embodiments, after sending the target instruction to the signaling service, the detection unit 502 is further configured to:
[0147] Searching for a fourth keyword in the log file of the signaling service, where the fourth keyword is used to indicate that the signaling service receives response information of the monitoring device to be networked to the video playback instruction;
[0148] The response result of the monitoring device to be connected to the network to the video playback instruction is determined according to the search result.
[0149] In some embodiments, the configuration information further includes a service name of the signaling service and a service name of the streaming media service, and the detection unit is further configured to:
[0150] Acquire process information that matches the service name of the signaling service to determine the startup state of the signaling service; acquire process information that matches the service name of the streaming media service to determine the startup state of the streaming media service.
[0151] In some embodiments, the configuration information also includes a port number opened by the signaling service, and the detection unit is further used to: detect the open state of the port corresponding to the port number in the signaling service.
[0152] It should be noted that in the accompanying drawings, the sizes of layers and regions may be exaggerated for clarity of illustration. It is also understood that when an element or layer is referred to as being "on" another element or layer, it may be directly on the other element, or there may be an intermediate layer. In addition, it is understood that when an element or layer is referred to as being "under" another element or layer, it may be directly under the other element, or there may be more than one intermediate layer or element. In addition, it is also understood that when a layer or element is referred to as being "between" two layers or two elements, it may be the only layer between the two layers or two elements, or there may also be more than one intermediate layer or element. Similar reference numerals throughout the text indicate similar elements.
[0153] In the present invention, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. The term "plurality" refers to two or more than two, unless otherwise clearly defined.
[0154] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the disclosure disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0155] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A fault detection method, characterized in that: Applied to a video surveillance networking system, the video surveillance networking system includes a signaling server and a streaming media server, the video surveillance networking system is connected to a monitoring device to be networked and a terminal device respectively, the method includes: Determine configuration information based on the user's input operation on the terminal device, the configuration information including the log file path of the signaling service and the network address information of the media stream of the monitoring device to be connected to the network; Determine the registration and authentication status of the monitoring device to be connected to the network according to the log file pointed to by the log file path; In the case where the registration authentication is successful, a target instruction for acquiring the media stream of the monitoring device to be connected to the network is generated based on the network address information, and the target instruction is sent to the signaling service, so that the signaling service forwards the target instruction to the monitoring device to be connected to the network; The data packets between the monitoring device to be connected to the network and the streaming media service are obtained, and it is determined whether the monitoring device to be connected to the network performs a streaming operation according to the acquisition result.
2. The method according to claim 1, characterized in that The step of determining the registration authentication status of the to-be-networked monitoring device according to the log file pointed to by the log file path includes: Searching for a first keyword in the log file pointed to by the log file path, and if the first keyword is not found, determining that the monitoring device to be connected to the network has not been registered and authenticated, the first keyword being used to characterize unauthorized response information sent by the signaling service; If the first keyword is searched, searching the log file for a second keyword, where the second keyword is used to characterize the registration request received by the signaling service; If the second keyword is not searched, it is determined that the registration and authentication of the monitoring device to be connected to the network has failed. If the second keyword is searched, it is determined that the registration and authentication of the monitoring device to be connected to the network has succeeded.
3. The method according to claim 1, characterized in that The network address information includes a real-time video preview address; The generating, based on the network address information, a target instruction for acquiring the media stream of the monitoring device to be networked comprises: Using a specified instruction to call the video real-time preview address, generating a preview instruction for previewing the media stream of the monitoring device to be connected to the network; After sending the target instruction to the signaling service, the method further includes: Searching for a third keyword in the log file of the signaling service, where the third keyword is used to indicate that the signaling service receives response information of the monitoring device to be connected to the network to the preview instruction; The response result of the monitoring device to be connected to the network to the preview instruction is determined according to the search result.
4. The method according to claim 1, characterized in that: The network address information includes a video playback address; The target instruction of simulating obtaining the media stream of the monitoring device to be networked based on the network address information includes: The video playback address is called by a specified instruction to generate a video playback instruction for acquiring the media stream of the monitoring device to be connected to the network; After sending the target instruction to the signaling service, the method further includes: Searching for a fourth keyword in the log file of the signaling service, where the fourth keyword is used to indicate that the signaling service receives response information of the monitoring device to be networked to the video playback instruction; The response result of the monitoring device to be connected to the network to the video playback instruction is determined according to the search result.
5. The method according to claim 1, characterized in that The configuration information also includes a service name of the signaling service and a service name of the streaming media service, and the method further includes: Acquire process information matching the service name of the signaling service to determine the startup status of the signaling service; The process information matching the service name of the streaming media service is obtained to determine the startup status of the streaming media service.
6. The method according to claim 1, characterized in that The configuration information also includes a port number opened by the signaling service, and the method further includes: Detect the open state of the port corresponding to the port number in the signaling service.
7. The method according to any one of claims 1 to 6, characterized in that: The terminal device has a display screen, and the method further includes: Send prompt information to the terminal device so that the terminal device displays the prompt information on the display screen, wherein the prompt information is used to indicate the fault detection result.
8. A fault detection device, characterized in that: Applied to a video surveillance networking system, the video surveillance networking system includes a signaling server and a streaming media server, the video surveillance networking system is connected to a monitoring device to be networked and a terminal device respectively, and the device includes: An acquisition unit, configured to determine configuration information based on an input operation of a user on the terminal device, the configuration information including a log file path of a signaling service and network address information of a media stream of the monitoring device to be connected to the network; A detection unit, used to determine the registration authentication status of the monitoring device to be connected to the network according to the log file pointed to by the log file path; A simulation unit, configured to generate a target instruction for acquiring a media stream of the monitoring device to be connected to the network based on the network address information when the registration and authentication is successful, and send the target instruction to the signaling service so that the signaling service forwards the target instruction to the monitoring device to be connected to the network; The detection unit is further used to obtain data packets between the monitoring device to be connected to the network and the streaming media service, and determine whether the monitoring device to be connected to the network performs a streaming operation based on the acquisition result.
9. A fault detection platform, characterized in that: The platform includes a video surveillance networking system, monitoring equipment to be networked and terminal equipment, and the video surveillance networking system includes a signaling server and a streaming media server; The terminal device receives configuration information input by a user, wherein the configuration information includes a log file path of the signaling service and network address information for obtaining a media stream of the monitoring device to be connected to the network; The video surveillance networking system determines the registration authentication status of the monitoring device to be networked according to the log file pointed to by the log file path; When the registration and authentication is successful, the video surveillance networking system generates a target instruction for acquiring the media stream of the monitoring device to be networked based on the network address information, and sends the target instruction to the signaling service, so that the signaling service forwards the target instruction to the monitoring device to be networked; The video surveillance networking system obtains data packets between the monitoring device to be networked and the streaming media service, and determines whether the monitoring device to be networked performs a streaming operation according to the acquisition result.
10. A computing device, characterized in that include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 7 by running the executable instructions.
11. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Malfunction elimination method and device based on video of things
CN108881895A
Controller, control program, and control method
JP2009177513A
APPARATUS, SYSTEM AND METHOD FOR DETECTING ABNORMAL VoLTE DE-REGISTRATION MESSAGE IN 4G MOBILE NETWORKS
KR101541119B1
A method for analyzing trouble logs of the wireless VoIP terminal and a system using the same
KR1020160014937A
Secure automated device configuration and management
US20170223011A1
