CN111641528A - Device management method, device, storage medium and computer readable medium - Google Patents

Device management method, device, storage medium and computer readable medium Download PDF

Info

Publication number
CN111641528A
CN111641528A CN202010474427.0A CN202010474427A CN111641528A CN 111641528 A CN111641528 A CN 111641528A CN 202010474427 A CN202010474427 A CN 202010474427A CN 111641528 A CN111641528 A CN 111641528A
Authority
CN
China
Prior art keywords
information
target
format
configuration information
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010474427.0A
Other languages
Chinese (zh)
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.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN202010474427.0A priority Critical patent/CN111641528A/en
Publication of CN111641528A publication Critical patent/CN111641528A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0226Mapping or translating multiple network management protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a device management method, a device, a storage medium and a computer readable medium, comprising: configuring configuration information of at least one device to be managed; when receiving an externally input management request, calling Netty to execute: determining target configuration information of target equipment corresponding to the management request from the configured configuration information; converting the management request into a management instruction in a first format according to the target configuration information, wherein the first format is a format which can be identified by the target equipment; sending the management instruction to the target equipment; and when receiving response information of the first format returned by the target equipment according to the management instruction of the first format, converting the response information of the first format into response information of a preset second format according to the target configuration information. The scheme can reduce the management difficulty of the equipment.

Description

