[go: up one dir, main page]

CN114500305B - Device monitoring method, device, storage medium and program product - Google Patents

Device monitoring method, device, storage medium and program product Download PDF

Info

Publication number
CN114500305B
CN114500305B CN202210120683.9A CN202210120683A CN114500305B CN 114500305 B CN114500305 B CN 114500305B CN 202210120683 A CN202210120683 A CN 202210120683A CN 114500305 B CN114500305 B CN 114500305B
Authority
CN
China
Prior art keywords
monitoring
collector
equipment
information
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
CN202210120683.9A
Other languages
Chinese (zh)
Other versions
CN114500305A (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.)
Hangzhou Kongtrolink Information Technology Co ltd
Original Assignee
Hangzhou Kongtrolink 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 Hangzhou Kongtrolink Information Technology Co ltd filed Critical Hangzhou Kongtrolink Information Technology Co ltd
Priority to CN202210120683.9A priority Critical patent/CN114500305B/en
Publication of CN114500305A publication Critical patent/CN114500305A/en
Application granted granted Critical
Publication of CN114500305B publication Critical patent/CN114500305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a device monitoring method, a device, a storage medium and a program product. The monitoring equipment of the monitoring system is connected with each monitoring subsystem of the monitoring system and the plurality of collectors; the method is applied to monitoring equipment and comprises the following steps: acquiring a monitoring data byte stream of a first monitored device and first initial device information of the first monitored device, wherein the monitoring data byte stream is acquired by a first acquisition unit; analyzing the monitoring data byte stream of the first monitored equipment according to the first initial equipment information to obtain initial monitoring data of the first monitored equipment; processing initial monitoring data of first monitored equipment to obtain monitoring data of the first monitored equipment, wherein the monitoring data of the first monitored equipment meets a first north interface protocol adopted by a first monitoring subsystem corresponding to the first monitored equipment; and reporting the monitoring data of the first monitored equipment to the first monitoring subsystem so that one monitoring equipment is adapted to a plurality of monitoring subsystems of the monitoring system.

Description

