CN111813622B - Equipment monitoring method and device - Google Patents

Equipment monitoring method and device Download PDF

Info

Publication number
CN111813622B
CN111813622B CN202010598222.3A CN202010598222A CN111813622B CN 111813622 B CN111813622 B CN 111813622B CN 202010598222 A CN202010598222 A CN 202010598222A CN 111813622 B CN111813622 B CN 111813622B
Authority
CN
China
Prior art keywords
data
equipment
monitoring
point location
monitored
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
CN202010598222.3A
Other languages
Chinese (zh)
Other versions
CN111813622A (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.)
Xiamen Kecan Information Technology Co ltd
Xiamen Kehua Hengsheng Co Ltd
Original Assignee
Xiamen Kecan Information Technology Co ltd
Xiamen Kehua Hengsheng 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 Xiamen Kecan Information Technology Co ltd, Xiamen Kehua Hengsheng Co Ltd filed Critical Xiamen Kecan Information Technology Co ltd
Priority to CN202010598222.3A priority Critical patent/CN111813622B/en
Publication of CN111813622A publication Critical patent/CN111813622A/en
Application granted granted Critical
Publication of CN111813622B publication Critical patent/CN111813622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application provides a device monitoring method and a device, which belong to the technical field of device monitoring, wherein the device monitoring method comprises the following steps: acquiring the equipment type of equipment to be monitored; acquiring a preset XML file corresponding to the equipment type based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing an equipment monitoring mode based on a Modbus communication protocol; analyzing the XML file to obtain an equipment monitoring mode; and monitoring the equipment to be monitored based on the equipment monitoring mode. According to the method and the device, the XML file is used for configuring the analysis mode, complex and tedious processes such as background analysis code modification, digital-analog modification and front-end display modification during equipment monitoring are omitted, the engineering quantity is reduced, the types of the equipment capable of being monitored are increased, the compatibility is improved, and the access and the monitoring of various kinds of equipment can be simply completed by importing the XML file.

Description

