CN113542032A - Method and device for rapidly verifying GB/T28181 protocol - Google Patents
Method and device for rapidly verifying GB/T28181 protocol Download PDFInfo
- Publication number
- CN113542032A CN113542032A CN202110823815.XA CN202110823815A CN113542032A CN 113542032 A CN113542032 A CN 113542032A CN 202110823815 A CN202110823815 A CN 202110823815A CN 113542032 A CN113542032 A CN 113542032A
- Authority
- CN
- China
- Prior art keywords
- data packet
- protocol
- tested
- equipment
- video
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000012360 testing method Methods 0.000 claims abstract description 69
- 238000012795 verification Methods 0.000 claims abstract description 65
- 230000011664 signaling Effects 0.000 claims abstract description 54
- 230000005540 biological transmission Effects 0.000 claims abstract description 44
- 230000006854 communication Effects 0.000 claims abstract description 34
- 238000004891 communication Methods 0.000 claims abstract description 31
- 238000001914 filtration Methods 0.000 claims abstract description 8
- 230000004044 response Effects 0.000 claims description 33
- 238000005070 sampling Methods 0.000 claims description 14
- 230000000977 initiatory effect Effects 0.000 claims description 10
- 238000005516 engineering process Methods 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 5
- 230000006855 networking Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0677—Localisation of faults
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/18—Protocol analysers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
- H04L65/1101—Session protocols
- H04L65/1104—Session initiation protocol [SIP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention relates to the technical field of verification, and particularly discloses a method for quickly verifying a GB/T28181 protocol, which comprises the steps of receiving a network communication data packet sent by GB/T28181 equipment to be tested; filtering the network communication data packet to obtain a GB/T28181 data packet, wherein the GB/T28181 data packet comprises an SIP session signaling control data packet and an RTP media transmission data packet; verifying the format and the content of the GB/T28181 data packet to obtain a verification result; generating a test report of the GB/T28181 equipment to be tested according to the verification result; and displaying a test report of the GB/T28181 equipment to be tested. The invention also discloses a device for rapidly verifying the GB/T28181 protocol. The method for quickly verifying the GB/T28181 protocol can quickly locate the corresponding error content and error position of the GB/T28181 protocol and automatically generate a test report, thereby improving the verification efficiency of the GB/T28181 protocol.
Description
Technical Field
The invention relates to the technical field of verification, in particular to a method for quickly verifying a GB/T28181 protocol and a device for quickly verifying the GB/T28181 protocol.
Background
The GB/T28181 protocol is proposed by the Ministry of public Security of the people's republic of China, is issued by the national Security and Security alarm System standardization technology Committee (SAC/TC100), and drafted by the first institute of public Security, the institute of public Security technology of Zhejiang, the institute of safety technology of Beijing, the institute of Stand-in-the-Jiang communication technology of Zhejiang, Yujing technology, Inc., Zhejiang Dahua technology, Hangzhou Haokiwei digital technology, Inc., and the institute of electronic technology standards, and is a set of SIP-based protocol used for video interconnection and interworking in the public security field prescribed by the nation. At present, GB/T28181 is widely used.
The GB/T28181 Protocol contains more contents and mainly comprises two contents of SIP signaling and RTP Streaming media transmission, wherein the SIP signaling part comprises a session Description Protocol SDP (Session Description Protocol), a Monitoring alarm networking System Control Description Protocol MANSCDP (Monitoring and alarm networking System Control Description Protocol), a Monitoring alarm networking System Real-Time Streaming Protocol MANSRTSP (Monitoring and alarm networking System read-Time Streaming Protocol), and the like, the loading mode of RTP Streaming media transmission comprises video and audio data or video and audio basic stream data based on PS encapsulation, and the transmission of media stream adopts an RTP Protocol specified by TF RFC 3550 to provide timestamp information in Real-Time data transmission and synchronization of each data stream; the RTCP protocol specified in IETF RFC 3550 should be used to provide reliable guarantees for the in-sequence transmission of data packets, and to provide flow control and congestion control.
At present, software such as wireshark and the like does not support the analysis of a GB/T28181 protocol, and as the GB/T28181 signaling protocols are more, verification is carried out by packet capturing software or manual comparison every time a session protocol is modified, and the process is complicated; for the verification of streaming media protocols such as H.264, SVAC and MPEG-4 video decoding, G.711, G.723.1, G.729 and SVAC audio encoding and decoding, the correctness of the protocols needs to be artificially compared, and if the phenomena such as screen splash and the like occur, a large amount of time is needed for analyzing the situations such as frame loss and the like; moreover, test reports need to be written manually, and the workload is increased.
At present, when audio and video transmission products based on the national standard GB/T28181 protocol are developed, due to the fact that the GB/T28181 protocol is complex, a method and a device for quickly verifying the GB/T28181 protocol are needed, and quick verification of the GB/T28181 protocol is achieved.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method and a device for quickly verifying a GB/T28181 protocol, which can quickly locate the corresponding error content and error position of the GB/T28181 protocol and automatically generate a test report, thereby improving the verification efficiency of the GB/T28181 protocol.
As a first aspect of the invention, a method for quickly verifying a GB/T28181 protocol is provided, wherein the method comprises the following steps:
s110, receiving a network communication data packet sent by GB/T28181 equipment to be tested;
s120, filtering the network communication data packet to obtain a GB/T28181 data packet, wherein the GB/T28181 data packet comprises an SIP session signaling control data packet and an RTP media transmission data packet;
s130, verifying the format and the content of the GB/T28181 data packet to obtain a verification result;
s140, generating a test report of the GB/T28181 device to be tested according to the verification result;
and S150, displaying a test report of the GB/T28181 device to be tested.
Further, before receiving the network communication data packet sent by the GB/T28181 device to be tested, the method further includes:
configuring parameters of the GB/T28181 device to be tested, wherein the parameters of the GB/T28181 device to be tested comprise an IP (Internet protocol), a port, an SIP (Session initiation protocol) domain and an SIP ID (Session initiation protocol);
configuring media information, wherein the media information comprises resolution, frame rate, coding mode of video, sampling rate, sampling precision, sound channel and coding mode of audio.
Further, the receiving a network communication data packet sent by the GB/T28181 device to be tested further includes:
and storing the network communication data packet.
Further, the verifying the format and the content of the GB/T28181 data packet to obtain a verification result further includes:
receiving the SIP session signaling control data packet, and analyzing the format and the content of the SIP session signaling control data packet to obtain an analysis result; if the analysis result conforms to the GB/T28181 protocol, a corresponding response command is replied to the GB/T28181 equipment to be tested, and the analysis result of the SIP session signaling control data packet is correct, otherwise, the analysis result is wrong;
receiving the RTP media transmission data packet, and analyzing the format and the content of the RTP media transmission data packet to obtain a decoded audio/video data packet; and splicing the decoded audio and video data packets, and generating a corresponding audio and video file so as to test the audio and video transmission result.
Further, the types of the SIP session signaling control data packet include: the method comprises the steps of equipment registration and cancellation, heartbeat package, real-time video on demand, equipment control, alarm event notification, network equipment information inquiry, state information report, equipment video file retrieval, historical audio and video playback, audio and video file downloading, subscription and notification, voice broadcasting and voice talkback.
As another aspect of the invention, an apparatus for rapidly verifying the GB/T28181 protocol is provided, which comprises:
the network data packet capturing module is used for receiving a network communication data packet sent by GB/T28181 equipment to be tested, filtering the network communication data packet and obtaining a GB/T28181 data packet, wherein the GB/T28181 data packet comprises an SIP session signaling control data packet and an RTP media transmission data packet;
the verification module is used for verifying the format and the content of the GB/T28181 data packet to obtain a verification result;
the test report generating module is used for generating a test report of the GB/T28181 device to be tested according to the verification result;
the display module is used for displaying a test report of the GB/T28181 device to be tested;
the GB/T28181 device to be tested is connected to the device for quickly verifying the GB/T28181 protocol through a wired or wireless network.
Further, the device further comprises a configuration module, wherein the configuration module is used for configuring the parameters of the GB/T28181 device to be tested, and the parameters of the GB/T28181 device to be tested comprise an IP (Internet protocol), a port, an SIP (Session initiation protocol) domain and an SIP ID (Session initiation protocol ID); and configuring media information, wherein the media information comprises resolution, frame rate, coding mode of video, sampling rate, sampling precision, sound channel and coding mode of audio.
Further, the network communication system further comprises a storage module, wherein the storage module is used for storing the network communication data packet.
Further, the system also comprises a central signaling service module and a streaming media service module, wherein the verification module comprises an SIP verification module and an RTP verification module,
the central signaling service module is used for receiving the SIP session signaling control data packet and sending the SIP session signaling control data packet to the SIP verification module;
the SIP verification module is used for analyzing the format and the content of the SIP session signaling control data packet to obtain an analysis result; if the analysis result conforms to the GB/T28181 protocol, a corresponding response command is replied to the GB/T28181 equipment to be tested through the central signaling service module, and the analysis result of the SIP session signaling control data packet is correct, otherwise, the analysis result is wrong;
the streaming media service module is used for receiving the RTP media transmission data packet and sending the RTP media transmission data packet to the RTP verification module;
the RTP verification module is used for analyzing the format and the content of the RTP media transmission data packet to obtain a decoded audio/video data packet; and splicing the decoded audio and video data packets, and generating a corresponding audio and video file so as to test the audio and video transmission result.
Further, the types of the SIP session signaling control data packet include: the method comprises the steps of equipment registration and cancellation, heartbeat package, real-time video on demand, equipment control, alarm event notification, network equipment information inquiry, state information report, equipment video file retrieval, historical audio and video playback, audio and video file downloading, subscription and notification, voice broadcasting and voice talkback.
The method for quickly verifying the GB/T28181 protocol can be applied to quick verification of equipment supporting the GB/T28181 protocol, can quickly locate error contents and error positions corresponding to the GB/T28181 protocol by automatically analyzing the GB/T28181 protocol of the equipment through software, automatically generates a test report, accelerates debugging and verification efficiency of the GB/T28181 protocol, reduces tedious work such as manual comparison of the protocol and the like, and improves verification efficiency of the GB/T28181 protocol.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flow chart of a method for quickly verifying the GB/T28181 protocol provided by the invention.
FIG. 2 is a flowchart of an embodiment of a method for quickly verifying the GB/T28181 protocol according to the present invention.
Fig. 3 is a flowchart of the working process of the SIP authentication module provided in the present invention.
Fig. 4 is a flowchart of the operation of the RTP verification module provided in the present invention.
FIG. 5 is a block diagram of a device for fast verifying the GB/T28181 protocol according to the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged under appropriate circumstances in order to facilitate the description of the embodiments of the invention herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As an embodiment of the present invention, a method for quickly verifying the GB/T28181 protocol is provided, as shown in fig. 1, including:
s110, receiving a network communication data packet sent by GB/T28181 equipment to be tested;
s120, filtering the network communication data packet to obtain a GB/T28181 data packet, wherein the GB/T28181 data packet comprises an SIP session signaling control data packet and an RTP media transmission data packet;
s130, verifying the format and the content of the GB/T28181 data packet to obtain a verification result;
s140, generating a test report of the GB/T28181 device to be tested according to the verification result;
and S150, displaying a test report of the GB/T28181 device to be tested.
Specifically, before receiving a network communication data packet sent by the GB/T28181 device to be tested, the method further includes:
configuring parameters of the GB/T28181 device to be tested, wherein the parameters of the GB/T28181 device to be tested comprise an IP (Internet protocol), a port, an SIP (Session initiation protocol) domain and an SIP ID (Session initiation protocol);
configuring media information, wherein the media information comprises resolution, frame rate, coding mode of video, sampling rate, sampling precision, sound channel and coding mode of audio.
Specifically, the receiving a network communication data packet sent by the GB/T28181 device to be tested further includes:
and storing the network communication data packet.
Specifically, the verifying the format and the content of the GB/T28181 data packet to obtain a verification result further includes:
receiving the SIP session signaling control data packet, and analyzing the format and the content of the SIP session signaling control data packet to obtain an analysis result; if the analysis result conforms to the GB/T28181 protocol, a corresponding response command is replied to the GB/T28181 equipment to be tested, and the analysis result of the SIP session signaling control data packet is correct, otherwise, the analysis result is wrong;
receiving the RTP media transmission data packet, and analyzing the format and the content of the RTP media transmission data packet to obtain a decoded audio/video data packet; and splicing the decoded audio and video data packets, and generating a corresponding audio and video file so as to test the audio and video transmission result.
Specifically, the types of the SIP session signaling control data packet include: the method comprises the steps of equipment registration and cancellation, heartbeat package, real-time video on demand, equipment control, alarm event notification, network equipment information inquiry, state information report, equipment video file retrieval, historical audio and video playback, audio and video file downloading, subscription and notification, voice broadcasting and voice talkback.
The method for rapidly verifying the GB/T28181 protocol not only saves the verification time of the GB/T28181 protocol, but also increases the accuracy of the verification result, and can also automatically output the verification report.
As shown in fig. 2, the specific process of the method for quickly verifying the GB/T28181 protocol provided by the present invention is as follows:
(1) initializing the device for rapidly verifying the GB/T28181 protocol, wherein the device comprises configuration of GB/T28181 device information to be tested and configuration of media information, the configuration of the device information comprises an IP (Internet protocol), a port, an SIP (Session initiation protocol) domain and an SIP ID (Session initiation protocol) of the device, and the configuration of the media information comprises a video resolution, a frame rate, an encoding mode, an audio sampling rate, sampling precision, a sound channel and an encoding mode;
(2) receiving a network communication data packet sent by GB/T28181 equipment to be tested, and filtering the network communication data packet to obtain a GB/T28181 data packet;
(3) the SIP session signaling control data packet comprises registration and cancellation, real-time audio and video on demand, equipment control, alarm notification and distribution, equipment query request command, state information reporting, equipment video file retrieval, historical video and audio playback, video and audio file downloading, subscription and notification, voice broadcasting and voice talkback; analyzing the received data respectively, if the analysis result conforms to the GB/T28181 protocol, replying a corresponding response command, and if the analysis result of the data packet is correct, otherwise, the analysis result is wrong; the specific verification flow is shown in fig. 3;
(4) analyzing RTP media transmission data packets, and obtaining the packet loss rate of network transmission according to SN (sequence number) in the packet header structure of each RTP media transmission data packet;
(5) for RTP media transmission data packets, according to the regulation of a GB/T28181 protocol, in media compression coding and decoding, H.264 or MPEG-4 is adopted for video coding and decoding, and SVAC should be preferentially adopted; the audio coding and decoding recommends adopting G.711, G.723.1, G.729 or SVAC; as shown in fig. 4, first, it is distinguished whether the RTP media transmission data packet type is a video data packet or an audio data packet, and then the coding mode is analyzed, and different codes are decoded by using corresponding modes; for video data packets, splicing the decoded data packets and generating an mp4 video file to test the result of video transmission; for the audio data packets, splicing the decoded data packets, and generating a pcm file to test the result of audio transmission;
(6) and generating a test report according to the analysis, and displaying the test result obtained by the analysis in an application window.
Specifically, as shown in fig. 3, the working flow diagram of the SIP authentication module is as follows:
(1) registering and deregistering: after receiving a Register (logout) request without authentication sent by GB/T28181 equipment to be tested (an apparatus for quickly verifying a GB/T28181 protocol), a test tool (a device for quickly verifying the GB/T28181 protocol) analyzes the content of a data packet, if the content is correct, sends a response 401 Unauuthorized, and gives an authentication system and parameters suitable for a SIP proxy in a WWW _ Autothenticate field of a message header of the response; after receiving a Register request with authentication sent by GB/T28181 equipment, the test tool analyzes the content of a data packet and carries out identity verification, if the analysis result is correct and the identity is legal, a response 200 OK is sent, and if the identity is not legal, a denial of service response is sent;
(2) real-time audio and video on demand: after a test tool (a device for quickly verifying a GB/T28181 protocol) sends an Invite request to GB/T28181 equipment to be tested, waiting for the GB/T28181 equipment to be tested to reply a 200 OK response carrying an SDP message body, analyzing an SDP data packet and sending ACK carrying the SDP message body to the equipment after a result is correct, and waiting for the GB/T28181 equipment to be tested to send a real-time media stream; after the test tool sends the BYE message to the GB/T28181 equipment to be tested, the GB/T28181 equipment to be tested responds to 200 OK and stops sending the real-time media stream;
(3) controlling equipment: for the non-response equipment control, the test tool sends a Message method with an equipment control command to the GB/T28181 equipment to be tested, and then waits for receiving a 200 OK response; for equipment control with response, after sending a Message method with equipment control command to GB/T28181 equipment to be tested, the test tool waits for receiving a 200 OK response and a Message method with equipment control response command, and after analyzing a data packet and obtaining a correct result, sends a 200 OK response to the equipment;
(4) alarm event notification and distribution: after an alarm event is generated, the GB/T28181 equipment to be tested sends a Message method with an alarm notification command to a test tool, after the test tool receives the Message method, the test tool analyzes a data packet, replies a 200 OK response and the Message method with the alarm notification response command after the result is correct, and then waits for receiving the 200 OK response;
(5) network equipment information inquiry: after sending the Message method with the equipment query command to the GB/T28181 equipment to be tested, the test tool waits for receiving the Message methods with the 200 OK response and the equipment query response command, analyzes the data packet after receiving the Message methods, and sends the 200 OK response to the GB/T28181 equipment to be tested if the analysis result is correct; the network equipment information query command comprises equipment directory query, equipment information query, equipment state query, equipment configuration query and equipment preset bit query;
(6) reporting state information: when the GB/T28181 equipment to be tested is abnormal, sending a Message with state information to the test tool, analyzing a data packet after the test tool receives the Message, and if the analysis result is correct, replying to 200 OK; when the GB/T28181 equipment is abnormal, state information (heartbeat) is sent to the testing tool at regular time, and the testing tool receives the heartbeat packet, analyzes the result of the data packet to be correct and then replies to 200 OK; if the test tool does not receive the state information report of the equipment for three times continuously, the equipment is considered to be offline;
(7) and (3) retrieving the video and audio files of the equipment: after sending a Message method with a video and audio file retrieval command to GB/T28181 equipment to be tested, the test tool waits for receiving a 200 OK response and the Message method with a file directory, analyzes a data packet and sends the 200 OK response to the equipment after the result is correct;
(8) playback of historical video and audio: after the testing tool sends an Invite request to the GB/T28181 equipment to be tested, waiting for the equipment to reply a 200 OK response carrying an SDP message body, analyzing the SDP message, obtaining a correct result, sending ACK carrying the SDP message body to the equipment, and waiting for the GB/T28181 equipment to send a historical media stream; after the test tool sends a BYE message to GB/T28181 equipment to be tested, the equipment responds to 200 OK and stops sending the historical media stream;
(9) downloading the video and audio files: after the testing tool sends an Invite request to the GB/T28181 device to be tested, waiting for the device to reply a 200 OK response carrying an SDP message body, then sending an ACK carrying the SDP message body to the device, and waiting for the GB/T28181 device to be tested to send a historical media stream; after the historical media stream is sent, the equipment sends a Message with a file sending completion Message to the test tool, the test tool replies a 200 OK response after receiving and analyzing the Message to obtain a correct result, and then sends a BYE Message and waits for receiving the 200 OK response;
(10) subscription and notification: for event subscription, the test tool sends a SUBSCRIBE message to the GB/T28181 device to be tested, waits for a 200 OK response, and for event notification, after receiving a NOTIFY message sent by the GB/T28181 device to be tested, the test tool analyzes the data packet, and replies the 200 OK response after obtaining a correct result;
(11) voice broadcasting and voice talkback: after the testing tool sends an Invite request to the GB/T28181 equipment to be tested, waiting for the equipment to reply a 200 OK response carrying an SDP message body, analyzing the SDP message, obtaining a correct result, sending ACK carrying the SDP message body to the equipment, and waiting for the GB/T28181 equipment to be tested to send a real-time audio stream; after the test tool sends a BYE message to the GB/T28181 device, the device responds with a 200 OK and stops sending real-time audio streams.
As another embodiment of the present invention, there is provided an apparatus for quickly verifying the GB/T28181 protocol, as shown in fig. 5, including:
the network data packet capturing module is used for receiving a network communication data packet sent by GB/T28181 equipment to be tested, filtering the network communication data packet and obtaining a GB/T28181 data packet, wherein the GB/T28181 data packet comprises an SIP session signaling control data packet and an RTP media transmission data packet;
the verification module is used for verifying the format and the content of the GB/T28181 data packet to obtain a verification result;
the test report generating module is used for generating a test report of the GB/T28181 device to be tested according to the verification result;
the display module is used for displaying a test report of the GB/T28181 device to be tested;
the GB/T28181 device to be tested is connected to the device for quickly verifying the GB/T28181 protocol through a wired or wireless network.
It should be noted that the GB/T28181 device is a device that implements a networking monitoring data encapsulation and transmission protocol according to the GB/T28181 protocol and has an audio and video capture or play function. The main function of the test tool (a device for rapidly verifying the GB/T28181 protocol) is to test GB/T28181 equipment so as to verify whether various session signaling and transmission media data meet requirements when the GB/T28181 protocol is realized, analyze the test result and automatically generate an analysis report.
Specifically, the device further comprises a configuration module, wherein the configuration module is configured to configure parameters of the GB/T28181 device to be tested, and the parameters of the GB/T28181 device to be tested include an IP, a port, an SIP domain, and an SIP ID; and configuring media information, wherein the media information comprises resolution, frame rate, coding mode of video, sampling rate, sampling precision, sound channel and coding mode of audio.
Particularly, the network communication data packet storage device further comprises a storage module, wherein the storage module is used for storing the network communication data packet.
Particularly, the system also comprises a central signaling service module and a streaming media service module, wherein the verification module comprises an SIP verification module and an RTP verification module,
the central signaling service module is used for receiving the SIP session signaling control data packet and sending the SIP session signaling control data packet to the SIP verification module;
the SIP verification module is used for analyzing the format and the content of the SIP session signaling control data packet to obtain an analysis result; if the analysis result conforms to the GB/T28181 protocol, a corresponding response command is replied to the GB/T28181 equipment to be tested through the central signaling service module, and the analysis result of the SIP session signaling control data packet is correct, otherwise, the analysis result is wrong;
the streaming media service module is used for receiving the RTP media transmission data packet and sending the RTP media transmission data packet to the RTP verification module;
the RTP verification module is used for analyzing the format and the content of the RTP media transmission data packet to obtain a decoded audio/video data packet; and splicing the decoded audio and video data packets, and generating a corresponding audio and video file so as to test the audio and video transmission result.
It should be noted that, the central signaling service module and the streaming media service module interact with the signaling part and the streaming media part of the GB/T28181 device to be tested, respectively.
The testing tool is used as a GB/T28181 server during testing, when a session signaling data packet and a media transmission data packet sent by GB/T28181 equipment to be tested are received, whether the format and the content of the session signaling data packet are correct or not is verified, the network delay and the packet loss rate of the session signaling data packet are analyzed, and then the testing tool responds to the correct data packet according to a GB/T28181 protocol so that the GB/T28181 equipment end can normally run.
Specifically, the types of the SIP session signaling control data packet include: the method comprises the steps of equipment registration and cancellation, heartbeat package, real-time video on demand, equipment control, alarm event notification, network equipment information inquiry, state information report, equipment video file retrieval, historical audio and video playback, audio and video file downloading, subscription and notification, voice broadcasting and voice talkback.
Specifically, in the embodiment of the present invention, the verification module is configured to analyze, in real time, a communication process of the GB28181 device to be tested, the central signaling service module, and the streaming media service module.
Specifically, in the embodiment of the present invention, the network data packet capturing module: integrating a third-party network library WinPcap, and capturing all network data packets communicated with the GB28181 device to be tested and the test tool; and simultaneously, storing the video and audio files generated in the streaming media communication process in real time.
Specifically, in the embodiment of the present invention, the storage module: the method is mainly used for storing all captured network packets into pcap files, and is beneficial to tracing the whole verification communication process by using wireshark. And meanwhile, storing the data analyzed by the verification module.
Specifically, in the embodiment of the present invention, the test report generating module: and generating an excel file format for the test item, so that the test result can be traced conveniently.
Specifically, in the embodiment of the present invention, the display module: the method comprises the steps of audio acquisition and playing, video playing and verification result display. The collection and playing of the audio are displayed through a oscillogram and a spectrogram, and played through a loudspeaker. The video playing is mainly to play the video file analyzed by the streaming media service module. And the verification result display is responsible for displaying the generated SIP protocol and RTP protocol analysis results in a window.
In summary, the method and the device for quickly verifying the GB/T28181 protocol provided by the present invention can be applied to quick verification of a device supporting the GB/T28181 protocol, and can quickly locate error contents and error positions corresponding to the GB/T28181 protocol by automatically analyzing the GB/T28181 protocol of the device through software, and automatically generate a test report, accelerate debugging and verification efficiency of the GB/T28181 protocol, reduce tedious work such as manual comparison of protocols, and thus improve verification efficiency of the GB/T28181 protocol.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.
Claims (10)
1. A method for rapidly verifying a GB/T28181 protocol is characterized by comprising the following steps:
s110, receiving a network communication data packet sent by GB/T28181 equipment to be tested;
s120, filtering the network communication data packet to obtain a GB/T28181 data packet, wherein the GB/T28181 data packet comprises an SIP session signaling control data packet and an RTP media transmission data packet;
s130, verifying the format and the content of the GB/T28181 data packet to obtain a verification result;
s140, generating a test report of the GB/T28181 device to be tested according to the verification result;
and S150, displaying a test report of the GB/T28181 device to be tested.
2. The method for fast verification of the GB/T28181 protocol according to claim 1, further comprising, before receiving the network communication packet sent by the GB/T28181 device under test:
configuring parameters of the GB/T28181 device to be tested, wherein the parameters of the GB/T28181 device to be tested comprise an IP (Internet protocol), a port, an SIP (Session initiation protocol) domain and an SIP ID (Session initiation protocol);
configuring media information, wherein the media information comprises resolution, frame rate, coding mode of video, sampling rate, sampling precision, sound channel and coding mode of audio.
3. The method for fast verification of the GB/T28181 protocol according to claim 1, wherein said receiving the network communication data packet sent by the GB/T28181 device under test further comprises:
and storing the network communication data packet.
4. The method for fast verifying the GB/T28181 protocol according to claim 1, wherein said verifying the format and content of the GB/T28181 data packet to obtain a verification result further comprises:
receiving the SIP session signaling control data packet, and analyzing the format and the content of the SIP session signaling control data packet to obtain an analysis result; if the analysis result conforms to the GB/T28181 protocol, a corresponding response command is replied to the GB/T28181 equipment to be tested, and the analysis result of the SIP session signaling control data packet is correct, otherwise, the analysis result is wrong;
receiving the RTP media transmission data packet, and analyzing the format and the content of the RTP media transmission data packet to obtain a decoded audio/video data packet; and splicing the decoded audio and video data packets, and generating a corresponding audio and video file so as to test the audio and video transmission result.
5. The method for fast authentication of the GB/T28181 protocol according to claim 4, wherein the type of the SIP session signaling control packet comprises: the method comprises the steps of equipment registration and cancellation, heartbeat package, real-time video on demand, equipment control, alarm event notification, network equipment information inquiry, state information report, equipment video file retrieval, historical audio and video playback, audio and video file downloading, subscription and notification, voice broadcasting and voice talkback.
6. An apparatus for fast authentication of the GB/T28181 protocol, comprising:
the network data packet capturing module is used for receiving a network communication data packet sent by GB/T28181 equipment to be tested, filtering the network communication data packet and obtaining a GB/T28181 data packet, wherein the GB/T28181 data packet comprises an SIP session signaling control data packet and an RTP media transmission data packet;
the verification module is used for verifying the format and the content of the GB/T28181 data packet to obtain a verification result;
the test report generating module is used for generating a test report of the GB/T28181 device to be tested according to the verification result;
the display module is used for displaying a test report of the GB/T28181 device to be tested;
the GB/T28181 device to be tested is connected to the device for quickly verifying the GB/T28181 protocol through a wired or wireless network.
7. The apparatus for fast verifying GB/T28181 protocol according to claim 6, further comprising a configuration module, said configuration module is configured to configure parameters of the GB/T28181 device to be tested, wherein the parameters of the GB/T28181 device to be tested include IP, port, SIP domain and SIP ID; and configuring media information, wherein the media information comprises resolution, frame rate, coding mode of video, sampling rate, sampling precision, sound channel and coding mode of audio.
8. The apparatus for fast verification of the GB/T28181 protocol according to claim 6, further comprising a storage module, said storage module being configured to store said network communication data packet.
9. The apparatus for fast authentication of GB/T28181 protocol according to claim 6, further comprising a central signaling service module and a streaming media service module, said authentication module comprising a SIP authentication module and a RTP authentication module, wherein,
the central signaling service module is used for receiving the SIP session signaling control data packet and sending the SIP session signaling control data packet to the SIP verification module;
the SIP verification module is used for analyzing the format and the content of the SIP session signaling control data packet to obtain an analysis result; if the analysis result conforms to the GB/T28181 protocol, a corresponding response command is replied to the GB/T28181 equipment to be tested through the central signaling service module, and the analysis result of the SIP session signaling control data packet is correct, otherwise, the analysis result is wrong;
the streaming media service module is used for receiving the RTP media transmission data packet and sending the RTP media transmission data packet to the RTP verification module;
the RTP verification module is used for analyzing the format and the content of the RTP media transmission data packet to obtain a decoded audio/video data packet; and splicing the decoded audio and video data packets, and generating a corresponding audio and video file so as to test the audio and video transmission result.
10. The apparatus for fast authentication of GB/T28181 protocol according to claim 9, wherein the type of the SIP session signaling control packet comprises: the method comprises the steps of equipment registration and cancellation, heartbeat package, real-time video on demand, equipment control, alarm event notification, network equipment information inquiry, state information report, equipment video file retrieval, historical audio and video playback, audio and video file downloading, subscription and notification, voice broadcasting and voice talkback.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110823815.XA CN113542032A (en) | 2021-07-21 | 2021-07-21 | Method and device for rapidly verifying GB/T28181 protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110823815.XA CN113542032A (en) | 2021-07-21 | 2021-07-21 | Method and device for rapidly verifying GB/T28181 protocol |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113542032A true CN113542032A (en) | 2021-10-22 |
Family
ID=78100725
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110823815.XA Pending CN113542032A (en) | 2021-07-21 | 2021-07-21 | Method and device for rapidly verifying GB/T28181 protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113542032A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5864658A (en) * | 1990-10-08 | 1999-01-26 | D2B Systems Company Limited | Test apparatus for verifying the conformity of a device under test with a standard application protocol |
US6373822B1 (en) * | 1999-01-08 | 2002-04-16 | Cisco Technology, Inc. | Data network protocol conformance test system |
CN1812417A (en) * | 2006-02-28 | 2006-08-02 | 西安西电捷通无线网络通信有限公司 | Method for testing safety switch-in protocol conformity of turn-on point and system thereof |
US20090162062A1 (en) * | 2007-12-21 | 2009-06-25 | Delew David A | Session initiation protocol (SIP) provisioning error detection for an optical network terminal (ONT) |
CN102724084A (en) * | 2012-05-25 | 2012-10-10 | 国网电力科学研究院 | Test and verification system for grid video monitoring system |
CN107086942A (en) * | 2017-04-25 | 2017-08-22 | 北京锐安科技有限公司 | A kind of Web content service provider ICP reported datas inspection method and device |
CN108683558A (en) * | 2018-05-10 | 2018-10-19 | 中国铁路总公司 | Railway security Communication Protocol Conformance Testing Methodology |
CN111326176A (en) * | 2018-12-14 | 2020-06-23 | 中移(杭州)信息技术有限公司 | Detection method, device and medium of RTP packet based on OPUS coding |
-
2021
- 2021-07-21 CN CN202110823815.XA patent/CN113542032A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5864658A (en) * | 1990-10-08 | 1999-01-26 | D2B Systems Company Limited | Test apparatus for verifying the conformity of a device under test with a standard application protocol |
US6373822B1 (en) * | 1999-01-08 | 2002-04-16 | Cisco Technology, Inc. | Data network protocol conformance test system |
CN1812417A (en) * | 2006-02-28 | 2006-08-02 | 西安西电捷通无线网络通信有限公司 | Method for testing safety switch-in protocol conformity of turn-on point and system thereof |
US20090162062A1 (en) * | 2007-12-21 | 2009-06-25 | Delew David A | Session initiation protocol (SIP) provisioning error detection for an optical network terminal (ONT) |
CN102724084A (en) * | 2012-05-25 | 2012-10-10 | 国网电力科学研究院 | Test and verification system for grid video monitoring system |
CN107086942A (en) * | 2017-04-25 | 2017-08-22 | 北京锐安科技有限公司 | A kind of Web content service provider ICP reported datas inspection method and device |
CN108683558A (en) * | 2018-05-10 | 2018-10-19 | 中国铁路总公司 | Railway security Communication Protocol Conformance Testing Methodology |
CN111326176A (en) * | 2018-12-14 | 2020-06-23 | 中移(杭州)信息技术有限公司 | Detection method, device and medium of RTP packet based on OPUS coding |
Non-Patent Citations (2)
Title |
---|
崔云红; 郑征; 王冰洋; 苏智睿; 孙琼芳; 汤宁; 孟卿卿; 何迪; 尹萍: "《国家标准GB/T 28181-2016符合性测试规范》", 《基础科学》, pages 3 - 10 * |
陈朝武;蒋乐中;房子河;赵问道;李硕;张本锋;施巨岭;张跃;廖双龙;孔维生;马伯康;郅晨;贺静;黄麒麟: "《公共安全视频监控联网系统信息传输、交换、控制技术要求》", 《社会科学Ⅱ辑》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100473025C (en) | Methods and systems for coordinated monitoring of network transmission events | |
US7583613B2 (en) | Method of monitoring the quality of a realtime communication | |
KR102188222B1 (en) | Video service quality evaluation method and device | |
US20050204052A1 (en) | Timing of quality of experience metrics | |
US9282133B2 (en) | Communicating control information within a real-time stream | |
ES2364475T3 (en) | PROCEDURE FOR THE ANALYSIS OF THE DISTURBANCES OF A FLOW OF DATA IN REAL TIME IN A DATA NETWORK, COMMUNICATION SYSTEM AND CONTROL COMPUTER. | |
KR20100120823A (en) | Voip anomaly traffic detection method with flow-level data | |
US7675948B2 (en) | Performance analysis of a circuit switched mobile telecommunications network | |
CN103166808B (en) | A monitoring method for IPTV service quality, Apparatus and system | |
EP2211521B1 (en) | Method and device for implementing test | |
JP2008535333A (en) | Large-scale analysis of push-to-talk traffic | |
CN108810475A (en) | A kind of Android video monitoring apparatus based on Onvif standards and Sip agreements | |
CN113542032A (en) | Method and device for rapidly verifying GB/T28181 protocol | |
EP2514143B1 (en) | Connection analysis in communication systems | |
US8959025B2 (en) | System and method for automatic identification of speech coding scheme | |
CN102137090B (en) | Method for logging in VOIP (Voice Over Internet Protocol) network and authentication server | |
US7821940B2 (en) | Transmission of maintenance information of an active packet connection through employment of packets communicated over the active packet connection | |
KR100452890B1 (en) | call test system and method thereof in ALL-IP mobile communication network | |
CN115086782B (en) | Media data transmission method and device | |
KR101423843B1 (en) | METHOD FOR PROVIDING AND MANAGING QUALITY INFORMATION IN mVoIP SERVICE | |
KR100808981B1 (en) | Timing of quality of experience metrics | |
CN117692438A (en) | Terminal detection application method for soft switching platform | |
Hou | An Upgrade of Network Traffic Recognition System for SIP/VoIP Traffic Recognition | |
Yellakonda | DESIGN AND IMPLEMENTATION OF RICH COMMUNICATION SERVICE SCENARIO REPLAYER AND PERFORMANCE EVALUATION OF APPLICATION SERVICE | |
Mohamed | Assessment and Improvement of the Quality of Voice-over-IP Communications |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |