CN108540516B - Running state information acquisition method, control terminal, network equipment and system - Google Patents

Running state information acquisition method, control terminal, network equipment and system Download PDF

Info

Publication number
CN108540516B
CN108540516B CN201710128367.5A CN201710128367A CN108540516B CN 108540516 B CN108540516 B CN 108540516B CN 201710128367 A CN201710128367 A CN 201710128367A CN 108540516 B CN108540516 B CN 108540516B
Authority
CN
China
Prior art keywords
network equipment
message
control terminal
preset data
data protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710128367.5A
Other languages
Chinese (zh)
Other versions
CN108540516A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710128367.5A priority Critical patent/CN108540516B/en
Publication of CN108540516A publication Critical patent/CN108540516A/en
Application granted granted Critical
Publication of CN108540516B publication Critical patent/CN108540516B/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/26Special purpose or proprietary protocols or architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications

Abstract

The embodiment of the invention provides an operation state information acquisition method, a control terminal, network equipment and a system, wherein a communication interface of the control terminal and a communication interface of the same type of network equipment are in communication connection; the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface; the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal; the control terminal receives the running state information and displays the running state information, and the preset data protocol is adopted to realize the method for acquiring the running state information of the network equipment based on any communication interface, so that a developer can know the running state of the network equipment, and further fault diagnosis is carried out on the network equipment.

Description