Equipment monitoring method and device
Technical Field
The present application belongs to the technical field of device monitoring, and in particular, to a device monitoring method and apparatus.
Background
When the device is monitored, the difference of the upward northbound interface protocol of the device is often large, and particularly for scenes such as branch data and single battery data, the monitored quantity is often related to the actual situation of a specific project. In the actual implementation process, the manufacturer also needs to make certain adjustments to the communication protocol of the device according to the service requirements.
At present, when equipment is monitored, a traditional development mode is still adopted, background analysis code modification, digital-analog modification, front-end display modification and the like can be involved, the period of new equipment access is long, the test cost is high, the code risk is not easy to control, and the whole code is bulky and not easy to maintain as time goes on.
Disclosure of Invention
The present application aims to provide a device monitoring method and apparatus, which enable access to multiple devices to be easily completed through XML (Extensible Markup Language) point table import.
In order to achieve the above object, a first aspect of the present application provides an apparatus monitoring method, including: acquiring the equipment type of equipment to be monitored;
acquiring a preset XML file corresponding to the equipment type based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing an equipment monitoring mode based on a Modbus communication protocol;
analyzing the XML file to obtain the equipment monitoring mode;
and monitoring the equipment to be monitored based on the equipment monitoring mode.
Based on the first aspect of the present application, in a first possible implementation manner, the XML file includes an instruction set and a point location set, where the instruction set is used to describe a data acquisition instruction for the device to be monitored, and the point location set is used to describe attribute configuration for a data point location;
the monitoring the device to be monitored based on the device monitoring mode includes:
and monitoring the equipment to be monitored based on the instruction set and the point location set obtained by analysis.
Based on the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner, the monitoring the device to be monitored based on the instruction set and the point location set obtained by the parsing includes:
sending the data acquisition instruction to the equipment to be monitored based on the instruction set, and receiving data to be analyzed returned by the equipment to be monitored;
and analyzing the data to be analyzed based on the point location set to obtain data information, wherein the point location set comprises the initial point location of the data acquisition instruction, the point location length and the point location attribute of each data point location in the data to be analyzed.
Based on the second possible implementation manner of the first aspect of the present application, in a third possible implementation manner, the monitoring the device to be monitored based on the device monitoring manner further includes: and dynamically establishing a table based on the XML file and the data information.
Based on the third possible implementation manner of the first aspect of the present application, in a fourth possible implementation manner, the dynamically creating a table based on the XML file and the data information includes:
establishing a data table based on the data information, wherein the data table is used for storing the data information;
establishing a relation table based on the XML file and the data information, wherein the relation table is used for describing the point location attribute of each data point location;
and associating the data table with the relation table.
Based on the fourth possible implementation manner of the first aspect of the present application, in a fifth possible implementation manner, the associating the data table and the relationship table includes:
numbering each data point of the data information;
and associating the data table and the relation table based on the serial number of each data point.
Based on a fifth possible implementation manner of the first aspect of the present application, in a sixth possible implementation manner, after the dynamically creating the table based on the XML file and the data information, the method further includes:
and transmitting the data table and the relation table to a front end for data display, wherein the data point positions are automatically arranged at the front end according to the point position numbers.
A second aspect of the present application provides an apparatus monitoring device, including:
the first acquisition module is used for acquiring the equipment type of the equipment to be monitored;
the second obtaining module is used for obtaining a preset XML file corresponding to the equipment type based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing an equipment monitoring mode based on a Modbus communication protocol;
the analysis module is used for analyzing the XML file to obtain the equipment monitoring mode;
and the monitoring module is used for monitoring the equipment to be monitored based on the equipment monitoring mode.
A third aspect of the present application provides an apparatus monitoring device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the first aspect or any possible implementation manner of the first aspect when executing the computer program.
A fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, performs the steps of the first aspect or any of the possible implementations of the first aspect.
In this way, the method includes firstly acquiring the device type of the device to be monitored; the method comprises the steps that a preset XML file corresponding to the equipment type is obtained based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing the equipment monitoring mode based on a Modbus communication protocol, so that communication with various kinds of equipment is achieved, the types of the equipment capable of being monitored are increased, and compatibility is improved; analyzing the XML file to obtain an equipment monitoring mode; and monitoring the equipment to be monitored based on the equipment monitoring mode. The XML file is used for configuring the analysis mode, complex and tedious processes such as background analysis code modification, digital-analog modification, front-end display modification and the like during equipment monitoring are omitted, the engineering quantity is reduced, and the access and monitoring of various kinds of equipment can be simply completed through XML file import.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of an apparatus monitoring method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a method for analyzing data to be analyzed according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus monitoring device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus monitoring device according to another embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The technical solutions in the embodiments of the present application are clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways than those described herein, and it will be apparent to those of ordinary skill in the art that the present application is not limited by the specific embodiments disclosed below.
Example one
An embodiment of the present application provides an apparatus monitoring method, as shown in fig. 1, the method includes:
step 11: acquiring the equipment type of equipment to be monitored;
step 12: acquiring a preset XML file corresponding to the equipment type based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing an equipment monitoring mode based on a Modbus communication protocol;
specifically, according to the device type of the device to be monitored, a Modbus communication protocol corresponding to the device is obtained, where the Modbus communication protocol is a file in an XML format, and the XML file is bound with the device to be monitored.
Specifically, the XML file includes a protocol header for describing basic information of the Modbus communication protocol, and the device type may be preset in the protocol header. Optionally, the protocol header may further preset a protocol version and a protocol language, so that verification of protocol contents and internationalized protocol distinction can be achieved, and internationalized translation of protocol contents can be achieved by importing different languages.
Step 13: analyzing the XML file to obtain the equipment monitoring mode;
specifically, after the XML file corresponding to the device to be monitored is obtained, the XML file is analyzed, and meanwhile, the analyzed result can be added into the cache, so that subsequent recall is facilitated.
Optionally, the XML file includes an instruction set and a point location set, where the instruction set is used to describe a data acquisition instruction for the device to be monitored, and the point location set is used to describe attribute configuration for a data point location.
Optionally, the type of the data acquisition instruction may be distinguished by the parameter type in the instruction set, where the data acquisition instruction class includes an instruction to be acquired as required, an instruction to be sent at a modified location, and a timing polling instruction. The point location set can be divided into data point locations such as remote signaling, remote measuring and remote controlling according to services required by the equipment to be monitored, and various functions are realized by configuring different attributes of the data point locations, wherein the point location set can configure attributes such as point location addresses, point location function codes, bitwise attributes, single bytes, double bytes, four bytes, signed and unsigned attributes, offset, magnification, point location names, data ranges and custom fields of the data point locations and realize various functions. And when aiming at the remote control data point location, the linkage configuration of single-point setting and simultaneous multi-point setting of the data point location can be realized.
Step 14: and monitoring the equipment to be monitored based on the equipment monitoring mode.
Optionally, in an embodiment, monitoring the device to be monitored based on the device monitoring method includes: and monitoring the equipment to be monitored based on the instruction set and the point location set obtained by analysis. Specifically, the device to be monitored is monitored according to the type of the data acquisition instruction in the instruction set and the attribute configuration of the data point location in the point location set.
Optionally, the monitoring the device to be monitored based on the instruction set and the point location set obtained through the analysis includes: sending the data acquisition instruction to the equipment to be monitored based on the instruction set, and receiving the data to be analyzed returned by the equipment to be monitored; and analyzing the data to be analyzed based on the point location set to obtain data information, wherein the point location set comprises the initial point location of the data acquisition instruction, the point location length and the point location attribute of each data point location in the data to be analyzed.
Optionally, the data to be analyzed is Modbus response information returned by the monitoring device according to a data acquisition instruction of the Modbus communication protocol, where the data to be analyzed includes a function code, an address, a device type, a point location length, a point location name, and 16-system data acquired according to the data acquisition instruction.
Optionally, the returned data to be analyzed is added to an analysis queue, when the data to be analyzed needs to be analyzed, the data to be analyzed is obtained from the analysis queue, the point location attribute of each data point location is obtained from the point location set according to the starting point location and the point location length of the data acquisition instruction, a corresponding analyzer is obtained according to the description of the point location attribute on the data point location, the analysis of the point location data in the data to be analyzed is completed in sequence, and the required data information is obtained.
Optionally, the obtained data information may be stored, so as to facilitate subsequent call of the data information. During storage, the storage mode can be automatically configured by importing the preset storage template, the automatic storage of the data information acquired in real time is realized through the storage template, and the workload in the data storage process is reduced.
In one embodiment, when the device monitoring method is applied to power station device monitoring, the XML file includes a Modbus communication protocol corresponding to the power station device, the XML file is bound with the power station device, then the XML file is parsed, an instruction set and a point location set obtained after parsing are added into a cache, meanwhile, a data acquisition instruction obtained in the instruction set is sent to the power station device, corresponding data returned by the power station device and acquired according to the data acquisition instruction is received, and finally, the returned corresponding data is added into a parsing queue as data to be parsed so as to be parsed subsequently and obtain data information, wherein the data acquisition instruction in the point location set can be a timing polling instruction, namely, a polling instruction is obtained from the instruction set at regular time, and the polling instruction obtained each time is sent to the power station device; or, in another embodiment, when the device monitoring method is applied to monitoring of the internet of things, the XML file includes a Modbus communication protocol corresponding to the internet of things, the XML file is bound with the internet of things and then is analyzed, the instruction set and the point location set obtained after the analysis are added into a cache, and meanwhile, the data acquisition instruction obtained in the instruction set is sent to the collector connected with the internet of things, so that the collector performs data acquisition on the device to be monitored connected with the internet of things according to the timing polling instruction and the displacement uploading instruction in the instruction set, receives corresponding data of the device to be monitored returned by the collector, and adds the returned corresponding data as the data to be analyzed into the analysis queue so as to analyze the data to obtain data information.
Further, as shown in fig. 2, in an embodiment, when analyzing the data to be analyzed, a specific analyzing process is as follows:
a, step a: acquiring data to be analyzed;
specifically, the data to be analyzed is obtained from the analysis queue.
Step b: identifying the function codes in the data to be analyzed;
specifically, if the identification is correct (the corresponding function code is obtained by identification), the step c is skipped; if an error is identified (the identified function code is an error function code), the step d is skipped. The function codes are supported by a Modbus communication protocol, and the error function codes are corresponding error function codes obtained when the function codes identify errors.
Step c: and acquiring an analyzer corresponding to the function code, and completing the analysis of the data to be analyzed through the analyzer.
Step d: and acquiring an abnormal analyzer corresponding to the error function code, and completing the analysis of the data to be analyzed through the abnormal analyzer.
Specifically, when the error function code is identified as a correct function code (function code identification error), the data is analyzed by the abnormal analyzer corresponding to the error function code.
The above-mentioned completing the analysis of the data to be analyzed by the abnormal analyzer specifically includes: acquiring an XML file corresponding to equipment to be monitored; acquiring the address of the data to be analyzed and the number of registers, and determining the type and the acquisition range of a data acquisition instruction based on an XML file; the type of the data acquisition instruction comprises a timing polling instruction, and the acquisition range comprises a starting point position and a point position length of the timing polling instruction; acquiring data point positions of the data to be analyzed according to the initial point position polling and segmenting the data point positions in the data to be analyzed according to the point bit length; acquiring the point location attribute of each data point location based on the XML file, and converting the data type of the segmented data point location; acquiring multiplying power and offset based on the XML file, and calculating a final value of each data point according to the multiplying power and the offset; and acquiring the point location name of each data point location based on the XML file, acquiring the corresponding data point location according to the point location name, and assigning the point location name based on the final value to finish the analysis of the data to be analyzed.
Optionally, the monitoring the device to be monitored based on the device monitoring method further includes: and dynamically establishing a table based on the XML file and the data information.
Optionally, the dynamically creating a table based on the XML file and the data information includes: establishing a data table based on the data information, wherein the data table is used for storing the data information; establishing a relation table based on the XML file and the data information, wherein the relation table is used for describing the point location attribute of each data point location; and associating the data table with the relation table.
Optionally, the associating the data table and the relationship table includes: numbering each data point of the data information; and associating the data table and the relation table based on the number of each data point.
Specifically, the data point locations in the data information are stored through the data table, the point location attributes describing each data point location are described through the relational table, the data information of the equipment to be monitored can be acquired and updated in real time through dynamic table building, and the latest acquired data information can be displayed.
Optionally, after performing dynamic table building based on the XML file and the data information, the method further includes: and transmitting the data table and the relation table to a front end for data display, wherein the data point positions are automatically arranged at the front end according to the point position numbers.
Specifically, the display configuration of the data information of the equipment to be monitored can be automatically completed by importing the display template, meanwhile, the data display of the data information can be automatically realized according to the data table and the relation table, the data point positions are automatically arranged on the front-end display interface through the point position numbers, the engineering configuration workload of common configuration system equipment during data display is reduced, the display template can be a pre-acquired template for data display, and the data information can be displayed on the front end according to the display configuration of the display template. Optionally, the display template may further provide a more detailed display configuration function, and may implement classification display of data by grouping, implement position adjustment of data point location display by moving adjustment of data point locations, and select table display or list display by configuration, so that rule arrangement of data such as branch information and battery cells may be simply implemented, and support dynamic limited display of branch class number according to an actual value of a certain data point location; configuration binding or displaying of computational logic (such as displaying through a statistical chart) of special data point positions can be achieved through custom fields in the XML file.
Further, in an application scenario, when a front end (such as a web page or monitoring software) needs to display data information, the data information of the device to be monitored is acquired from a cache through a device name or a device type of the device to be monitored, and if the front end configures a display mode of the data information through an import template, the data information is displayed based on the configured display mode; and if the front end does not configure the display mode, displaying the data information in a list form by default.
As can be seen from the above, the device monitoring method provided in the embodiment of the present application first obtains the device type of the device to be monitored; the method comprises the steps that a preset XML file corresponding to the equipment type is obtained based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing the equipment monitoring mode based on a Modbus communication protocol, so that communication with various kinds of equipment is achieved, the types of the equipment capable of being monitored are increased, and compatibility is improved; analyzing the XML file to obtain an equipment monitoring mode; and monitoring the equipment to be monitored based on the equipment monitoring mode. The XML file is used for configuration analysis, complex and tedious processes such as background analysis code modification, digital-analog modification and front-end display modification during equipment monitoring are omitted, the engineering quantity is reduced, and access and monitoring of various kinds of equipment can be simply completed through XML file import.
Example two
An embodiment of the present application provides an apparatus monitoring device, and fig. 3 illustrates a schematic structural diagram of the apparatus monitoring device provided in the embodiment of the present application.
Specifically, referring to fig. 3, the device monitoring apparatus 20 includes a first obtaining module 21, a second obtaining module 22, a parsing module 23, and a monitoring module 24.
The first obtaining module 21 is configured to obtain a device type of a device to be monitored;
the second obtaining module 22 is configured to obtain a preset XML file corresponding to the device type based on the device type of the device to be monitored, where the XML file is a file describing a device monitoring mode based on a Modbus communication protocol;
the parsing module 23 is configured to parse the XML file to obtain the device monitoring mode;
the monitoring module 24 is configured to monitor the device to be monitored based on the device monitoring method.
Optionally, the monitoring module 24 is configured to monitor the device to be monitored based on the instruction set and the point location set obtained by the analysis of the analysis module 23.
Optionally, the monitoring module 24 is specifically configured to send a data acquisition instruction to the device to be monitored based on the instruction set, and receive data to be analyzed returned by the device to be monitored; analyzing the data to be analyzed based on a point location set to obtain data information, wherein the point location set comprises a starting point location of a data acquisition instruction, a point location length and a point location attribute of each data point location in the data to be analyzed.
Optionally, the monitoring module 24 is further configured to perform dynamic table building based on the XML file and the data information. Specifically, the monitoring module 24 establishes a data table based on the data information, and the data table is used for storing the data information; establishing a relation table based on the XML file and the data information, wherein the relation table is used for describing the point location attribute of each data point location; an association data table and a relationship table. When the monitoring module 24 associates the data table and the relationship table, it first numbers each data point of the data information, and associates the data table and the relationship table based on the number of each data point.
Optionally, the monitoring module 24 further includes a display module (not shown in the figure), and the display module is configured to transmit the data table and the relationship table to the front end for data display after performing dynamic table establishment based on the XML file and the data information, where the data point locations are automatically arranged at the front end according to the point location numbers.
As can be seen from the above, the device monitoring apparatus 20 provided in the embodiment of the present application first obtains the device type of the device to be monitored through the first obtaining module 21; the second obtaining module 22 obtains a preset XML file corresponding to the device type based on the device type of the device to be monitored, wherein the XML file is a file for describing a device monitoring mode based on a Modbus communication protocol, so that communication with various devices is realized, the types of the devices which can be monitored are increased, and compatibility is improved; then, the XML file is analyzed through the analysis module 23 to obtain an equipment monitoring mode; and finally, monitoring the equipment to be monitored by the monitoring module 24 based on the equipment monitoring mode. The XML file is used for configuration analysis, complex and tedious processes such as background analysis code modification, digital-analog modification and front-end display modification during equipment monitoring are omitted, the engineering quantity is reduced, and access and monitoring of various kinds of equipment can be simply completed through XML file import.
EXAMPLE III
Referring to fig. 4, the moving object tracking apparatus includes a memory 31, a processor 32, and a computer program stored in the memory 31 and executable on the processor 32, where the memory 31 is used for storing software programs and modules, and the processor 32 executes the software programs and modules stored in the memory 31, so as to execute various functional applications and data processing. The memory 31 and the processor 32 are connected by a bus 33. In particular, the processor 32, by running the above-mentioned computer program stored in the memory 31, implements the following steps:
acquiring the equipment type of equipment to be monitored;
acquiring a preset XML file corresponding to the equipment type based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing an equipment monitoring mode based on a Modbus communication protocol;
analyzing the XML file to obtain the equipment monitoring mode;
and monitoring the equipment to be monitored based on the equipment monitoring mode.
Assuming that the above is the first possible implementation manner, in a second possible implementation manner provided on the basis of the first possible implementation manner, the XML file includes an instruction set and a point location set, where the instruction set is used to describe a data acquisition instruction for the device to be monitored, and the point location set is used to describe attribute configuration for a data point location;
the monitoring the device to be monitored based on the device monitoring method includes:
and monitoring the equipment to be monitored based on the instruction set and the point location set obtained by analysis.
In a third possible implementation manner provided on the basis of the second possible implementation manner, the monitoring the device to be monitored based on the instruction set and the point location set obtained by the analysis includes:
sending the data acquisition instruction to the equipment to be monitored based on the instruction set, and receiving the data to be analyzed returned by the equipment to be monitored;
and analyzing the data to be analyzed based on the point location set to obtain data information, wherein the point location set comprises the initial point location of the data acquisition instruction, the point location length and the point location attribute of each data point location in the data to be analyzed.
In a fourth possible implementation manner provided on the basis of the third possible implementation manner, the monitoring the device to be monitored based on the device monitoring manner further includes: and dynamically establishing a table based on the XML file and the data information.
In a fifth possible embodiment based on the fourth possible embodiment, the dynamically creating a table based on the XML file and the data information includes:
establishing a data table based on the data information, wherein the data table is used for storing the data information;
establishing a relation table based on the XML file and the data information, wherein the relation table is used for describing the point location attribute of each data point location;
and associating the data table with the relation table.
In a sixth possible embodiment based on the fifth possible embodiment, the associating the data table and the relationship table includes:
numbering each data point of the data information;
and associating the data table and the relation table based on the serial number of each data point.
In a seventh possible embodiment based on the sixth possible embodiment, after the dynamic table creation based on the XML file and the data information, the method further includes:
and transmitting the data table and the relation table to a front end for data display, wherein the data point positions are automatically arranged at the front end according to the point position numbers.
It should be understood that, in the embodiment of the present Application, the Processor 32 may be a Central Processing Unit (CPU), and the Processor 32 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may include read-only memory, flash memory, and random access memory, and provides instructions and data to the processor. Some or all of the memory 31 may also include non-volatile random access memory.
As can be seen from the above, the device monitoring apparatus provided in the embodiment of the present application first obtains a device type of a device to be monitored; the method comprises the steps that a preset XML file corresponding to the equipment type is obtained based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing the equipment monitoring mode based on a Modbus communication protocol, so that communication with various kinds of equipment is achieved, the types of the equipment capable of being monitored are increased, and compatibility is improved; analyzing the XML file to obtain an equipment monitoring mode; and monitoring the equipment to be monitored based on the equipment monitoring mode. The XML file is used for configuration analysis, complex and tedious processes such as background analysis code modification, digital-analog modification and front-end display modification during equipment monitoring are omitted, the engineering quantity is reduced, and access and monitoring of various kinds of equipment can be simply completed through XML file import.
It should be understood that the above-described integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above may be implemented by instructing the relevant hardware by a computer program, where the computer program may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the embodiments of the methods described above may be implemented. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the contents contained in the computer-readable storage medium can be increased or decreased as required by legislation and patent practice in the jurisdiction.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It should be noted that, the methods and the details thereof provided by the foregoing embodiments may be combined with the apparatuses and devices provided by the embodiments, which are referred to each other and are not described again.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described apparatus/device embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and the actual implementation may be implemented by another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (8)

1. A method of device monitoring, comprising:
acquiring the equipment type of equipment to be monitored;
acquiring a preset XML file corresponding to the equipment type based on the equipment type of the equipment to be monitored, wherein the XML file is a file for describing an equipment monitoring mode based on a Modbus communication protocol, the XML file comprises an instruction set and a point location set, the instruction set is used for describing a data acquisition instruction for the equipment to be monitored, the point location set is used for describing attribute configuration for data point locations, and the point location set comprises a starting point location of the data acquisition instruction, a point location length and a point location attribute of each data point location in the data to be analyzed;
analyzing the XML file to obtain the equipment monitoring mode;
monitoring the equipment to be monitored based on the equipment monitoring mode;
wherein, the monitoring the device to be monitored based on the device monitoring mode includes: sending the data acquisition instruction to the equipment to be monitored based on the instruction set, and receiving the data to be analyzed returned by the equipment to be monitored; analyzing the data to be analyzed based on the point location set to obtain data information;
analyzing the data to be analyzed based on the point location set to obtain data information, wherein the analyzing comprises: identifying the function codes in the data to be analyzed; when the obtained function code is identified to be the correct function code, acquiring an analyzer corresponding to the correct function code, and completing the analysis of the data to be analyzed through the analyzer to obtain data information; and when the obtained function code is identified to be an error function code, acquiring an abnormal resolver corresponding to the error function code, and completing the resolution of the data to be resolved through the abnormal resolver to obtain data information.
2. The device monitoring method according to claim 1, wherein the monitoring the device to be monitored based on the device monitoring manner further comprises: and dynamically establishing a table based on the XML file and the data information.
3. The device monitoring method of claim 2, wherein the dynamically tabulating based on the XML file and the data information comprises:
establishing a data table based on the data information, wherein the data table is used for storing the data information;
establishing a relation table based on the XML file and the data information, wherein the relation table is used for describing the point location attribute of each data point location;
and associating the data table and the relation table.
4. The device monitoring method of claim 3, wherein said associating said data table and said relationship table comprises:
numbering each data point of the data information;
and associating the data table and the relation table based on the serial number of each data point position.
5. The device monitoring method of claim 4, wherein the dynamically tabulating based on the XML file and the data information further comprises:
and transmitting the data table and the relation table to a front end for data display, wherein the data point locations are automatically arranged at the front end according to the point location numbers.
6. An equipment monitoring device, comprising:
the first acquisition module is used for acquiring the equipment type of the equipment to be monitored;
a second obtaining module, configured to obtain a preset XML file corresponding to a device type of the device to be monitored based on the device type of the device to be monitored, where the XML file is a file describing a device monitoring manner based on a Modbus communication protocol, the XML file includes an instruction set and a point location set, the instruction set is used to describe a data acquisition instruction for the device to be monitored, the point location set is used to describe attribute configuration for data point locations, and the point location set includes a start point location of the data acquisition instruction, a point location length, and a point location attribute of each data point location in data to be analyzed;
the analysis module is used for analyzing the XML file to obtain the equipment monitoring mode;
the monitoring module is used for monitoring the equipment to be monitored based on the equipment monitoring mode;
the monitoring module is specifically configured to: sending the data acquisition instruction to the equipment to be monitored based on the instruction set, and receiving the data to be analyzed returned by the equipment to be monitored; analyzing the data to be analyzed based on the point location set to obtain data information;
the monitoring module is further configured to: identifying the function codes in the data to be analyzed; when the obtained function code is identified to be the correct function code, acquiring an analyzer corresponding to the correct function code, and completing the analysis of the data to be analyzed through the analyzer to obtain data information; and when the obtained function code is identified to be an error function code, acquiring an abnormal resolver corresponding to the error function code, and completing the resolution of the data to be resolved through the abnormal resolver to obtain data information.
7. An equipment monitoring device comprising: memory, processor and computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202010598222.3A 2020-06-28 2020-06-28 Equipment monitoring method and device Active CN111813622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010598222.3A CN111813622B (en) 2020-06-28 2020-06-28 Equipment monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010598222.3A CN111813622B (en) 2020-06-28 2020-06-28 Equipment monitoring method and device