Device management method, device, storage medium and computer readable medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a device management method, apparatus, storage medium, and computer-readable medium.
Background
At present, unified management of multiple devices is generally implemented by a management platform. The devices to be managed are usually from different vendors, and the protocols supported by the devices of different vendors are different. In this case, when managing devices with different protocols, developers are generally required to develop communication functions in a customized manner, that is, different communication modules for different protocols are required to be developed.
As can be seen from the above description, for the variety of proprietary protocols, this not only brings huge coding work and causes resource waste, but also causes code stacking and difficult maintenance as the number of protocol accesses increases, resulting in a difficult management of devices.
Disclosure of Invention
The embodiment of the invention provides a device management method, a device, a storage medium and a computer readable medium, which can reduce the management difficulty of devices.
In a first aspect, the present invention provides a device management method, including:
configuring configuration information of at least one device to be managed;
when receiving an externally input management request, calling Netty to execute:
determining target configuration information of target equipment corresponding to the management request from the configured configuration information;
converting the management request into a management instruction in a first format according to the target configuration information, wherein the first format is a format which can be identified by the target equipment;
sending the management instruction to target equipment;
and when response information of the first format returned by the target equipment according to the management instruction of the first format is received, converting the response information of the first format into response information of a preset second format according to the target configuration information.
Preferably, the first and second electrodes are formed of a metal,
after the converting the management request into the management instruction in the first format according to the target configuration information, before the sending the management instruction to the target device, the method further includes:
establishing long connection with the target equipment according to the target configuration information, and executing the management instruction to be sent to the target equipment;
after the sending the management instruction to the target device, further comprising:
when disconnection with the target equipment is detected, determining whether long connection can be established with the target equipment according to the target configuration information;
and outputting prompt information indicating that the connection of the target equipment is abnormal when the connection with the target equipment cannot be established according to the target configuration information within a preset reconnection time.
Preferably, the first and second electrodes are formed of a metal,
the establishing of the long connection with the target device according to the target configuration information includes:
when the target configuration information indicates that the target device supports serial communication,
and calling the pre-configured RXTX to establish long connection with the target equipment through a serial port.
Preferably, the first and second electrodes are formed of a metal,
after the converting the management request into the management instruction in the first format according to the target configuration information, before the sending the management instruction to the target device, the method further includes:
determining whether the management instruction needs to be split according to a preset communication mechanism;
when the management instruction needs to be split, splitting the management instruction into at least two pieces of first splitting information according to the communication mechanism;
the sending the management instruction to the target device includes:
and respectively sending each piece of the first splitting information to the target device, so that the target device splices each piece of the first splitting information into the management instruction after receiving each piece of the first splitting information.
Preferably, the first and second electrodes are formed of a metal,
further comprising:
and when the received response information comprises at least two pieces of second splitting information, splicing the at least two pieces of splitting information according to the target configuration information to obtain splicing information, and using the splicing information as the response information.
Preferably, the first and second electrodes are formed of a metal,
when receiving response information in the first format returned by the target device according to the management instruction in the first format, before converting the response information in the first format into response information in a preset second format according to the target configuration information, the method further includes:
verifying the response information in the first format according to the target configuration information by using a cyclic redundancy check code;
and when the response information in the first format passes the verification, converting the response information in the first format into response information in a preset second format according to the target configuration information.
In a second aspect, the present invention provides a device management apparatus, including:
the information configuration module is used for configuring configuration information of at least one device to be managed;
the information interaction module is used for calling Netty to execute the following steps when an externally input management request is received: determining target configuration information of target equipment corresponding to the management request from the configuration information configured by the information configuration module;
the information processing module is used for converting the management request into a management instruction in a first format according to the target configuration information determined by the information interaction module, wherein the first format is a format which can be identified by the target equipment;
the information interaction module is also used for sending the management instruction to the target equipment;
the information processing module is further configured to, when the information interaction module receives response information in the first format, which is returned by the target device according to the management instruction in the first format, convert the response information in the first format into response information in a preset second format according to the target configuration information.
Preferably, the first and second electrodes are formed of a metal,
the information interaction module is further used for establishing long connection with the target equipment according to the target configuration information and executing the management instruction to be sent to the target equipment; when disconnection with the target equipment is detected, determining whether long connection can be established with the target equipment according to the target configuration information; and outputting prompt information indicating that the connection of the target equipment is abnormal when the connection with the target equipment cannot be established according to the target configuration information within a preset reconnection time.
Preferably, the first and second electrodes are formed of a metal,
and the information interaction module is used for calling the pre-configured RXTX to establish long connection with the target equipment through a serial port when the target configuration information indicates that the target equipment supports serial port communication.
Preferably, the first and second electrodes are formed of a metal,
the information processing module is further configured to determine whether the management instruction needs to be split according to a preset communication mechanism; when the management instruction needs to be split, splitting the management instruction into at least two pieces of first splitting information according to the communication mechanism;
the information interaction module is configured to send each piece of the first splitting information to the target device, so that the target device splices each piece of the first splitting information into the management instruction after receiving each piece of the first splitting information.
Preferably, the first and second electrodes are formed of a metal,
the information processing module is further configured to, when the response information received by the information interaction module includes at least two pieces of second split information, splice the at least two pieces of split information according to the target configuration information to obtain spliced information, and use the spliced information as the response information.
Preferably, the first and second electrodes are formed of a metal,
the information processing module is further configured to check the response information in the first format according to the target configuration information by using a cyclic redundancy check code; and when the response information in the first format passes the verification, converting the response information in the first format into response information in a preset second format according to the target configuration information.
In a third aspect, the present invention also provides a storage medium comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform the device management method according to any of the first aspect.
In a fourth aspect, the present invention also provides a computer readable medium having stored thereon computer instructions, which, when executed by a processor, cause the processor to execute the device management method of any of the first aspects.
The invention provides a device management method, a device, a storage medium and a computer readable medium, when the information of a device to be managed needs to be acquired based on the requirement, the target device to be acquired can be determined by using Netty, then the target configuration information corresponding to the target device is determined from the configuration information respectively corresponding to at least one device to be managed which is configured in advance, a management request input from the outside is firstly converted into a management instruction in a first format which can be identified by the target device based on the target configuration information, then the management instruction is sent to the target device so that the target device returns corresponding response information based on the management instruction, because the system of the target device supports the data in the first format, the response information returned by the target device is also the information in the first format, and in order to facilitate the system to identify the content of the response information returned by the target device, the response information in the first format can be converted according to the target configuration information to obtain the response information in the second format, so that data interaction with equipment in different protocols is realized, different communication modules do not need to be developed for the different protocols, and the aim of reducing the management difficulty of the equipment is fulfilled.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a device management method according to an embodiment of the present invention;
fig. 2 is a flowchart of a device management method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device management apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a device management method, including:
step 101: configuring configuration information of at least one device to be managed;
step 102: when receiving an externally input management request, calling Netty to execute: determining target configuration information of target equipment corresponding to the management request from the configured configuration information;
step 103: converting the management request into a management instruction in a first format according to the target configuration information, wherein the first format is a format which can be identified by the target equipment;
step 104: sending the management instruction to target equipment;
step 105: and when response information of the first format returned by the target equipment according to the management instruction of the first format is received, converting the response information of the first format into response information of a preset second format according to the target configuration information.
In the embodiment of the present invention, when information of a device to be managed needs to be acquired based on a demand, a target device to be acquired may be determined using Netty, then target configuration information corresponding to the target device is determined from configuration information respectively corresponding to at least one device to be managed that is configured in advance, a management request input from the outside is first converted into a management instruction in a first format that can be recognized by the target device based on the target configuration information, and then the management instruction is sent to the target device, so that the target device returns corresponding response information based on the management instruction, since a system of the target device supports data in the first format, response information returned by the target device is also information in the first format, and in order to facilitate the system to recognize content of the response information returned by the target device, the response information in the first format may be converted according to the target configuration information, the response information in the second format is obtained, data interaction with the equipment in different protocols is realized, different communication modules do not need to be developed aiming at different protocols, and therefore the purpose of reducing the management difficulty of the equipment is achieved.
In an embodiment of the present invention, after the converting the management request into the management instruction in the first format according to the target configuration information, before the sending the management instruction to the target device, the method further includes:
establishing long connection with the target equipment according to the target configuration information, and executing the management instruction to be sent to the target equipment;
after the sending the management instruction to the target device, further comprising:
when disconnection with the target equipment is detected, determining whether long connection can be established with the target equipment according to the target configuration information;
and outputting prompt information indicating that the connection of the target equipment is abnormal when the connection with the target equipment cannot be established according to the target configuration information within a preset reconnection time.
In the embodiment of the invention, the long connection is established with the target equipment based on the connection mode supported by the target equipment in the target configuration information, a plurality of requests can be sent and a plurality of responses can be received on the basis of one connection, and the situation that a new connection is opened by each request is avoided, so that the use of a CPU (central processing unit), namely a memory, can be reduced, the network congestion can be reduced, and the response time of subsequent requests can be reduced. When a network is abnormal and a device at one end fails, the device may be disconnected from a target device, at this time, the connection with the target device may be attempted again by using a connection mode supported by the target device, if the connection with the target device is reestablished within a specified reconnection duration (for example, 20s, 30s, or 60 s), data interaction with the target device continues, and if the connection with the target device cannot be established within the reconnection duration, a prompt message needs to be output to prompt that the network connection of the target device is abnormal, so that a developer can manage the device conveniently.
In an embodiment of the present invention, the establishing a long connection with the target device according to the target configuration information includes:
when the target configuration information indicates that the target device supports serial communication,
and calling the pre-configured RXTX to establish long connection with the target equipment through a serial port.
In the embodiment of the invention, the communication with the target device can be realized based on a Transmission Control Protocol (TCP) or a serial port. When the target device is communicated with the RXTX based on a serial port mode, the RXTX can be introduced to realize the long connection with the target device through the serial port.
In an embodiment of the present invention, after the converting the management request into the management instruction in the first format according to the target configuration information, before the sending the management instruction to the target device, the method further includes:
determining whether the management instruction needs to be split according to a preset communication mechanism;
when the management instruction needs to be split, splitting the management instruction into at least two pieces of first splitting information according to the communication mechanism;
the sending the management instruction to the target device includes:
and respectively sending each piece of the first splitting information to the target device, so that the target device splices each piece of the first splitting information into the management instruction after receiving each piece of the first splitting information.
In the embodiment of the invention, after the management instruction which can be identified by the target device is generated, whether the management instruction needs to be split or not can be judged based on the packet sending threshold value in the preset communication mechanism and the size of the management instruction, and if the management instruction needs to be split, the management instruction can be split according to the management mechanism and respectively sent to the target device, so that the situation that the management instruction data is too large and cannot be sent to the target device at one time is avoided.
For example, the packet sending threshold set in the communication mechanism is not greater than 500k, and if the generated management command is 600k, it is necessary to unpack the management command, for example, the management command is unpacked based on a preset fixed length of 300k, 400, 500k, or in a manner that a specified character ends.
In an embodiment of the present invention, the device management method further includes:
and when the received response information comprises at least two pieces of second splitting information, splicing the at least two pieces of splitting information according to the target configuration information to obtain splicing information, and using the splicing information as the response information.
In the embodiment of the present invention, if response information data returned by the target device based on the management instruction is too large, the target device may split the response information into the plurality of pieces of second split information to be fed back, respectively, and when receiving the response information composed of the plurality of pieces of second split information, the plurality of pieces of second split information need to be spliced based on a packet-sticking mechanism with a fixed length and a specified character end in the communication mechanism, so as to form complete response information.
In order to ensure that the information sent by the target device can be identified, in an embodiment of the present invention, when receiving response information in the first format returned by the target device according to the management instruction in the first format, before converting the response information in the first format into response information in the preset second format according to the target configuration information, the method further includes:
verifying the response information in the first format according to the target configuration information by using a cyclic redundancy check code;
and when the response information in the first format passes the verification, converting the response information in the first format into response information in a preset second format according to the target configuration information.
In the embodiment of the present invention, after receiving the response information in the first format sent by the target device, the response information in the first format needs to be checked, and the information check may be implemented by combining a cyclic redundancy check code CRC with content that needs to be sent by the target device in the target configuration information when responding to the management instruction. If the response information passes the verification, the response information in the first format can be analyzed to obtain the response information in the second format which can be identified by the system, so that the function of supporting the conversion of the response data is realized.
As shown in fig. 2, in order to more clearly illustrate the technical solution and advantages of the present invention, the following describes in detail the device management method provided in the embodiment of the present invention, and specifically may include the following steps:
step 201: and configuring configuration information of at least one device to be managed.
Specifically, based on the device management requirement, when the humidity sensor and the temperature sensor need to be managed, configuration information corresponding to the humidity sensor and the temperature sensor respectively may be determined first. The configuration information may include access basic information, instruction basic information, and data response basic information of the device. The configuration information of the humidity sensor and the temperature sensor may be configured by a preset protocol model.
The access basic information includes: vendor information, product information, version information of the system, supported communication protocols, interface information, etc., but is not limited thereto.
The instruction basic information includes: the instruction may be sent to the device, and for example, the instruction may be sent to the humidity sensor to request the humidity of the environment where the device is located, the instruction to request the time point when the humidity sensor acquires data, and the instruction to request the operation duration of the humidity sensor.
The data response information includes: the device can feed back parameters of which functions, for example, the temperature sensor can feed back parameters such as detected temperature, detected time, running time of the device and the like.
Step 202: when receiving an externally input management request, calling Netty to execute: and determining target configuration information of the target equipment corresponding to the management request from the configured configuration information.
Specifically, when a user needs to acquire data acquired by the temperature sensor, a management request indicating acquisition of the temperature data acquired by the temperature sensor may be input, Netty encapsulating communication logic of the temperature sensor and the humidity sensor in advance is invoked, and target configuration information associated with the temperature sensor may be determined so as to perform data interaction with the temperature sensor based on the target configuration information.
For example, the target configuration information of the temperature sensor is: the manufacturer is z, the version information of the system is 123, the supported communication mode is a serial port, data in a first format is supported in the system, an instruction for acquiring the acquired temperature value can be sent, the acquired temperature range is 0-60 ℃, and the accuracy of the acquired temperature is one bit after a decimal point.
Step 203: and converting the management request into a management instruction in a first format according to the target configuration information, wherein the first format is a format which can be identified by the target equipment.
Specifically, since the protocol supported by the target device may be different from the protocol supported by the apparatus, the management request "acquire temperature collected by the temperature sensor" in chinese format may be converted into the management instruction in the first format in the target configuration information, so that the temperature sensor can recognize the management instruction in the first format.
Step 204: and calling the pre-configured RXTX to establish long connection with the target equipment through the serial port when the target configuration information indicates that the target equipment supports serial port communication.
Specifically, since the temperature sensor supports serial communication, RXTX can be used to establish a long connection with the temperature sensor through a serial port for communication.
Step 205: and determining whether the management instruction needs to be split according to a preset communication mechanism.
Step 206: when the management instruction needs to be split, the management instruction is split into at least two pieces of first splitting information according to a communication mechanism.
Specifically, when parameters of multiple functions need to be acquired, the length of the generated management instruction is usually long, which may make the management instruction data large, and if the data size of the management instruction at this time is set to the specified packet sending threshold in the communication mechanism, the management instruction data may be too large to perform data transmission, so that the management instruction needs to be unpacked at this time to split into multiple pieces of first splitting information.
Specifically, the management command can be split based on a preset fixed length and/or a specified character ending mode.
It should be noted that, if it is determined based on the communication mechanism that the management command can be directly sent to the temperature sensor, the management command does not need to be split.
Step 207: and respectively sending each piece of first splitting information to the target equipment, so that the target equipment splices each piece of first splitting information into a management instruction after receiving each piece of first splitting information.
Step 208: and receiving response information of the first format returned by the target equipment according to the management instruction of the first format.
Specifically, the management instruction is split and then sent to the temperature sensors respectively, so that the temperature sensors splice the plurality of pieces of first split information to form a complete management instruction, and then response information corresponding to the management instruction is returned.
Step 209: and when the received response information comprises at least two pieces of second splitting information, splicing the at least two pieces of splitting information according to the target configuration information to obtain splicing information, and using the splicing information as the response information.
Specifically, if the response information returned by the temperature sensor based on the management instruction is information composed of a plurality of second split information, the plurality of second split information may be subjected to a sticky packet processing in a preset fixed length and in a designated character ending manner to form complete response information.
Taking the fixed length as an example, the packet pasting mechanism is to perform packet pasting according to the sequence of the lengths from large to small, and if the lengths of the second split information sent by the temperature sensor are 200 characters, 150 characters and 50 characters in sequence, the 200 characters, 150 characters and the second split information with the length of 50 characters are spliced together according to the sequence of the lengths from large to small.
Step 210: and checking the response information in the first format according to the target configuration information by using the cyclic redundancy check code.
Specifically, in order to ensure the correctness of the received data, the cyclic redundancy check code CRC may be used to check the contents of the data format and whether the field of the response information in the first format is empty, so as to ensure that the response information returned by the temperature sensor is valid.
Step 211: and when the response information in the first format passes the verification, converting the response information in the first format into the preset response information in the second format according to the target configuration information.
Specifically, when the response information in the first format returned by the temperature sensor is 165, the 165 can be converted into the response information in the second format of 16.5 degrees based on that the collection temperature range in the configuration information is 0-60 degrees and the precision of the collection temperature is one digit after the decimal point.
Specifically, when disconnection from the target device is detected, connection with the temperature sensor may be attempted based on a connection manner of the temperature sensor in the target configuration information, and if the disconnection is still unable to be established with the temperature sensor within a preset reconnection duration, a situation that connection with the temperature sensor is abnormal is represented, and at this time, prompt information indicating that connection with the target device is abnormal may be output.
Specifically, when the temperature sensor performs data interaction, the data interaction may be synchronous data interaction, that is, after an instruction is sent to the temperature sensor, the temperature sensor needs to immediately feed back corresponding information. And asynchronous data interaction can be performed between the temperature sensor and the temperature sensor, namely, after the instruction is sent to the temperature sensor, the temperature sensor can perform feedback based on the instruction after other instructions are executed.
As shown in fig. 3, an embodiment of the present invention provides a device management apparatus, including:
an information configuration module 301, configured to configure configuration information of at least one device to be managed;
an information interaction module 302, configured to, when receiving an externally input management request, invoke Netty to perform: determining target configuration information of a target device corresponding to the management request from the configuration information configured by the information configuration module 301;
an information processing module 303, configured to convert the management request into a management instruction in a first format according to the target configuration information determined by the information interaction module 302, where the first format is a format that can be recognized by the target device;
the information interaction module 302 is further configured to send the management instruction to a target device;
the information processing module 303 is further configured to, when the information interaction module 302 receives response information in the first format, which is returned by the target device according to the management instruction in the first format, convert the response information in the first format into response information in a preset second format according to the target configuration information.
In the embodiment of the present invention, when information of a device to be managed needs to be acquired based on a demand, a target device to be acquired may be determined using Netty, then target configuration information corresponding to the target device is determined from configuration information respectively corresponding to at least one device to be managed that is configured in advance, a management request input from the outside is first converted into a management instruction in a first format that can be recognized by the target device based on the target configuration information, and then the management instruction is sent to the target device, so that the target device returns corresponding response information based on the management instruction, since a system of the target device supports data in the first format, response information returned by the target device is also information in the first format, and in order to facilitate the system to recognize content of the response information returned by the target device, the response information in the first format may be converted according to the target configuration information, the response information in the second format is obtained, data interaction with the equipment in different protocols is realized, different communication modules do not need to be developed aiming at different protocols, and therefore the purpose of reducing the management difficulty of the equipment is achieved.
In an embodiment of the present invention, the information interaction module is further configured to establish a long connection with the target device according to the target configuration information, and execute the sending of the management instruction to the target device; when disconnection with the target equipment is detected, determining whether long connection can be established with the target equipment according to the target configuration information; and outputting prompt information indicating that the connection of the target equipment is abnormal when the connection with the target equipment cannot be established according to the target configuration information within a preset reconnection time.
In an embodiment of the present invention, the information interaction module is configured to call a preconfigured RXTX to establish a long connection with the target device through a serial port when the target configuration information indicates that the target device supports serial port communication.
In an embodiment of the present invention, the information processing module is further configured to determine whether the management instruction needs to be split according to a preset communication mechanism; when the management instruction needs to be split, splitting the management instruction into at least two pieces of first splitting information according to the communication mechanism;
the information interaction module is configured to send each piece of the first splitting information to the target device, so that the target device splices each piece of the first splitting information into the management instruction after receiving each piece of the first splitting information.
In an embodiment of the present invention, the information processing module is further configured to, when the response information received by the information interaction module includes at least two pieces of second split information, splice the at least two pieces of split information according to the target configuration information to obtain spliced information, and use the spliced information as the response information.
In an embodiment of the present invention, the information processing module is further configured to check the response information in the first format according to the target configuration information by using a cyclic redundancy check code; and when the response information in the first format passes the verification, converting the response information in the first format into response information in a preset second format according to the target configuration information.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the device management apparatus. In other embodiments of the invention, the device management apparatus may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
An embodiment of the present invention further provides a storage medium, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine readable program to perform the device management method in any embodiment of the invention.
Embodiments of the present invention further provide a computer-readable medium, where computer instructions are stored, and when executed by a processor, cause the processor to execute the device management method in any embodiment of the present invention.
Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware unit may be implemented mechanically or electrically. For example, a hardware element may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware elements may also comprise programmable logic or circuitry, such as a general purpose processor or other programmable processor, that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (10)

