CN111614612B - Communication protocol implementation method, device, network management server and storage medium - Google Patents

Communication protocol implementation method, device, network management server and storage medium Download PDF

Info

Publication number
CN111614612B
CN111614612B CN202010260890.5A CN202010260890A CN111614612B CN 111614612 B CN111614612 B CN 111614612B CN 202010260890 A CN202010260890 A CN 202010260890A CN 111614612 B CN111614612 B CN 111614612B
Authority
CN
China
Prior art keywords
parameter
response
network management
management server
message
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
CN202010260890.5A
Other languages
Chinese (zh)
Other versions
CN111614612A (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.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology 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 Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN202010260890.5A priority Critical patent/CN111614612B/en
Publication of CN111614612A publication Critical patent/CN111614612A/en
Application granted granted Critical
Publication of CN111614612B publication Critical patent/CN111614612B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention provides a method, a device, a network management server and a storage medium for realizing a communication protocol, which are applied to the video networking, wherein the network management server sends a command message to video networking equipment, and the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.

Description

Communication protocol implementation method, device, network management server and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for implementing a communication protocol, a network management server, and a storage medium.
Background
In the field of video networking, when an existing network management server manages video networking equipment, a binary protocol is generally adopted, specifically, the binary protocol adopts 2 bytes to represent a "command code", a plurality of bytes represent a "load", and different bytes correspond to different meanings.
When the protocol is extended, for example, a terminal mask and a heartbeat timeout function are newly set, and at this time, an extension load is required, a mask is newly added by 6 bytes, and a timeout is newly added by 4 bytes. Each time the protocol is extended, the network management server and the terminal are modified, if the network management server extends and modifies the communication protocol, and the terminal does not extend and modify the communication protocol, the network management server adopts the modified communication protocol to communicate with the terminal, and the terminal reports errors.
For example, if the terminal can only receive 10 bytes through the communication protocol, the network management server modified communication protocol sends 20 bytes; thus, the terminal cannot identify the data packet sent by the network management server.
If the network management server and the video networking equipment adopt binary protocol communication, the binary protocol communication is expanded and modified, the fixed bytes are required to be modified, the expansibility is poor, and the readability is poor.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention are provided to provide a method, an apparatus, a network management server, a video networking device, and a storage medium for implementing a communication protocol that overcome or at least partially solve the foregoing problems.
In a first aspect, an embodiment of the present invention provides a method for implementing a communication protocol, which is applied to the internet of vision, where the method includes:
the network management server sends a command message to the visual networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the visual networking equipment;
and the network management server receives a response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
Optionally, before the network management server sends the command message to the video networking device, the method further includes:
and carrying out communication protocol parameter configuration on the network management server and the video networking equipment respectively, wherein the communication protocol parameters are the communication protocol parameters in the KLV form, so that the communication protocol parameter configuration between the network management server and the video networking equipment is consistent.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
Wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
Optionally, the network management server sends a command message to the video networking device, including:
the network management server sends a first command message to the visual networking device, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
in a corresponding manner,
the network management server receives a response message fed back by the video networking device, and the response message comprises:
the network management server receives a first response message fed back by the video networking device, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is not less than 1 and not more than m, i is a natural number, j is not less than 1 and not more than m, j is a natural number, and i and j are not equal
Optionally, the network management server sends a command message to the video networking device, including:
the network management server sends a second command message to the visual networking device, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
in a corresponding manner,
the network management server receives a response message fed back by the video networking device, and the response message comprises:
the network management server receives a second response message fed back by the video networking device, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identification, a parameter length corresponding to the second parameter identification, a parameter value corresponding to the second parameter identification, … …, the nth parameter identification, a parameter length corresponding to the nth parameter identification, a parameter value corresponding to the nth parameter identification
Optionally, if the size of the command message is greater than a preset value, the sending, by the network management server, the command message to the internet of vision device includes:
the network management server packetizes the command message to obtain a split message, wherein the split message further comprises a total packet number and a current packet number;
and the network management server sends the split message to the visual networking equipment.
Optionally, the network management server packetizes the command message to obtain a split message, where the split message further includes a total packet number, a current packet number, and application protocol data information in a split KLV form, and the method includes:
if the command message contains a plurality of parameter identifiers and the parameter value corresponding to the parameter identifiers is smaller than a first preset value, the network management server splits the plurality of parameter identifiers in the command message according to a preset rule to obtain a split message;
if the command message only comprises one parameter identifier, and the parameter value corresponding to the parameter identifier is larger than a second preset value, the network management server splits the parameter value in the command message to obtain the split message, wherein the split application protocol data information in the KLV form comprises the parameter identifier, a parameter length, a first parameter length sequence number k and a first parameter value corresponding to the first parameter length sequence number k, x is larger than or equal to 1 and smaller than or equal to k, k is a natural number, and the parameter length is the total length of bytes occupied by k first parameter values.
In a second aspect, an embodiment of the present invention provides a method for implementing a communication protocol, applied to video networking, where the method includes:
the method comprises the steps that an Internet of view device receives a command message sent by a network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the Internet of view device;
the video networking server analyzes the command message to obtain a response message;
and the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
Optionally, before the video networking device receives the command message sent by the network management server, the method further includes:
and carrying out communication protocol parameter configuration on the network management server and the video networking equipment respectively, wherein the communication protocol parameters are the communication protocol parameters in the KLV form, so that the communication protocol parameter configuration between the network management server and the video networking equipment is consistent.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
Optionally, the receiving, by the internet of view device, a command packet sent by a network management server includes:
the video networking device receives a first command message sent by a network management server, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
in a corresponding manner,
the visual network server analyzes the command message to obtain a response message, which comprises the following steps:
the video networking server analyzes the first command message to obtain a first response message;
In a corresponding manner,
the said visual network equipment sends the said response message to the said network management server, including:
the video networking device sends the first response message to the network management server, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
Optionally, the receiving, by the internet of view device, a command packet sent by a network management server includes:
the video networking device receives the second command message sent by the network management server, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
In a corresponding manner,
the visual network server analyzes the command message to obtain a response message, which comprises the following steps:
the video networking server analyzes the second command message to obtain a second response message;
in a corresponding manner,
the said visual network equipment sends the said response message to the said network management server, including:
the video networking device sends the second response message to the network management server, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
Optionally, if the size of the command message is greater than a preset value, the receiving, by the internet of view device, the command message sent by the network management server includes:
the video networking equipment receives a split message sent by the network management server, wherein the split message is obtained by the network management server in a sub-packaging mode of the command message; the split message also comprises the total packet number, the current packet number and the split KLV-type application protocol data information.
In a third aspect, an embodiment of the present invention provides a device for implementing a communication protocol, which is applied to the internet of vision, and the device includes:
the first sending module is used for sending a command message to the visual networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for marking different instructions issued by the network management server to the visual networking equipment;
and the first receiving module is used for receiving a response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
Optionally, the apparatus further comprises a configuration module, the configuration module is configured to:
and carrying out communication protocol parameter configuration on the network management server and the video networking equipment respectively, wherein the communication protocol parameters are the communication protocol parameters in the KLV form, so that the communication protocol parameter configuration between the network management server and the video networking equipment is consistent.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
Wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
Optionally, the first sending module is configured to:
sending a first command message to the internet-of-view device, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
in a corresponding manner,
the first receiving module is configured to:
receiving a first response message fed back by the internet of view device, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
The first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
Optionally, the first sending module is configured to:
sending a second command message to the internet-of-view device, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
in a corresponding manner,
the first receiving module is configured to:
receiving a second response message fed back by the internet of view device, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
Optionally, if the size of the command packet is greater than a preset value, the first sending module is further configured to:
subpackaging the command message to obtain a split message, wherein the split message further comprises a total packet number and a current packet number;
and sending the split message to the visual networking equipment.
Optionally, the first sending module is specifically configured to:
if the command message contains a plurality of parameter identifiers and the parameter value corresponding to the parameter identifiers is smaller than a first preset value, splitting the plurality of parameter identifiers in the command message according to a preset rule to obtain a split message;
if the command message only comprises one parameter identifier, and the parameter value corresponding to the parameter identifier is larger than a second preset value, splitting the parameter value in the command message to obtain the split message, wherein the split application protocol data information in the KLV form comprises the parameter identifier, the parameter length, a first parameter length serial number k and a first parameter value corresponding to the first parameter length serial number k, x is larger than or equal to 1 and smaller than or equal to k, k is a natural number, and the parameter length is the total length of bytes occupied by k first parameter values.
In a fourth aspect, an embodiment of the present invention provides a device for implementing a communication protocol, which is applied to the internet of vision, and the device includes: the second receiving module is used for receiving a command message sent by a network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the visual networking equipment;
the analysis module is used for analyzing the command message and obtaining a response message;
and the second sending module is used for sending the response message to the network management server, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
Optionally, the apparatus further comprises a configuration module, configured to:
and carrying out communication protocol parameter configuration on the network management server and the video networking equipment respectively, wherein the communication protocol parameters are the communication protocol parameters in the KLV form, so that the communication protocol parameter configuration between the network management server and the video networking equipment is consistent.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
Optionally, the second receiving module is configured to:
receiving a first command message sent by a network management server, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
in a corresponding manner,
the analysis module is used for:
analyzing the first command message to obtain a first response message;
in a corresponding manner,
the second sending module is configured to:
the first response message is sent to the network management server, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
Optionally, the second receiving module is configured to:
receiving the second command message sent by the network management server, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
in a corresponding manner,
the analysis module is used for:
analyzing the second command message to obtain a second response message;
in a corresponding manner,
the second sending module is configured to:
sending the second response message to the network management server, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
Optionally, if the size of the command packet is greater than a preset value, the second receiving module is further configured to:
receiving a split message sent by the network management server, wherein the split message is obtained by the network management server in a sub-packaging way of the command message; the split message also comprises the total packet number, the current packet number and the split KLV-type application protocol data information.
In a fifth aspect, an embodiment of the present invention provides a network management server, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the method for implementing the communication protocol provided in the first aspect.
In a sixth aspect, an embodiment of the present invention provides a computer readable storage medium having stored therein a computer program that when executed implements the method for implementing the communication protocol provided in the first aspect.
In a seventh aspect, an embodiment of the present invention provides an optical networking device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the method for implementing the communication protocol provided in the second aspect.
In an eighth aspect, an embodiment of the present invention provides a computer readable storage medium having stored therein a computer program that when executed implements the method for implementing the communication protocol provided in the second aspect.
The technical scheme provided by the embodiment of the invention is applied to the video networking, and the network management server sends a command message to the video networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
Drawings
FIG. 1 is a flow chart of steps of an embodiment of a method for implementing a communication protocol according to the present invention;
FIG. 2 is a flow chart of steps of an embodiment of a method for implementing another communication protocol of the present invention;
FIG. 3 is a flow chart illustrating steps of an embodiment of a method for implementing a communication protocol according to the present invention;
FIG. 4 is a flow chart of steps of an embodiment of a method for implementing a communication protocol in accordance with the present invention;
FIG. 5 is a flow chart of steps of an embodiment of a method for implementing a communication protocol in accordance with the present invention;
FIG. 6 is a flow chart illustrating steps of an embodiment of a method for implementing a communication protocol in accordance with the present invention;
FIG. 7 is a flow chart of steps of an embodiment of a method for implementing a communication protocol in accordance with the present invention;
FIG. 8 is a flow chart of steps of an embodiment of a method of implementing a further communication protocol in accordance with the present invention;
FIG. 9 is a block diagram illustrating an embodiment of a communication protocol implementing apparatus according to the present invention;
FIG. 10 is a block diagram illustrating an embodiment of a communication protocol implementing apparatus according to the present invention;
fig. 11 is a schematic diagram of a network management server according to the present invention;
fig. 12 is a schematic diagram of a visual networking device of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
The nouns are explained as follows:
and the video networking terminal: the service landing equipment on the video network comprises actual participants or servers of the video network service, including various conference set-top boxes, video telephone set-top boxes, operation teaching set-top boxes, streaming media gateways, storage gateways, media synthesizers and the like. The video networking terminal needs to register above the video networking server to perform normal service. A video networking number is required.
And the network management server: the core equipment on the visual network controls the operations of opening and registering the service of the visual network sub-control server by controlling the autonomous server, is the management 'brain' of the visual network, and provides a UI interface for the client to call.
And (3) setting signaling: after receiving the signaling, the signaling receiver generally makes a "Set" action to change its own information. For example, register the device signaling, after receiving the signaling, the main control server analyzes the information parameters in the signaling, writes them into the local file system and the memory, and returns the operation result value (usually, whether two result values are used) to the signaling sending.
Query signaling: after receiving the signaling, the signaling receiver generally makes "Get" action without changing own information. For example, inquiring the device signaling, after receiving the signaling, the master control server compiles the signaling parameters in a certain format according to the device information stored in the file system, and returns the result to the signaling sender.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a method for implementing a communication protocol according to the present invention may be applied to the internet of view, and may specifically include the following steps:
S101, a network management server sends a command message to a visual networking device, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the visual networking device;
based on the defects of binary protocols in the prior art, the embodiment of the invention provides a new network management protocol, namely KLV protocol, and the network management server can directly interact with the video networking equipment by adopting the KLV protocol, and the video networking equipment comprises a video networking terminal or a video networking server, thereby achieving the purpose of managing the video networking equipment.
Before the network management server sends a command message to the video networking equipment, the network management server and the video networking equipment are respectively configured with communication protocol parameters, wherein the communication protocol parameters are in a KLV form, so that the communication protocol parameters between the network management server and the video networking equipment are consistent in configuration.
Specifically, the network management server and the video networking device are applied to the video networking, and the network management server sends a command message to the video networking device, wherein the command message at least comprises communication protocol parameters in a KLV form, namely application protocol data information in the KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking device.
S102, the network management server receives a response message fed back by the video networking device, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
Specifically, the network management server adopts a communication protocol in a KLV form to send a command message to the video networking equipment, the video networking equipment returns a response message to the network management server after receiving the command message, and the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
The implementation method of the communication protocol provided by the embodiment of the invention is applied to the video networking, and the command message is sent to the video networking equipment through the network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued to the video networking equipment by the network management server; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
A further embodiment of the present invention further provides a method according to the above embodiment.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
Specifically, the parameters of the KLV-form communication protocol include one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value;
wherein the command code is 2 bytes, the network byte order, the 1 st byte is the command type, and the 2 nd byte is the command word.
Command type 1 byte, detailed in table 1 below, table 1 is an example of command types.
TABLE 1
Bit 8-Bit1 Description of the invention
0x01 Network management =>View network server, inquiry server parameter
0x81 Video networking server =>Network manager, inquiry server parameter response
0x02 Network management =>Vision network server, set up server parameter
0x82 Video networking server = >Network management, setting clothesServer parameter response
0x03 Network management =>Vision networking terminal, inquiring terminal parameter
0x83 Video networking terminal =>Network manager, inquiry terminal parameter response
0x04 Network management =>Video networking terminal, terminal parameter setting
0x84 Video networking terminal =>Network management, setting terminal parameter response
Command word 1 byte, the command word including a server command word and a view networking device command word, wherein the server signaling portion command word is shown in table 2, and the view networking device signaling portion command word is shown in table 3:
TABLE 2
Command word Description of the invention
0x01 Restarting
0x02 Querying server information
0x03 Server upgrades
TABLE 3 Table 3
Command word Description of the invention
0x01 Device restart
0x02 Inquiring terminal information
0x03 Batch inquiry terminal information
Specifically, the number of parameters, i.e., number Num,2 bytes, network endian, represents the number of parameters followed by several parameters, i.e., parameter identification keys.
Specifically, the parameter identifier is an instruction identifier issued by the network management server to the visual networking device, namely a parameter Key,2 bytes and a network byte order, and represents a parameter type;
the parameter Length is the byte Length of the parameter value;
the parameter Value is the parameter Value corresponding to the parameter identifier.
The parameters can be multiple, and the Key-Length-Value form is adopted. Length occupies 2 bytes, network byte order; the Value Length is determined by the parameter Length. The Value refers to int, short and the like, and network byte order is adopted; if Value is a character string, the word sequence is not required to be converted.
Common keys are shown in table 4, for example.
Specifically, the response message also includes a response result, namely a Ret value, 2 bytes and a network byte order. 0 represents success; a value greater than 0 indicates failure. 1 represents a parameter error, and the error parameter is pointed out by using a parameter Key; other errors are contracted again, and common errors are shown in Table 5.
TABLE 4 Table 4
Figure BDA0002439251080000161
TABLE 5
Figure BDA0002439251080000162
As shown in fig. 2, a step flow chart of an embodiment of another implementation method of a communication protocol of the present invention is shown, where the implementation method of the communication protocol includes:
s201, the network management server sends a first command message to the visual networking device, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
specifically, when the network management server manages the video networking device, the network management server issues different instructions, such as a setting instruction, to the video networking device, and specifically, the network management server sends a first command message, namely a setting message, to the video networking device, where the setting message is shown in table 6.
TABLE 6
First command code Parameter Num Parameter Key Parameter Len Parameter Value
Wherein, the first command code: 2 bytes;
first parameter number m: a parameter Num,2 bytes, representing several parameters later, each parameter taking the form of a first parameter identification, a first parameter length and a first parameter value;
the first parameter identification: parameter Key,2 bytes;
first parameter length: parameters Len,2 bytes;
first parameter value: a parameter Value, len byte Value;
s202, the network management server receives a first response message fed back by the visual networking device, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Specifically, when receiving a first command message issued by a network management server, namely a setting message, the internet of view device analyzes the setting message, executes an instruction corresponding to the setting message to obtain a first response message, and sends the first response message to the network management server, wherein the network management server receives the first response message, namely the setting response message, and a specific message form is shown in table 7.
TABLE 7
First response code Ret Parameter Key
Wherein, the first response code: 2 bytes corresponding to the first command code;
Ret:2 bytes, representing the response result; as shown in table 5.
Parameter Key:2 bytes, representing the failed parameter Key, i.e. the parameter identification.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
As shown in fig. 3, a step flow chart of an embodiment of a method for implementing a communication protocol according to the present invention is shown, where the method for implementing a communication protocol includes:
s301, the network management server sends a second command message to the visual networking device, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
Specifically, the network management server may also issue a second command message, i.e. a query message, to the networking device, where the query message is specifically shown in table 8.
TABLE 8
Second command code Parameter Num Parameter Key Parameter Key Parameter Key
Specifically, the second command code: 2 bytes;
second parameter number n: the parameter Num,2 bytes, represents that there are several parameters at the back, n is more than or equal to 1, n is a natural number;
and (3) identifying a second parameter: parameter Key,2 bytes;
s302, the network management server receives a second response message fed back by the visual networking device, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
Specifically, when receiving the second command message issued by the network management server, namely, the query message, the internet-of-view device analyzes the query message, executes the instruction corresponding to the query message, obtains the second response message, and sends the second response message to the network management server, and the network management server receives the second response message, namely, the set response message, and the specific message form is shown in table 9.
TABLE 9
Second response code Ret Parameter Num Parameter Key Parameter Len Parameter Value
Second response code: 2 bytes corresponding to the second command code;
ret:2 bytes, representing the results, as shown in table 5;
parameter Num:2 bytes, which means that there are several parameters at the back, n is more than or equal to 1, n is a natural number;
parameter Key:2 bytes;
parameters Len:2 bytes;
parameter Value: len byte value;
it should be noted that the first and second are merely used to distinguish different instructions, and are not limited to a specific order.
As shown in fig. 4, a step flow chart of an embodiment of a method for implementing a communication protocol according to the present invention is shown, where the method for implementing a communication protocol includes:
s401, the network management server packetizes the command message to obtain a split message, wherein the split message further comprises a total packet number and a current packet number;
specifically, if the size of the command message sent by the network management server to the internet-of-view device is greater than a preset value, splitting the command message is needed to obtain a split message, for example: the protocol length is limited to 1k, and if the protocol length exceeds 1k, a packetization mode is adopted.
Specifically, if the command message includes a plurality of parameter identifiers and a parameter value corresponding to the parameter identifiers is smaller than a first preset value, the network management server splits the plurality of parameter identifiers in the command message according to a preset rule to obtain a split message;
Illustratively, the embodiment of the invention is a first type of subcontracting: the number of keys in the protocol is large, the length of a single key is less than 860 bytes, and the key needs to be transmitted and issued for a plurality of times, and a plurality of keys are issued each time. All parameters of the protocol data are only required to be combined together, and each parameter key is independently solved.
If the command message only comprises one parameter identifier, and the parameter value corresponding to the parameter identifier is larger than a second preset value, the network management server splits the parameter value in the command message to obtain the split message, wherein the split application protocol data information in the KLV form comprises the parameter identifier, a parameter length, a first parameter length sequence number k and a first parameter value corresponding to the first parameter length sequence number k, x is larger than or equal to 1 and smaller than or equal to k, k is a natural number, and the parameter length is the total length of bytes occupied by k first parameter values.
The second category of subpackets provided by the embodiment of the invention is as follows: only one key is arranged in the protocol, the length of the key is very long and is more than 860 bytes, and the key needs to be transmitted and issued for many times, and a part of data of the key is issued each time. Specifically, the Key to be packetized is subjected to specialized processing, and generally adopts a KLV1V2 format, L is the total length of V1 and V2, V1 is the Key sequence number, and V2 is the actual content of the Key. The third category is sub-packaging, in principle, long keys are transferred first, and short keys are transferred after transferring.
The third class of sub-packets provided by the embodiment of the invention is a mixture of the first class and the second class, the number of keys is more, and the keys with long lengths are also provided, and in principle, the keys with long lengths are preferentially sent. And uploading the key with long length, and after the key is transmitted, transmitting the short key, namely sub-packaging according to the second splitting mode, and sub-packaging again according to the first splitting mode.
In summary, the first type of packetization is a relatively large number of packetization modes that are commonly used, and the second type of packetization sometimes has to be used for the binary value, and if the data packet is the third type of packetization, the data packet can be divided into a plurality of transparent commands, and converted into the first type of packetization and the second type of packetization respectively.
S402, the network management server sends the split message to the video networking equipment, wherein the split message further comprises total packet number, current packet number and KLV-form application protocol data information;
the network management server sends a split message to the video networking device, wherein the split message further comprises a total packet number and a current packet number on the basis of application protocol data information in a KLV form, and the specific split message is shown in the following table 10.
Table 10
Figure BDA0002439251080000211
Wherein:
the total number of fragments of the message is more than or equal to 1; the "message current slice" is numbered from 1.
Message ID: the network management is responsible for filling when descending (network management to the visual network equipment), the original value is returned when the visual network server or the terminal responds, the value is increased at the network management side, the unique package id is represented, and the server or the terminal is responsible for filling when actively reporting,
Session id: when the SessionID is transmitted downwards, the network manager is responsible for filling in, the original value is returned when the server or the terminal responds, and a plurality of fragments are consistent. When the server or the terminal actively reports, the single packet is filled with 0, and the server or the terminal is responsible for filling when dividing into multiple packets, the high four bytes of 0xFFFFFFFF is required, the low four bytes of the highest bit32 is 1, and each packet is guaranteed to be uniform.
CRC field, 2 bytes, adopts cyclic redundancy check method, the sender computer uses a certain formula to calculate a value of information contained in the transmitted data, and after attaching the value to the transmitted data, the receiver computer performs the same calculation on the same data, and the same result should be obtained. If the two CRC results are inconsistent, indicating that an error occurred in the transmission, the receiving computer may require the transmitting computer to retransmit the data;
application protocol data: application protocol data information in the form of KLV, i.e. KLV format, key-Length-Value, key representing the parameter identity, length representing the parameter Length, value representing the parameter Value. The advantage of adopting this format, the communication both sides, have one side not know this Key, neglect directly, need not to handle, the interface is unlikely to fail, increase flexibility.
S403, the network management server receives a response message fed back by the video networking device, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
Specifically, the header flag of the application protocol packet is 0x0101, which indicates the new KLV protocol of the network management, that is, the format is shown in the following table 11:
TABLE 11
Figure BDA0002439251080000221
The application protocol data is application protocol data information of the KLV or application protocol response information of the KLV form.
Illustratively, the network management server sends a query instruction to the video networking terminal:
command type 0x03: network management= > video networking terminal, and terminal parameter is queried
Command word 0x02: inquiring terminal information
Command type 0x83: network management of video networking terminal= > and inquiring terminal parameter response
As shown in table 12:
table 12
Querying Command Parameter Num Parameter Key Parameter Key Parameter Key
0x0302 Num Key Key Key
Num=5, specific key, normally issued by the network manager: 0x0001 (terminal software program version), 0x0002 (terminal menu version), 0x0005 (terminal IP (ipv 4)), 0x0006 (terminal mask), 0x0007 (terminal gateway);
the network management server receives a response message returned by the video networking terminal, and the specific message form is shown in table 13:
TABLE 13
Response to Command Ret Parameter Num Parameter KLV Parameter KLV
0x8302 0x0000 Num KLV KLV
Key not supported by terminal:
when the network manager issues, if num=6, the Key of 0x00FE is acquired (if the Key is the terminal kernel version Key), if the Key is not supported by the terminal, after the terminal receives the signaling, according to the fact that the Key occupies two bytes, after each Key is solved, the unrecognized Key is directly ignored, and processing is not needed.
Key not supported by network management:
when the terminal goes up, if num=5 when the network manager obtains, the terminal supports 0x00FE, the terminal reports that Num can be 6, and takes up the Key, after the network manager receives the Key, each Key is found according to the number of Num and the Key-Length-Value format, each Key is solved according to Length, an unrecognized Key is found, the network manager directly skips Value according to Length of the Key, and processing is not needed.
In summary, the novel KLV protocol is self-explanatory only by the field Key table, and has very good readability; the protocol expansion is convenient, and only the key needs to be increased and reduced; and the two communication parties are completely decoupled, one party does not support Key temporarily, and the other party is not affected to be brought online.
The communication protocol provided by the embodiment of the invention can also be used for batch operation, in particular:
the network management server queries terminal information signaling in batches:
Command type 0x03: network management= > video networking terminal, and terminal parameter is queried
Command word 0x03: batch inquiry terminal information
Command type 0x83: network management of video networking terminal= > and inquiring terminal parameter response
As shown in table 14:
TABLE 14
Querying Command Parameter Num Parameter Key Parameter Key Parameter Key
0x0303 Num Key Key Key
Num=6, specific key, normally issued by the network manager: 0x0001 (terminal software program version), 0x0002 (terminal menu version), 0x0005 (terminal IP (ipv 4)), 0x0006 (terminal mask), 0x0007 (terminal gateway) and 0x0041 (one-dimensional array).
0x0041 denotes a one-dimensional array in the format of K-L-V, K being 0x0041, L being the actual length of the back, V being composed of a plurality of keys, for example K0L0V0K1L1V1K2L2V2K3L3V3, where these K0, K1, K2 and K3 are all 0x0008 (device number), indicating the device number, indicating the terminal information to be queried for these 4 numbers.
The network management server receives a response message sent by the video networking terminal, as shown in table 15:
TABLE 15
Command Ret Parameter Num Parameter KLV
Response to 0x8303 0x0000 Num KLV
In response, num=1, there is only one key:0x0042, representing a two-dimensional array, the format KLV, K being 0x0042, where V is made up of a plurality of 0x0041 one-dimensional arrays, e.g. the above terminal information of 4 number terminals to be queried, where V will have KLVs of 4 one-dimensional arrays.
0x0041 represents a one-dimensional array in the format of K-L-V, K0 x0041, L the actual length of the back, V inside consisting of a plurality of keys, K0L0V0, K1L1V1, K2L2V2, K3L3V3, K4L4V4, K5L5V5, where K0 is 0x0008 representing the terminal number (uniquely representing a terminal), K1, K2, K3, K4 and K5 representing 0x0001,0x0002,0x0005,0x0006,0x0007, corresponding to the terminal software program version, menu version, IP, mask, gateway.
The KLV protocol (Key-Length-Value) provided by the embodiment of the invention is self-explanatory and has very good readability; the protocol expansion is convenient, and only the key needs to be increased and reduced; and the two communication parties are completely decoupled, one party does not support Key temporarily, and the other party is not affected to be brought online.
Meanwhile, batch operation of signaling is supported; the CRC is added to the signaling, the communication parties receive the signaling, CRC is firstly performed, and the protocol analysis is performed by a checking party; protocol packetization is supported.
The embodiment of the invention provides a realization method of a communication protocol, which is applied to the video networking, and sends a command message to video networking equipment through a network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
As shown in fig. 5, a flowchart illustrating steps of an embodiment of a method for implementing a communication protocol according to the present invention is applied to the internet of view, where the method for implementing the communication protocol includes:
s501, receiving a command message sent by a network management server by using a video networking device, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking device;
s502, the video networking equipment analyzes the command message to obtain a response message;
s503, the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information.
The embodiment of the invention provides a realization method of a communication protocol, which is applied to the visual network, and a command message sent by a network management server is received through visual network equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the visual network equipment; the video networking equipment analyzes the command message to obtain a response message; the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
On the basis of the foregoing embodiment, optionally, before the optical networking device receives the command packet sent by the network management server, the method further includes:
and carrying out communication protocol parameter configuration on the network management server and the video networking equipment respectively, wherein the communication protocol parameters are the communication protocol parameters in the KLV form, so that the communication protocol parameter configuration between the network management server and the video networking equipment is consistent.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
As shown in fig. 6, a step flow chart of an embodiment of a method for implementing a communication protocol according to the present invention is shown, where the method for implementing a communication protocol includes:
s601, the video networking device receives a first command message sent by a network management server, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
S602, the video networking server analyzes the first command message to obtain a first response message;
s603, the video networking device sends the first response message to the network management server, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
As shown in fig. 7, a step flow chart of an embodiment of a method for implementing a communication protocol according to the present invention is shown, where the method for implementing a communication protocol includes:
s701, the video networking device receives a second command message sent by a network management server, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
S702, the video networking server analyzes the second command message to obtain a second response message;
s703, the video networking device sends the second response message to the network management server, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
As shown in fig. 8, a step flow chart of an embodiment of a method for implementing a communication protocol according to the present invention is shown, where the method for implementing a communication protocol includes:
s801, the video networking equipment receives a split message sent by the network management server, wherein the split message is obtained by subpackaging the command message by the network management server; the split message also includes a total packet number, a current packet number, and application protocol data information in the form of KLV.
Specifically, if the command message includes a plurality of parameter identifiers and a parameter value corresponding to the parameter identifiers is smaller than a first preset value, the network management server splits the plurality of parameter identifiers in the command message according to a preset rule to obtain a split message;
If the command message only comprises one parameter identifier, and the parameter value corresponding to the parameter identifier is larger than a second preset value, the network management server splits the parameter value in the command message to obtain the split message, wherein the split application protocol data information in the KLV form comprises the parameter identifier, a parameter length, a first parameter length sequence number k and a first parameter value corresponding to the first parameter length sequence number k, x is larger than or equal to 1 and smaller than or equal to k, k is a natural number, and the parameter length is the total length of bytes occupied by k first parameter values.
S802, the video networking equipment analyzes the split message to obtain a response message;
s803, the video networking device sends the response message to the network management server, wherein the response message at least comprises a total packet number, a current packet number and the KLV-type application protocol response information, and the application protocol response information corresponds to the application protocol data information.
Because the communication protocol adopted by the video networking device is the same as the communication protocol adopted by the other party interacting with the network management server, the embodiment based on the video networking device side is not described again, and the specific communication protocol format is referred to the embodiment based on the network management server side.
The implementation method of the communication protocol provided by the embodiment of the invention is applied to the video networking, and the command message sent by the network management server is received through the video networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the video networking equipment analyzes the command message to obtain a response message; the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
Another embodiment of the present invention provides a device for implementing a communication protocol, which is configured to execute the method for implementing a communication protocol provided in the foregoing embodiment.
Referring to fig. 9, there is shown a block diagram of an embodiment of a communication protocol implementing apparatus of the present invention, applied to the internet of view, the apparatus comprising: a first transmitting module 901 and a first receiving module 902, wherein:
the first sending module 901 is configured to send a command packet to an internet-of-view device, where the command packet at least includes KLV-form application protocol data information, where the application protocol data information is used to identify different instructions issued by the network management server to the internet-of-view device;
The first receiving module 902 is configured to receive a response message fed back by the internet of view device, where the response message at least includes application protocol response information in the KLV format, and the application protocol response information corresponds to the application protocol data information.
The implementation device of the communication protocol provided by the embodiment of the invention is applied to the video networking, and sends the command message to the video networking equipment through the network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
A further embodiment of the invention provides a further supplementary explanation of the device provided by the above embodiment.
Optionally, the apparatus further comprises a configuration module, the configuration module is configured to:
and carrying out communication protocol parameter configuration on the network management server and the video networking equipment respectively, wherein the communication protocol parameters are the communication protocol parameters in the KLV form, so that the communication protocol parameter configuration between the network management server and the video networking equipment is consistent.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
Optionally, the first sending module 901 is configured to:
sending a first command message to the internet-of-view device, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
in a corresponding manner,
the first receiving module 902 is configured to:
receiving a first response message fed back by the internet of view device, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
Optionally, the first sending module 901 is configured to:
sending a second command message to the internet-of-view device, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
in a corresponding manner,
the first receiving module 902 is configured to:
receiving a second response message fed back by the internet of view device, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
Optionally, if the size of the command packet is greater than a preset value, the first sending module 901 is further configured to:
subpackaging the command message to obtain a split message, wherein the split message further comprises a total packet number and a current packet number;
and sending the split message to the visual networking equipment.
The implementation device of the communication protocol provided by the embodiment of the invention is applied to the video networking, and sends the command message to the video networking equipment through the network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
Another embodiment of the present invention provides a device for implementing a communication protocol, which is configured to execute the method for implementing a communication protocol provided in the foregoing embodiment.
Referring to fig. 10, there is shown a block diagram of an embodiment of a communication protocol implementing apparatus of the present invention, applied to the internet of view, the apparatus comprising: a second receiving module 1001, a parsing module 1002, and a second transmitting module 1003, wherein:
the second receiving module 1001 is configured to receive a command packet sent by a network management server, where the command packet at least includes application protocol data information in KLV form, and the application protocol data information is used to identify different instructions issued by the network management server to the video networking device;
the parsing module 1002 is configured to parse the command message to obtain a response message;
the second sending module 1003 is configured to send the response message to the network management server, where the response message at least includes application protocol response information in the KLV format, and the application protocol response information corresponds to the application protocol data information.
The implementation device of the communication protocol provided by the embodiment of the invention is applied to the video networking, and the command message sent by the network management server is received through the video networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the video networking equipment analyzes the command message to obtain a response message; the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
A further embodiment of the present invention provides a further supplementary explanation of the apparatus provided in the above embodiment.
Optionally, the apparatus further includes a configuration module, where the configuration module is configured to:
and carrying out communication protocol parameter configuration on the network management server and the video networking equipment respectively, wherein the communication protocol parameters are the communication protocol parameters in the KLV form, so that the communication protocol parameter configuration between the network management server and the video networking equipment is consistent.
Optionally, the parameters of the KLV-form communication protocol include: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier.
Optionally, the second receiving module 1001 is configured to:
receiving a first command message sent by a network management server, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
In a corresponding manner,
the parsing module 1002 is configured to:
analyzing the first command message to obtain a first response message;
in a corresponding manner,
the second transmitting module 1003 is configured to:
the first response message is sent to the network management server, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
Optionally, the response result corresponding to the first parameter identifier includes response success or response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
Optionally, the second receiving module 1001 is configured to:
receiving the second command message sent by the network management server, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
In a corresponding manner,
the parsing module 1002 is configured to:
analyzing the second command message to obtain a second response message;
in a corresponding manner,
the second transmitting module 1003 is configured to:
sending the second response message to the network management server, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
Optionally, if the size of the command packet is greater than a preset value, the second receiving module 1001 is further configured to:
receiving a split message sent by the network management server, wherein the split message is obtained by the network management server in a sub-packaging way of the command message; the split message also includes a total packet number and a current packet number.
It should be noted that, in this embodiment, each of the possible embodiments may be implemented separately, or may be implemented in any combination without conflict, which is not limited to the implementation of the present application.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The implementation device of the communication protocol provided by the embodiment of the invention is applied to the video networking, and the command message sent by the network management server is received through the video networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the video networking equipment analyzes the command message to obtain a response message; the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
Still another embodiment of the present invention provides a network management server, configured to execute the implementation method of the communication protocol provided in the foregoing embodiment.
Fig. 11 is a schematic structural diagram of a network management server according to the present invention, as shown in fig. 11, and the electronic device includes: at least one processor 1101 and memory 1102;
The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the method for implementing the communication protocol provided in the foregoing embodiment.
The network management server provided by the embodiment is applied to the video networking, and sends a command message to the video networking equipment through the network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
Yet another embodiment of the present application provides a computer readable storage medium having a computer program stored therein, the computer program when executed implementing the method for implementing the communication protocol provided in any one of the above embodiments.
The computer readable storage medium according to the embodiment is applied to the video networking, and sends a command message to the video networking equipment through the network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued to the video networking equipment by the network management server; the network management server receives the response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
An embodiment of the present invention provides an optical networking device, configured to execute the implementation method of the communication protocol provided in the foregoing embodiment.
Fig. 12 is a schematic structural diagram of an internet-of-view device of the present invention, shown in fig. 12, and the electronic device includes: at least one processor 1201 and memory 1202;
the memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the method for implementing the communication protocol provided in the foregoing embodiment.
The video networking device provided by the embodiment is applied to video networking, and the video networking device receives the command message sent by the network management server, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking device; the video networking equipment analyzes the command message to obtain a response message; the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
Yet another embodiment of the present application provides a computer readable storage medium having a computer program stored therein, the computer program when executed implementing the method for implementing the communication protocol provided in any one of the above embodiments.
The computer readable storage medium according to the embodiment is applied to the video networking, and receives a command message sent by a network management server through the video networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the video networking equipment; the video networking equipment analyzes the command message to obtain a response message; the video networking device sends the response message to the network management server, wherein the response message at least comprises application protocol response information in a KLV form, and the application protocol response information corresponds to the application protocol data information.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing describes in detail a method for implementing a communication protocol and a device for implementing a communication protocol, and specific examples are applied to illustrate the principles and embodiments of the present invention, and the above description of the examples is only for helping to understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (7)

1. A method for implementing a communication protocol, applied to the internet of vision, the method comprising: the network management server sends a command message to the visual networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by the network management server to the visual networking equipment;
the network management server receives a response message fed back by the video networking device, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information;
wherein the KLV-form application protocol data information comprises: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier;
if the command message contains a plurality of parameter identifiers and the parameter value corresponding to the parameter identifiers is smaller than a first preset value, the network management server splits the plurality of parameter identifiers in the command message according to a preset rule to obtain a split message;
If the command message only comprises one parameter identifier, and the parameter value corresponding to the parameter identifier is larger than a second preset value, the network management server splits the parameter value in the command message to obtain the split message, wherein the split application protocol data information in the form of KLV comprises the parameter identifier, a parameter length, a first parameter length sequence number k and a first parameter value x corresponding to the first parameter length sequence number k, wherein x is larger than or equal to 1 and smaller than or equal to k, k is a natural number, and the parameter length is the total length of bytes occupied by k first parameter values.
2. The method of claim 1, wherein the network management server sending a command message to the internet of view device comprises:
the network management server sends a first command message to the visual networking device, wherein the first command message at least comprises: a first command code, a first parameter number m, a first parameter identification 1, a first parameter length 1, a first parameter value 1, a first parameter identification 2, a first parameter length 2, a first parameter value 2, … …, a first parameter identification m, a first parameter length m, and a first parameter value m; m is 1 or more, m is a natural number;
in a corresponding manner,
The network management server receives a response message fed back by the video networking device, and the response message comprises:
the network management server receives a first response message fed back by the video networking device, wherein the first response message comprises: and a first response code corresponding to the first command code and a response result corresponding to the first parameter identifier.
3. The method of claim 2, wherein the response result corresponding to the first parameter identification includes a response success or a response failure;
the first response message includes: a first response code corresponding to the first command code, success response and a first parameter identifier i corresponding to the success response;
or the first response message includes: a first response code corresponding to the first command code, a response failure, a reason for the response failure, and a first parameter identifier j corresponding to the response failure;
wherein i is 1-m, i is a natural number, j is 1-m, j is a natural number, and i and j are unequal.
4. The method according to claim 2, wherein the network management server sends a command message to the internet of view device, comprising:
the network management server sends a second command message to the visual networking device, wherein the second command message at least comprises: a second command code, a second parameter number n, a second parameter identifier … … and an nth parameter identifier; n is 1 or more, n is a natural number;
In a corresponding manner,
the network management server receives a response message fed back by the video networking device, and the response message comprises:
the network management server receives a second response message fed back by the video networking device, wherein the second response message comprises: a second response code corresponding to the second command code, a response result, the second parameter number n, the second parameter identifier, a parameter length corresponding to the second parameter identifier, a parameter value corresponding to the second parameter identifier, … …, the nth parameter identifier, a parameter length corresponding to the nth parameter identifier, and a parameter value corresponding to the nth parameter identifier.
5. An implementation device of a communication protocol, applied to the internet of vision, characterized in that the device comprises: the first sending module is used for sending a command message to the video networking equipment, wherein the command message at least comprises application protocol data information in a KLV form, and the application protocol data information is used for identifying different instructions issued by a network management server to the video networking equipment;
the first receiving module is used for receiving a response message fed back by the video networking equipment, wherein the response message at least comprises application protocol response information in the KLV form, and the application protocol response information corresponds to the application protocol data information;
Wherein the KLV-form application protocol data information comprises: one or more of a command code, a response result, a parameter number, a parameter identification, a parameter length, and a parameter value,
wherein, the parameter number is the number of the parameter identifiers;
the parameter identifier is an instruction identifier issued by the network management server to the visual networking equipment;
the parameter length is the byte length of the parameter value;
the parameter value is a parameter value corresponding to the parameter identifier;
if the command message contains a plurality of parameter identifiers and the parameter value corresponding to the parameter identifiers is smaller than a first preset value, the network management server splits the plurality of parameter identifiers in the command message according to a preset rule to obtain a split message;
if the command message only comprises one parameter identifier, and the parameter value corresponding to the parameter identifier is larger than a second preset value, the network management server splits the parameter value in the command message to obtain the split message, wherein the split application protocol data information in the form of KLV comprises the parameter identifier, a parameter length, a first parameter length sequence number k and a first parameter value x corresponding to the first parameter length sequence number k, wherein x is larger than or equal to 1 and smaller than or equal to k, k is a natural number, and the parameter length is the total length of bytes occupied by k first parameter values.
6. A network management server for use in a video network, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the method of implementing a communication protocol of any one of claims 1-4.
7. A computer readable storage medium for use in video networking, wherein the computer readable storage medium has stored therein a computer program which when executed implements the method of implementing the communication protocol of any of claims 1-4.
CN202010260890.5A 2020-04-03 2020-04-03 Communication protocol implementation method, device, network management server and storage medium Active CN111614612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010260890.5A CN111614612B (en) 2020-04-03 2020-04-03 Communication protocol implementation method, device, network management server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010260890.5A CN111614612B (en) 2020-04-03 2020-04-03 Communication protocol implementation method, device, network management server and storage medium

Publications (2)

Publication Number Publication Date
CN111614612A CN111614612A (en) 2020-09-01
CN111614612B true CN111614612B (en) 2023-06-23

Family

ID=72203644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010260890.5A Active CN111614612B (en) 2020-04-03 2020-04-03 Communication protocol implementation method, device, network management server and storage medium

Country Status (1)

Country Link
CN (1) CN111614612B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948194B (en) * 2021-03-15 2023-08-15 中国联合网络通信集团有限公司 Communication protocol testing method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1727056B1 (en) * 2005-05-25 2008-11-05 Microsoft Corporation Data communication protocol
US9602557B2 (en) * 2012-10-15 2017-03-21 Wowza Media Systems, LLC Systems and methods of communication using a message header that includes header flags
CN107729139B (en) * 2017-09-18 2021-02-26 北京京东尚科信息技术有限公司 Method and device for concurrently acquiring resources
CN110768817B (en) * 2018-07-27 2022-04-12 视联动力信息技术股份有限公司 Upgrading method and device for video networking terminal
CN109525635A (en) * 2018-10-11 2019-03-26 视联动力信息技术股份有限公司 A kind of acquisition methods and system of memory usage
CN109660560A (en) * 2019-01-23 2019-04-19 视联动力信息技术股份有限公司 A kind of method of data synchronization and system
CN110113298B (en) * 2019-03-19 2021-09-28 视联动力信息技术股份有限公司 Data transmission method, device, signaling server and computer readable medium
CN110535683A (en) * 2019-07-23 2019-12-03 视联动力信息技术股份有限公司 A kind of report method and device of end message
CN110557370B (en) * 2019-07-30 2022-06-17 视联动力信息技术股份有限公司 Method, system, electronic equipment and storage medium for pamir synchronization of terminal information

Also Published As

Publication number Publication date
CN111614612A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN108965484B (en) Internet of things data transmission method, system and terminal
US9838221B2 (en) Base station deployment configuration method for base station, base station, and server
CN109451032B (en) Message transmission system
WO2018165113A1 (en) Dynamic header compression for constrained networks
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN102938794A (en) Address resolution protocol (ARP) message forwarding method, exchanger and controller
CN103581130B (en) data compression processing method, system and device
WO2022262465A1 (en) Opc ua-based centralized user configuration method and system for time sensitive network
US10455641B2 (en) Protocol data unit management
WO2011140844A1 (en) Method for processing messages on m2m platform and m2m platform system
KR101120778B1 (en) Method, system and terminal for changing management object of broadcast service guide
CN104753804B (en) A kind of data stream transmitting control method, apparatus and system
CN111182611B (en) Communication method and device
CN105656643B (en) Method and equipment for performing compatible management based on network configuration protocol
CN111614612B (en) Communication protocol implementation method, device, network management server and storage medium
US8886913B2 (en) Apparatus and method for identifier management
CN108833331B (en) Resource object creating method and device and resource object state reporting method and device
US9160811B2 (en) Client provisioning with enhanced linking
CN106961687B (en) Information interaction method and system
CN109729154B (en) Simple message subscription and publishing service method based on controller
WO2020253330A1 (en) Method and apparatus for customer premise equipment configuration management
CN112995095B (en) Data processing method, device and computer readable storage medium
CN109600837B (en) System information generation method and device
CN112671854A (en) Data processing method, server and system
CN112422565A (en) Message processing method and device, storage medium and electronic device

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
GR01 Patent grant
GR01 Patent grant