Device monitoring method, device, storage medium and program product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a device monitoring method, an apparatus, a device, a storage medium, and a program product.
Background
With the development of computer technology, the number of various machine rooms such as data centers, network machine rooms, data service machine rooms, communication base stations and the like is increased, the scale is continuously enlarged, and the required monitored equipment is also increased. In order to ensure the stable operation of the machine room, the machine room needs to be monitored by using a monitoring system so as to realize real-time and efficient monitoring of the machine room. The monitoring system comprises a monitoring management platform and monitoring equipment positioned at the machine room side. The monitoring equipment is used for collecting the running state data of the machine room and reporting the running state data to the monitoring management platform.
Currently, the monitoring management platform may include a plurality of subsystems, and the north interface protocols corresponding to the plurality of subsystems may be different. Thus, the prior art typically provides a monitoring device for each subsystem to collect and report the monitoring data required by the subsystem. However, the above-mentioned mode of obtaining the monitoring data leads to more monitoring equipment that the computer lab deployed, and then leads to the installation deployment comparatively loaded down with trivial details, easily causes the wasting of resources.
Disclosure of Invention
The application provides a device monitoring method, a device, equipment, a storage medium and a program product, which are used for solving the problems of more monitoring devices deployed in a machine room, more complicated installation and deployment and resource waste caused by a mode of acquiring monitoring data in the prior art.
In a first aspect, the present application provides an apparatus monitoring method, where a monitoring system includes a monitoring apparatus and at least M monitoring subsystems, where a north interface protocol adopted by each of the monitoring subsystems is different, the monitoring apparatus is connected to each of the monitoring subsystems, and a plurality of collectors are connected to each other, where the collectors are used to collect a byte stream of monitoring data of a plurality of monitored apparatuses, and M is an integer greater than or equal to 2; the method is applied to the monitoring device, and comprises the following steps:
acquiring a monitoring data byte stream of a first monitored device acquired by the first acquisition unit, and first initial device information of the first monitored device; the first collector is any one of the plurality of collectors;
analyzing the monitoring data byte stream of the first monitored equipment according to the first initial equipment information to obtain initial monitoring data of the first monitored equipment; the initial monitoring data of the first monitored equipment comprises initial monitoring data of X monitoring points of the first monitored equipment; x is an integer greater than or equal to 1;
processing initial monitoring data of the first monitored equipment to obtain monitoring data of the first monitored equipment, wherein the monitoring data of the first monitored equipment meets a first north interface protocol adopted by a first monitoring subsystem corresponding to the first monitored equipment; the monitoring data comprise monitoring data of Y monitoring points of the first monitored equipment, wherein Y is a positive integer less than or equal to X;
And reporting the monitoring data of the first monitored equipment to the first monitoring subsystem.
Optionally, the analyzing the monitoring data byte stream of the first monitored device according to the first initial device information to obtain initial monitoring data of the first monitored device includes:
acquiring first initial monitoring point parameter information of the first monitored equipment according to the first initial equipment information of the first monitored equipment and the mapping relation between the initial equipment information and the initial monitoring point parameter information;
and analyzing the monitoring data byte stream of the first monitored equipment according to the first initial monitoring point parameter information to obtain initial monitoring data of the first monitored equipment.
Optionally, the processing the initial monitoring data of the first monitored device to obtain the monitoring data of the first monitored device includes:
obtaining first equipment information of the first monitored equipment according to the equipment information mapping table corresponding to the first monitoring subsystem and the initial equipment information of the first monitored equipment; the equipment information mapping table comprises a mapping relation between initial equipment information and equipment information, wherein the equipment information corresponding to the initial equipment information is equipment information constrained by the first northbound interface protocol;
Acquiring monitoring data of the Y monitoring points from the initial monitoring data according to a monitoring point attribute template table of the first monitoring subsystem; the monitoring point attribute template table is used for indicating the type of monitoring data of the monitoring point required by the first monitoring subsystem based on the first northbound interface protocol;
and obtaining the monitoring data according to the first equipment information and the monitoring data of the Y monitoring points.
Optionally, the acquiring the monitoring data byte stream of the first monitored device acquired by the first acquirer, and the first initial device information of the first monitored device include:
receiving a monitoring data acquisition request from the first monitoring subsystem;
and acquiring a monitoring data byte stream of the first monitored equipment and the first initial equipment information from a cache data list of the first collector on the monitoring equipment according to the identification of the first monitored equipment.
Optionally, the acquiring, according to the identification of the first monitored device, a monitoring data byte stream of the first monitored device from a cache data list of the first collector, and before the first initial device information, further includes:
Receiving a monitoring data byte stream of the first monitored equipment reported by the first collector and the first initial equipment information;
and adding the monitoring data byte stream of the first monitored equipment and the first initial equipment information into a cache data list of the first collector.
Optionally, the method further comprises:
an initialization operation is performed to configure the following information:
the system comprises a binding relation between a collector and monitored equipment, a mapping relation between initial equipment information and initial monitoring point parameter information of each monitored equipment, an equipment information mapping table corresponding to each monitoring subsystem and a monitoring point attribute template table of each monitoring subsystem.
Optionally, the performing an initializing operation includes:
initializing network parameters of the monitoring equipment to monitor port numbers registered by the collector;
registering a connection initialization callback function and a data receiving callback function; the connection initialization callback function is used for receiving a connection request sent by the collector from the port number registered by the collector, and the data receiving callback function is used for receiving a monitoring data byte stream of the monitored equipment collected by the collector from the port number registered by the collector;
Constructing a collector handle pool, and updating the collector handle pool according to the connection information of the collector acquired by calling a connection initialization callback function; the collector handle pool comprises a collector handle corresponding to each collector, the collector handle is used for storing and analyzing the monitoring data byte stream of the monitored equipment, and the collector handle stores the monitoring configuration information of the corresponding collector; the monitoring configuration information comprises: attribute information of the collector, binding relation of the collector and the monitored equipment, mapping relation of initial equipment information of the monitored equipment corresponding to the collector and initial monitoring point parameter information, and a cache data list of the collector;
starting a thread for connecting with each monitoring subsystem, and registering data initialization callback functions required by each thread; the data initialization callback function is used for initializing an equipment information mapping table of the monitoring subsystem corresponding to the thread and a monitoring point attribute template table; the thread is used for processing the initial monitoring data of the first monitored equipment, acquiring the monitoring data of the first monitored equipment and reporting the corresponding monitoring subsystem.
Optionally, the attribute information of the collector includes: the identification of the collector and the state of the collector;
the construction of the collector handle pool, and updating the collector handle pool according to the connection information of the collector acquired by calling the connection initialization callback function, comprises the following steps:
constructing a collector handle pool according to the information of the collector stored in the database, the register information configuration table of the monitored equipment and the parameter template table of the monitoring point of the monitored equipment; wherein, the initial state of the collector is an off-line state; the register information configuration table is used for indicating the storage space required to be occupied by the monitored equipment;
if the connection request sent by the second collector is monitored, the connection initialization callback function is called, and the connection information of the second collector is added into a connection queue; the connection information comprises an identifier of the second collector;
when the connection queue is traversed to acquire the connection information of the second collector, if no collector handle corresponding to the second collector is determined in the collector handle pool according to the identification of the second collector, adding the collector handle corresponding to the second collector in the collector handle pool, and modifying the state of the second collector into an online state in the collector handle corresponding to the second collector;
Or if the collector handle corresponding to the second collector exists in the collector handle pool according to the identification of the second collector, modifying the state of the second collector into an on-line state in the collector handle corresponding to the second collector.
Optionally, after modifying the state of the second collector to the online state in the collector handle corresponding to the second collector, the method further includes:
acquiring information of the monitored equipment bound by the collector from the second collector;
and according to the initial equipment information of the monitored equipment bound by the second collector, updating the mapping relation between the initial equipment information of the monitored equipment corresponding to the second collector and the initial monitoring point parameter information in the collector handle corresponding to the second collector.
In a second aspect, the present application provides an apparatus monitoring device, where a monitoring system includes a monitoring apparatus and at least M monitoring subsystems, where a north interface protocol adopted by each of the monitoring subsystems is different, the monitoring apparatus is connected to each of the monitoring subsystems, and a plurality of collectors are connected to each other, where the collectors are used to collect monitored data byte streams of a plurality of monitored apparatuses, and M is an integer greater than or equal to 2; the apparatus is applied to the monitoring device, and the apparatus includes:
The acquisition module is used for acquiring the monitoring data byte stream of the first monitored equipment acquired by the first acquisition unit and first initial equipment information of the first monitored equipment; the first collector is any one of the plurality of collectors;
the analysis module is used for analyzing the monitoring data byte stream of the first monitored equipment according to the first initial equipment information to obtain initial monitoring data of the first monitored equipment; the initial monitoring data of the first monitored equipment comprises initial monitoring data of X monitoring points of the first monitored equipment; x is an integer greater than or equal to 1;
the processing module is used for processing the initial monitoring data of the first monitored equipment to obtain the monitoring data of the first monitored equipment, and the monitoring data of the first monitored equipment meets a first north interface protocol adopted by a first monitoring subsystem corresponding to the first monitored equipment; the monitoring data comprise monitoring data of Y monitoring points of the first monitored equipment, wherein Y is a positive integer less than or equal to X;
and the sending module is used for reporting the monitoring data of the first monitored equipment to the first monitoring subsystem.
In a third aspect, the present application provides a monitoring device comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, are adapted to carry out the device monitoring method according to any one of the first aspects.
In a fifth aspect, the application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the first aspects.
According to the equipment monitoring method, the equipment, the storage medium and the program product, the monitoring equipment can process and report the monitoring data according to the northbound interface protocol required by each monitoring subsystem, so that one monitoring equipment can be adapted to a plurality of monitoring subsystems of the monitoring system, each monitoring subsystem is not required to be provided with the monitoring equipment, the number of monitoring equipment deployed at the machine room side can be reduced, the installation and deployment of the monitoring equipment in the monitoring system are simplified, and the waste of the monitoring equipment is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of a prior art monitoring system;
FIG. 2 is a schematic diagram of a monitoring system according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a device monitoring method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of an initialization process of an apparatus monitoring method according to an embodiment of the present application;
FIG. 5 is a schematic block diagram of a monitoring device;
fig. 6 is a schematic structural diagram of a device monitoring apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a monitoring device according to the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
For ease of understanding, the architecture of the monitoring system used in the prior art will be described first.
FIG. 1 is a schematic diagram of a prior art monitoring system, as shown in FIG. 1, the monitoring system includes: the monitoring platform, the monitoring equipment and the collector are deployed in the machine room.
The monitoring device may be, for example, an electronic device having communication and processing functions, such as a server, a terminal device, or the like. The Terminal device may also be referred to as a Terminal, a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), etc. The terminal device may be a mobile phone (mobile phone), a tablet computer (pad), a computer with a wireless transceiver function, etc.
The collector can be a data collection device such as a singlechip comprising a communication port, an intelligent gateway, a wireless sensor, an audio/video collector and the like.
The monitoring platform may be, for example, a server or a cluster of servers. Each machine room may correspond to N monitoring platforms, where N is an integer greater than or equal to 1. Each monitoring platform comprises at least one monitoring subsystem, and all monitoring platforms corresponding to each machine room can comprise M monitoring subsystems. Wherein M is an integer greater than or equal to 2. Fig. 1 is a schematic diagram of an example where N is 2 and M is 3. The monitoring subsystem is used to collect and process monitoring data of the monitored devices, which may include, for example, but not limited to, merging, cleaning, analysis, presentation, and the like.
When the monitoring platform is a server cluster, the M monitoring subsystems may be deployed on different servers of the server cluster; or, the monitoring data are obtained through different interfaces of the server, which are deployed on the same server; alternatively, part of the monitoring subsystem is deployed on the same server, and data is acquired through different interfaces of the server, particularly related to deployment of the monitoring subsystem.
The monitoring subsystems have different functions, so that each monitoring subsystem uses different northbound interface protocols when collecting monitored data. Taking the 3 monitoring subsystems shown in fig. 1 as an example, each monitoring subsystem may be shown in the following table 1:
TABLE 1
Currently, in order to match the north interface protocol adopted by each monitoring subsystem, a monitoring device is usually set for one monitoring subsystem at the machine room side. The monitoring equipment is pre-deployed with codes supporting the northbound interface protocol, and the following functions can be realized by running the codes: and acquiring monitoring data of the monitored equipment in the machine room from a collector side connected with the monitoring subsystem, and reporting the acquired data of the monitored equipment to the monitoring subsystem according to the northbound interface protocol. It should be understood that the monitored equipment referred to herein may be equipment that is to be monitored in a machine room. Such as communication devices, smart door locks, surveillance cameras, etc.
In this implementation manner, taking a machine room as an example, the connection relationship among the monitoring platform, the monitoring device, the collector and the monitored device is as follows:
each monitoring subsystem is connected with a corresponding monitoring device, each monitoring device is connected with one or more collectors, and each collector is connected with one or more monitored devices. The number of collectors connected with each monitoring device and the number of monitored devices connected with the collectors can be specifically set according to monitoring requirements. Fig. 1 is a diagram illustrating a relationship among a monitoring device, a collector, and a monitored device, taking the monitoring device 1 as an example.
The connection may be a wired or wireless connection.
Because each monitoring device supports only one northbound interface protocol, and the supported northbound interface protocol is pre-deployed, the more monitoring devices are required when the more monitoring subsystems are included in the monitoring system. Taking 3 monitoring subsystems shown in fig. 1 as an example, 3 monitoring devices are required to be set on the machine room side, and each monitoring device corresponds to 1 monitoring subsystem. Correspondingly, when the monitoring subsystem is newly added to the monitoring system, the monitoring function can be realized only by newly adding monitoring equipment to the machine room. The deployment mode of the monitoring system ensures that the monitoring equipment in the monitoring system is complicated to install and deploy, and the waste of the monitoring equipment is easily caused.
In view of this, the application provides a monitoring method, the monitoring device can process and report the monitoring data according to the north interface protocol required by each monitoring subsystem, so that one monitoring device can adapt to a plurality of monitoring subsystems of the monitoring system, and each monitoring subsystem does not need to be provided with a monitoring device separately, thereby saving the number of monitoring devices deployed at the machine room side, simplifying the installation and deployment of the monitoring devices in the monitoring system, and avoiding the waste of the monitoring devices.
Fig. 2 is a schematic diagram of a monitoring system according to an embodiment of the present application, where, as shown in fig. 2, the monitoring system according to the present application includes: the monitoring platform, the monitoring equipment and the collector are deployed in the machine room.
Unlike the existing monitoring system shown in fig. 1, the monitoring system in the application can realize data collection of a plurality of monitoring subsystems by only deploying one monitoring device in one machine room. That is, the monitoring device is connected to each monitoring subsystem, and, respectively, to all collectors deployed in the machine room.
With continued reference to fig. 2, taking 2 monitoring platforms and 3 monitoring subsystems as an example, in the embodiment of the present application, only 1 monitoring device needs to be set on the machine room side. The monitoring equipment can be connected with all collectors (1 to c) in the machine room to acquire monitoring data of all monitored equipment (1 to d) in the machine room, and the data of the required monitored equipment are reported to each monitoring subsystem according to the northbound interface protocol corresponding to each monitoring subsystem.
The following describes the technical solution of the present application and how the technical solution of the present application solves the above technical problems in combination with specific embodiments from the perspective of a monitoring device, taking the architecture of the monitoring system shown in fig. 2 as an example. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 3 is a flow chart of a device monitoring method according to an embodiment of the present application, as shown in fig. 3, the method of this embodiment includes the following steps:
s301, acquiring a monitoring data byte stream of the first monitored device acquired by the first acquisition unit and first initial device information of the first monitored device.
The first collector is any one of a plurality of collectors connected with the monitoring device, and the first monitored device is any one of a plurality of monitored devices connected with the first collector.
Alternatively, the first initial device information may include, for example, information of a device type, a device brand, a device model number, a device name, a device ID, a device resource number, a monitoring point name, and the like. It should be noted that, in the present application, the device types of the monitored devices of different brands and/or different models are different. For example, the monitored apparatus 1 and the monitored apparatus 2 are air conditioners of brand a, but are different in model, so the apparatus types of the monitored apparatus 1 and the monitored apparatus 2 are different types. For another example, the monitored apparatus 1 is an air conditioner with a brand and the monitored apparatus 2 is an air conditioner with a brand b, so the apparatus types of the monitored apparatus 1 and the monitored apparatus 2 are different types.
The byte stream of the monitoring data of the first monitored device is a byte stream composed of initial monitoring data of X monitoring points of the first monitored device, and X is an integer greater than or equal to 1. The monitoring point may be alarm information, operation parameter information, set parameter information, etc. of the first monitored device, for example, the first monitored device is an air conditioner, and the monitoring point may be abnormal operation alarm, air conditioner power, operation temperature setting, etc.
In one possible implementation manner, the monitoring device is provided with a buffer data list of each collector, and the buffer data byte stream of the monitored device reported by each collector and the initial device information of the monitored device are used for buffering.
Therefore, the monitoring device can acquire the monitoring data byte stream of the first monitored device acquired by the first collector from the cache data list of the first collector, and the initial device information of the first monitored device.
Optionally, when the monitoring device receives the monitoring data acquisition request of the first monitoring subsystem, according to the identifier of the first monitored device, the monitoring data byte stream of the first monitored device acquired by the first collector is acquired from the cache data list of the first collector on the monitoring device, and the initial device information of the first monitored device is reported to the first monitoring subsystem after the subsequent processing shown in fig. 3 is performed. It should be understood that the monitoring data acquisition request may be an acquisition request for acquiring the monitoring data of the first monitored device, or an acquisition request for requesting to acquire the monitoring data of all monitored devices required by the monitoring subsystem and reported by the first collector.
Optionally, the monitoring device may also actively traverse the cache data list of each collector, and when traversing the cache data list of the first collector, acquire the monitoring data byte stream of the first monitored device collected by the first collector from the cache data list of the first collector, and the initial device information of the first monitored device, and report the initial device information to the first monitoring subsystem after performing the subsequent processing shown in fig. 3.
In another possible implementation manner, the monitoring device may receive the monitoring data byte stream of the first monitored device actively reported by the first collector, and the first initial device information.
S302, analyzing the monitoring data byte stream of the first monitored equipment according to the first initial equipment information to obtain initial monitoring data of the first monitored equipment.
In one possible implementation manner, the monitoring device may first obtain the first initial monitoring point parameter information of the first monitored device according to the first initial device information of the first monitored device and the mapping relationship between the initial device information and the initial monitoring point parameter information. The first initial monitoring point parameter information comprises: monitoring point parameter information of X monitoring points of the first monitored equipment. The first initial monitoring point parameter information may be stored in first initial device information of the first monitored device, or may correspond to the first initial device information in a pointer, a linked list or the like, and the embodiment of the present invention is not limited specifically. The first initial monitoring point parameter information is used for describing information or characteristics of initial monitoring data of each monitoring point.
The first initial monitoring point parameter information may also be referred to as attribute information of the monitoring points, and may include, for example, a monitoring point type, a monitoring point name, an offset position of each monitoring point in the monitoring data byte stream, a occupied byte length of each monitoring point in the monitoring data byte stream, and the like.
Then, the monitoring device can analyze the monitoring data byte stream of the first monitored device according to the first initial monitoring point parameter information to obtain initial monitoring data of the first monitored device. For example, the monitoring data in the monitoring data byte stream of the first monitored equipment is extracted through the offset position and the occupied byte length of the parameter information of each monitoring point, the specific value of the monitoring point is obtained, and the specific value is associated with the type of the monitoring point and the name of the monitoring point, so that the initial monitoring data of the monitoring point is obtained. The initial data of each monitoring point, and the initial device information of the first monitored device constitute initial monitoring data of the first monitored device.
In another possible implementation manner, the initial device information includes first initial monitoring point parameter information, so that the monitoring device may directly parse the monitored data byte stream of the first monitored device according to the first initial monitoring point parameter information included in the initial device information to obtain initial monitored data of the first monitored device.
S303, processing initial monitoring data of a plurality of monitoring points of the first monitored equipment to obtain monitoring data of the first monitored equipment.
In one possible implementation manner, the monitoring device may obtain the first device information of the first monitored device according to the device information mapping table corresponding to the first monitoring subsystem and the first initial device information of the first monitored device. Wherein the first device information of the first monitored device is device information constrained by a first north interface protocol in the first monitoring subsystem.
The device information differs from the initial device information in that the device information is device information that can be recognized by the first monitoring subsystem, or in other words, device information that can uniquely characterize the monitored device in the first monitoring subsystem. The initial device information is the device information which can uniquely characterize the monitored device in the machine room where the first monitored device is located. That is, the device information is set in compliance with the monitoring subsystem marking device, while the initial device information is set in compliance with the machine room marking device.
One device information may correspond to one or more initial device information. For example, the device information constrained by the first north interface protocol in the first monitoring subsystem is an air conditioner, the plurality of corresponding monitored devices that are air conditioners are respectively an a brand 1 type air conditioner, an a brand 2 type air conditioner, a b brand 1 type air conditioner, and a b brand 2 type air conditioner, and the device information "air conditioner" may correspond to the plurality of corresponding monitored devices that are air conditioners. The device information mapping table comprises a mapping relation between initial device information and device information, and the mapping relation is preset according to actual needs.
The monitoring device may obtain a plurality of monitoring point attributes of the first device information according to the first device information of the first monitored device and a monitoring point attribute template table corresponding to the first northbound interface protocol in the first monitoring subsystem. The monitoring point attribute is attribute information of a monitoring point which corresponds to the first northbound interface protocol and needs or can monitor the first equipment information, for example, the monitoring point attribute information can be a monitoring point ID, a monitoring point type, a monitoring point name, a storage time interval and the like. The monitoring points included in the monitoring point attribute template table may be a subset or a complete set of monitoring points included in the first initial monitoring point parameter information of the first monitored device, and specifically related to monitoring data of the monitoring points required by the monitoring subsystem.
The manner of obtaining the plurality of monitoring point attributes of the first device information is similar to the manner of obtaining the monitoring point parameter information of the X monitoring points of the first monitored device in step S302, and is not described herein in detail.
The monitoring device can obtain the monitoring data of Y monitoring points needed by the first northbound interface protocol from the initial monitoring data according to the plurality of monitoring point attributes of the first device information, so as to obtain the monitoring data of the first monitored device. Y is less than or equal to X and is an integer greater than or equal to 1.
For example, when the monitored device is an air conditioner of model a brand 1, initial monitoring data of the X monitoring points are shown in table 2:
TABLE 2
Monitoring point type Monitoring point name Data location Data length Parameter information
4 (remote signaling) Work abnormality alert 0 1 0
3 (remote measuring) Air conditioner power 68 4 2400
2 (remote adjusting) Operating temperature setting 88 4 26
The monitoring point attributes of the Y monitoring points required by the corresponding northbound interface protocol are shown in table 3:
TABLE 3 Table 3
Monitoring point ID Monitoring point type Monitoring point name Storage time interval Unit (B)
415001001 2 Work abnormality alert 1800 Without any means for
415108001 3 Air conditioner power 1800 W
Through the above process, the monitoring device obtains the monitoring data of the Y monitoring points required by the first northbound interface protocol from the initial monitoring data according to the plurality of monitoring point attributes of the first device information, and the obtained monitoring data of the first monitored device is shown in table 4,
TABLE 4 Table 4
Monitoring point ID Monitoring point type Monitoring point name Storage time interval Unit (B) Monitoring data
415001001 2 Work abnormality alert 1800 Without any means for 0
415108001 3 Air conditioner power 1800 KWH 2400
S304, reporting the monitoring data of the first monitored equipment to the first monitoring subsystem.
The first monitoring subsystem is one of at least M monitoring subsystems in the monitoring system, and M is an integer greater than or equal to 2. The first monitored device is a monitored device type corresponding to a function of the first monitoring subsystem. For example, the first monitoring subsystem is used for collecting monitoring data of monitored equipment responsible for video service, and the first monitored equipment is a monitoring camera; the first monitoring subsystem is used for collecting monitoring data of monitored equipment of air conditioner operation parameters, and the first monitored equipment is an air conditioner.
According to the equipment monitoring method provided by the embodiment of the application, the monitoring equipment can process and report the monitoring data according to the northbound interface protocol required by each monitoring subsystem, so that one monitoring equipment can be adapted to a plurality of monitoring subsystems of the monitoring system, and each monitoring subsystem is not required to be provided with the monitoring equipment independently, thereby saving the number of the monitoring equipment deployed at the machine room side, simplifying the installation and deployment of the monitoring equipment in the monitoring system, and avoiding the waste of the monitoring equipment.
Taking the example that the monitoring equipment processes and reports the monitoring data according to the northbound interface protocol required by each monitoring subsystem through the initial equipment information, the initial monitoring point parameter information, the equipment information mapping table and the monitoring point attribute template table of the monitored equipment, how the monitoring equipment is provided with the above content to realize the function of matching the monitoring equipment with a plurality of monitoring subsystems is exemplified below:
the monitoring device may perform an initialization operation at initial start-up to configure the following information:
1. binding relationship between collector and monitored equipment
The binding relation between the collectors and the monitored devices is used for representing the monitored devices connected with each collector, or the collectors can collect the monitoring data byte streams of the monitored devices.
Illustratively, the binding relationship may be: the mapping relationship between the identifier of the collector and the identifier of the monitored device, for example, the mapping relationship between the serial number of the collector and the resource number of the monitored device. The serial number of the collector can be assigned to the collector by the monitoring device when the collector is connected with the monitoring device. The resource number of the monitored equipment is used for identifying the monitored equipment, and can be set manually or the hardware number of each monitored equipment and the like.
2. Mapping relation between initial equipment information and initial monitoring point parameter information of each monitored equipment
The mapping relation between the initial equipment information and the initial monitoring point parameter information of each monitored equipment is as follows: the initial monitoring point parameter information of the X monitoring points of the monitored device may be stored in the initial device information of the first monitored device, or may correspond to the initial device information in a pointer, a linked list, or the like, and the embodiment of the present invention is not specifically limited.
By way of example, taking an air conditioner as an example, referring to the initial equipment information table shown in table 5 and the initial monitoring point parameter information table shown in table 6, the plurality of monitoring points in the initial equipment information can obtain the corresponding parameter information by mapping the same item as the monitoring point name of the initial monitoring point parameter information in the monitoring point name of the initial equipment information. Table 6 may be incorporated into table 5, or may correspond to table 5 in the form of a pointer, a linked list, or the like.
TABLE 5
TABLE 6
Monitoring point type Monitoring point name Data location Data length
4 (remote signaling) Work abnormality alert 0 1
3 (remote measuring) Air conditioner power 68 4
2 (remote adjusting) Operating temperature setting 88 4
3. Equipment information mapping table corresponding to each monitoring subsystem
The device information mapping table corresponding to each monitoring subsystem may be a mapping relationship table of a device type in the initial device information and a device type of the device information corresponding to each monitoring subsystem. This is due to the fact that the partitioning of the equipment types in the north interface protocol of the monitoring subsystem is different from the partitioning of the monitoring equipment types at the machine room end. One piece of device information may correspond to one or more pieces of initial device information, as described in step S303. For example, the device information constrained by the first north interface protocol in the first monitoring subsystem is an air conditioner, the plurality of corresponding monitored devices that are air conditioners are respectively an a brand 1 type air conditioner, an a brand 2 type air conditioner, a b brand 1 type air conditioner, and a b brand 2 type air conditioner, and the device information "air conditioner" may correspond to the plurality of corresponding monitored devices that are air conditioners. Therefore, it is necessary to preset the mapping relationship between the device type in the initial device information and the device type of the device information corresponding to each monitoring subsystem. For example, in table 7, the initial equipment information equipment types T00 to T02 are air conditioning equipment of different equipment types, and the monitoring subsystem equipment information equipment type 19 is an air conditioner; the initial device information device type T03 is a notebook computer device, and the monitoring subsystem device information device type 25 is a computer.
TABLE 7
4. Monitoring point attribute template table of each monitoring subsystem
The content of the monitoring point attribute template table of each monitoring subsystem is the monitoring point attribute corresponding to the northbound interface protocol of the monitoring subsystem, and forms a mapping relation with the type of the monitoring subsystem equipment information equipment, and the mapping relation and the mapping mode are similar to those of the initial equipment information and the initial monitoring point parameter information, and are not described in detail herein. The monitoring point attribute of each monitoring subsystem is used for the monitoring subsystem to send a monitoring data acquisition request to the monitoring equipment. The monitoring point attribute template table of each monitoring subsystem is shown in table 8:
TABLE 8
Monitoring point ID Monitoring point type Monitoring point name Storage time interval Unit (B)
signal_id signal_type signal_name storage_interval unit
415001001 2 Work abnormality alert 1800 -
415108001 3 Air conditioner power 1800 W
415301001 5 Operating temperature setting 1800 -
The machine room end monitoring equipment acquires initial equipment information of the monitored equipment through a binding relation between the collector and the monitored equipment, and acquires a mapping relation between the initial equipment information and the initial monitoring point parameter information through an initial equipment information table and an initial monitoring point parameter information table, so that initial monitoring information is acquired; then, the monitoring equipment acquires the mapping relation between the initial equipment information of the monitored equipment at the machine room end and the equipment information of the monitoring subsystem end through the equipment information mapping table; further, a monitoring data acquisition request sent by the monitoring subsystem is acquired through the mapping relation between the equipment information of the monitoring subsystem and the monitoring point attribute template table, so that the mapping relation between the initial monitoring information of the machine room end and the monitoring information of the monitoring subsystem section is completed.
How the initialization is performed is described in detail below.
Fig. 4 is a schematic flow chart of an initialization process of a device monitoring method according to an embodiment of the present application. As shown in fig. 4, the method of the present embodiment includes:
s401, initializing network parameters of the monitoring device to monitor port numbers registered by the collector.
The monitoring device may obtain the port number registered by each collector according to the corresponding relationship between the pre-stored preset identifier of the collector and the network port number of the monitoring device. The pre-stored preset identifier of the collector may be a collector serial number; the corresponding relation between the pre-stored preset identifier of the collector and the network port number of the monitoring device may be stored in a database, a file, a table or the like, and the application is not particularly limited. The monitoring device can monitor the port after starting the network port according to the acquired port number to monitor whether the collector sends a connection request or not or monitor data byte stream of the monitored device.
S402, registering a connection initialization callback function and a data receiving callback function.
The connection initialization callback function can be used for receiving a connection request sent by the collector from a port number registered by the collector;
The data receiving callback function is used for receiving the monitored data byte stream of the monitored equipment collected by the collector from the port number registered by the collector.
S403, constructing a collector handle pool, and updating the collector handle pool according to the connection information of the collector acquired by calling the connection initialization callback function.
The collector handle pool may include a collector handle corresponding to each collector, where the collector handle may be used to store and parse a monitored data byte stream of the monitored device, and the collector handle stores monitoring configuration information of the corresponding collector. The monitoring configuration information may include, for example: attribute information of the collector, binding relation between the collector and the monitored equipment, mapping relation between initial equipment information of the monitored equipment corresponding to the collector and initial monitoring point parameter information, and a cache data list of the collector.
The attribute information of the collector may include an identification of the collector and a status of the collector. The identification of the collector can be used for determining the binding relation between the collector and the monitoring equipment; the collector state may include an offline state, an online state, for determining the operational state of the collector. The on-line state refers to a state that the collector is connected with the monitoring equipment and can work normally. The off-line state refers to that the collector is not connected with the monitoring equipment; or the connection with the monitoring equipment is completed, and normal working state cannot be performed, for example, the collector has a fault, or data acquisition and/or reporting cannot be performed due to power failure and other reasons.
The binding relationship between the collector and the monitored device, the mapping relationship between the initial device information of the monitored device corresponding to the collector and the initial monitoring point parameter information, and the cache data list of the collector can be referred to the description about these concepts in the foregoing embodiments, and will not be repeated here.
For example, the monitoring device may construct a collector handle pool according to the information of the collector stored in the database, the register information configuration table of the monitored device, and the parameter template table of the monitored point of the monitored device; wherein, the initial state of the collector is an off-line state; the register information configuration table is used for indicating the storage space required to be occupied by the monitored equipment. The information of the collector can comprise the content such as a collector identifier, a serial number of the collector, a type of the collector, a name of the collector and the like; the monitored device register information configuration table may include the device type, the number of registers, etc.; the monitoring point parameter template table of the monitored device is as described in the foregoing embodiment, and is not described herein again.
After the collector handle pool is built, the monitoring equipment can update the built collector handle pool according to the connection request of each collector. The update procedure is for example as follows:
The monitoring equipment can call a connection initialization callback function according to the monitored connection request sent by the second collector, and add the connection information of the second collector to the connection queue. The connection information may include an identification of the second collector; the connection queue may include connection information for a plurality of collectors.
When the monitoring device traverses the connection queue to obtain the connection information of the second collector, the following two situations may be included:
case 1: and determining that no collector handle corresponding to the second collector exists in the collector handle pool according to the identification of the second collector. That is, the second collector is the collector newly added after the collector handle pool is built for the monitoring device. In this case, the monitoring device may add a collector handle corresponding to the second collector in the collector handle pool, and modify the state of the second collector to an online state in the collector handle corresponding to the second collector. By the mode, when the collector is newly added in the machine room, the updating and the new addition of the collector and the collector equipment information can be dynamically completed.
Case 2: and determining that the collector handle corresponding to the second collector exists in the collector handle pool according to the identification of the second collector. In this case, the monitoring device may modify the state of the second collector to an online state in the collector handle corresponding to the second collector, so as to implement the device monitoring method provided in fig. 3, and further determine whether the collector is faulty or not, and whether normal operation is possible.
Correspondingly, the monitoring equipment can acquire the information of the monitored equipment bound by the second collector through the active report of the second collector or according to the monitoring data acquisition request of the corresponding monitoring subsystem. The information of the monitored device bound by the second collector may include initial device information of the monitored device. Then, the monitoring device can acquire the initial device information of the monitored device bound by the second collector according to the second collector, and update the mapping relation between the initial device information of the monitored device corresponding to the second collector and the initial monitoring point parameter information in the collector handle corresponding to the second collector.
For example, if the monitoring point and the parameter information of the monitoring point of the newly added monitored device are the same as those of the existing monitored device, the monitoring device may update the information of the existing monitored device of the second collector according to the device resource number in the initial device information of the monitored device bound by the second collector, and the manner of updating the information of the monitored device is similar to that of updating the handle of the collector, which is not described herein again; if the monitoring point and the monitoring point parameter information of the newly added monitored equipment are not identical or completely different from those of the existing monitored equipment, the mapping relation between the initial equipment information and the initial monitoring point parameter information of the monitored equipment is updated, the monitoring system needs to manually update the monitoring point parameter template table, re-reads the updated monitoring point information of the monitored equipment from the updated monitoring point parameter template table, and then stores the updated monitored equipment and the information of the monitoring point thereof into a database. Therefore, the monitoring equipment can conveniently and rapidly acquire the updated or newly-added equipment information and the parameter information of the monitoring points of the plurality of monitored equipment.
S404, starting a thread used for being connected with each monitoring subsystem, and registering data needed by each thread to initialize a callback function.
Each thread is used for being connected with the corresponding monitoring subsystem, and reporting monitoring data to the monitoring subsystem in a mode shown in fig. 3. The data initialization callback function is used for initializing a device information mapping table of the monitoring subsystem corresponding to each thread and a monitoring point attribute template table, so that the thread can adapt to a northbound interface protocol of the corresponding monitoring subsystem to process and report monitoring data. When initializing equipment and monitoring point information, if information of corresponding equipment and monitoring points thereof exists in the database, directly reading the equipment and the monitoring point information thereof in the database; if the information of the corresponding equipment and the monitoring point thereof does not exist in the database, the newly added equipment and the monitoring point information are stored in the database according to the mapping relation between the classification of the monitored equipment at the machine room end and the classification of the monitored equipment at the monitoring subsystem end, which are corresponding to the equipment information mapping table, and the monitoring point attribute information in the monitoring point attribute template table. When the corresponding information of the newly-added equipment and the monitoring point information does not exist in the equipment information mapping table and the monitoring point attribute template table, the corresponding information of the newly-added equipment and the monitoring point information is required to be artificially added into the equipment information mapping table and the monitoring point attribute template table. In this way, the monitoring device can be made to support multiple northbound interfaces.
According to the initialization method provided by the embodiment of the application, the network parameters of the monitoring equipment and the binding relation between the collector and the monitored equipment are initialized, so that the monitoring equipment and the collector are completed, and the collector is connected with the monitored equipment; registering an initialization callback function and a data receiving callback function aiming at the connection of the monitoring equipment and the collectors, constructing a data transmission path between the monitoring equipment and the collectors, constructing handles corresponding to the collectors in the monitoring equipment, and dividing and storing monitoring information of the monitored equipment connected with the collectors, wherein the monitoring information is collected by the collectors; aiming at the connection between the monitoring equipment and the monitoring subsystems, the monitoring equipment is connected with different monitoring subsystems through a plurality of threads, and for each thread, a callback function is initialized through data, and a data transmission path between the monitoring equipment and each monitoring subsystem is established; in addition, the method also provides a solution for updating or adding the collector and the monitored equipment. The embodiment of the application provides an initialization method. The initialization process of the monitoring device for the collector and the monitored device, and the monitoring subsystem is completed, so that the configuration of the configuration information can be completed when the monitoring device is initially started, and the device monitoring method provided in fig. 3 is further implemented.
The foregoing embodiment has exemplified how to implement device monitoring with the monitoring device as a whole as an execution subject. It should be understood that the monitoring device may also implement the device monitoring method described above by means of monitoring software provided thereon. Fig. 5 is a schematic block diagram of a monitoring device. As shown in fig. 5, the monitoring software includes: the system comprises a network interface module, a collector management module and a north interface protocol processing module.
The following describes how the monitoring device obtains and reports the monitoring data through the monitoring software:
the network interface module comprises a plurality of network ports and is used for connecting the monitoring equipment with the plurality of collectors, the monitoring equipment can obtain the registered port number of each collector through the corresponding relation between the preset identification of the prestored collector and the network port number of the monitoring equipment by the network interface module, and monitors the collector corresponding to the port after the corresponding network port is started.
The collector management module comprises a collector handle pool, wherein the collector handle pool can comprise a plurality of collector handles, each collector corresponds to one collector handle, and each collector handle is used for storing and analyzing a monitoring data byte stream of the monitored equipment and monitoring configuration information of the corresponding collector. The monitoring configuration information may include, for example: attribute information of the collector, binding relation of the collector and the monitored equipment, mapping relation of initial equipment information of the monitored equipment corresponding to the collector and initial monitoring point parameter information, and a cache data list of the collector; the attribute information of the collector may include an identification of the collector and a status of the collector.
The north interface protocol processing module may include a plurality of north interface protocol processing units, each running on an independent thread, respectively conforming to the north interface protocol of the corresponding monitoring subsystem. The module is used for connecting the monitoring equipment with a plurality of monitoring subsystems and adapting to a plurality of different north interface protocols so as to transmit corresponding monitoring data to the plurality of monitoring subsystems.
When the monitoring device cooperates with each other through each module provided on the monitoring device, the initialization process of each module is as follows when implementing the initialization process of the device monitoring method provided in fig. 4:
s4011, initializing network parameters of a network interface module in monitoring equipment, and monitoring the corresponding collector by the monitoring equipment through network ports with different port numbers in the network interface module.
S4021, a network interface module in the monitoring equipment registers and connects an initialization callback function and a data receiving callback function, the network interface module receives a connection request sent by a corresponding collector from a network port of a different network port number through the connection initialization callback function, and receives a monitoring data byte stream of the monitored equipment collected by the corresponding collector from the network port of the different network port number through the data receiving callback function.
S4031, the collector management module constructs a collector handle pool according to the collector information, and updates the corresponding collector handle in the collector handle pool according to the connection information of the collector acquired by calling the connection initialization callback function, thereby updating the collector handle pool.
S4041, each north interface protocol processing unit operates as an independent thread without mutual influence. The monitoring device starts the thread of the north interface protocol processing unit connected with each monitoring subsystem, registers the initialization callback function required by each thread, and establishes the device connection path and the data transmission path of the north interface protocol processing unit and the corresponding monitoring subsystem so as to process and report the monitoring data.
The foregoing detailed initialization procedure is explained in detail in the description of the initialization procedure of the device monitoring method shown in fig. 4, and the present application is not repeated here.
When the monitoring device is matched with each other through each module arranged on the monitoring device, and the device monitoring method provided in fig. 3 is implemented, the use flow of each module is as follows:
s3011, the monitoring device acquires a monitoring data byte stream of the first monitored device acquired by the first acquisition device and first initial device information of the first monitored device through the network interface module.
S3021, the monitoring device stores and analyzes the monitoring data byte stream of the first monitored device according to the first initial device information through the collector handle in the collector management module to obtain initial monitoring data of the first monitored device, and stores the initial monitoring data in the corresponding collector handle.
S3031, the initial monitoring data of a plurality of monitoring points of the first monitored equipment are transmitted to the corresponding north interface protocol processing unit for processing, and the monitoring data of the first monitored equipment are obtained.
S3041, the monitoring equipment reports the monitoring data of the first monitored equipment to the first monitoring subsystem through a northbound interface protocol processing unit corresponding to the first monitoring subsystem in the northbound interface module.
The detailed flow of the above device monitoring method is explained in detail in the description of a device monitoring method shown in fig. 3, and the present application is not repeated here.
Fig. 6 is a schematic structural diagram of a device monitoring apparatus according to an embodiment of the present application. The monitoring system comprises monitoring equipment and at least M monitoring subsystems, wherein the north interface protocols adopted by the monitoring subsystems are different, the monitoring equipment is connected with each monitoring subsystem, and a plurality of collectors are used for collecting monitoring data byte streams of a plurality of monitored equipment, and M is an integer greater than or equal to 2; the device is applied to the monitoring equipment.
As shown in fig. 6, the apparatus monitoring device includes: the device comprises an acquisition module, an analysis module, a processing module and a sending module. Optionally, the device monitoring apparatus may comprise, for example, at least one of the following modules: and the receiving module and the initializing module.
An obtaining module 12, configured to obtain a monitoring data byte stream of the first monitored device collected by the first collector, and first initial device information of the first monitored device; the first collector is any one of a plurality of collectors.
The analyzing module 13 is configured to analyze the monitoring data byte stream of the first monitored device according to the first initial device information, so as to obtain initial monitoring data of the first monitored device; the initial monitoring data of the first monitored equipment comprises initial monitoring data of X monitoring points of the first monitored equipment; x is an integer greater than or equal to 1;
the processing module 14 is configured to process the initial monitoring data of the first monitored device, obtain monitoring data of the first monitored device, where the monitoring data of the first monitored device meets a first northbound interface protocol adopted by a first monitoring subsystem corresponding to the first monitored device; the monitoring data comprise monitoring data of Y monitoring points of the first monitored equipment, wherein Y is a positive integer less than or equal to X;
And the sending module 15 is used for reporting the monitoring data of the first monitored equipment to the first monitoring subsystem.
As a possible implementation manner, the parsing module 13 is specifically configured to obtain, according to the obtaining module 12, first initial device information of the first monitored device, and a mapping relationship between the initial device information and the initial monitoring point parameter information, obtain first initial monitoring point parameter information of the first monitored device; and analyzing the monitoring data byte stream of the first monitored equipment according to the first initial monitoring point parameter information to obtain initial monitoring data of the first monitored equipment.
In this implementation, optionally, the processing module 14 is specifically configured to: obtaining first equipment information of the first monitored equipment according to the equipment information mapping table corresponding to the first monitoring subsystem and the initial equipment information of the first monitored equipment; the equipment information mapping table comprises a mapping relation between initial equipment information and equipment information, wherein the equipment information corresponding to the initial equipment information is equipment information constrained by a first north interface protocol; acquiring monitoring data of Y monitoring points from initial monitoring data according to a monitoring point attribute template table of the first monitoring subsystem; the monitoring point attribute template table is used for indicating the type of monitoring data of the monitoring point required by the first monitoring subsystem based on the first northbound interface protocol; and obtaining monitoring data according to the first equipment information and the monitoring data of the Y monitoring points.
Optionally, a receiving module 11 is configured to receive a monitoring data acquisition request from the first monitoring subsystem; the obtaining module 12 is specifically configured to obtain, from a cache data list of the first collector on the monitoring device, a monitoring data byte stream of the first monitored device and first initial device information according to the identifier of the first monitored device.
Optionally, the receiving module 11 is further configured to, before the obtaining module 12 obtains the monitored data byte stream of the first monitored device from the cache data list of the first collector according to the identifier of the first monitored device, receive the monitored data byte stream of the first monitored device reported by the first collector and the first initial device information. The processing module is further configured to add the monitoring data byte stream of the first monitored device and the first initial device information to a cache data list of the first collector.
As a possible implementation manner, the initialization module 21 is configured to perform an initialization operation to configure the following information: the system comprises a binding relation between a collector and monitored equipment, a mapping relation between initial equipment information and initial monitoring point parameter information of each monitored equipment, an equipment information mapping table corresponding to each monitoring subsystem and a monitoring point attribute template table of each monitoring subsystem.
For example, the initialization module 21 is specifically configured to:
initializing network parameters of monitoring equipment to monitor port numbers registered by a collector;
registering a connection initialization callback function and a data receiving callback function; the connection initialization callback function is used for receiving a connection request sent by the collector from the port number registered by the collector, and the data receiving callback function is used for receiving a monitoring data byte stream of the monitored equipment collected by the collector from the port number registered by the collector;
constructing a collector handle pool, and updating the collector handle pool according to the connection information of the collector acquired by calling the connection initialization callback function; the collector handle pool comprises a collector handle corresponding to each collector, the collector handle is used for storing and analyzing the monitoring data byte stream of the monitored equipment, and the collector handle stores the monitoring configuration information of the corresponding collector; the monitoring configuration information comprises: attribute information of the collector, binding relation of the collector and the monitored equipment, mapping relation of initial equipment information of the monitored equipment corresponding to the collector and initial monitoring point parameter information, and a cache data list of the collector;
starting a thread for connecting with each monitoring subsystem, and registering data initialization callback functions required by each thread; the data initialization callback function is used for initializing an equipment information mapping table of the monitoring subsystem corresponding to the thread and a monitoring point attribute template table; the thread is used for processing the initial monitoring data of the first monitored equipment, acquiring the monitoring data of the first monitored equipment and reporting the corresponding monitoring subsystem.
The attribute information of the collector comprises: the identity of the collector, and the status of the collector. Illustratively, the initialization module 21 is specifically configured to:
constructing a collector handle pool according to the information of the collector stored in the database, the register information configuration table of the monitored equipment and the parameter template table of the monitoring point of the monitored equipment; wherein, the initial state of the collector is an off-line state; the register information configuration table is used for indicating the storage space required to be occupied by the monitored equipment;
if the connection request sent by the second collector is monitored, a connection initialization callback function is called, and the connection information of the second collector is added into a connection queue; the connection information comprises the identification of the second collector;
when connection information of the second collector is obtained by traversing the connection queue, if no collector handle corresponding to the second collector is determined in the collector handle pool according to the identification of the second collector, adding the collector handle corresponding to the second collector in the collector handle pool, and modifying the state of the second collector into an on-line state in the collector handle corresponding to the second collector;
or if the collector handle corresponding to the second collector exists in the collector handle pool according to the identification of the second collector, modifying the state of the second collector into an on-line state in the collector handle corresponding to the second collector.
Illustratively, the initialization module 21 is further configured to obtain, from the second collector, information of the monitored device bound by the collector after modifying the state of the second collector to an online state in the collector handle corresponding to the second collector; and according to the initial equipment information of the monitored equipment bound by the second collector, updating the mapping relation between the initial equipment information of the monitored equipment corresponding to the second collector and the initial monitoring point parameter information in the collector handle corresponding to the second collector.
The device monitoring apparatus provided by the embodiment of the present application may execute the device monitoring method and the initializing method shown in fig. 3 to 4 in the above method embodiments, and its implementation principle and technical effects are similar, and are not described herein again. The device monitoring means may be, for example, the monitoring device described above, or may be a chip of the monitoring device, for example, a processor or the like.
Fig. 7 is a schematic structural diagram of a monitoring device according to the present application. The monitoring device may be, for example, a monitoring device in the aforementioned monitoring system. As shown in fig. 7, the monitoring device 700 may include: at least one processor 701, memory 702, and a communication interface 703.
A memory 702 for storing programs. In particular, the program may include program code including computer-operating instructions.
The memory 702 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 701 is configured to execute computer-executable instructions stored in the memory 702 to implement the device monitoring method described in the foregoing method embodiment. The processor 701 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
The processor 701 may perform communication interaction with an external device through the communication interface 703, where the external device may be, for example, a collector or a server deployed with a monitoring subsystem, and in a specific implementation, if the communication interface 703, the memory 702 and the processor 701 are implemented independently, the communication interface 703, the memory 702 and the processor 701 may be connected to each other through a bus and complete communication therebetween. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface 703, the memory 702, and the processor 701 are implemented on a single chip, the communication interface 703, the memory 702, and the processor 701 may complete communication through internal interfaces.
The present application also provides a computer-readable storage medium, which may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc., in which program codes may be stored, and in particular, the computer-readable storage medium stores program instructions for the methods in the above embodiments.
The present application also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the electronic device may read the execution instructions from the readable storage medium, and execution of the execution instructions by the at least one processor causes the electronic device to implement the device monitoring methods provided by the various embodiments described above.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (11)