Running state information acquisition method, control terminal, network equipment and system
Technical Field
The present invention relates to the field of communications, and in particular, to a method, a control terminal, a network device, and a system for acquiring running state information.
Background
With the development of society and the advancement of science and technology, various embedded network equipment products are layered endlessly, and great challenges are presented to maintenance work of the products. At present, a control terminal of the embedded network equipment is generally a serial interface based on RS232, but the serial interface is only used for debugging in a product development stage, and is not provided for the outside when the product is shipped. In addition, due to network security issues, network side access functions like telnet are required to be turned off. Therefore, if the network equipment fails in the field use, the equipment maintainer cannot log in the control terminal of the network equipment to acquire the running state of the network equipment and some diagnosis information, so that great difficulty is brought to the fault diagnosis of the developer.
Disclosure of Invention
The embodiment of the invention mainly solves the technical problem of incapability of acquiring the running state of network equipment in the prior art by providing a running state information acquisition method, a control terminal, network equipment and a system.
In order to solve the above technical problems, an embodiment of the present invention provides a method for acquiring running state information, including:
establishing communication connection with the network equipment through a communication interface of the network equipment;
transmitting a query command with a preset data protocol format to network equipment through a communication interface;
and receiving and displaying the running state information of the network equipment returned by the network equipment according to the query command.
In order to solve the above technical problems, an embodiment of the present invention provides a method for acquiring running state information, including:
establishing communication connection with the control terminal through a communication interface of the control terminal;
receiving a query command in a preset data protocol format sent from a control terminal through a communication interface;
inquiring the running state of the network equipment according to the inquiring command, and sending the obtained running state information to the control terminal.
In order to solve the above technical problems, an embodiment of the present invention provides a method for acquiring running state information, including:
The communication interface of the control terminal establishes communication connection with the communication interface of the same type of the network equipment;
the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface;
the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal;
and the control terminal receives and displays the running state information.
In order to solve the above technical problems, an embodiment of the present invention provides a control terminal, including:
the first communication connection establishment module is used for establishing communication connection with the network equipment through a communication interface of the network equipment;
the command issuing module is used for issuing a query command with a preset data protocol format to the network equipment through the communication interface;
the first receiving module is used for receiving the running state information of the network equipment returned by the network equipment according to the query command;
and the display module is used for displaying the running state information.
To solve the above technical problem, an embodiment of the present invention provides a network device, including:
the second communication connection establishment module is used for establishing communication connection with the control terminal through a communication interface of the control terminal;
the second receiving module is used for receiving a query command in a preset data protocol format sent from the control terminal through the communication interface;
The query module is used for querying the running state of the network equipment according to the query command;
and the sending module is used for sending the obtained running state information to the control terminal.
In order to solve the above technical problems, an embodiment of the present invention provides a system, including:
the control terminal is used for establishing communication connection with the network equipment through a communication interface of the network equipment, and sending a query command with a preset data protocol format to the network equipment through the communication interface; receiving and displaying running state information of the network equipment returned by the network equipment;
and the network equipment is used for inquiring the running state of the network equipment according to the inquiry command and sending the obtained running state information to the control terminal.
In order to solve the above technical problem, an embodiment of the present invention further provides a computer storage medium, in which computer executable instructions are stored, where the computer executable instructions are configured to execute the foregoing method for acquiring running state information.
The beneficial effects of the invention are as follows:
according to the method, the control terminal, the network equipment and the system for acquiring the running state information provided by the embodiment of the invention, the communication interface of the control terminal and the communication interface of the same type of the network equipment are in communication connection; the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface; the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal; the control terminal receives the running state information and displays the running state information, and the preset data protocol is adopted to realize the method for acquiring the running state information of the network equipment based on any communication interface, so that a developer can know the running state of the network equipment, and further fault diagnosis is carried out on the network equipment.
Drawings
Fig. 1 is a flowchart of a method for acquiring operation state information at a control terminal according to a first embodiment of the present invention;
fig. 2 is a flowchart of a method for acquiring operation status information on a network device side according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for acquiring running state information of a system according to a third embodiment of the present invention;
fig. 4 is a flowchart of another method for acquiring running state information of a system according to the third embodiment of the present invention;
fig. 5 is a schematic diagram of a control terminal according to a fourth embodiment of the present invention;
fig. 6 is a schematic diagram of a network device according to a fifth embodiment of the present invention;
fig. 7 is a schematic diagram of a system according to a sixth embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a method for acquiring operation state information on a control terminal side, which includes the following steps:
s101: establishing communication connection with the network equipment through a communication interface of the network equipment;
The control terminal establishes communication connection with the network equipment through a communication interface of the network equipment;
the network devices include embedded network devices and the like. The control terminal is used for controlling the network equipment and can execute commands supported by the network equipment, for example, the control terminal can access the network equipment to acquire the running state information of the network equipment. Wherein the control terminal comprises a PC (personal computer ) or other handheld devices and the like; the operation state information includes an operation state of the network device, diagnostic information, device information, an operation log, and the like.
The communication interface of the network device includes an ethernet interface, a wireless interface, a USB (Universal Serial Bus ) interface, or other communication interfaces, etc.;
establishing a communication connection with a network device through a communication interface of the network device includes:
the communication interface is connected with the communication interface corresponding to the network equipment through a network cable, a wireless or USB data line;
when the Ethernet interface is selected to connect the network equipment and the control terminal, the Ethernet interface of the network equipment is connected with the Ethernet interface of the control terminal through a network cable;
when the wireless interface is selected to connect the network equipment and the control terminal, the wireless interface of the network equipment is connected with the wireless interface of the control terminal through wireless;
When the USB interface is selected to be connected with the network equipment and the control terminal, the USB interface of the network equipment is connected with the USB interface of the control terminal through a USB data line;
a handshake message with a preset data protocol format is issued to the network equipment through a communication interface of the network equipment;
the control terminal transmits a handshake message with a preset data protocol format to the network equipment through a communication interface of the network equipment;
the preset data protocol is used for controlling the communication between the terminal and the network equipment;
the structure of the preset data protocol format in this embodiment is as follows:
Figure BDA0001239177950000041
Figure BDA0001239177950000051
after the network equipment answers the handshake message, identity authentication information in a preset data protocol format is issued to the network equipment;
after the network equipment answers the handshake message, the control terminal transmits identity authentication information in a preset data protocol format to the network equipment;
after receiving the identity authentication information sent by the control terminal, the network equipment authenticates the identity authentication information, and if the authentication is successful, the information which is successful in the identity authentication is packaged according to a preset data protocol format and is sent to the control terminal; and the control terminal receives the information of successful identity authentication sent by the network equipment.
If the authentication fails, the message with the authentication failure is packaged according to a preset data protocol format and is sent to the control terminal.
The method of the network equipment for carrying out identity authentication on the control terminal ensures the validity of the control terminal and avoids illegal access of some illegal terminals to the network equipment.
S102: transmitting a query command with a preset data protocol format to network equipment through a communication interface;
the control terminal issues a query command with a preset data protocol format to the network equipment through a communication interface of the network equipment; the query command is used to query the operating state of the network device, diagnostic information, etc.
S103: and receiving and displaying the running state information of the network equipment returned by the network equipment according to the query command.
After receiving the inquiry command, the network equipment inquires the running state of the network equipment and sends the obtained running state information to the control terminal;
and the control terminal receives the running state information of the network equipment returned by the network equipment and displays the running state information.
According to the method for acquiring the running state information provided by the embodiment, the communication interface of the control terminal and the communication interface of the same type of network equipment are connected in a communication mode; the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface; the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal; the control terminal receives the running state information and displays the running state information, and the preset data protocol is adopted to realize the method for acquiring the running state information of the network equipment based on any communication interface, so that a developer can know the running state of the network equipment, and further fault diagnosis is carried out on the network equipment.
Further, since many communication interfaces of the embedded network device are provided externally, such as an ethernet interface, a wireless interface, a USB interface, etc., it is easy to connect the network device through these interfaces, so it is convenient for a developer to access the network device through these communication interfaces.
Example two
The present embodiment provides a method for acquiring operation status information on a network device side, please refer to fig. 2, fig. 2 is a flowchart of the method for acquiring operation status information provided in the present embodiment, the method includes the following steps:
s201: establishing communication connection with the control terminal through a communication interface of the control terminal;
the network equipment establishes communication connection with the control terminal through a communication interface of the control terminal;
the network devices include embedded network devices and the like. The control terminal is used for controlling the network equipment and can execute commands supported by the network equipment, for example, the control terminal can access the network equipment to acquire the running state information of the network equipment. The control terminal comprises a PC or other handheld devices and the like; the operation state information includes an operation state of the network device, diagnostic information, device information, an operation log, and the like.
The communication interface of the control terminal comprises an Ethernet interface, a wireless interface, a USB interface or other communication interfaces and the like;
Establishing communication connection with the control terminal through the communication interface of the control terminal comprises:
the communication interface is connected with the communication interface corresponding to the control terminal through a network cable, a wireless or USB data line;
when the Ethernet interface is selected to connect the network equipment and the control terminal, the Ethernet interface of the network equipment is connected with the Ethernet interface of the control terminal through a network cable;
when the wireless interface is selected to connect the network equipment and the control terminal, the wireless interface of the network equipment is connected with the wireless interface of the control terminal through wireless;
when the USB interface is selected to be connected with the network equipment and the control terminal, the USB interface of the network equipment is connected with the USB interface of the control terminal through a USB data line;
after receiving a handshake message in a preset data protocol format sent by a control terminal, replying the handshake message to the control terminal;
the preset data protocol is used for controlling the communication between the terminal and the network equipment;
the structure of the preset data protocol format in this embodiment is as follows:
Figure BDA0001239177950000071
after receiving identity authentication information in a preset data protocol format sent by the control terminal, authenticating the identity authentication information, and if authentication is successful, packaging the information which is successful in identity authentication according to the preset data protocol format, and sending the information to the control terminal.
If the authentication fails, the message with the authentication failure is packaged according to a preset data protocol format and is sent to the control terminal.
The method of the network equipment for carrying out identity authentication on the control terminal ensures the validity of the control terminal and avoids illegal access of some illegal terminals to the network equipment.
S202: receiving a query command in a preset data protocol format sent from a control terminal through a communication interface;
the network equipment receives a query command in a preset data protocol format sent from the control terminal through a communication interface of the control terminal; the query command is used to query the operating state of the network device, diagnostic information, etc.
S203: inquiring the running state of the network equipment according to the inquiring command, and sending the obtained running state information to the control terminal;
after receiving the inquiry command, the network equipment inquires the running state of the network equipment and sends the obtained running state information to the control terminal.
According to the method for acquiring the running state information provided by the embodiment, the communication interface of the control terminal and the communication interface of the same type of network equipment are connected in a communication mode; the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface; the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal; the control terminal receives the running state information and displays the running state information, and the preset data protocol is adopted to realize the method for acquiring the running state information of the network equipment based on any communication interface, so that a developer can know the running state of the network equipment, and further fault diagnosis is carried out on the network equipment.
Further, since many communication interfaces of the embedded network device are provided externally, such as an ethernet interface, a wireless interface, a USB interface, etc., it is easy to connect the network device through these interfaces, so it is convenient for a developer to access the network device through these communication interfaces.
Example III
Referring to fig. 3, fig. 3 is a flowchart of a method for acquiring operation status information provided in the present embodiment, and the method includes the following steps:
s301: the communication interface of the control terminal establishes communication connection with the communication interface of the same type of the network equipment;
the system comprises a control terminal and a network device. The network devices include embedded network devices and the like. The control terminal is used for controlling the network equipment and can execute commands supported by the network equipment, for example, the control terminal can access the network equipment to acquire the running state information of the network equipment. The control terminal comprises a PC or other handheld devices and the like; the operation state information includes an operation state of the network device, diagnostic information, device information, an operation log, and the like.
The communication interface of the network equipment comprises an Ethernet interface, a wireless interface, a USB interface or other communication interfaces and the like;
The communication interface of the control terminal comprises an Ethernet interface, a wireless interface, a USB interface or other communication interfaces and the like;
when the control terminal and the network equipment establish communication connection, the communication interface of the selected control terminal is the same as the communication interface of the network equipment in type; for example, when the communication interface of the selected control terminal is an ethernet interface, the communication interface of the network device also needs to be an ethernet interface; when the communication interface of the selected control terminal is a wireless interface, the communication interface of the network device also needs to be a wireless interface.
The communication interface of the control terminal establishing a communication connection with a communication interface of the same type as the network device comprises:
the communication interface of the control terminal is connected with the communication interface corresponding to the network equipment through a network cable, a wireless or USB data line;
when the Ethernet interface is selected to connect the network equipment and the control terminal, the Ethernet interface of the network equipment is connected with the Ethernet interface of the control terminal through a network cable;
when the wireless interface is selected to connect the network equipment and the control terminal, the wireless interface of the network equipment is connected with the wireless interface of the control terminal through wireless;
when the USB interface is selected to be connected with the network equipment and the control terminal, the USB interface of the network equipment is connected with the USB interface of the control terminal through a USB data line;
The control terminal transmits a handshake message with a preset data protocol format to the network equipment through a communication interface of the network equipment;
the preset data protocol is used for controlling the communication between the terminal and the network equipment;
the structure of the preset data protocol format in this embodiment is as follows:
Figure BDA0001239177950000091
after the network equipment answers the handshake message, the control terminal transmits identity authentication information in a preset data protocol format to the network equipment;
after receiving the identity authentication information sent by the control terminal, the network equipment authenticates the identity authentication information, and if the authentication is successful, the information which is successful in the identity authentication is packaged according to a preset data protocol format and is sent to the control terminal; and the control terminal receives the information of successful identity authentication sent by the network equipment.
If the authentication fails, the message with the authentication failure is packaged according to a preset data protocol format and is sent to the control terminal.
The method of the network equipment for carrying out identity authentication on the control terminal ensures the validity of the control terminal and avoids illegal access of some illegal terminals to the network equipment.
S302: the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface;
The query command is used to query the operating state of the network device, diagnostic information, etc.
S303: the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal;
s304: and the control terminal receives and displays the running state information.
The present invention will be further described with reference to the following specific examples.
As shown in fig. 4, fig. 4 is a flowchart of an operation state information acquisition method provided in the present example,
s401: defining a preset data protocol, wherein the preset data protocol is used for controlling communication between a terminal and network equipment;
s402: the control terminal and the network equipment are powered on and started, and a login tool is installed on the control terminal;
s403: connecting the wireless interface of the control terminal with the wireless interface of the network equipment, and carrying out correct setting to ensure that the wireless interface and the wireless interface can normally communicate;
s404: operating a login tool on the control terminal, selecting a selection item of a wireless interface on the login tool, packaging a handshake message by the login tool according to a format of a preset data protocol, and sending the handshake message to network equipment;
s405: the network device replies to the handshake message;
s406: a login tool on the control terminal requires a user to input an account number and a password, and the account number and the password input by the user are sent to the network equipment according to a format of a preset data protocol;
S407: the network equipment authenticates the account number and the password, if the authentication fails, the information of the authentication failure is packaged according to a format of a preset data protocol and is sent to the control terminal, and the process is finished; if the authentication is successful, obtaining a session ID according to a preset algorithm, packaging the session ID according to a format of a preset data protocol, and sending the session ID to a control terminal;
s408: after the network equipment sends the session ID to the control terminal, the network equipment encapsulates the starting log data of the system according to the format of a preset data protocol, adds the header of the preset data protocol to the header of the data to be forwarded, and then sends the header of the preset data protocol to the control terminal through a wireless interface;
s409: a login tool on the control terminal receives the data, analyzes the received data according to a preset data protocol, strips off the head of the preset data protocol, takes out actual and effective data, and displays the content corresponding to the actual data on the login tool, so that a developer can see a log of system operation on the login tool;
s410: inputting a command supported by the network equipment on a login tool of the control terminal, packaging data according to a preset data protocol by the login tool, adding a header of the preset data protocol to a header of the data to be forwarded, and then sending the header to the network equipment through a wireless interface;
S411: the network equipment analyzes the received network data, then forwards the actual data to a system of the network equipment to wait for a standard input process, processes the standard input process to obtain a processed result, encapsulates the processed result data according to a self-defined data protocol, and then sends the processed result data to the control terminal through a wireless interface;
the process waiting for standard input by the system can acquire the standard output of each user state process in the system and log information output by the kernel state;
s412: the login tool of the control terminal receives and analyzes the network data, then the actual data is displayed on the login tool, and a developer can see the execution result of the command on the login tool;
s413: ending the session and disconnecting the logging tool.
According to the method for acquiring the running state information provided by the embodiment, the communication interface of the control terminal and the communication interface of the same type of network equipment are connected in a communication mode; the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface; the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal; the control terminal receives the running state information and displays the running state information, and the preset data protocol is adopted to realize the method for acquiring the running state information of the network equipment based on any communication interface, so that a developer can know the running state of the network equipment, and further fault diagnosis is carried out on the network equipment.
Further, since many communication interfaces of the embedded network device are provided externally, such as an ethernet interface, a wireless interface, a USB interface, etc., it is easy to connect the network device through these interfaces, so it is convenient for a developer to access the network device through these communication interfaces.
Example IV
Referring to fig. 5, fig. 5 is a schematic diagram of a control terminal provided in this embodiment, where the control terminal includes:
a first communication connection establishment module 501, configured to establish a communication connection with a network device through a communication interface of the network device;
the network devices include embedded network devices and the like. The control terminal is used for controlling the network equipment and can execute commands supported by the network equipment, for example, the control terminal can access the network equipment to acquire the running state information of the network equipment. The control terminal comprises a PC or other handheld devices and the like; the operation state information includes an operation state of the network device, diagnostic information, device information, an operation log, and the like.
The communication interface of the network equipment comprises an Ethernet interface, a wireless interface, a USB interface or other communication interfaces and the like;
the communication connection establishment module 501 includes:
The first connection submodule 5011 is used for connecting with a communication interface corresponding to the network equipment through a network cable, a wireless or USB data line;
when the Ethernet interface is selected to connect the network equipment and the control terminal, the Ethernet interface of the network equipment is connected with the Ethernet interface of the control terminal through a network cable;
when the wireless interface is selected to connect the network equipment and the control terminal, the wireless interface of the network equipment is connected with the wireless interface of the control terminal through wireless;
when the USB interface is selected to be connected with the network equipment and the control terminal, the USB interface of the network equipment is connected with the USB interface of the control terminal through a USB data line;
a handshake message issuing submodule 5012, configured to issue a handshake message in a preset data protocol format to a network device through a communication interface;
the preset data protocol is used for controlling the communication between the terminal and the network equipment;
the structure of the preset data protocol format in this embodiment is as follows:
Figure BDA0001239177950000121
Figure BDA0001239177950000131
the identity authentication information issuing submodule 5013 is used for issuing identity authentication information in a preset data protocol format to the network equipment after the network equipment answers the handshake message;
after receiving the identity authentication information sent by the control terminal, the network equipment authenticates the identity authentication information, and if the authentication is successful, the information which is successful in the identity authentication is packaged according to a preset data protocol format and is sent to the control terminal;
A receiving submodule 5014, configured to receive information that the identity authentication sent by the network device is successful;
if the authentication fails, the message with the authentication failure is packaged according to a preset data protocol format and is sent to the control terminal.
The method of the network equipment for carrying out identity authentication on the control terminal ensures the validity of the control terminal and avoids illegal access of some illegal terminals to the network equipment.
The command issuing module 502 is configured to issue a query command in a preset data protocol format to the network device through the communication interface;
the query command is used to query the operating state of the network device, diagnostic information, etc.
A first receiving module 503, configured to receive operation state information of the network device returned by the network device according to the query command;
after receiving the inquiry command, the network equipment inquires the running state of the network equipment and sends the obtained running state information to the control terminal;
and a display module 504, configured to display the operation state information.
According to the control terminal provided by the embodiment, the communication interface of the control terminal and the communication interface of the same type of network equipment establish communication connection; the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface; the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal; the control terminal receives the running state information and displays the running state information, and the preset data protocol is adopted to realize the method for acquiring the running state information of the network equipment based on any communication interface, so that a developer can know the running state of the network equipment, and further fault diagnosis is carried out on the network equipment.
Further, since many communication interfaces of the embedded network device are provided externally, such as an ethernet interface, a wireless interface, a USB interface, etc., it is easy to connect the network device through these interfaces, so it is convenient for a developer to access the network device through these communication interfaces.
Example five
Referring to fig. 6, fig. 6 is a schematic diagram of a network device according to the present embodiment, where the network device includes:
a second communication connection establishment module 601, configured to establish a communication connection with a control terminal through a communication interface of the control terminal;
the network devices include embedded network devices and the like. The control terminal is used for controlling the network equipment and can execute commands supported by the network equipment, for example, the control terminal can access the network equipment to acquire the running state information of the network equipment. The control terminal comprises a PC or other handheld devices and the like; the operation state information includes an operation state of the network device, diagnostic information, device information, an operation log, and the like.
The communication interface of the control terminal comprises an Ethernet interface, a wireless interface, a USB interface or other communication interfaces and the like;
the second communication connection establishment module 601 includes:
The second connection submodule 6011 is used for connecting with a communication interface corresponding to the control terminal through a network cable, a wireless or USB data line;
when the Ethernet interface is selected to connect the network equipment and the control terminal, the Ethernet interface of the network equipment is connected with the Ethernet interface of the control terminal through a network cable;
when the wireless interface is selected to connect the network equipment and the control terminal, the wireless interface of the network equipment is connected with the wireless interface of the control terminal through wireless;
when the USB interface is selected to be connected with the network equipment and the control terminal, the USB interface of the network equipment is connected with the USB interface of the control terminal through a USB data line;
the response submodule 6012 is configured to respond to the handshake message to the control terminal after receiving the handshake message in the preset data protocol format sent by the control terminal;
the preset data protocol is used for controlling the communication between the terminal and the network equipment;
the structure of the preset data protocol format in this embodiment is as follows:
Figure BDA0001239177950000141
Figure BDA0001239177950000151
an authentication submodule 6013, configured to authenticate the identity authentication information after receiving the identity authentication information in the preset data protocol format sent by the control terminal;
and the sending submodule 6014 is used for sending information of successful identity authentication to the control terminal if the authentication is successful.
If the authentication fails, the message with the authentication failure is packaged according to a preset data protocol format and is sent to the control terminal.
The method of the network equipment for carrying out identity authentication on the control terminal ensures the validity of the control terminal and avoids illegal access of some illegal terminals to the network equipment.
A second receiving module 602, configured to receive, through a communication interface, a query command in a preset data protocol format sent from a control terminal;
the query command is used to query the operating state of the network device, diagnostic information, etc.
A query module 603, configured to query an operation state of the network device according to a query command;
and the sending module 604 is configured to send the obtained operation state information to the control terminal.
According to the network device provided by the embodiment, the communication interface of the control terminal and the communication interface of the same type of the network device establish communication connection; the control terminal transmits a query command with a preset data protocol format to the network equipment through the communication interface; the network equipment inquires the running state of the network equipment according to the inquiry command and sends the obtained running state information to the control terminal; the control terminal receives the running state information and displays the running state information, and the preset data protocol is adopted to realize the method for acquiring the running state information of the network equipment based on any communication interface, so that a developer can know the running state of the network equipment, and further fault diagnosis is carried out on the network equipment.
Further, since many communication interfaces of the embedded network device are provided externally, such as an ethernet interface, a wireless interface, a USB interface, etc., it is easy to connect the network device through these interfaces, so it is convenient for a developer to access the network device through these communication interfaces.
Example six
Referring to fig. 7, fig. 7 is a schematic diagram of a system provided in this embodiment, where the system includes a control terminal 701 and a network device 702;
a control terminal 701, configured to establish a communication connection with the network device 702 through a communication interface of the network device 702, and send a query command in a preset data protocol format to the network device 702 through the communication interface; receiving and displaying the running state information of the network equipment 702 returned by the network equipment 702;
wherein the query command is used to query the operating status, diagnostic information, etc. of the network device 702.
The network device 702 is configured to query its own operation state according to the query command, and send the obtained operation state information to the control terminal 701.
Network device 702 includes embedded network devices, and the like. The control terminal 701 is configured to control the network device 702, and may execute a command supported by the network device 702, for example, the control terminal 701 may access the network device 702 to obtain operation state information of the network device 702. Wherein the control terminal 701 includes a PC or other handheld device, etc.; the operational status information includes the operational status of the network device 702, diagnostic information, device information, operational logs, and the like.
The communication interface of the network device 702 includes an ethernet interface, a wireless interface, a USB interface, or other communication interface, etc.;
the communication interface of the control terminal 701 includes an ethernet interface, a wireless interface, a USB interface, or other communication interfaces, etc.;
when the control terminal 701 and the network device 702 establish a communication connection, the communication interface of the selected control terminal 701 is the same type as the communication interface of the network device 702; for example, when the communication interface of the selected control terminal 701 is an ethernet interface, the communication interface of the network device 702 also needs to be an ethernet interface; when the communication interface of the selected control terminal 701 is a wireless interface, the communication interface of the network device 702 also needs to be a wireless interface.
The control terminal 701 establishes a communication connection with the network device 702 through a communication interface of the network device 702 includes:
the communication interface of the control terminal 701 is connected with the communication interface corresponding to the network device 702 through a network cable, a wireless or a USB data line;
when the ethernet interface is selected to connect the network device 702 and the control terminal 701, the ethernet interface of the network device 702 and the ethernet interface of the control terminal 701 are connected by a network cable;
when the wireless interface is selected to connect the network device 702 and the control terminal 701, the wireless interface of the network device 702 and the wireless interface of the control terminal 701 are connected by wireless;
When the USB interface is selected to connect the network device 702 and the control terminal 701, the USB interface of the network device 702 and the USB interface of the control terminal 701 are connected through a USB data line;
the control terminal 701 transmits a handshake message in a preset data protocol format to the network equipment 702 through a communication interface of the network equipment 702;
the preset data protocol is used for communication between the control terminal 701 and the network device 702;
the structure of the preset data protocol format in this embodiment is as follows:
Figure BDA0001239177950000171
after the network device 702 replies to the handshake message, the control terminal 701 issues identity authentication information in a preset data protocol format to the network device 702;
after receiving the identity authentication information sent by the control terminal 701, the network device 702 authenticates the identity authentication information, and if the authentication is successful, the information which is successful in identity authentication is packaged according to a preset data protocol format and sent to the control terminal 701; the control terminal 701 receives information that the identity authentication sent from the network device 702 is successful.
If the authentication fails, the message with the authentication failure is encapsulated according to a preset data protocol format, and is sent to the control terminal 701.
The mode that the network equipment 702 performs identity authentication on the control terminal 701 ensures the validity of the control terminal 701 and avoids illegal access of some illegal terminals to the network equipment 702.
According to the system provided in the present embodiment, the communication interface of the control terminal 701 establishes a communication connection with the same type of communication interface of the network device 702; the control terminal 701 issues a query command in a preset data protocol format to the network device 702 through the communication interface; the network device 702 queries the running state of itself according to the query command, and sends the obtained running state information to the control terminal 701; the control terminal 701 receives the operation state information and displays the operation state information, and the preset data protocol provided above is adopted to implement a method for acquiring the operation state information of the network device 702 based on any communication interface, so that a developer can know the operation state of the network device 702, and further perform fault diagnosis on the network device 702.
Further, since many communication interfaces of the embedded network device are provided externally, such as an ethernet interface, a wireless interface, a USB interface, etc., it is easy to connect the network device 702 through these interfaces, so it is convenient for a developer to access the network device 702 through these communication interfaces.
It will be appreciated by those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed over a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a storage medium (ROM/RAM, magnetic or optical disk) for execution by computing devices and, in some cases, the steps shown or described may be performed in a different order than what is shown or described herein, or they may be separately manufactured as individual integrated circuit modules, or a plurality of modules or steps in them may be manufactured as a single integrated circuit module. Therefore, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a further detailed description of embodiments of the invention in connection with the specific embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.

