Network frame loss diagnosis method, device and computer equipment in visual networking
By forming a network topology in the visual network system and receiving audio and video data frames and announcement frames, the frame drop situation is automatically judged, which solves the problem of low network frame drop efficiency in the visual network, and realizes automatic diagnosis and efficiency improvement.
Patent Information
- Application Number
- CN202411659785.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-11-20
AI Technical Summary
In the visual network, troubleshooting the problem of network frame loss is inefficient and labor-intensive.
By forming a network topology at the back-end monitoring device, sending video pull commands to the front-end monitoring device, receiving audio and video data frames and advertisement frames, and determining the frame drop situation of audio and video data frames based on the correspondence between the announcement frame and audio and video data frames.
It realizes automatic frame drop diagnosis without destroying the user's usage environment, improves inspection efficiency and saves manpower.
Smart Images

Figure CN119155515B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual networking communication technology, and in particular to a network frame loss diagnosis method, device and computer equipment in a visual networking. Background Art
[0002] In the visual network, adding a camera IPC to the NVR to pull the camera's audio and video data in real time is a common application scenario. In order to increase the connection distance between the NVR and the IPC, a layer 2 switch is usually added. When the communication link grows and the number of transmission nodes increases, it also brings difficulties and challenges to troubleshooting.
[0003] In this type of networking, when the NVR video image freezes, displays a distorted screen, or goes black and needs to be investigated, the usual practice is to perform a long-term on-hook test and copy the surveillance video to a local location for playback. This method is inefficient and labor-intensive. Summary of the invention
[0004] In this embodiment, a method, apparatus and computer device for diagnosing network frame loss in a visual network are provided to solve the problem of low efficiency in troubleshooting frame loss in a visual network in related technologies.
[0005] In a first aspect, a network frame loss diagnosis method in a visual network is provided in this embodiment, and the method is applied to a visual network system, wherein the visual network system includes a back-end monitoring device, a front-end monitoring device, and at least one switch; the back-end monitoring device is connected to the front-end monitoring device through the switch; the method is applicable to the back-end monitoring device, and the method includes:
[0006] forming a network topology based on the switch added to the back-end monitoring device and the front-end monitoring device;
[0007] Sending a video pull command to the front-end monitoring device based on the network topology; and receiving an audio and video data frame generated by the front-end monitoring device based on the video pull command, and a notification frame generated by each node in the network topology based on the audio and video data frame;
[0008] Based on the correspondence between the notification frame and the audio and video data frame, the frame loss situation of the audio and video data frame is determined.
[0009] In some embodiments, forming a network topology based on the added switch and the front-end monitoring device includes:
[0010] Obtaining a link layer discovery protocol of the switch added to the backend monitoring device;
[0011] Based on the link layer discovery protocol, a network topology is established which is connected to the front-end monitoring device through each of the switches in sequence; the network topology includes each node device name and connection port.
[0012] In some of the embodiments, the audio and video data frame includes a first magic number, a frame identifier, and audio and video data;
[0013] The notification frame includes a first notification frame and a second notification frame;
[0014] Among them, the first notification frame is generated by the front-end monitoring device based on the frame identifier of the audio and video data frame, and is notified to the back-end monitoring device; the second notification frame is generated by each of the switches based on the frame identifier of the hit audio and video data frame, and is notified to the back-end monitoring device, and the switch hits the audio and video data frame based on the first magic number.
[0015] In some embodiments, the first announcement frame includes a second magic number and the frame identifier; the second announcement frame includes the second magic number, the frame identifier, and a code stream hit port;
[0016] The process of the switch generating the second notification frame includes:
[0017] Based on a preset filtering rule, the audio and video data frame carrying the first magic number is hit;
[0018] Parsing the audio and video data frame to obtain the frame identifier carried in the data frame;
[0019] The content of the obtained frame identifier is written into the frame identifier of the second notification frame to obtain the second notification frame.
[0020] In some of the embodiments, the front-end monitoring device first sends the first notification frame and then sends the corresponding audio and video data frame.
[0021] In some of the embodiments, judging the frame loss of the audio and video data frame based on the correspondence between the notification frame and the audio and video data frame includes:
[0022] Determining whether the audio and video data frame matching the frame identifier of the current first notification frame is received;
[0023] If the audio and video data frame matching the frame identifier of the current first notification frame is not received, it indicates that frame loss has occurred, and the received second notification frames are traversed to find the key node where the second notification frame is not sent normally; wherein the key node cannot miss the lost audio and video data frame, so the corresponding second notification frame is not sent normally;
[0024] Determine the upper level node of the key node as a frame loss node; the upper level node is a node that transmits the audio and video data frame to the key node;
[0025] If the audio and video data frame matching the frame identifier of the current first notification frame is received, it means that there is no frame loss and no processing is performed.
[0026] In some of the embodiments, it also includes:
[0027] Frame loss information is generated based on the frame loss node for storage and display.
[0028] In a second aspect, a network frame loss diagnosis device in a visual network is provided in this embodiment, and the device is applied to a visual network system, and the visual network system includes a back-end monitoring device, a front-end monitoring device, and at least one switch; the back-end monitoring device is connected to the front-end monitoring device through the switch; the device is applicable to the back-end monitoring device, and the device includes:
[0029] A networking module, used to form a network topology based on the added switch and the front-end monitoring device;
[0030] A receiving module, configured to send a video pull command to the front-end monitoring device based on the network topology; and receive an audio and video data frame generated by the front-end monitoring device based on the video pull command, and a notification frame generated by each node in the network topology based on the audio and video data frame;
[0031] The diagnosis module is used to determine the frame loss situation of the audio and video data frame based on the corresponding relationship between the notification frame and the audio and video data frame.
[0032] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the network frame loss diagnosis method in the visual network described in the first aspect is implemented.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for diagnosing network frame loss in a visual network described in the first aspect is implemented.
[0034] Compared with the related art, in the network frame loss diagnosis method, device and computer equipment in the visual network provided in this embodiment, the method is applied to the visual network system, and the visual network system includes a back-end monitoring device, a front-end monitoring device and at least one switch; the back-end monitoring device is connected to the front-end monitoring device through the switch; the method is applicable to the back-end monitoring device, and the method includes: forming a network topology based on the added switch and the front-end monitoring device; sending a video pull command to the front-end monitoring device based on the network topology; and receiving the audio and video data frames generated by the front-end monitoring device based on the video pull command, and the notification frames generated by each node in the network topology based on the audio and video data frames; based on the correspondence between the notification frames and the audio and video data frames, judging the frame loss situation of the audio and video data frames, solving the problems of low troubleshooting efficiency and manpower consumption, and realizing automatic completion of frame loss diagnosis without damaging the user's use environment, improving troubleshooting efficiency, and saving manpower efficiency.
[0035] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 A hardware structure block diagram of a terminal of a method for diagnosing network frame loss in a visual network in one embodiment;
[0038] Figure 2 A schematic diagram of the structure of a front-end monitoring device in one embodiment;
[0039] Figure 3 A schematic diagram of the structure of a switch in one embodiment;
[0040] Figure 4 A schematic diagram of the structure of a back-end monitoring device in one embodiment;
[0041] Figure 5 A schematic diagram of a flow chart of a method for diagnosing network frame loss in a visual network in one embodiment;
[0042] Figure 6 A schematic diagram of device networking in a visual networking system in one embodiment;
[0043] Figure 7 A flowchart of a method for diagnosing network frame loss in a visual network in a preferred embodiment;
[0044] Figure 8 A schematic diagram of a network frame loss diagnosis module in a preferred embodiment;
[0045] Fig. 9 The present invention is a structural block diagram of a network frame loss diagnosis device in a visual network according to an embodiment.
[0046] Figure numerals: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 61, networking module; 62, receiving module; 63, diagnosis module. DETAILED DESCRIPTION
[0047] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0048] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0049] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the network frame loss diagnosis method in the visual network of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0050] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the network frame loss diagnosis method in the visual network in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0051] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0052] In this embodiment, a visual networking system is provided, which includes a back-end monitoring device, a front-end monitoring device and at least one switch; the back-end monitoring device is connected to the front-end monitoring device via the switch.
[0053] Specifically, the back-end monitoring device is a network video recorder (NVR), and the front-end monitoring device is an Internet Protocol Camera (IPC).
[0054] See also Figure 2The front-end monitoring device includes a front-end system module, an encoding module, a first signaling interaction module, a bitstream sending module and a first link layer discovery protocol module. Among them, the front-end system module: is mainly used to manage the peripherals of the camera, etc. The encoding module: is mainly used to perform network encoding on the bitstream data of the camera. The first signaling interaction module: is mainly used to establish a signaling connection with the video recorder, such as establishing a session, receiving control stream pulling signaling, and announcing bitstream frame information. The bitstream sending module: is mainly used to send the camera's bitstream to the video recorder. The first link layer discovery protocol module: is mainly used to send LLDP (Link Layer Discovery Protocol) neighbor information.
[0055] See also Figure 3 The switch includes a port module, an access control rule module, a stream decoding module, a second signaling interaction module and a second link layer discovery protocol module. Among them, the port module is mainly used to manage the physical ports of the switch. The access control rule module is mainly used to manage the ACL (Access List) rules of the switch. The stream decoding module is mainly used to decode the stream data of the camera. The second signaling interaction module is mainly used to establish a signaling connection with the video recorder, such as establishing a session, announcing LLDP neighbor information, and announcing stream frame information. The second link layer discovery protocol module is mainly used to parse and send LLDP neighbor information.
[0056] See also Figure 4 The back-end monitoring device includes a back-end system module, a storage module, a stream receiving module, a third signaling interaction module, a third link layer discovery protocol module and a network frame loss diagnosis module. Among them, the back-end system module: is mainly used to manage the peripherals of the video recorder, etc. The storage module: is mainly used to manage the IPC audio and video storage of the video recorder, etc. The stream receiving module: is mainly used to receive the stream data of the camera. The third signaling interaction module: is mainly used to establish a signaling connection with the camera, such as establishing a session, sending control stream pulling signaling, and receiving stream frame information; it is also used to establish a signaling connection with the switch, such as establishing a session and receiving LLDP neighbor information. The third link layer discovery protocol module: is mainly used to parse LLDP neighbor information, and store the LLDP information of the switch and IPC of the video network. The network frame loss diagnosis module: is mainly used to analyze the verification logic of network frame loss.
[0057] In this embodiment, a network frame loss diagnosis method in a visual network is also provided. The method is applied to the above-mentioned visual network system and is suitable for back-end monitoring equipment. Figure 5 Flowchart of the network frame loss diagnosis method in the visual networking of this embodiment. Figure 5 As shown, the process includes the following steps:
[0058] Step S110, forming a network topology based on the switches added to the back-end monitoring device and the front-end monitoring device.
[0059] Specifically, all devices in the visual networking system are powered on and network connectivity is ensured. The LLDP (Link Layer Discovery Protocol) of all devices is enabled by default. When the switch is powered on, the transport layer control port and ACL (Access List) match the rules for audio and video data. The audio and video data protocol design is shown in Table 1 below.
[0060] Table 1:
[0061]
[0062] Specifically, the ACL rules include: starting offset matching from the TCP / IP transport layer to filter out the MAC address and IP address of the IPC and NVR; matching the transport layer port in the TCP / IP protocol stack of the audio and video stream, such as 8080; matching the first 4 bytes AABB of the audio and video data.
[0063] See also Figure 6 , the back-end monitoring device searches and adds switches and front-end monitoring devices, and obtains the LLDP of the switch to form a network topology diagram. Through the LLDP protocol, the network topology information seen on the back-end monitoring device is as follows:
[0064] <Backend monitoring device, port 1> connects to <Switch A0, port 1>;
[0065] <Switch A0, Port 2> connects to <Switch A1, Port 1>;
[0066] <Switch A1, Port 2> connects to <Switch A2, Port 1>;
[0067] <Switch A2, Port 2> connects to <Front-end monitoring device, Port 1>.
[0068] Step S120, sending a video pull command to the front-end monitoring device based on the network topology; and receiving the audio and video data frames generated by the front-end monitoring device based on the video pull command, and the notification frames generated by each node in the network topology based on the audio and video data frames.
[0069] Specifically, the front-end monitoring device generates an audio and video data frame based on the above-mentioned audio and video data protocol, and generates a notification frame based on the audio and video data frame. The notification frame and the audio and video data frame carry corresponding identifiers, such as frame sequence numbers. During the transmission of the audio and video data frame, once the switch hits the audio and video data frame through the ACL rule, it will generate a notification frame based on the audio and video data frame. The currently generated notification frame corresponds to the identifier of the currently hit audio and video data frame. When the switch does not hit the audio and video data frame, it will not generate the corresponding notification frame.
[0070] Step S130: judging the frame loss status of the audio and video data frames based on the correspondence between the notification frames and the audio and video data frames.
[0071] Specifically, in actual application scenarios, since the notification frame is only used to transmit notification information, its frame size is small and the probability of frame loss is also small. Therefore, this embodiment excludes the situation where the notification frame is lost. On the contrary, the audio and video data frame carries video data, its frame size is large, and the probability of frame loss is high. In addition, since the notification frames sent by each node in the network topology correspond to the audio and video data frames passing through the node, by querying the reception status of the notification frame, it can be determined whether the node has lost the audio and video data frame.
[0072] In the network frame loss diagnosis method in the visual network provided in this embodiment, a network topology is formed based on the added switches and front-end monitoring devices; a video pull command is sent to the front-end monitoring device based on the network topology; and audio and video data frames generated by the front-end monitoring device based on the video pull command, as well as notification frames generated by each node in the network topology based on the audio and video data frames, are received; based on the correspondence between the notification frames and the audio and video data frames, the frame loss situation of the audio and video data frames is judged, which solves the problems of low troubleshooting efficiency and manpower consumption, and realizes automatic completion of frame loss diagnosis without damaging the user environment, thereby improving troubleshooting efficiency and saving manpower efficiency.
[0073] In some of the embodiments, based on the added switches and front-end monitoring devices, a network topology is formed, including:
[0074] Step S111, obtaining the link layer discovery protocol of the switch added to the backend monitoring device.
[0075] Step S112, based on the link layer discovery protocol, establish a network topology that is connected to the front-end monitoring device through each switch in sequence; the network topology includes each node device name and connection port.
[0076] Specifically, the network topology information seen on the back-end monitoring device is as follows:
[0077] <Backend monitoring device, port 1> connects to <Switch A0, port 1>;
[0078] <Switch A0, Port 2> connects to <Switch A1, Port 1>;
[0079] <Switch A1, Port 2> connects to <Switch A2, Port 1>;
[0080] <Switch A2, Port 2> connects to <Front-end monitoring device, Port 1>.
[0081] When transmission is normal, see Figure 6 , the audio and video data frame is sent from port 1 of the front-end monitoring device, passes through each node in the network topology, and finally reaches the back-end monitoring device. After the notification frame is generated by the current node, it will be sent from port 1 of the current node, and after being transmitted by each subsequent node, it will finally reach the back-end monitoring device.
[0082] In some of the embodiments, the audio and video data frame includes a first magic number, a frame identifier, and audio and video data; the notification frame includes a first notification frame and a second notification frame.
[0083] Among them, the first notification frame is generated by the front-end monitoring device based on the frame identifier of the audio and video data frame, and notified to the back-end monitoring device; the second notification frame is generated by each switch based on the frame identifier of the hit audio and video data frame, and notified to the back-end monitoring device, and the switch hits the audio and video data frame based on the first magic number.
[0084] Specifically, the audio and video data is generated based on the audio and video data protocol design in the above Table 1. The content of the frame identifier includes a frame sequence number, which is used to distinguish each audio and video data frame sent by the front-end monitoring device.
[0085] See also Figure 6, when the front-end monitoring device sends the audio and video data frame Z to the back-end monitoring device, the audio and video data frame Z is sent out from port 1 of the front-end monitoring device, and is hit by port 1 of switch A2 when passing through switch A2. Switch A2 parses the audio and video data frame Z, extracts the frame information from the audio and video data frame, and generates a notification frame of switch A2 based on the frame information. After switch A2 generates the notification frame, it sends the audio and video data frame Z from port 2 of switch A2. When the audio and video data frame Z passes through switch A3 and is hit by port 1 of switch A3, the above-mentioned parsing and notification frame generation process is repeated, and it is sent out from port 2 of switch A3. The transmission of the audio and video data frame Z is completed until it is received by port 1 of the back-end monitoring device. Among them, during normal transmission, the audio and video data frame Z will pass through each node in the network topology. The switch at each node hits the audio and video data frame Z, generates a notification frame based on the audio and video data frame Z and sends the notification frame to the back-end monitoring device; when the audio and video data frame Z is lost after passing through a certain node, the switch of the next node will not hit the audio and video data frame Z, and therefore will not send the corresponding notification frame.
[0086] In some of the embodiments, the first notification frame includes a second magic number and a frame identifier; the second notification frame includes a second magic number, a frame identifier, and a code stream hit port.
[0087] Specifically, the audio and video frame notification protocol design of the front-end monitoring device is shown in Table 2 below, and the audio and video frame notification protocol design of the switch is shown in Table 3. The first notification frame is generated based on the audio and video frame notification protocol design of the front-end monitoring device. The second notification frame is generated based on the audio and video frame notification protocol design of the switch.
[0088] Table 2:
[0089]
[0090] Table 3:
[0091]
[0092] The Port number is Figure 6 The port number of port 1 of each switch.
[0093] The process of the switch generating the second advertisement frame includes:
[0094] Step S210: based on a preset filtering rule, an audio or video data frame carrying a first magic number is hit.
[0095] Specifically, the filtering rules are the rules for ACL (Access List) hitting audio and video data. ACL rules include: starting offset matching from the TCP / IP transport layer to filter out the MAC address and IP address of IPC and NVR; matching the transport layer port in the TCP / IP protocol stack of the audio and video stream, such as 8080; matching the first 4 bytes AABB of the audio and video data.
[0096] Step S220, parse the audio and video data frame to obtain the frame identifier carried in the data frame.
[0097] Step S230, writing the content of the obtained frame identifier into the frame identifier of the second notification frame to obtain the second notification frame.
[0098] In this embodiment, the audio and video data and notification information are associated through frame identification, and the transmission of audio and video data frames is monitored and recorded in real time through the notification information generated by each node, so that the back-end monitoring device can perceive richer and more accurate data transmission information.
[0099] In some of the embodiments, the front-end monitoring device first sends a first notification frame and then sends a corresponding audio and video data frame.
[0100] In this embodiment, by sending the audio and video notification frame first and then sending the audio and video data frame, it is convenient for the back-end monitoring device to match the notification frame with the data frame.
[0101] In some of the embodiments, based on the correspondence between the notification frame and the audio and video data frame, determining the frame loss of the audio and video data frame includes:
[0102] Step S131, determining whether an audio or video data frame matching the frame identifier of the current first notification frame is received.
[0103] Step S132, if the audio or video data frame that matches the frame identifier of the current first notification frame is not received, it means that frame loss has occurred, and the received second notification frame is traversed to find the key node that did not send the second notification frame normally; wherein, the key node cannot miss the lost audio or video data frame, so the corresponding second notification frame is not sent normally.
[0104] Step S133, determining the upper level node of the key node as the frame loss node; the upper level node is the node that transmits the audio and video data frame to the key node.
[0105] Step S134: If an audio or video data frame matching the frame identifier of the current first notification frame is received, it indicates that there is no frame loss and no processing is performed.
[0106] Specifically, assume that the NVR parses the video stream frame announcement information <IPC, frame announcement serial number 1000> from the received IPC announcement frame. At this time, the NVR parses the frame information from the received IPC audio and video data frame and obtains <IPC, video stream frame serial number 1002>. Since the frame announcement serial number 1000 does not match the video stream frame serial number 1002, at this time, it is necessary to traverse the network topology to find out on which node the frame loss occurred.
[0107] Continue to assume branch 1:
[0108] The NVR queries the announcement information of switch A2 and has <switch A2, port number Port2, frame announcement serial number 1000>.
[0109] The NVR queries the announcement information of switch A1 and has <switch A1, Port2, frame announcement serial number 1000>.
[0110] The NVR queries the announcement information of switch A0 and does not have <switch A0, Port2, frame announcement serial number 1000>.
[0111] Then, it indicates that switch A1 lost this frame. At this time, record the frame loss information "<switch A1, Port2, 1000> to <switch A0, Port2, frame announcement serial number 1000>".
[0112] Continue to assume branch 2:
[0113] The NVR queries the announcement information of switch A2 and does not have <switch A2, port number Port2, frame announcement serial number 1000>.
[0114] The NVR queries the announcement information of switch A1 and does not have <switch A1, Port2, frame announcement serial number 1000>.
[0115] The NVR queries the announcement information of switch A0 and does not have <switch A0, Port2, frame announcement serial number 1000>.
[0116] Then, it indicates that the IPC lost this frame. At this time, record the frame loss information "<IPC, Port1> to <switch A2, Port2, frame announcement serial number 1000>".
[0117] In this embodiment, based on the network topology and the announcement frames of each node, the frame loss node is automatically diagnosed, which improves the problem location efficiency and reduces the labor and time costs.
[0118] In some of the embodiments, it further includes: generating frame loss information based on the frame loss node for storage and display.
[0119] Specifically, in the above-mentioned hypothetical branch 1, the frame loss information "<switch A1, Port2, 1000> to <switch A0, Port2, 1000>" is recorded, stored and displayed, and is convenient for subsequent export, thereby providing visualization and historical records for users to troubleshoot frame loss diagnosis, thereby improving the efficiency of problem locating.
[0120] The present embodiment is described and illustrated below through preferred embodiments.
[0121] Figure 7 It is a flowchart of the network frame loss diagnosis method in the visual network of this preferred embodiment.
[0122] S1. Networking of visual networking devices.
[0123] 1.1. The visual networking equipment includes the back-end monitoring equipment NVR, the front-end monitoring equipment IPC and the switch. All the visual networking equipment are powered on and connected with network cables to enable network connectivity. LLDP of all devices is enabled by default.
[0124] 1.2. When the switch is powered on, preset transport layer control ports and ACL rules for matching audio and video data.
[0125] The audio and video data protocol is designed as follows:
[0126] The ACL matching rules are as follows: start offsetting from L3, match the audio and video stream transmission control port, such as 8080; match the first 4 bytes AABB.
[0127] 1.3. NVR searches and adds switches and IPCs, and obtains the LLDP of switches to form a network topology diagram. The device list added in NVR: switches A0, A1, A2, camera IPC.
[0128] Through the lldp protocol, the network topology information seen on the NVR is as follows:
[0129] <NVR,Port1> Connect <Switch A0, Port1>;
[0130] <Switch A0, Port2> connects to <Switch A1, Port1>;
[0131] <Switch A1, Port2> connects to <Switch A2, Port1>;
[0132] <Switch A2, Port2> Connection<IPC,Port1> .
[0133] 1.4. NVR sends a command to pull the audio and video data from IPC.
[0134] S2, code stream transmission.
[0135] 2.1. The front-end monitoring device IPC sends the stream frame announcement information based on the first announcement frame and sends the audio-video data frame.
[0136] The audio-video data protocol of the IPC is designed as follows:
[0137]
[0138] The audio-video frame announcement protocol of the IPC is designed as follows:
[0139]
[0140] 2.2. The switch obtains the audio-video data frame by hitting the stream rule through the preset ACL, and parses the audio-video data frame. The stream frame information is obtained from the audio-video data frame, and the second announcement frame is generated based on the stream frame information. The stream frame announcement information is sent to the back-end monitoring device NVR based on the second announcement frame.
[0141] The audio-video frame announcement protocol design of the switch:
[0142]
[0143] 2.3. The back-end monitoring device NVR receives the stream frame announcement information of the front-end monitoring device IPC and receives the stream frame announcement information of the switch.
[0144] For example:
[0145] 1) The NVR receives the stream frame announcement information <IPC, frame announcement serial number> of the IPC.
[0146] 2) The NVR receives the stream frame announcement information <switch A2, port number, frame announcement serial number> of the switch A2.
[0147] 3) The NVR receives the stream frame announcement information <switch A1, port number, frame announcement serial number> of the switch A1.
[0148] 4) The NVR receives the stream frame announcement information <switch A0, port number, frame announcement serial number> of the switch A0.
[0149] 2.4. The back-end monitoring device NVR receives the audio-video data frame of the front-end monitoring device IPC and parses out the stream frame information.
[0150] For example: The stream frame information parsed by the NVR based on the received stream is <IPC, stream frame serial number>.
[0151] S3, network dropped frame diagnosis.
[0152] 3.1. Determine whether there is a match based on the received stream frame notification information of the front-end monitoring device IPC and the parsed stream frame information.
[0153] 3.2. Traverse the nodes according to the network topology algorithm to identify the frame loss node.
[0154] 3.3. Store and display the device information and frame loss sequence number of the frame loss node for subsequent export.
[0155] Specifically, refer to Figure 8 , the network frame loss diagnosis module of the back-end monitoring device includes the following modules: frame sequence detection module, topology traversal algorithm module, diagnosis result storage module, and diagnosis result export / display module. Among them, the frame sequence detection module is used to determine whether there is a match based on the received stream frame notification information of the IPC and the parsed stream frame information. The topology traversal algorithm module is used to traverse the nodes according to the network topology algorithm to confirm which node does not have the frame, and then determine that the previous device has lost the stream frame. The diagnosis result storage module is used to store the frame loss device information and frame loss sequence number, and the stored frame loss device information and frame loss sequence number and other information can be exported and displayed through the diagnosis result export / display module.
[0156] For example:
[0157] The NVR receives the stream frame notification information <IPC, frame notification sequence number 1000> from the IPC.
[0158] At this time, the NVR receives the stream information of the IPC, parses the stream frame information, and obtains <IPC, stream frame sequence number 1002>.
[0159] Then, it is necessary to determine at which node the packet loss occurred according to the topology traversal.
[0160] Hypothesis 1:
[0161] The NVR queries the stream frame notification information of switch A2 and has <switch A2, port number Port2, frame notification sequence number 1000>;
[0162] The NVR queries the stream frame notification information of switch A1 and has <switch A1, Port2, 1000>;
[0163] The NVR queries the stream frame notification information of switch A0 and does not have <switch A0, Port2, 1000>;
[0164] Then, it indicates that switch A1 has lost this frame. At this time, record the frame loss information "<switch A1, Port2, 1000> to <switch A0, Port2, 1000>", and store and display it for subsequent export.
[0165] Assumption 2:
[0166] The NVR found that the code stream frame notification information of switch A2 did not contain <switch A2, port number Port2, frame notification sequence number 1000>;
[0167] The NVR found that the code stream frame notification information of switch A1 did not contain <switch A1, Port2, 1000>;
[0168] The NVR found that the code stream frame notification information of switch A0 did not contain <switch A0, Port2, 1000>;
[0169] Then, it means that IPC lost this frame, and the frame loss information is recorded at this time.<IPC,Port1> to <Switch A2, Port2, 1000>", and store and display it for subsequent export.
[0170] In this preferred embodiment, the audio and video notification frame is designed, and the audio and video data frame is a different magic number. The switch hits the audio and video data through the ACL, and sends it to the CPU to parse the code stream frame and notify it to the NVR. The camera IPC first sends the audio and video notification frame, and then sends the audio and video data frame, which is convenient for the recorder NVR to match the notification frame and the data frame. Based on the network topology and the notification frames of each node, the frame loss node is automatically diagnosed and the records are stored, providing visualization and historical records for users to troubleshoot frame loss diagnosis, thereby improving the efficiency of problem location and reducing manpower and time costs.
[0171] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0172] In this embodiment, a network frame loss diagnosis device in a visual network is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and conceivable.
[0173] Fig. 9 : is a structural block diagram of a network frame loss diagnosis device in a visual network of this embodiment. Fig. 9As shown, the device is applied to a visual networking system, which includes a back-end monitoring device, a front-end monitoring device and at least one switch; the back-end monitoring device is connected to the front-end monitoring device through the switch; the device is applicable to the back-end monitoring device, and the device includes: a networking module 61, a receiving module 62, and a diagnostic module 63.
[0174] The networking module 61 is used to form a network topology based on the added switches and front-end monitoring devices.
[0175] The receiving module 62 is used to send a video pull command to the front-end monitoring device based on the network topology; and receive the audio and video data frames generated by the front-end monitoring device based on the video pull command, and the notification frames generated by each node in the network topology based on the audio and video data frames.
[0176] The diagnosis module 63 is used to determine the frame loss situation of the audio and video data frame based on the corresponding relationship between the notification frame and the audio and video data frame.
[0177] In some of the embodiments, the networking module 61 is also used to obtain the link layer discovery protocol of the switch added to the back-end monitoring device; based on the link layer discovery protocol, establish a network topology that is connected to the front-end monitoring device through each of the switches in sequence; the network topology includes each node device name and connection port.
[0178] In some of the embodiments, the audio and video data frame includes a first magic number, a frame identifier, and audio and video data; the notification frame includes a first notification frame and a second notification frame;
[0179] Among them, the first notification frame is generated by the front-end monitoring device based on the frame identifier of the audio and video data frame, and is notified to the back-end monitoring device; the second notification frame is generated by each of the switches based on the frame identifier of the hit audio and video data frame, and is notified to the back-end monitoring device, and the switch hits the audio and video data frame based on the first magic number.
[0180] In some embodiments, the first notification frame includes a second magic number and the frame identifier; the second notification frame includes the second magic number, the frame identifier and a code stream hit port; wherein the process of the switch generating the second notification frame includes: based on a preset filtering rule, hitting the audio and video data frame carrying the first magic number; parsing the audio and video data frame to obtain the frame identifier carried in the data frame; writing the content of the obtained frame identifier into the frame identifier of the second notification frame to obtain the second notification frame.
[0181] In some of the embodiments, the front-end monitoring device first sends the first notification frame and then sends the corresponding audio and video data frame.
[0182] In some of the embodiments, the diagnostic module 63 is also used to determine whether the audio and video data frame matching the frame identifier of the current first notification frame is received; if the audio and video data frame matching the frame identifier of the current first notification frame is not received, it indicates that frame loss has occurred, and the received second notification frames are traversed to find the key node that did not send the second notification frame normally; wherein the key node cannot miss the lost audio and video data frame, so the corresponding second notification frame is not sent normally; the upper-level node of the key node is determined as a frame loss node; the upper-level node is a node that transmits the audio and video data frame to the key node; if the audio and video data frame matching the frame identifier of the current first notification frame is received, it indicates that there is no frame loss and no processing is performed.
[0183] In some of the embodiments, a storage and display module is further included, and the storage and display module is used to generate frame loss information based on the frame loss node for storage and display.
[0184] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0185] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0186] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0187] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0188] In addition, in combination with the network frame loss diagnosis method in the visual network provided in the above embodiments, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the network frame loss diagnosis methods in the visual network in the above embodiments is implemented.
[0189] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0190] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0191] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0192] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A method for diagnosing network frame loss in a visual network, characterized in that: The method is applied to a visual networking system, which includes a back-end monitoring device, a front-end monitoring device and at least one switch; The back-end monitoring device is connected to the front-end monitoring device through the switch; the method is applicable to the back-end monitoring device, and the method includes: forming a network topology based on the switch added to the back-end monitoring device and the front-end monitoring device; Send a video pull command to the front-end monitoring device based on the network topology; and receive the audio and video data frame generated by the front-end monitoring device based on the video pull command, and the notification frame generated by each node in the network topology based on the audio and video data frame; wherein the notification frame includes a first notification frame and a second notification frame; the first notification frame is generated by the front-end monitoring device based on the frame identifier of the audio and video data frame, and notified to the back-end monitoring device; the second notification frame is generated by each of the switches based on the frame identifier of the hit audio and video data frame, and notified to the back-end monitoring device; Based on the correspondence between the notification frame and the audio and video data frame, determining the frame loss situation of the audio and video data frame; The step of determining the frame loss of the audio and video data frame based on the correspondence between the notification frame and the audio and video data frame includes: Determining whether the audio and video data frame matching the frame identifier of the current first notification frame is received; If the audio and video data frame matching the frame identifier of the current first notification frame is not received, it indicates that frame loss has occurred, and the received second notification frames are traversed to find the key node where the second notification frame is not sent normally; wherein the key node cannot hit the lost audio and video data frame, so the corresponding second notification frame is not sent normally; Determine the upper level node of the key node as a frame loss node; the upper level node is a node that transmits the audio and video data frame to the key node; If the audio and video data frame matching the frame identifier of the current first notification frame is received, it means that there is no frame loss and no processing is performed.
2. The method for diagnosing network frame loss in visual networking according to claim 1, characterized in that: The forming of a network topology based on the added switch and the front-end monitoring device includes: Obtaining a link layer discovery protocol of the switch added to the backend monitoring device; Based on the link layer discovery protocol, a network topology is established which is connected to the front-end monitoring device through each of the switches in sequence; the network topology includes each node device name and connection port.
3. The method for diagnosing network frame loss in visual networking according to claim 1, characterized in that: The audio and video data frame includes a first magic number, a frame identifier and audio and video data; The switch matches the audio and video data frame based on the first magic number.
4. The method for diagnosing network frame loss in visual networking according to claim 3, characterized in that: The first notification frame includes a second magic number and the frame identifier; the second notification frame includes the second magic number, the frame identifier and a code stream hit port; The process of the switch generating the second notification frame includes: Based on a preset filtering rule, the audio and video data frame carrying the first magic number is hit; Parsing the audio and video data frame to obtain the frame identifier carried in the data frame; The content of the obtained frame identifier is written into the frame identifier of the second notification frame to obtain the second notification frame.
5. The method for diagnosing network frame loss in visual networking according to claim 3, characterized in that: The front-end monitoring device first sends the first notification frame and then sends the corresponding audio and video data frame.
6. The method for diagnosing network frame loss in visual networking according to claim 1, characterized in that: Also includes: Frame loss information is generated based on the frame loss node for storage and display.
7. A network frame loss diagnosis device in a visual network, characterized in that: The device is applied to a visual networking system, which includes a back-end monitoring device, a front-end monitoring device and at least one switch; The back-end monitoring device is connected to the front-end monitoring device through the switch; the device is applicable to the back-end monitoring device, and the device includes: A networking module, used to form a network topology based on the added switch and the front-end monitoring device; A receiving module, used to send a video pull command to the front-end monitoring device based on the network topology; and receive the audio and video data frame generated by the front-end monitoring device based on the video pull command, and the notification frame generated by each node in the network topology based on the audio and video data frame; the notification frame includes a first notification frame and a second notification frame; the first notification frame is generated by the front-end monitoring device based on the frame identifier of the audio and video data frame, and notified to the back-end monitoring device; the second notification frame is generated by each of the switches based on the frame identifier of the hit audio and video data frame, and notified to the back-end monitoring device; A diagnosis module, used to determine the frame loss of the audio and video data frame based on the correspondence between the notification frame and the audio and video data frame, including: Determining whether the audio and video data frame matching the frame identifier of the current first notification frame is received; If the audio and video data frame matching the frame identifier of the current first notification frame is not received, it indicates that frame loss has occurred, and the received second notification frames are traversed to find the key node where the second notification frame is not sent normally; wherein the key node cannot hit the lost audio and video data frame, so the corresponding second notification frame is not sent normally; Determine the upper level node of the key node as a frame loss node; the upper level node is a node that transmits the audio and video data frame to the key node; If the audio and video data frame matching the frame identifier of the current first notification frame is received, it means that there is no frame loss and no processing is performed.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the network frame loss diagnosis method in the visual network described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Lost frame measuring method and system
CN103546303A
Vehicular Ad-hoc network data processing method, device and system
CN105099827A