1. The device management method is characterized by comprising the following steps:
configuring configuration information of at least one device to be managed;
when receiving an externally input management request, calling Netty to execute:
determining target configuration information of target equipment corresponding to the management request from the configured configuration information;
converting the management request into a management instruction in a first format according to the target configuration information, wherein the first format is a format which can be identified by the target equipment;
sending the management instruction to target equipment;
and when response information of the first format returned by the target equipment according to the management instruction of the first format is received, converting the response information of the first format into response information of a preset second format according to the target configuration information.
2. The device management method according to claim 1,
after the converting the management request into the management instruction in the first format according to the target configuration information, before the sending the management instruction to the target device, the method further includes:
establishing long connection with the target equipment according to the target configuration information, and executing the management instruction to be sent to the target equipment;
after the sending the management instruction to the target device, further comprising:
when disconnection with the target equipment is detected, determining whether long connection can be established with the target equipment according to the target configuration information;
and outputting prompt information indicating that the connection of the target equipment is abnormal when the connection with the target equipment cannot be established according to the target configuration information within a preset reconnection time.
3. The device management method according to claim 2,
the establishing of the long connection with the target device according to the target configuration information includes:
when the target configuration information indicates that the target device supports serial communication,
and calling the pre-configured RXTX to establish long connection with the target equipment through a serial port.
4. The device management method according to any one of claims 1 to 3,
after the converting the management request into the management instruction in the first format according to the target configuration information, before the sending the management instruction to the target device, the method further includes:
determining whether the management instruction needs to be split according to a preset communication mechanism;
when the management instruction needs to be split, splitting the management instruction into at least two pieces of first splitting information according to the communication mechanism;
the sending the management instruction to the target device includes:
sending each piece of the first splitting information to the target device, so that the target device splices each piece of the first splitting information into the management instruction after receiving each piece of the first splitting information;
and/or the presence of a gas in the gas,
further comprising:
when the received response information comprises at least two pieces of second splitting information, splicing the at least two pieces of splitting information according to the target configuration information to obtain splicing information, and using the splicing information as the response information;
and/or the presence of a gas in the gas,
when receiving response information in the first format returned by the target device according to the management instruction in the first format, before converting the response information in the first format into response information in a preset second format according to the target configuration information, the method further includes:
verifying the response information in the first format according to the target configuration information by using a cyclic redundancy check code;
and when the response information in the first format passes the verification, converting the response information in the first format into response information in a preset second format according to the target configuration information.
5. An apparatus for managing devices, comprising:
the information configuration module is used for configuring configuration information of at least one device to be managed;
the information interaction module is used for calling Netty to execute the following steps when an externally input management request is received: determining target configuration information of target equipment corresponding to the management request from the configuration information configured by the information configuration module;
the information processing module is used for converting the management request into a management instruction in a first format according to the target configuration information determined by the information interaction module, wherein the first format is a format which can be identified by the target equipment;
the information interaction module is also used for sending the management instruction to the target equipment;
the information processing module is further configured to, when the information interaction module receives response information in the first format, which is returned by the target device according to the management instruction in the first format, convert the response information in the first format into response information in a preset second format according to the target configuration information.
6. The device management apparatus according to claim 5,
the information interaction module is further used for establishing long connection with the target equipment according to the target configuration information and executing the management instruction to be sent to the target equipment; when disconnection with the target equipment is detected, determining whether long connection can be established with the target equipment according to the target configuration information; and outputting prompt information indicating that the connection of the target equipment is abnormal when the connection with the target equipment cannot be established according to the target configuration information within a preset reconnection time.
7. The device management apparatus according to claim 6,
and the information interaction module is used for calling the pre-configured RXTX to establish long connection with the target equipment through a serial port when the target configuration information indicates that the target equipment supports serial port communication.
8. The device management apparatus according to any one of claims 5 to 7,
the information processing module is further configured to determine whether the management instruction needs to be split according to a preset communication mechanism; when the management instruction needs to be split, splitting the management instruction into at least two pieces of first splitting information according to the communication mechanism;
the information interaction module is configured to send each piece of the first splitting information to the target device, so that the target device splices each piece of the first splitting information into the management instruction after receiving each piece of the first splitting information;
and/or the presence of a gas in the gas,
the information processing module is further configured to, when the response information received by the information interaction module includes at least two pieces of second split information, splice the at least two pieces of split information according to the target configuration information to obtain spliced information, and use the spliced information as response information;
and/or the presence of a gas in the gas,
the information processing module is further configured to check the response information in the first format according to the target configuration information by using a cyclic redundancy check code; and when the response information in the first format passes the verification, converting the response information in the first format into response information in a preset second format according to the target configuration information.
9. A storage medium, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program to perform the method of any of claims 1 to 4.
10. Computer readable medium, characterized in that it has stored thereon computer instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 4.
CN202010474427.0A 2020-05-29 2020-05-29 Device management method, device, storage medium and computer readable medium Pending CN111641528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010474427.0A CN111641528A (en) 2020-05-29 2020-05-29 Device management method, device, storage medium and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010474427.0A CN111641528A (en) 2020-05-29 2020-05-29 Device management method, device, storage medium and computer readable medium