Publications (2)

Publication Number Publication Date
CN111813622A CN111813622A (en) 2020-10-23
CN111813622B true CN111813622B (en) 2022-09-09

Family

ID=72856596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010598222.3A Active CN111813622B (en) 2020-06-28 2020-06-28 Equipment monitoring method and device

Country Status (1)

Country Link
CN (1) CN111813622B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112684748B (en) * 2020-11-16 2023-04-07 航天信息股份有限公司 Monitoring method and system compatible with various monitored devices
CN112732516A (en) * 2020-12-29 2021-04-30 航天信息股份有限公司 Equipment monitoring method and system
CN115623046B (en) * 2022-12-19 2023-03-10 思创数码科技股份有限公司 Sensing equipment monitoring method and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624685B (en) * 2011-11-24 2015-05-20 高新兴科技集团股份有限公司 Encodable protocol processing method for intelligent equipment
CN104331354A (en) * 2014-11-20 2015-02-04 普华基础软件股份有限公司 Real-time comprehensive monitoring method for cloud computing
US9612873B2 (en) * 2015-08-20 2017-04-04 Microsoft Technology Licensing, Llc Dynamically scalable data collection and analysis for target device
CN106789290B (en) * 2016-12-29 2020-05-12 国网山东省电力公司 Data access method and system based on Modbus RTU protocol
CN108829560B (en) * 2018-06-01 2021-09-28 平安科技(深圳)有限公司 Data monitoring method and device, computer equipment and storage medium
CN109245980B (en) * 2018-11-20 2021-08-06 厦门科灿信息技术有限公司 Modbus communication protocol analysis method, system, equipment and storage medium
CN110377655A (en) * 2019-06-10 2019-10-25 厦门科灿信息技术有限公司 The method and terminal device that front equipment end data are shown

