CN109218104B - Method and device for realizing QoS network optimization based on Onvif protocol - Google Patents

Method and device for realizing QoS network optimization based on Onvif protocol Download PDF

Info

Publication number
CN109218104B
CN109218104B CN201811160177.2A CN201811160177A CN109218104B CN 109218104 B CN109218104 B CN 109218104B CN 201811160177 A CN201811160177 A CN 201811160177A CN 109218104 B CN109218104 B CN 109218104B
Authority
CN
China
Prior art keywords
qos
dscp
setting
onvif protocol
protocol
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.)
Active
Application number
CN201811160177.2A
Other languages
Chinese (zh)
Other versions
CN109218104A (en
Inventor
于宏志
王景彬
王思俊
董晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tiandi Weiye Technology Co Ltd
Original Assignee
Tiandy Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tiandy Technologies Co Ltd filed Critical Tiandy Technologies Co Ltd
Priority to CN201811160177.2A priority Critical patent/CN109218104B/en
Publication of CN109218104A publication Critical patent/CN109218104A/en
Application granted granted Critical
Publication of CN109218104B publication Critical patent/CN109218104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements

Abstract

The invention discloses a method for realizing QoS network optimization based on an Onvif protocol, which realizes the dynamic setting of QoS network parameters between devices through the Onvif protocol by carrying out extension design on an Onvif protocol network interface and designing a QoS realization scheme in an embedded device operation program based on Linux, so as to achieve the purposes that important services are not delayed or lost when the network is overloaded and congested, and the real-time performance and the stability of data transmission are optimized. The invention is applied to a multi-channel concurrent video monitoring system with high real-time requirement, and enables the QoS network optimization among different manufacturer devices through the Onvif protocol, thereby solving the problem of data transmission delay blockage in the monitoring system.

Description

Method and device for realizing QoS network optimization based on Onvif protocol
Technical Field
The invention belongs to the technical field of network transmission interaction and video monitoring, and relates to a method for realizing Onvif protocol extension design and embedded program QoS design and application.
Background
The Onvif protocol is an open network video interface standard, is applied to the field of security monitoring, and provides a standardized network protocol. The Onvif standardizes the format type and the interaction mode of network data, builds a model of network communication, provides a universal interface for communication among equipment, and realizes interconnection and intercommunication among equipment with different functions of different manufacturers.
The QoS service quality is realized by a network technical scheme, provides better service capability for specified communication in a network, optimizes the delay and blockage problems of the specified communication network, and is very necessary for key signaling and high-real-time streaming media in a video monitoring system. When the network is overloaded and congested, the specified service is ensured not to be delayed and discarded, and the transmission real-time performance and stability are ensured.
DSCP, i.e. differentiated services code point, is a classification standard of Diff-Serv differentiated services model in QoS technical scheme. In the service class TOS flag byte of each packet IP header, priority is given by an encoded value.
The embedded IPC and NVR are hardware platforms based on Haisi chips and ARM Cortex kernels, the embedded IPC and NVR run in an embedded Linux system environment, the IPC realizes audio and video acquisition, coding and transmission, and the NVR realizes streaming media receiving and storage. And the IPC and the NVR carry out signaling interaction and transmission of streaming media data through an Onvif protocol.
In the existing technical scheme, the Onvif protocol defaults without QoS acquisition and setting, and IPC and NVR equipment do not support the QoS function scheme. The mode of transmission of data in a video surveillance system is therefore to send and receive messages as much as possible.
However, the client and the server send and receive messages as much as possible, and no guarantee is provided for instantaneity and reliability. When the network is congested, the data packet is delayed or discarded, which affects important signaling transmission and streaming media real-time transmission, and affects system stability.
In addition, in the Onvif devices of different manufacturers, because the default protocol does not include QoS, the setting cannot be uniformly performed on the device side, and a device Web interface of each support function needs to be logged in for configuration.
In view of the above, these problems and disadvantages are the problems that the art is presently compelling to address.
Disclosure of Invention
The invention aims to carry out extension design on the network interface of the Onvif protocol, so that the QoS can be dynamically set among the devices based on the Onvif, the devices have the QoS function, and the optimization of network transmission is realized.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method for realizing QoS network optimization based on Onvif protocol includes:
s1, carrying out extension design on the Onvif protocol according to the QoS scheme;
and S2, the QoS is realized in the device and is set to the kernel through the shared memory.
Further, the method for expanding and designing the Onvif protocol according to the QoS scheme in step S1 includes:
s101, expanding interfaces of all functions of GetCaabilities acquisition equipment in an Onvif protocol to enable a network capability set structure to comprise QoS functions;
s102, expanding interfaces of the configuration of the GetNetworkInterfaces acquisition equipment network interface and the configuration of the SetNetworkInterfaces setting equipment network interface in the Onvif protocol, so that the expansion structure of the network InterfaceExtension network interface contains the state and the parameters of QoS.
Furthermore, the DSCP coding designed in step S1 is divided into two categories, which are DSCP Bitstream classification and DSCP signal classification, and the priority of stream and signal transmission is determined according to different classifications.
Further, the method for setting QoS to the kernel through the shared memory in the device in step S2 includes:
s201, expanding DSCP parameter content of a NetDevice shared memory structure body in an equipment running program;
s202, analyzing QoS parameters of Onvif protocol interaction, and assigning to an iStemDscpVal and an iCmdDscpVal of a global variable structure;
s203, setting the DSCP priority sent by the code stream in the PthreadTpClientSend TCP client sending thread;
s204, setting the DSCP priority of signaling reception in the PthreadTpClientRecv TCP client receiving thread.
In another aspect of the present invention, a device for implementing QoS network optimization based on the Onvif protocol is further provided, including:
the protocol extension module is used for carrying out extension design on the Onvif protocol according to the QoS scheme;
and the setting module is used for realizing that the QoS is set to the kernel through the shared memory in the equipment.
Further, the protocol extension module comprises:
the function interface extension unit is used for extending interfaces of all functions of GetCapabilites acquisition equipment in the Onvif protocol so that a network capability set structure of the network capabilities contains QoS functions;
and the network interface extension unit is used for extending interfaces of the GetNetworkInterfaces acquisition equipment network interface configuration and the SetNetworkInterfaces setting equipment network interface configuration in the Onvif protocol, so that the NetworkInterfaceExtension network interface extension structure body contains the state and the parameters of the QoS.
Furthermore, the protocol extension module also comprises a code classification unit which is used for designing codes of the DSCP into two types, namely DSCP Bitstream code stream classification and DSCP signal signaling classification, and determining the priority of code stream and signaling transmission according to different classifications.
Further, the setting module includes:
the shared memory structure body expansion unit is used for expanding the DSCP parameter content of the NetDevice shared memory structure body in the equipment running program;
the analysis unit is used for analyzing the QoS parameters of the Onvif protocol interaction and assigning the QoS parameters to the global variable structure iStreamDscpVal and iCmdDscpVal;
a sending setting unit, configured to set a DSCP priority for sending a bitstream in a pthreamdtcppurge send TCP client sending thread;
and the receiving setting unit is used for setting the DSCP priority of signaling receiving in the PthreadTcPClientRecv TCP client receiving thread.
Compared with the prior art, the invention has the following beneficial effects:
the invention carries out expansion design on the network interface of the Onvif protocol, defines the data type and format, and builds a frame for acquiring and setting the QoS parameters, so that the QoS can be dynamically set between the devices based on the Onvif.
The invention designs a scheme that QoS parameters are set to a kernel through an interprocess communication shared memory after being transmitted according to Onvif. Therefore, the device has the QoS function and realizes the optimization of network transmission.
Drawings
Fig. 1 is a flow of implementing QoS configured to a kernel through a shared memory in a device according to an embodiment of 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 main content of the invention is as follows:
1. extension design of Onvif protocol according to QoS scheme
2. Scheme for realizing QoS setting to kernel through shared memory in design equipment
The method specifically comprises the following steps:
s1, expanding and designing Onvif protocol according to QoS scheme
S101, expanding interfaces of all functions of GetCapabilites acquisition equipment in an Onvif protocol to enable a network capability set structure to contain QoS functions, wherein the design content of an Extension field is as follows:
Figure GDA0003098772170000041
s102, expanding interfaces of the configuration of the GetNetworkInterfaces acquisition equipment network interface and the configuration of the SetNetworkInterfaces setting equipment network interface in the Onvif protocol, so that the expansion structure of the network InterfaceExtension network interface contains the state and the parameters of QoS. The codes for designing the DSCP are divided into two categories, namely DSCP Bitstream code stream classification and DSCP signal signaling classification. And determining the priority of code stream and signaling transmission according to different grades.
Figure GDA0003098772170000051
Figure GDA0003098772170000061
S2, designing scheme for setting QoS in equipment to kernel through shared memory
S201, expanding the DSCP parameter content of the NetDevice shared memory structure body in the equipment running program:
Figure GDA0003098772170000062
s202, resolving QoS parameters of Onvif protocol interaction, and assigning to global variable structures iStreamDscpVal and iCmdDscpVal.
S203, setting the DSCP priority of the code stream transmission in the PthreadTpClientSend TCP client transmission thread:
iOrderValue=Tcp_Get_QosStreamDscpValue();
iOrderValue ═ iOrderValue < < 2; v/left shift by two bits to obtain TOS value
setsockopt(tsThis->m_socket,IPPROTO_IP,IP_TOS,(int
& iOrderValue, sizeof (iOrderValue)); // set IP _ TOS socket
S204, setting the DSCP priority of signaling reception in the PthreadtclientRecv TCP client receiving thread:
iOrderValue=Tcp_Get_QosCmdDscpValue();
iOrderValue ═ iOrderValue < < 2; v/left shift by two bits to obtain TOS value
setsockopt(tsThis->m_socket,IPPROTO_IP,IP_TOS,(int
& iOrderValue, sizeof (iOrderValue)); // set IP _ TOS socket
The specific implementation details of the scheme for setting QoS to the kernel through the shared memory in the design device are as shown in fig. 1:
(1) resolving an Onvif protocol to obtain a QoS parameter;
(2) checking the validity of the DSCP parameters;
(3) assigning the DSCP value to the shared memory structure;
(4) a code stream is set in a TCP client sending thread to send a DSCP;
(5) and a signaling receiving DSCP is set in the TCP client receiving thread.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (4)

1. A method for realizing QoS network optimization based on Onvif protocol is characterized in that the method comprises the following steps:
s1, carrying out extension design on the Onvif protocol according to the QoS scheme;
s2, setting QoS parameters in the device to a kernel through a shared memory;
the method for expanding and designing the Onvif protocol according to the QoS scheme in step S1 includes:
s101, expanding interfaces of all functions of GetCaabilities acquisition equipment in an Onvif protocol to enable a network capability set structure to comprise QoS functions;
s102, expanding interfaces of GetNetworkInterfaces acquisition equipment network interface configuration and SetNetworkInterfaces setting equipment network interface configuration in an Onvif protocol, so that a NetworkInterfaces extension network interface expansion structure body contains QoS state and parameters;
the method for setting the QoS parameter in the device to the kernel through the shared memory in step S2 includes:
s201, expanding DSCP parameter content of a NetDevice shared memory structure body in an equipment running program;
s202, analyzing QoS parameters of Onvif protocol interaction, and assigning to global variable structures iStreamDscpVal and iCmdDscpVal of a kernel;
s203, setting the DSCP priority sent by the code stream in the PthreadTpClientSend TCP client sending thread;
s204, setting the DSCP priority of signaling reception in the PthreadTpClientRecv TCP client receiving thread.
2. The method according to claim 1, wherein the Onvif protocol is extended in step S1, including dividing the codes of DSCP parameters into two categories, DSCP Bitstream code stream classification and DSCP signal signaling classification, and determining the priority of code stream and signaling transmission according to different classifications.
3. An apparatus for implementing QoS network optimization based on Onvif protocol, comprising:
the protocol extension module is used for carrying out extension design on the Onvif protocol according to the QoS scheme;
the setting module is used for setting the QoS parameters in the equipment to the kernel through the shared memory;
the protocol extension module includes:
the function interface extension unit is used for extending interfaces of all functions of GetCapabilites acquisition equipment in the Onvif protocol so that a network capability set structure of the network capabilities contains QoS functions;
the network interface extension unit is used for extending interfaces of GetNetworkInterfaces acquisition equipment network interface configuration and SetNetworkInterfaces setting equipment network interface configuration in the Onvif protocol, so that a NetworkInterfaceExtension network interface extension structure body contains QoS state and parameters;
the setting module includes:
the shared memory structure body expansion unit is used for expanding the DSCP parameter content of the NetDevice shared memory structure body in the equipment running program;
the analysis unit is used for analyzing the QoS parameters of the Onvif protocol interaction and assigning the QoS parameters to the global variable structure iStreamDscpVal and iCmdDscpVal of the kernel;
a sending setting unit, configured to set a DSCP priority for sending a bitstream in a pthreamdtcppurge send TCP client sending thread;
and the receiving setting unit is used for setting the DSCP priority of signaling receiving in the PthreadTcPClientRecv TCP client receiving thread.
4. The apparatus of claim 3, wherein the protocol extension module further comprises a code classification unit for designing codes of the DSCP into two classes, namely DSCP Bitstream code stream classification and DSCP signal signaling classification, and determining priorities of code stream and signaling transmission according to different classifications.
CN201811160177.2A 2018-09-30 2018-09-30 Method and device for realizing QoS network optimization based on Onvif protocol Active CN109218104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811160177.2A CN109218104B (en) 2018-09-30 2018-09-30 Method and device for realizing QoS network optimization based on Onvif protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811160177.2A CN109218104B (en) 2018-09-30 2018-09-30 Method and device for realizing QoS network optimization based on Onvif protocol

Publications (2)

Publication Number Publication Date
CN109218104A CN109218104A (en) 2019-01-15
CN109218104B true CN109218104B (en) 2021-12-07

Family

ID=64982724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811160177.2A Active CN109218104B (en) 2018-09-30 2018-09-30 Method and device for realizing QoS network optimization based on Onvif protocol

Country Status (1)

Country Link
CN (1) CN109218104B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438008A (en) * 2007-01-26 2012-05-02 日本电气株式会社 Video distribution system and video distribution method
CN103297532A (en) * 2013-06-07 2013-09-11 浙江宇视科技有限公司 Direct access storage method by ONVIF (Open Network Video Interface Forum) protocol
CN103780900A (en) * 2014-01-16 2014-05-07 国家电网公司 ONVIF simulating testing device and method
US9704393B2 (en) * 2011-01-11 2017-07-11 Videonetics Technology Private Limited Integrated intelligent server based system and method/systems adapted to facilitate fail-safe integration and/or optimized utilization of various sensory inputs

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303617A (en) * 2016-08-26 2017-01-04 四川弘和通讯有限公司 Generic video distribution technology based on ZeroMQ and MessagePack

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438008A (en) * 2007-01-26 2012-05-02 日本电气株式会社 Video distribution system and video distribution method
US9704393B2 (en) * 2011-01-11 2017-07-11 Videonetics Technology Private Limited Integrated intelligent server based system and method/systems adapted to facilitate fail-safe integration and/or optimized utilization of various sensory inputs
CN103297532A (en) * 2013-06-07 2013-09-11 浙江宇视科技有限公司 Direct access storage method by ONVIF (Open Network Video Interface Forum) protocol
CN103780900A (en) * 2014-01-16 2014-05-07 国家电网公司 ONVIF simulating testing device and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
onvif规范中文介绍;ghostyu;《CSDN, https://blog.csdn.net/ghostyu/article/details/8162193》;20121108;全文 *

Also Published As

Publication number Publication date
CN109218104A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
US10291535B2 (en) Method and apparatus for controlling media delivery in multimedia transport network
US7859998B2 (en) System and method for managing pre-emption of quality of service (QoS) allocations in a network
KR100609147B1 (en) System and Method for providing TPEG traffic and traveler information, and DMB Broadcasting Receiving System and Method for receiving TPEG traffic and traveler information
EP2562964B1 (en) Alleviating congestion in a cable modem
AU2012321424A1 (en) Apparatus and method for transmitting multimedia data in hybrid network
US10498492B2 (en) Method and device for receiving and transmitting information in multimedia system
KR20130023094A (en) Dynamic bandwidth re-allocation
WO2011066088A1 (en) Method of priority based transmission of wireless video
US7936677B2 (en) Selection of an audio visual stream by sampling
CN107846341B (en) Method, related device and system for scheduling message
WO2012161652A1 (en) Methods for transmitting and receiving a digital signal, transmitter and receiver
US20120124633A1 (en) Wireless Video Streaming Quality Management for Bandwidth Constrained Cellular Network
CN111385616B (en) Method and device for determining video transmission quality
CN109218104B (en) Method and device for realizing QoS network optimization based on Onvif protocol
KR102277748B1 (en) Method and apparatus of transmitting media data related information in multimedia transmission system
US10523399B2 (en) Apparatus and method for transmitting/receiving multimedia data delivery characteristics information in multimedia communication system
JP4900272B2 (en) Satellite communication earth station
US10455261B2 (en) Signaling scheme for improved video streaming
WO2009052727A1 (en) Sending method, processing method, communication system and device for data flow information
US11394650B2 (en) Modificationless packet prioritization for frame generation
KR20030070350A (en) Method and apparatus for controlling a packet in home network
KR100797388B1 (en) Adaptive packet scheduling apparatus for uncapsulated IP packet data communication in interactive satellite communication system, and data receive apparatus and transmitting and receiving method using it
KR100799538B1 (en) Apparatus for transmitting and receiving broadcasting and communication data in interactive satellite communication system based on DVB-S2
JP2004080706A (en) Packet relay device
CN111585818A (en) System and method for distributing coefficients of user information based on service quality

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211112

Address after: 300450 No. 8, Haitai Huake Second Road, Huayuan Industrial Zone (outside the ring), Binhai New Area, Tianjin

Applicant after: Tiandi Weiye Technology Co., Ltd

Address before: 300457 room B307, building 2, No. 8, Haitai Huake Second Road, Huayuan Industrial Zone (outside the ring), high tech Zone, Binhai New Area, Tianjin

Applicant before: Tianjin Tiandi Weiye Electronic Industry Manufacturing Co., Ltd

GR01 Patent grant
GR01 Patent grant