Claims (10)

1. An operation state information acquisition method includes:
defining a preset data protocol, wherein the preset data protocol is used for controlling communication between a terminal and network equipment; the format of the preset data protocol comprises a message type field, a session identification field, a bearing length field and a load field, wherein the message type field is used for identifying the message type, and the message type comprises a handshake message, an authentication message, a data message and a disconnection message, and the bearing length field is used for indicating the length of the load field;
establishing communication connection with the network equipment through a communication interface of the network equipment; comprising the following steps: generating a handshake message according to the format of the preset data protocol, and sending the handshake message to the network equipment through the communication interface; after receiving the handshake message responded by the network equipment, generating an authentication message according to the format of the preset data protocol, and sending the authentication message to send identity authentication information to the network equipment; receiving information of successful identity authentication sent by the network equipment through an authentication message generated and responded according to the format of the preset data protocol, wherein the information of successful identity authentication comprises a session identifier obtained by the network equipment according to a preset algorithm;
Generating a data message according to the format of the preset data protocol, and sending a data message issuing query command to the network equipment through the communication interface;
and receiving and analyzing the data message which is generated and responded by the network equipment according to the query command and the format of the preset data protocol according to the preset data protocol, acquiring and displaying the running state information of the network equipment.
2. The method for acquiring operation state information according to claim 1, wherein,
the communication interface comprises an Ethernet interface, a wireless interface or a universal serial bus interface;
the establishing a communication connection with the network device through the communication interface of the network device includes:
and the communication interface is connected with the communication interface corresponding to the network equipment through a network cable, a wireless or universal serial bus data line.
3. An operation state information acquisition method includes:
defining a preset data protocol, wherein the preset data protocol is used for controlling communication between a terminal and network equipment; the format of the preset data protocol comprises a message type field, a session identification field, a bearing length field and a load field, wherein the message type field is used for identifying a message type, and the message type comprises a handshake message, an authentication message, a data message and a disconnection message, and the bearing length field is used for indicating the length of the load field;
Establishing communication connection with a control terminal through a communication interface of the control terminal; comprising the following steps: after receiving a handshake message generated and sent by the control terminal according to the format of the preset data protocol, generating and responding the handshake message to the control terminal according to the format of the preset data protocol; after receiving identity authentication information sent by the control terminal through an authentication message generated according to the format of the preset data protocol, authenticating the identity authentication information, if authentication is successful, obtaining a session identifier according to a preset algorithm, generating and responding to the authentication message to the control terminal according to the format of the preset data protocol, and sending information of successful identity authentication to the control terminal, wherein the information of successful identity authentication comprises the session identifier;
receiving a query command sent by the control terminal through a data message generated according to the format of the preset data protocol through the communication interface;
inquiring the running state of the network equipment according to the inquiring command, generating and responding to a data message according to the format of the preset data protocol, and sending the obtained running state information to the control terminal.
4. The method for acquiring operation state information according to claim 3, wherein,
the communication interface comprises an Ethernet interface, a wireless interface or a universal serial bus interface;
the establishing communication connection with the control terminal through the communication interface of the control terminal comprises the following steps:
and the communication interface is connected with the communication interface corresponding to the control terminal through a network cable, a wireless or universal serial bus data line.
5. An operation state information acquisition method includes:
defining a preset data protocol, wherein the preset data protocol is used for controlling communication between a terminal and network equipment; the format of the preset data protocol comprises a message type field, a session identification field, a bearing length field and a load field, wherein the message type field is used for identifying a message type, and the message type comprises a handshake message, an authentication message, a data message and a disconnection message, and the bearing length field is used for indicating the length of the load field;
the communication interface of the control terminal establishes communication connection with the communication interface of the same type of the network equipment; comprising the following steps:
the control terminal generates a handshake message according to the format of the preset data protocol, and issues the handshake message to the network equipment through the communication interface;
After receiving the handshake message, the network equipment generates and responds the handshake message to the control terminal according to the format of the preset data protocol;
after receiving the handshake message responded by the network equipment, the control terminal generates an authentication message according to the format of the preset data protocol, and sends the authentication message to the network equipment to send identity authentication information;
after receiving the identity authentication information sent by the authentication message, the network equipment authenticates the identity authentication information, if the authentication is successful, a session identifier is obtained according to a preset algorithm, an authentication message is generated and responded to the control terminal according to the format of the preset data protocol, the information of successful identity authentication is sent to the control terminal, and the information of successful identity authentication comprises the session identifier;
the control terminal receives the information of successful identity authentication, generates a data message according to the format of the preset data protocol, and sends a data message issuing inquiry command to the network equipment through the communication interface;
the network equipment receives the query command through the communication interface, queries the running state of the network equipment according to the query command, generates and responds to a data message according to the format of the preset data protocol, and sends the obtained running state information to the control terminal;
And the control terminal receives and analyzes the data message responded by the network equipment according to the preset data protocol, acquires the running state information and displays the running state information.
6. A control terminal, comprising:
the first communication connection establishment module is used for establishing communication connection with the network equipment through a communication interface of the network equipment; comprising the following steps: the handshake message issuing sub-module is used for generating handshake messages according to the format of a preset data protocol and issuing the handshake messages to the network equipment through the communication interface; the identity authentication information issuing sub-module is used for generating an authentication message according to the format of the preset data protocol after receiving the handshake message responded by the network equipment, and sending the authentication message to issue identity authentication information to the network equipment; the receiving sub-module is used for receiving the information of successful identity authentication sent by the network equipment through the authentication message which is generated and responded according to the format of the preset data protocol, wherein the information of successful identity authentication comprises a session identifier obtained by the network equipment according to a preset algorithm;
the command issuing module is used for generating a data message according to the format of the preset data protocol, and sending a data message issuing query command to the network equipment through the communication interface;
The first receiving module is used for receiving and analyzing the data message which is generated and responded by the network equipment according to the query command and the format of the preset data protocol according to the preset data protocol, and acquiring the running state information of the network equipment;
the display module is used for displaying the running state information;
the preset data protocol is used for controlling communication between the terminal and the network equipment; the protocol format of the preset data comprises a message type field, a session identification field, a bearing length field and a load field, wherein the message type field is used for identifying the message type, and the message type comprises a handshake message, an authentication message, a data message and a disconnection message, and the bearing length field is used for indicating the length of the load field.
7. The control terminal of claim 6, wherein,
the communication interface comprises an Ethernet interface, a wireless interface or a universal serial bus interface;
the communication connection establishment module includes:
and the first connection sub-module is used for being connected with a communication interface corresponding to the network equipment through a network cable, a wireless or universal serial bus data line.
8. A network device, comprising:
the second communication connection establishment module is used for establishing communication connection with the control terminal through a communication interface of the control terminal; the response sub-module is used for generating and responding to the handshake message according to the format of the preset data protocol after receiving the handshake message generated and sent by the control terminal according to the format of the preset data protocol; the authentication sub-module is used for authenticating the identity authentication information after receiving the identity authentication information sent by the control terminal through the authentication message generated according to the format of the preset data protocol; the sending sub-module is used for obtaining a session identifier according to a preset algorithm if authentication is successful, generating and responding an authentication message to the control terminal according to the format of the preset data protocol, and sending information of successful identity authentication to the control terminal, wherein the information of successful identity authentication comprises the session identifier;
The second receiving module is used for receiving a query command sent by the control terminal through a data message generated according to the format of the preset data protocol through the communication interface;
the query module is used for querying the running state of the network equipment according to the query command;
the sending module is used for generating and responding to a data message according to the format of the preset data protocol and sending the obtained running state information to the control terminal;
the preset data protocol is used for controlling communication between the terminal and the network equipment; the format of the preset data protocol comprises a message type field, a session identification field, a bearing length field and a load field, wherein the message type field is used for identifying the message type, and the message type comprises a handshake message, an authentication message, a data message and a disconnection message, and the bearing length field is used for indicating the length of the load field.
9. The network device of claim 8,
the communication interface comprises an Ethernet interface, a wireless interface or a universal serial bus interface;
the second communication connection establishment module includes:
and the second connection sub-module is used for being connected with a communication interface corresponding to the control terminal through a network cable, a wireless or universal serial bus data line.
10. A system for acquiring an operation state comprises a control terminal and network equipment; the control terminal establishes communication connection with the network equipment through a communication interface of the network equipment, and comprises:
the control terminal generates a handshake message according to a format of a preset data protocol, and issues the handshake message to the network equipment through the communication interface;
after receiving the handshake message, the network equipment generates and responds the handshake message to the control terminal according to the format of the preset data protocol;
after receiving the handshake message responded by the network equipment, the control terminal generates an authentication message according to the format of the preset data protocol, and sends the authentication message to the network equipment to send identity authentication information;
after receiving the identity authentication information sent by the authentication message, the network equipment authenticates the identity authentication information, if the authentication is successful, a session identifier is obtained according to a preset algorithm, an authentication message is generated and responded to the control terminal according to the format of the preset data protocol, the information of successful identity authentication is sent to the control terminal, and the information of successful identity authentication comprises the session identifier;
The control terminal receives the information of successful identity authentication, generates a data message according to the format of the preset data protocol, and sends a data message issuing inquiry command to the network equipment through the communication interface;
the network equipment receives the query command through the communication interface, queries the running state of the network equipment according to the query command, generates and responds to a data message according to the format of the preset data protocol, and sends the obtained running state information to the control terminal;
the control terminal receives and analyzes the data message responded by the network equipment according to the preset data protocol, acquires the running state information of the network equipment and displays the running state information;
the preset data protocol is used for controlling communication between the terminal and the network equipment; the format of the preset data protocol comprises a message type field, a session identification field, a bearing length field and a load field, wherein the message type field is used for identifying the message type, and the message type comprises a handshake message, an authentication message, a data message and a disconnection message, and the bearing length field is used for indicating the length of the load field.
CN201710128367.5A 2017-03-06 2017-03-06 Running state information acquisition method, control terminal, network equipment and system Active CN108540516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710128367.5A CN108540516B (en) 2017-03-06 2017-03-06 Running state information acquisition method, control terminal, network equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710128367.5A CN108540516B (en) 2017-03-06 2017-03-06 Running state information acquisition method, control terminal, network equipment and system