Publications (1)

Publication Number Publication Date
CN111641528A true CN111641528A (en) 2020-09-08

Family

ID=72331219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010474427.0A Pending CN111641528A (en) 2020-05-29 2020-05-29 Device management method, device, storage medium and computer readable medium

Country Status (1)

Country Link
CN (1) CN111641528A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650802A (en) * 2020-12-22 2021-04-13 浪潮云信息技术股份公司 Butt joint method and device for government affair data
CN112769901A (en) * 2020-12-23 2021-05-07 交控科技股份有限公司 Rail transit signal equipment communication interaction method and system
CN114157714A (en) * 2021-12-01 2022-03-08 福建博思数字科技有限公司 Method, system and storage device for realizing financial system protocol communication based on Netty

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809945A (en) * 2018-05-17 2018-11-13 广州云湾信息技术有限公司 Realize the method, apparatus and Internet of Things cloud platform that equipment room interconnects
CN110049137A (en) * 2019-04-25 2019-07-23 广东工业大学 A kind of instruction transmission method, collecting method and relevant apparatus
CN110324169A (en) * 2018-03-30 2019-10-11 北京京东尚科信息技术有限公司 A kind of method and apparatus of interface management
US20200128077A1 (en) * 2017-05-25 2020-04-23 Siemens Aktiengesellschaft Data transmission method and device
CN111193765A (en) * 2019-11-18 2020-05-22 腾讯科技(深圳)有限公司 Device connection method, device, computer device and computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200128077A1 (en) * 2017-05-25 2020-04-23 Siemens Aktiengesellschaft Data transmission method and device
CN110324169A (en) * 2018-03-30 2019-10-11 北京京东尚科信息技术有限公司 A kind of method and apparatus of interface management
CN108809945A (en) * 2018-05-17 2018-11-13 广州云湾信息技术有限公司 Realize the method, apparatus and Internet of Things cloud platform that equipment room interconnects
CN110049137A (en) * 2019-04-25 2019-07-23 广东工业大学 A kind of instruction transmission method, collecting method and relevant apparatus
CN111193765A (en) * 2019-11-18 2020-05-22 腾讯科技(深圳)有限公司 Device connection method, device, computer device and computer-readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650802A (en) * 2020-12-22 2021-04-13 浪潮云信息技术股份公司 Butt joint method and device for government affair data
CN112769901A (en) * 2020-12-23 2021-05-07 交控科技股份有限公司 Rail transit signal equipment communication interaction method and system
CN112769901B (en) * 2020-12-23 2023-02-28 交控科技股份有限公司 Rail transit signal equipment communication interaction method and system
CN114157714A (en) * 2021-12-01 2022-03-08 福建博思数字科技有限公司 Method, system and storage device for realizing financial system protocol communication based on Netty
CN114157714B (en) * 2021-12-01 2024-02-13 福建博思数字科技有限公司 Method, system and storage device for realizing financial system protocol communication based on Netty