1. The equipment monitoring method is characterized in that a monitoring system comprises monitoring equipment and at least M monitoring subsystems, wherein the north interface protocols adopted by the monitoring subsystems are different, the monitoring equipment is connected with each monitoring subsystem, and a plurality of collectors are connected for collecting monitoring data byte streams of a plurality of monitored equipment, and M is an integer greater than or equal to 2; the method is applied to the monitoring device, and comprises the following steps:
acquiring a monitoring data byte stream of first monitored equipment acquired by a first acquisition unit, and first initial equipment information of the first monitored equipment; the first collector is any one of the plurality of collectors;
analyzing the monitoring data byte stream of the first monitored equipment according to the first initial equipment information to obtain initial monitoring data of the first monitored equipment; the initial monitoring data of the first monitored equipment comprises initial monitoring data of X monitoring points of the first monitored equipment; x is an integer greater than or equal to 1;
processing initial monitoring data of the first monitored equipment to obtain monitoring data of the first monitored equipment, wherein the monitoring data of the first monitored equipment meets a first north interface protocol adopted by a first monitoring subsystem corresponding to the first monitored equipment; the monitoring data comprise monitoring data of Y monitoring points of the first monitored equipment, wherein Y is a positive integer less than or equal to X;
Reporting the monitoring data of the first monitored equipment to the first monitoring subsystem;
the processing the initial monitoring data of the first monitored equipment to obtain the monitoring data of the first monitored equipment includes:
obtaining first equipment information of the first monitored equipment according to the equipment information mapping table corresponding to the first monitoring subsystem and the initial equipment information of the first monitored equipment; the equipment information mapping table comprises a mapping relation between initial equipment information and equipment information, wherein the equipment information corresponding to the initial equipment information is equipment information constrained by the first northbound interface protocol;
acquiring monitoring data of the Y monitoring points from the initial monitoring data according to a monitoring point attribute template table of the first monitoring subsystem; the monitoring point attribute template table is used for indicating the type of monitoring data of the monitoring point required by the first monitoring subsystem based on the first northbound interface protocol;
and obtaining the monitoring data according to the first equipment information and the monitoring data of the Y monitoring points.
2. The method according to claim 1, wherein the parsing the monitoring data byte stream of the first monitored device according to the first initial device information to obtain initial monitoring data of the first monitored device includes:
Acquiring first initial monitoring point parameter information of the first monitored equipment according to the first initial equipment information of the first monitored equipment and the mapping relation between the initial equipment information and the initial monitoring point parameter information;
and analyzing the monitoring data byte stream of the first monitored equipment according to the first initial monitoring point parameter information to obtain initial monitoring data of the first monitored equipment.
3. The method of claim 1, wherein the obtaining the stream of monitoring data bytes for the first monitored device collected by the first collector, and the first initial device information for the first monitored device, comprises:
receiving a monitoring data acquisition request from the first monitoring subsystem;
and acquiring a monitoring data byte stream of the first monitored equipment and the first initial equipment information from a cache data list of the first collector on the monitoring equipment according to the identification of the first monitored equipment.
4. The method of claim 3, wherein the obtaining the monitored data byte stream of the first monitored device from the cached data list of the first collector according to the identification of the first monitored device, and the first initial device information further comprises, before:
Receiving a monitoring data byte stream of the first monitored equipment reported by the first collector and the first initial equipment information;
and adding the monitoring data byte stream of the first monitored equipment and the first initial equipment information into a cache data list of the first collector.
5. The method according to claim 4, wherein the method further comprises:
an initialization operation is performed to configure the following information:
the system comprises a binding relation between a collector and monitored equipment, a mapping relation between initial equipment information and initial monitoring point parameter information of each monitored equipment, an equipment information mapping table corresponding to each monitoring subsystem and a monitoring point attribute template table of each monitoring subsystem.
6. The method of claim 5, wherein the performing an initialization operation comprises:
initializing network parameters of the monitoring equipment to monitor port numbers registered by the collector;
registering a connection initialization callback function and a data receiving callback function; the connection initialization callback function is used for receiving a connection request sent by the collector from the port number registered by the collector, and the data receiving callback function is used for receiving a monitoring data byte stream of the monitored equipment collected by the collector from the port number registered by the collector;
Constructing a collector handle pool, and updating the collector handle pool according to the connection information of the collector acquired by calling a connection initialization callback function; the collector handle pool comprises a collector handle corresponding to each collector, the collector handle is used for storing and analyzing the monitoring data byte stream of the monitored equipment, and the collector handle stores the monitoring configuration information of the corresponding collector; the monitoring configuration information comprises: attribute information of the collector, binding relation of the collector and the monitored equipment, mapping relation of initial equipment information of the monitored equipment corresponding to the collector and initial monitoring point parameter information, and a cache data list of the collector;
starting a thread for connecting with each monitoring subsystem, and registering data initialization callback functions required by each thread; the data initialization callback function is used for initializing an equipment information mapping table of the monitoring subsystem corresponding to the thread and a monitoring point attribute template table; the thread is used for processing the initial monitoring data of the first monitored equipment, acquiring the monitoring data of the first monitored equipment and reporting the corresponding monitoring subsystem.
7. The method of claim 6, wherein the attribute information of the collector comprises: the identification of the collector and the state of the collector;
the construction of the collector handle pool, and updating the collector handle pool according to the connection information of the collector acquired by calling the connection initialization callback function, comprises the following steps:
constructing a collector handle pool according to the information of the collector stored in the database, the register information configuration table of the monitored equipment and the parameter template table of the monitoring point of the monitored equipment; wherein, the initial state of the collector is an off-line state; the register information configuration table is used for indicating the storage space required to be occupied by the monitored equipment;
if the connection request sent by the second collector is monitored, the connection initialization callback function is called, and the connection information of the second collector is added into a connection queue; the connection information comprises an identifier of the second collector;
when the connection queue is traversed to acquire the connection information of the second collector, if no collector handle corresponding to the second collector is determined in the collector handle pool according to the identification of the second collector, adding the collector handle corresponding to the second collector in the collector handle pool, and modifying the state of the second collector into an online state in the collector handle corresponding to the second collector;
Or if the collector handle corresponding to the second collector exists in the collector handle pool according to the identification of the second collector, modifying the state of the second collector into an on-line state in the collector handle corresponding to the second collector.
8. The method of claim 7, wherein after modifying the state of the second collector to the online state in the collector handle corresponding to the second collector, further comprising:
acquiring information of the monitored equipment bound by the collector from the second collector;
and according to the initial equipment information of the monitored equipment bound by the second collector, updating the mapping relation between the initial equipment information of the monitored equipment corresponding to the second collector and the initial monitoring point parameter information in the collector handle corresponding to the second collector.
9. The equipment monitoring device is characterized in that a monitoring system comprises monitoring equipment and at least M monitoring subsystems, wherein the north interface protocols adopted by the monitoring subsystems are different, the monitoring equipment is connected with each monitoring subsystem, and a plurality of collectors are used for collecting monitoring data byte streams of a plurality of monitored equipment, and M is an integer greater than or equal to 2; the apparatus is applied to the monitoring device, and the apparatus includes:
The acquisition module is used for acquiring a monitoring data byte stream of the first monitored equipment acquired by the first acquisition unit and first initial equipment information of the first monitored equipment; the first collector is any one of the plurality of collectors;
the analysis module is used for analyzing the monitoring data byte stream of the first monitored equipment according to the first initial equipment information to obtain initial monitoring data of the first monitored equipment; the initial monitoring data of the first monitored equipment comprises initial monitoring data of X monitoring points of the first monitored equipment; x is an integer greater than or equal to 1;
the processing module is used for processing the initial monitoring data of the first monitored equipment to obtain the monitoring data of the first monitored equipment, and the monitoring data of the first monitored equipment meets a first north interface protocol adopted by a first monitoring subsystem corresponding to the first monitored equipment; the monitoring data comprise monitoring data of Y monitoring points of the first monitored equipment, wherein Y is a positive integer less than or equal to X;
the sending module is used for reporting the monitoring data of the first monitored equipment to the first monitoring subsystem;
The processing module is specifically configured to obtain first device information of the first monitored device according to the device information mapping table corresponding to the first monitoring subsystem and initial device information of the first monitored device; the equipment information mapping table comprises a mapping relation between initial equipment information and equipment information, wherein the equipment information corresponding to the initial equipment information is equipment information constrained by the first northbound interface protocol;
acquiring monitoring data of the Y monitoring points from the initial monitoring data according to a monitoring point attribute template table of the first monitoring subsystem; the monitoring point attribute template table is used for indicating the type of monitoring data of the monitoring point required by the first monitoring subsystem based on the first northbound interface protocol;
and obtaining the monitoring data according to the first equipment information and the monitoring data of the Y monitoring points.
10. A monitoring device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing the device monitoring method of any of claims 1 to 8.
CN202210120683.9A 2022-02-09 2022-02-09 Device monitoring method, device, storage medium and program product Active CN114500305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210120683.9A CN114500305B (en) 2022-02-09 2022-02-09 Device monitoring method, device, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210120683.9A CN114500305B (en) 2022-02-09 2022-02-09 Device monitoring method, device, storage medium and program product