Publications (2)

Publication Number Publication Date
CN108540516A CN108540516A (en) 2018-09-14
CN108540516B true CN108540516B (en) 2023-07-04

Family

ID=63489586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710128367.5A Active CN108540516B (en) 2017-03-06 2017-03-06 Running state information acquisition method, control terminal, network equipment and system

Country Status (1)

Country Link
CN (1) CN108540516B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112087344B (en) * 2019-06-13 2022-04-29 烽火通信科技股份有限公司 State data acquisition method and system
CN110958333A (en) * 2020-02-25 2020-04-03 湖南中车时代通信信号有限公司 File acquisition method and device
CN115333977B (en) * 2022-08-11 2023-08-15 南京国电南自电网自动化有限公司 Method and device for realizing system diagnosis channel based on network interface

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932193A (en) * 2012-11-28 2013-02-13 迈普通信技术股份有限公司 Network device, management terminal and configuration management system
CN103123485A (en) * 2012-12-26 2013-05-29 上海迪爱斯通信设备有限公司 Intelligent data acquisition and control terminal and Internet of Things system with same

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7478152B2 (en) * 2004-06-29 2009-01-13 Avocent Fremont Corp. System and method for consolidating, securing and automating out-of-band access to nodes in a data network
CN101741636A (en) * 2009-12-22 2010-06-16 中国科学院长春光学精密机械与物理研究所 Computer network monitoring system using chip TMS320F2812
CN102478797B (en) * 2010-11-22 2014-01-08 中国科学院空间科学与应用研究中心 Monitoring system with configurable communication protocol
CN102170370A (en) * 2011-04-29 2011-08-31 中山大学 Home-gateway-based network management realization method
CN103179027B (en) * 2011-12-22 2016-09-28 中兴通讯股份有限公司 A kind of realize the compatible method and system of electric equipment, Universal peripheral accesses gateway
CN102638366B (en) * 2012-03-12 2016-02-10 中兴通讯股份有限公司 A kind of network apparatus management system and method
CN102722468B (en) * 2012-05-28 2014-12-17 成都睿联智居电子科技有限公司 Method for acquiring and updating configuration for network equipment
CN103442250B (en) * 2013-07-30 2015-09-16 Tcl光电科技(惠州)有限公司 Television set debugging system and method
CN103684869B (en) * 2013-12-21 2018-02-06 中电科航空电子有限公司 For the method and device of the status information for reporting multi-interface airborne equipment
CN105227531A (en) * 2014-06-27 2016-01-06 中兴通讯股份有限公司 A kind of acquisition methods of vital sign data, Apparatus and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932193A (en) * 2012-11-28 2013-02-13 迈普通信技术股份有限公司 Network device, management terminal and configuration management system
CN103123485A (en) * 2012-12-26 2013-05-29 上海迪爱斯通信设备有限公司 Intelligent data acquisition and control terminal and Internet of Things system with same