Similar Documents

Publication Publication Date Title
CN111641528A (en) Device management method, device, storage medium and computer readable medium
CN109768970B (en) Configurable universal protocol generation method
CN109361550B (en) Method, device and equipment for network equipment configuration management
CN111464608A (en) Message processing method and device
CN109547524B (en) User behavior storage method, device, equipment and storage medium based on Internet of things
CN108063775B (en) Communication protocol compatible method, device and system
CN106330483B (en) Information acquisition method, client device and server device
CN111683066A (en) Heterogeneous system integration method and device, computer equipment and storage medium
CN113015165A (en) Internet of things platform device access method, device and system
CN111694797A (en) File uploading and analyzing method, device, server and medium
CN113806037A (en) Service calling method and device, storage medium and electronic equipment
CN114675945A (en) Service calling method and device, computer equipment and storage medium
CN115134236A (en) Intelligent network card management method, device, equipment and readable medium
CN112988409B (en) Interface calling method and device, computer equipment and storage medium
CN114860437A (en) Data acquisition method, edge calculation host and computer-readable storage medium
CN107040613A (en) A kind of message transmitting method and system
CN114172978A (en) Multi-protocol equipment access method and related device
CN116028331A (en) Configuration file generation method and framework construction method for middleware test
WO2024108940A1 (en) Performance supervision method, apparatus and system, and device and medium
CN110780915B (en) Data processing method, device and storage medium
CN110955537B (en) Method and device for containing pipes by physical machine
EP3038390B1 (en) Processing method and apparatus for signaling tracing
CN114531289A (en) System interaction method based on artificial intelligence and related equipment
WO2017041550A1 (en) Device simulator communication method and system
CN112905212A (en) Firmware data processing method, device, equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200908