Publications (2)

Publication Number Publication Date
CN114500305A CN114500305A (en) 2022-05-13
CN114500305B true CN114500305B (en) 2023-08-15

Family

ID=81477655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210120683.9A Active CN114500305B (en) 2022-02-09 2022-02-09 Device monitoring method, device, storage medium and program product

Country Status (1)

Country Link
CN (1) CN114500305B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981962B (en) * 2022-12-30 2024-03-12 北京基调网络股份有限公司 Thread pool monitoring method and device, electronic equipment and storage medium
CN116527982B (en) * 2023-06-01 2023-09-15 杭州威灿科技有限公司 Method and system for recording question synchronous audio and video

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015081743A1 (en) * 2013-12-06 2015-06-11 珠海格力电器股份有限公司 Monitoring system for air conditioning systems based on distributed power generation and air conditioning system using same
CN107104975A (en) * 2017-05-22 2017-08-29 郑州云海信息技术有限公司 Data poolization layer, system and its implementation of a kind of support isomery based on MDC
CN109194617A (en) * 2018-08-01 2019-01-11 杭州电子科技大学 The automatically parsing of XML message, packaging method and device
CN111447109A (en) * 2020-03-23 2020-07-24 京东方科技集团股份有限公司 Monitoring management apparatus and method, computer readable storage medium
CN111949484A (en) * 2020-08-13 2020-11-17 中国工商银行股份有限公司 Information processing method, information processing apparatus, electronic device, and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015081743A1 (en) * 2013-12-06 2015-06-11 珠海格力电器股份有限公司 Monitoring system for air conditioning systems based on distributed power generation and air conditioning system using same
CN107104975A (en) * 2017-05-22 2017-08-29 郑州云海信息技术有限公司 Data poolization layer, system and its implementation of a kind of support isomery based on MDC
CN109194617A (en) * 2018-08-01 2019-01-11 杭州电子科技大学 The automatically parsing of XML message, packaging method and device
CN111447109A (en) * 2020-03-23 2020-07-24 京东方科技集团股份有限公司 Monitoring management apparatus and method, computer readable storage medium
CN111949484A (en) * 2020-08-13 2020-11-17 中国工商银行股份有限公司 Information processing method, information processing apparatus, electronic device, and medium