Also Published As

Publication number Publication date
CN108540516A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN105472546B (en) Near field communication method and mobile terminal
CN108540516B (en) Running state information acquisition method, control terminal, network equipment and system
CN104378145A (en) Pairing method and system of Bluetooth device
US8417841B2 (en) Communication system, host device, and terminal device
CN106341834A (en) Internet-of-things device configuration method, Internet-of-things device configuration apparatus, Internet-of-things device configuration system and Internet-of-things device
CN103974308A (en) Base station maintenance equipment, method, device and system, mobile terminal and base station
EP2821922A1 (en) Information processing system, information processing method, mobile phone unit, server and control method and control program for system, phone unit, and server
CN104678798A (en) Method for operating a field device
CN105577717B (en) Control method and system compatible with connection of multiple different electrical appliances
CN110290185A (en) A kind of internet of things equipment integrated system and its application method based on Agent
WO2018113113A1 (en) Double-system terminal wifi sharing method and device
CN112020120A (en) Network configuration method, device, equipment and system
CN103105784B (en) Messaging device and method and control devices, method and system
CN111787514B (en) Method and device for acquiring equipment control data, storage medium and electronic device
CN113141593B (en) Detection method and detection system for vehicle virtual key and upper computer
CN111385611B (en) Account login method of smart television, smart television and terminal equipment
EP3694151A1 (en) Terminal network sharing method, apparatus, air conditioning adjustment device, and storage medium
CN113190452A (en) Dial testing service system, method, equipment and storage medium
CN103490874A (en) Safety information interaction system, method, device and server
JP2010049543A (en) Programmable controller, input/output device and operation parameter access system
CN115021939B (en) Identity authentication method, device, equipment and storage medium
CN109450718B (en) Remote diagnosis method and device for wireless routing equipment
CN113301542B (en) Pairing connection method and device, storage medium and electronic equipment
CN113242060B (en) Network access method and device, storage medium and electronic device
CN113726585B (en) Intelligent household equipment, equipment network access method and system

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