Also Published As

Publication number Publication date
CN111813622A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN111371638B (en) Intelligent equipment testing method and device, server and storage medium
CN111813622B (en) Equipment monitoring method and device
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN106899987B (en) Method and device for calibrating data traffic of mobile terminal
CN112564772B (en) Satellite data acquisition system
CN115623358A (en) Meter reading method, meter reading device and meter reading system
CN108023905B (en) Internet of things application system and method
CN106790380A (en) Data reporting method and device
CN113094087A (en) Software configuration method, electronic device and storage medium
CN113014617A (en) Gateway configuration method and device based on cloud data management platform
CN106899775B (en) Method and device for calibrating data traffic of mobile terminal
CN109788034B (en) Configuration method for gateway access equipment, electronic equipment and storage medium
CN111506501A (en) Test instruction set generation method and device and electronic equipment
CN110780630A (en) Protocol library docking execution system suitable for Internet of things and working method
CN114285774B (en) Flow recording method and device, electronic equipment and storage medium
CN211630177U (en) Equipment data acquisition system
CN114185804A (en) Interface testing method and device and terminal equipment
CN109918353B (en) Method for automatically processing information and terminal equipment
CN113452533A (en) Charging self-inspection and self-healing method and device, computer equipment and storage medium
CN114070863B (en) Data processing method and device, electronic equipment and storage medium
US20220311644A1 (en) Data transmission method and device, electronic apparatus and storage medium
CN110191095B (en) Data processing method and terminal equipment
CN111162983A (en) Equipment data acquisition method and device, storage medium and electronic device
CN117319529B (en) Message analysis method and device applied to vehicle end, electronic 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
GR01 Patent grant
GR01 Patent grant