Also Published As

Publication number Publication date
CN114500305A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN109361562B (en) Automatic testing method based on associated network equipment access
CN109194617B (en) Method and device for automatic parsing and encapsulation of XML messages
CN114500305B (en) Device monitoring method, device, storage medium and program product
CN103297517B (en) Distributed data transmission method of condition monitoring system
CN107357571B (en) Maintenance method and system for equipment component program
CN111181800B (en) Test data processing method and device, electronic equipment and storage medium
CN114844927B (en) Distributed photovoltaic station data acquisition system, electronic equipment and storage medium
CN112134748A (en) Equipment state monitoring method, device, system and computer readable medium
CN113010122B (en) Image forming device monitoring device, method, system and storage medium
US20200203026A1 (en) System of industrial internet of things and information processing device thereof
CN111629205B (en) System and method applied to industrial camera simulation test
CN112235195A (en) Reported data processing method and related equipment
CN115103007A (en) Distributed cloud-based service discovery method, device and readable storage medium
CN111092952B (en) Data interaction method and related product
CN114116544A (en) Method, device and equipment for acquiring slot information and storage medium
CN114006942B (en) Data processing method, system, electronic equipment and storage medium
CN111737084A (en) Information monitoring method and device, intelligent equipment, computer equipment and medium
CN117909143A (en) Method and device for processing project data, storage medium and electronic equipment
CN111200546A (en) CANopen-based equipment parameter information diagnosis system and method
CN112436974B (en) CDN data resource consistency detection method and device and computer equipment
CN116980286A (en) Device configuration method, device control method, storage medium, and terminal
CN114115753A (en) Storage device, request processing method and device based on storage device
CN114500688A (en) Method, device, terminal and storage medium for identifying device protocol
WO2021056435A1 (en) Method and apparatus for abnormality detection
CN107147694B (en) Information processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant