Inspection system and inspection method for Internet of Things equipment
By formulating inspection plans through the operation and maintenance platform and managing collectors through the collector management module, non-intrusive inspection of IoT devices is achieved, solving the safety hazards and resource waste problems in existing technologies and improving the stability and efficiency of the system.
Patent Information
- Application Number
- CN202211559663.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-12-06
AI Technical Summary
The existing monitoring methods of IoT devices rely on host resources, leading to security risks and resource waste. At the same time, it is difficult to effectively integrate the inspection of multi-state equipment, affecting the stability and efficiency of the operation and maintenance system.
The operation and maintenance platform is used to formulate inspection plans. The collector and IoT devices establish communication connections based on the access protocol to obtain and report indicator information without being deployed on the host. The collector management module is used to manage the collector's life cycle and resources to achieve non-intrusive inspection.
It improves the security of IoT device inspection, reduces resource waste, enhances system stability and flexibility, and supports unified management and inspection of multi-state devices.
Smart Images

Figure CN115941739B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things device monitoring, and in particular to an inspection system and an inspection method for Internet of Things devices. Background Art
[0002] With the rapid development of multi-dimensional sensing technologies in the Internet of Things (IoT), and the deployment of massive numbers of connected sensing devices, the importance of effectively ensuring the availability and effectiveness of these devices through operations and maintenance, and preventing damage or losses caused by equipment downtime, has become paramount. Consequently, the development of intelligent operations and maintenance technologies for multi-dimensional sensing devices has entered a period of rapid growth. However, the key challenge in the development of operations and maintenance platforms is how to effectively and timely perceive the operating status of IoT devices.
[0003] The current method for collecting operational metrics from IoT devices involves deploying a collection script on the device's host. The device then runs the script and reports its metrics to the operation and maintenance platform. This intrusive monitoring method places high demands on the device's host resources, consuming them and posing security risks and wasting resources. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide an inspection system and inspection method for IoT devices, so as to implement IoT device inspections that do not rely on IoT device host resources, improve security, and reduce resource waste. The specific technical solutions are as follows:
[0005] In a first aspect, an embodiment of the present invention provides an inspection system for IoT devices, the system including a collection and operation and maintenance platform, wherein:
[0006] The operation and maintenance platform is used to formulate an inspection plan for the IoT devices to be collected based on the resource type of the IoT devices to be collected, the access protocol of the IoT devices to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected, and issue the inspection plan;
[0007] The collector is configured to receive a corresponding inspection plan; wherein the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource types of the IoT devices that the collector can collect, the access protocols of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect;
[0008] The collector is also used to obtain indicator information corresponding to the indicators to be collected of the IoT devices to be collected in accordance with the received inspection plan and based on the communication connection with the IoT devices to be collected, and report the indicator information to the operation and maintenance platform, wherein the communication connection is established based on the access protocol of the IoT devices to be collected.
[0009] Optionally, the system further includes a collector management module;
[0010] The operation and maintenance platform is configured to send resource information and inspection plan information of the IoT devices to be collected, connected to the operation and maintenance platform, to the collector management module; wherein the resource information of the IoT devices to be collected includes the resource type of the IoT devices to be collected, the access protocol for the IoT devices to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected;
[0011] The collector management module is used to obtain the resource information of the IoT devices to be collected and the inspection plan information, determine the collector corresponding to the inspection plan according to the correspondence between the resource information of the IoT devices to be collected and the inspection plan, generate the inspection task corresponding to the collector, and send the inspection task and the resource information of the IoT devices to be collected to the collector;
[0012] The collector is specifically configured to obtain resource information of the IoT device to be collected and the inspection task, and based on a communication connection with the IoT device to be collected, obtain indicator information corresponding to the indicator to be collected indicated by the inspection task of the IoT device to be collected, and report the indicator information to the collector management module;
[0013] The collector management module is further used to report the indicator information to the operation and maintenance platform.
[0014] Optionally, the collector management module includes a collector management service and a collector access service; the collector access service is connected to a collector;
[0015] The collector management service is used to obtain the resource information of the IoT device to be collected and the inspection plan information, and send the resource information of the IoT device and the inspection plan information to the corresponding collector access service according to the corresponding relationship between the resource information and the collector;
[0016] The collector access service is used to determine the collector corresponding to the inspection plan according to the correspondence between the resource information and the inspection plan, generate the inspection task corresponding to the collector, and send the inspection task and the resource information to the collector;
[0017] The collector access service is further used to obtain indicator information corresponding to the to-be-collected indicator indicated by the inspection task collected by the collector, and report the indicator information to the operation and maintenance platform.
[0018] Optionally, the collector access service is further used to obtain the execution status information of the inspection task by the collector, and send the execution status information of the inspection task to the collector management service;
[0019] The collector management service is further configured to obtain execution status information of the inspection task, and dispatch the inspection task to other collectors when the execution status information indicates that an abnormality has occurred in the collector.
[0020] Optionally, the collector may be constructed by:
[0021] Obtain the resource type of the newly added IoT device to be collected, the access protocol to the operation and maintenance platform, and the indicators to be collected;
[0022] Determine whether the access protocol for the newly added IoT device to be collected to access the operation and maintenance platform is a new protocol;
[0023] If it is not a new protocol, determine whether an existing collector with the same access protocol as the access protocol of the newly added IoT device to be collected can collect the indicators to be collected corresponding to the resource type;
[0024] If the indicators to be collected corresponding to the resource type can be collected, a corresponding relationship between the existing collector and the newly added IoT device to be collected is established;
[0025] If the corresponding indicators to be collected for the resource type cannot be collected, or,
[0026] If it is a new protocol, a new collector is constructed based on a preset collector model, and a corresponding relationship between the new collector and the newly added IoT devices to be collected is established, wherein the preset collector model includes the access protocol, resource type and indicators to be collected of the newly added IoT devices to be collected.
[0027] In a second aspect, an embodiment of the present invention provides a method for inspecting an IoT device. The method is applied to a collector in an inspection system for the IoT device. The method includes:
[0028] Receive a corresponding inspection plan, wherein the inspection plan is an inspection plan for the IoT device to be collected, formulated and issued by the operation and maintenance platform based on the resource type of the IoT device to be collected, the access protocol for the IoT device to be collected to access the operation and maintenance platform, and the indicators to be collected of the IoT device to be collected, and the inspection plan corresponds to the collection capability of the collector, which is determined based on the resource type of the IoT device that the collector can collect, the access protocol for the IoT device that the collector can collect to access the operation and maintenance platform, and the indicators to be collected of the IoT device that the collector can collect;
[0029] According to the received inspection plan, based on a communication connection with the IoT device to be collected, obtaining indicator information corresponding to the indicator to be collected of the IoT device to be collected, wherein the communication connection is established based on an access protocol of the IoT device to be collected;
[0030] Report the indicator information to the operation and maintenance platform.
[0031] Optionally, the system further includes a collector management module;
[0032] The step of acquiring the indicator information corresponding to the indicator to be collected of the IoT device to be collected according to the received inspection plan and based on the communication connection with the IoT device to be collected includes:
[0033] Obtain resource information and inspection tasks of the IoT devices to be collected sent by the collector management module, wherein the resource information is resource information of the IoT devices to be collected connected to the operation and maintenance platform obtained by the collector management module from the operation and maintenance platform, and the resource information includes resource types of the IoT devices to be collected, access protocols for the IoT devices to be collected to access the operation and maintenance platform, and indicators to be collected of the IoT devices to be collected; the inspection tasks are inspection tasks corresponding to the collectors determined by the collector management module according to the correspondence between the resource information of the IoT devices to be collected and the inspection plan;
[0034] Based on the communication connection with the IoT device to be collected, obtain the indicator information corresponding to the indicator to be collected indicated by the inspection task;
[0035] The step of reporting the indicator information to the operation and maintenance platform includes:
[0036] Report the indicator information to the collector management module, so that the collector management module reports the indicator information to the operation and maintenance platform.
[0037] Optionally, the collector management module includes a collector management service and a collector access service; the collector access service is connected to the collector;
[0038] The step of obtaining the resource information and inspection tasks of the IoT devices to be collected sent by the collector management module includes:
[0039] Obtain the resource information and inspection task of the IoT device to be collected sent by the collector access service, wherein the inspection task is the inspection task corresponding to the collector determined by the collector access service according to the correspondence between the resource information of the IoT device to be collected and the inspection plan, and the resource information and inspection task of the IoT device to be collected are sent to the corresponding collector access service by the collector management service according to the correspondence between the resource information and the collector;
[0040] The step of reporting the indicator information to the collector management module includes:
[0041] Report the indicator information to the collector access service, so that the collector access service reports the indicator information to the operation and maintenance platform.
[0042] Optionally, the method further includes:
[0043] Report the execution status information of the inspection task to the collector access service, so that the collector access service sends the execution status information of the inspection task to the collector management service, so that the collector management service dispatches the inspection task to other collectors when the execution status information indicates that an abnormality has occurred in the collector.
[0044] Optionally, the collector may be constructed by:
[0045] Obtain the resource type of the newly added IoT device to be collected, the access protocol to the operation and maintenance platform, and the indicators to be collected;
[0046] Determine whether the access protocol for the newly added IoT device to be collected to access the operation and maintenance platform is a new protocol;
[0047] If it is not a new protocol, determine whether an existing collector with the same access protocol as the access protocol of the newly added IoT device to be collected can collect the indicators to be collected corresponding to the resource type;
[0048] If the indicators to be collected corresponding to the resource type can be collected, a corresponding relationship between the existing collector and the newly added IoT device to be collected is established;
[0049] If the corresponding indicators to be collected for the resource type cannot be collected, or,
[0050] If it is a new protocol, a new collector is constructed based on a preset collector model, and a corresponding relationship between the new collector and the newly added IoT devices to be collected is established, wherein the preset collector model includes the access protocol, resource type and indicators to be collected of the newly added IoT devices to be collected.
[0051] Beneficial effects of the embodiments of the present invention:
[0052] In the solution provided by the embodiment of the present invention, the inspection system of the Internet of Things devices includes a collector and an operation and maintenance platform, wherein: the operation and maintenance platform is used to formulate an inspection plan for the Internet of Things devices to be collected based on the resource type of the Internet of Things devices to be collected, the access protocol of the Internet of Things devices to be collected to the operation and maintenance platform, and the indicators to be collected of the Internet of Things devices to be collected, and issue the inspection plan. The collector is used to receive the corresponding inspection plan, wherein the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource type of the Internet of Things devices that the collector can collect, the access protocol of the Internet of Things devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the Internet of Things devices that the collector can collect. The collector can also be used to obtain indicator information corresponding to the indicators to be collected of the Internet of Things devices to be collected based on the communication connection with the Internet of Things devices to be collected in accordance with the received inspection plan, and report the indicator information to the operation and maintenance platform, wherein the communication connection is established based on the access protocol of the Internet of Things devices to be collected. Since the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource types of the IoT devices that the collector can collect, the access protocols of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect, the collector can obtain the indicator information corresponding to the indicators to be collected of the IoT devices to be collected according to the inspection plan and the communication connection established based on the access protocols of the IoT devices to be collected, without having to be deployed on the host of the IoT devices, and without having to occupy the host resources of the IoT devices, thereby not relying on the host resources of the IoT devices to conduct IoT device inspections, thereby improving security and reducing resource waste. Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0054] Figure 1A schematic structural diagram of an inspection system for Internet of Things devices provided by an embodiment of the present invention;
[0055] Figure 2 A schematic structural diagram of another inspection system for Internet of Things devices provided by an embodiment of the present invention;
[0056] Figure 3 Based on Figure 1 A schematic diagram of an interface interaction between a collector management module and an external application according to the embodiment shown;
[0057] Figure 4 Based on Figure 2 A schematic diagram of a process flow of a collector management module performing installation and management of a collector according to the illustrated embodiment;
[0058] Figure 5 Based on Figure 2 A schematic diagram of a process of disabling management of a collector by a collector management module according to the embodiment shown;
[0059] Figure 6 Based on Figure 2 A schematic diagram of a process flow of a collector management module performing uninstall management on a collector according to the embodiment shown;
[0060] Figure 7 Based on Figure 2 A schematic diagram of a process flow of a collector management module performing upgrade management on a collector according to the illustrated embodiment;
[0061] Figure 8 Based on Figure 2 A schematic diagram of a process of a collector management module performing heartbeat management on a collector according to the illustrated embodiment;
[0062] Figure 9 Based on Figure 2 A schematic diagram of a flow chart of a collector management module controlling a collector to perform service addressing according to the embodiment shown;
[0063] Figure 10 Based on Figure 2 A schematic diagram of a process of a collector management module controlling a collector to obtain inspection tasks according to the embodiment shown;
[0064] Figure 11 Based on Figure 2 A schematic diagram of a process of controlling a collector to change resources by a collector management module according to the embodiment shown;
[0065] Figure 12 Based on Figure 2 A schematic diagram of a process of controlling a collector to report inspection results by a collector management module according to the embodiment shown;
[0066] Figure 13 Based on Figure 2 A schematic diagram of a connection method for various services in a collector management module according to the illustrated embodiment;
[0067] Figure 14 Based on Figure 13 A schematic diagram of service deployment of a collector management module according to the embodiment shown;
[0068] Figure 15 Based on Figure 13 A structural block diagram of a collector management service according to the embodiment shown;
[0069] Figure 16 Based on Figure 13 A schematic diagram of the architecture of a collector access service according to the illustrated embodiment;
[0070] Figure 17 Based on Figure 16 A schematic diagram of a collector scanning process according to the illustrated embodiment;
[0071] Figure 18 Based on Figure 16 A schematic diagram of a collector startup process according to the illustrated embodiment;
[0072] Figure 19 Based on Figure 16 A schematic diagram of a collector heartbeat keep-alive process according to the illustrated embodiment;
[0073] Figure 20 Based on Figure 16 A schematic diagram of a process flow of a collector accessing service data monitoring according to the illustrated embodiment;
[0074] Figure 21 Based on Figure 16 A schematic diagram of a process of generating an inspection task by a collector access service according to the embodiment shown;
[0075] Figure 22 Based on Figure 16 A schematic diagram of a process of managing resources by a collector access service according to the embodiment shown;
[0076] Figure 23 Based on Figure 16 A schematic diagram of a process of managing inspection tasks by a collector access service according to the embodiment shown;
[0077] Figure 24 Based on Figure 16 A schematic diagram of a process for a collector to access a service and report inspection results according to the embodiment shown;
[0078] Figure 25 Based on Figure 13A flowchart of establishing a long connection between a collector and a collector access service according to the illustrated embodiment;
[0079] Figure 26 Based on Figure 13 A schematic diagram of a block diagram of a collector according to the illustrated embodiment;
[0080] Figure 27 Based on Figure 26 A schematic diagram of a directory structure of a collector according to the illustrated embodiment;
[0081] Figure 28 Based on Figure 13 A schematic diagram of a process for configuring parameters of a collector according to the embodiment shown;
[0082] Figure 29 Based on Figure 13 A schematic diagram of a process for configuring the operation of a collector according to the embodiment shown;
[0083] Figure 30 Based on Figure 13 A schematic diagram of a process of calling an installation script to install a collector according to the embodiment shown;
[0084] Figure 31 Based on Figure 13 A schematic diagram of a process of starting and stopping a collector based on a script file in the illustrated embodiment;
[0085] Figure 32 Based on Figure 3 A schematic diagram of a process for developing a collector based on the basic principles of collector development in the embodiment shown;
[0086] Figure 33 Based on Figure 3 A schematic diagram of a process for an IoT device to proactively report indicator information according to the embodiment shown;
[0087] Figure 34 Based on Figure 3 A schematic diagram of a process for another IoT device to proactively report indicator information according to the embodiment shown;
[0088] Figure 35 A schematic diagram of a flow chart of an inspection method for an Internet of Things device provided by an embodiment of the present invention;
[0089] Figure 36 A schematic structural diagram of an inspection device for Internet of Things devices provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0090] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on the present invention are within the scope of protection of the present invention.
[0091] In order to achieve IoT device inspection without relying on IoT device host resources, improve security, and reduce resource waste, an embodiment of the present invention provides an IoT device inspection system, inspection method, device, computer-readable storage medium, and computer program product. The following first introduces an IoT device inspection system provided by an embodiment of the present invention.
[0092] like Figure 1 As shown, an inspection system for IoT devices includes a collector 110 and an operation and maintenance platform 120, wherein:
[0093] The operation and maintenance platform 120 is configured to formulate an inspection plan for the IoT device to be collected based on the resource type of the IoT device to be collected, the access protocol of the IoT device to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT device to be collected, and issue the inspection plan;
[0094] The collector 110 is used to receive the corresponding inspection plan;
[0095] Among them, the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource type of the IoT devices that the collector can collect, the access protocol of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect.
[0096] The collector 110 is further configured to obtain, in accordance with the inspection plan and based on the communication connection with the IoT device to be collected, indicator information corresponding to the indicator to be collected of the IoT device to be collected, and report the indicator information to the operation and maintenance platform 120;
[0097] The communication connection is established based on the access protocol of the IoT device to be collected.
[0098] It can be seen that the inspection system for IoT devices provided by the embodiment of the present invention includes a collector and an operation and maintenance platform, wherein: the operation and maintenance platform is used to formulate an inspection plan for the IoT devices to be collected based on the resource type of the IoT devices to be collected, the access protocol for the IoT devices to be collected to access the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected, and issue the inspection plan. The collector is used to receive the corresponding inspection plan, wherein the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource type of the IoT devices that the collector can collect, the access protocol for the IoT devices that the collector can collect to access the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect. The collector can also be used to obtain indicator information corresponding to the indicators to be collected of the IoT devices to be collected based on the received inspection plan and the communication connection with the IoT devices to be collected, and report the indicator information to the operation and maintenance platform, wherein the communication connection is established based on the access protocol of the IoT devices to be collected. Since the inspection plan corresponds to the collection capability of the collector, the collection capability of the collector is determined based on the resource type of the IoT devices that the collector can collect, the access protocol of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect. Therefore, the collector can obtain the indicator information corresponding to the indicators to be collected of the IoT devices to be collected according to the inspection plan and the communication connection established based on the access protocol of the IoT devices to be collected, without being deployed on the host of the IoT devices, and without having to occupy the host resources of the IoT devices. Therefore, the IoT devices can be inspected without relying on the host resources of the IoT devices, thereby improving security and reducing resource waste.
[0099] In current IoT systems, IoT devices can possess multiple sensing capabilities. Multiple IoT devices at the edge can complement and collaborate with each other, or the multiple sensing capabilities within the IoT system can be integrated. Such IoT devices possess multidimensional sensing capabilities. For example, radar vision devices possess both radar detection and video image perception capabilities. Multidimensional states refer to interrelated states of material and technical properties. They can be used to describe the capabilities and clustering of indicators of multidimensional sensing devices. For example, a thermal imaging dual-spectrum dome camera possesses basic status, basic information, and thermal imaging detection capabilities. Basic status can be categorized into indicators such as online status and operating status; basic information can be categorized into indicators such as the device's network address, network port, serial number, and firmware version; and thermal imaging detection capabilities can include temperature measurement, temperature difference, and RGB (Red, Green, and Blue) attributes of the thermal imaging frame.
[0100] The number of IoT devices in an IoT system can be enormous. The systematic construction, management, and use of ultra-large-scale, multi-dimensional sensing networks presents challenges in multi-dimensional quality inspection. For example, multi-dimensional sensing devices vary from vendor to vendor, using different access protocols, device types, and integration methods, leading to difficulty in standardizing standards and complex expansion of capabilities and metrics. Consequently, the operations and maintenance platform must integrate numerous vendor protocols to implement various interconnection methods. Deploying collection scripts on the host being collected, an intrusive monitoring method, requires certain host resource requirements and usage, posing security risks and resulting in costly waste. Adding new multi-dimensional sensing devices or multiple collection metrics requires modifying existing collection code, potentially impacting its robustness. The perception and collection modules for IoT devices from multiple vendors and protocols run within the same component service process. Due to the instability of many vendors' protocol SDKs or device code streams, these modules often cause serious issues such as crashes and freezes. A single module failure inevitably impacts the normal operation of all collectors, thus affecting the entire operations and maintenance system's perception of all IoT devices.
[0101] During the operation of the O&M system, adding a new collector requires interrupting all component services. During this interruption, the system cannot detect device status changes in a timely manner. Without a unified integrated management standard for IoT device data perception, different developers arbitrarily develop or modify code when adding new collectors. This intrusive development process affects the stability of the original code structure, making the entire O&M system gradually unstable and affecting the perception quality of IoT devices.
[0102] In order to solve the above problems, an embodiment of the present invention provides an inspection system for Internet of Things devices. In the inspection system for Internet of Things devices provided by the embodiment of the present invention, the operation and maintenance platform can be used to formulate an inspection plan for the Internet of Things devices to be collected based on the resource type of the Internet of Things devices to be collected, the access protocol of the Internet of Things devices to be collected to the operation and maintenance platform, and the indicators to be collected of the Internet of Things devices to be collected, and issue the inspection plan.
[0103] The access protocol refers to the protocol for the IoT device to access the operation and maintenance platform. In one embodiment, the access protocol can be consistent with the protocol defined by the collector management module of the collector used to collect the indicator information of the IoT device. The protocol defined by the collector management module can include multiple protocols, for example, a general access protocol, a private protocol of Company A, a private protocol of Company B, etc.
[0104] The IoT system can include multiple collectors. Each collector can correspond to one or more of the access protocols defined by the collector management module. A collector that corresponds to one access protocol can only collect metrics from IoT devices that communicate using that access protocol. A collector that corresponds to multiple access protocols can collect metrics from IoT devices that communicate using all access protocols.
[0105] Protocols not defined in the collector management module of the collector can be expanded during the management of the collector. The protocol definition specifications can be kept in all lowercase, composed of numbers and underscores, and not exceed 64 characters in length, etc. There is no specific limitation here.
[0106] The resource type can identify the category of the resource and is used to distinguish between various types of resources. The resource can be a single IoT device, a cluster of multiple IoT devices, or a resource divided according to a certain rule, for example, a processor, a collection of components for implementing a certain function, etc., which are not limited here. In one embodiment, the definition of the resource type of the IoT device to be collected can be consistent with the definition of the resource type by the collector management module. That is to say, the resource type of the IoT device to be collected is divided according to a single IoT device or a cluster of multiple IoT devices, then the definition of the resource type by the collector management module is also divided according to a single IoT device or a cluster of multiple IoT devices. The extended resource type specification can maintain the requirements of uppercase and lowercase letters, numbers, and a length not exceeding 64, etc., which are not specifically limited here.
[0107] The indicators to be collected can include various indicators that need to be collected for the IoT devices to be collected. The collected indicators can be categorized by collection capabilities. For example, if a collector can collect a certain type of collection indicator, it can be said that the collector has the ability to collect that type of collection indicator. When a collector obtains indicator information corresponding to the indicators to be collected for the IoT devices to be collected, it can have different collection capabilities. For example, basic information collection capabilities can include device name, serial number, device model, software version, MAC address, etc. Basic status capabilities can include device online status, channel online status, video recording status, etc., which are not specifically limited here.
[0108] In one embodiment, the collection code that directly interacts with the IoT device to be collected can be isolated. The collection code can be pre-written by the developer based on the access protocol of the IoT device to be collected, the resource type of the IoT device to be collected, and the indicators to be collected of the IoT device to be collected. Then, according to the access protocol of the IoT device to be collected, the resource type of the IoT device to be collected, and the indicators to be collected of the IoT device to be collected, the collection code is modeled to obtain a collector model. For example, a collector model can be obtained by constructing a triple including the three elements of the access protocol, the resource type, and the indicators to be collected. Thus, based on the collector model, a collector can be constructed. For example, the collector model can be process-constructed into a collector. The collector is an independent process that can inspect the IoT device to be collected, which can be called a collector.
[0109] The O&M platform can develop inspection plans for IoT devices based on their resource types, the access protocols they use to access the O&M platform, and the metrics they intend to collect. These inspection plans can include the frequency of collecting metrics for each IoT device. For example, an inspection plan might include: every hour, obtain temperature metrics collected by a thermal imaging dual-spectrum camera using Company A's proprietary protocol. (This is not specifically limited here.) The O&M platform can then control the collector to conduct inspections based on the inspection plans for the IoT devices.
[0110] The inspection plan corresponds to the collector's collection capabilities, which are determined by the resource types of IoT devices the collector can collect, the access protocols used by these IoT devices to the operation and maintenance platform, and the indicators to be collected by the collector. The collector can then receive the corresponding inspection plan.
[0111] Specifically, the resource types of the IoT devices to be collected, the access protocols for the IoT devices to be collected to access the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected corresponding to the inspection plan received by the collector, respectively match the resource types of the IoT devices that can be collected by the collector, the access protocols for the IoT devices to be collected to access the operation and maintenance platform, and the indicators to be collected of the IoT devices that can be collected by the collector.
[0112] For example, for the inspection plan: every hour, obtain temperature index information collected by the thermal imaging dual-spectrum dome camera through Company A's private protocol. It can be found that the access protocol for the IoT device that can collect temperature information to access the operation and maintenance platform includes Company A's private protocol, the resource type of the IoT device that can collect temperature information includes the thermal imaging dual-spectrum dome camera, and the indicator to be collected of the IoT device that can collect temperature includes the collector. That is, the triple corresponding to the collector: access protocol, resource type, and indicator to be collected include Company A's private protocol, thermal imaging dual-spectrum dome camera, and temperature, respectively. This indicates that the collector can execute the inspection plan, and the inspection plan is the inspection plan corresponding to the collector.
[0113] The collector can be used to receive the corresponding inspection plan and then, based on the received inspection plan and the communication connection with the IoT device to be collected, obtain the indicator information corresponding to the target indicator of the IoT device to be collected. After obtaining the indicator information, it can be reported to the operation and maintenance platform.
[0114] Since the access protocol of the IoT device to be collected is known, the collector can communicate with the IoT device based on this access protocol. Furthermore, the collector can obtain the indicator information corresponding to the target indicator of the IoT device according to the received inspection plan and based on the communication connection with the IoT device to be collected, and report the indicator information to the operation and maintenance platform.
[0115] For example, the inspection plan received by the collector is: every 1 hour, the temperature index information collected by the thermal imaging dual-spectrum dome camera is obtained through the private protocol of Company A. Then the collector can establish a communication connection with the thermal imaging dual-spectrum dome camera based on the private protocol of Company A, and obtain the temperature index information of the thermal imaging dual-spectrum dome camera every 1 hour, and then report the temperature index information to the operation and maintenance platform.
[0116] In one embodiment, the collection frequency indicated by the inspection plan can be periodic inspections by the collector, or it can be that the collector reports the indicator information to the operation and maintenance platform after the IoT device to be collected actively reports the indicator information. Both are reasonable. The operation and maintenance platform can also determine whether the IoT device to be collected is operating normally based on the reported indicator information. If the IoT device to be collected fails, the indicator information can also be used to determine the location of the failure, facilitating rapid resolution of the failure. For example, the indicator information obtained by the collector may include the device online status, channel online status, video recording status, etc. of the IoT device to be collected, which are not specifically limited here.
[0117] It can be seen that in the inspection system of the above-mentioned IoT devices, the operation and maintenance platform can control the collector to conduct inspections based on the inspection plan of the IoT devices to be collected. The collector can obtain the indicator information corresponding to the indicators to be collected of the IoT devices to be collected according to the inspection plan based on the communication connection with the IoT devices to be collected, and report the indicator information to the operation and maintenance platform. Since the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource type of the IoT devices that the collector can collect, the access protocol of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect, the collector can obtain the indicator information corresponding to the indicators to be collected of the IoT devices to be collected according to the inspection plan based on the communication connection established by the access protocol of the IoT devices to be collected, without having to be deployed on the host of the IoT devices, thereby performing IoT device inspections without relying on the host resources of the IoT devices, thereby improving security and reducing resource waste. Non-invasive monitoring of the collection object is not restricted by the space and resources of the collection object, is more flexible, safer and saves costs.
[0118] As an implementation method of the embodiment of the present invention, Figure 2 As shown, the above system may further include a collector management module 130 , and the above operation and maintenance platform 120 may be used to send resource information and inspection plan information of the IoT devices to be collected connected to the operation and maintenance platform to the collector management module 130 .
[0119] In one embodiment, the collector management module 130 may include a resource operation interface 131 and an inspection plan operation interface 132. The collector management module 130 can manage the entire life cycle of the collector 110, including installation, activation, disabling, starting, stopping, and uninstalling. Through these capabilities provided by the collector management module 130, dynamic expansion of the collection capability during the operation of the collector 110 can be achieved.
[0120] The operation and maintenance platform 120 can send the resource information of the IoT devices to be collected to the resource operation interface 131, and send the inspection plan information to the inspection plan operation interface 132. The resource information may include the resource type of the IoT devices to be collected, the access protocol of the IoT devices to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected. Of course, it can also include other information needed in the inspection process, such as the device connection information of the IoT devices to be collected, etc., which is not specifically limited here. When the IoT device is connected as a passive device connection, the device connection information may include the IP (Internet Protocol), port, user name, and password of the passive device. When the IoT device to be collected is connected as an active registration, the device connection information may include the IP and port of the access component. For resource information involving sensitive information, it can be securely transmitted in accordance with the requirements for sensitive information transmission. The resource information may also include secure transmission information, etc., which is not specifically limited here.
[0121] The inspection plan information may include one or more inspection plans. The collector management module 130 can obtain the inspection plan information through the inspection plan operation interface 132, determine the collector corresponding to the inspection plan according to the correspondence between the resource information of the IoT device to be collected and the inspection plan, generate the inspection task corresponding to the collector, and send the inspection task and the resource information of the IoT device to be collected to the collector 110.
[0122] For example, a patrol plan targets IoT devices with access protocol S and resource type T, collecting data every three hours, with the collected metric information being metric P. The collector management module can then identify the collector with access protocol S, resource type T, and collection capability of metric P as the corresponding collector for this patrol plan. The collector management module can then generate a patrol task for this collector and send the patrol task and the resource information of the IoT devices to be collected to the collector.
[0123] The inspection task instructs the collector to collect the corresponding indicator information from the IoT device corresponding to the resource information according to the corresponding inspection plan. Continuing with the above example, the inspection task instructs the collector to establish a communication connection with the IoT device of resource type T using protocol S, and to collect indicator P from the IoT device every three hours based on this communication connection.
[0124] The collector 110 can be specifically used to obtain resource information and inspection tasks of the IoT device to be collected, and based on the communication connection with the IoT device to be collected, obtain indicator information corresponding to the indicator to be collected indicated by the inspection task of the IoT device to be collected.
[0125] In one embodiment, when the collector 110 obtains an inspection task, if the inspection task does not exist, the waiting time interval can be increased. For example, it can be obtained again after 5 seconds after the first acquisition fails, and then again after 10 seconds after the second acquisition fails, increasing by 5 seconds each time. When it reaches 60 seconds, it starts again from 5 seconds until the task is successfully acquired.
[0126] The collector 110 may also report the indicator information to the collector management module 130 . Correspondingly, the collector management module 130 may also be used to report the indicator information to the operation and maintenance platform 120 .
[0127] In one embodiment, the collector management module 130 can manage the life cycle of the collector 110 and provide services to external applications. The collector collection capability provided by the collector management module 130 can collect indicator information of various resources and analyze it, thereby realizing applications such as fault location of various devices used in the business system.
[0128] For example, the interface interaction between the collector management module and the external application can be as follows: Figure 3 As shown, the inspection plan is the collection plan, and the indicator information corresponding to the indicators to be collected indicated by the inspection task is the collection result. The operation and maintenance platform can distribute resources and collection plans to the collector management module, which can also address the collection component service to the core service. The collector management module is connected to multiple corresponding collectors, including "A private protocol encoding device collector," "A private protocol capture machine collector," and other collectors.
[0129] The collector management module can control the collector parameter configuration changes, plan changes, resource changes, etc. The collector can obtain resources and plans from the collector management module and report the collection results, etc. The A private protocol encoding device collector can have basic information collection capabilities, status information collection capabilities, video parameter collection capabilities, etc., and can collect data from A encoding device. The A private protocol capture machine collector can have basic information collection capabilities, status information collection capabilities, capture machine parameter collection capabilities, etc., and can collect data from A capture machine. Similarly, other collectors can collect data from other corresponding devices. The collector management module can send the collection results to the message queue, and the message queue can push the collection results to the operation and maintenance platform.
[0130] The collector management module provides resource operation interface and inspection plan operation interface for external applications. The resource operation interface can add, delete and modify resources, and the inspection plan operation interface can add, delete and modify inspection plans.
[0131] Inspection plans can be configured by resource type, meaning all devices of the same type can use the same inspection plan. Plans can also be configured for specific resources, meaning that the inspection plan is only valid for that specific resource. An inspection plan can be composed of three key factors: resource type, metrics to be collected, and access protocol. The collector management module can allocate inspection tasks based on access protocol, resource type, and metrics to be collected.
[0132] Since the collector management module can manage the entire life cycle of the collector, including installation, activation, disabling, starting, stopping, and uninstalling, these capabilities provided by the collector management module can realize dynamic expansion of collection capabilities during the operation of the collector. The following examples introduce the capabilities of the collector management module in each link.
[0133] For example, the process of collector management module to install and manage collectors can be as follows: Figure 4 As shown, the collector exists in the form of a resource package. Users can be developers, operation and maintenance personnel, testers, etc. Users can upload the collector resource package through the operation and maintenance center. The operation and maintenance center will feedback the resource package upload results and the verification results after verifying the resource package to the user. Then the user can issue an instruction to install the collector resource package. After the operation and maintenance center completes the installation of the collector, it can copy the resource package to the collector management module (collector framework). The collector can be stored in the specified directory of the collector management module. The relative path can be a pre-set storage path, for example, it can be . / resource / probes / , which is not specifically limited here.
[0134] Furthermore, the collector management module can execute the collector installation action and feedback the collector installation results to the operation and maintenance center and the user. In one embodiment, the collector is enabled by default after installation, but no collector instance is created. In the enabled state, plan configuration and resource distribution can be performed, and the collector can be put into operation.
[0135] After the collector is installed, if the collector is in the disabled state, the user can set the collector state to enabled through the enable button in the collector management function of the collector management module. At this time, the collector management module can configure inspection tasks for the resource types supported by the collector.
[0136] The process of disabling the collector by the collector management module can be as follows: Figure 5As shown, if the collector is in the enabled state, the user can disable the collector using the disable button in the collector management function of the collector management module. When the collector is in the disabled state, the collector management module will not be able to configure inspection tasks for resource types supported by the collector. The collector management module can provide feedback to the user on the collector disabling result. If the collector is in the enabled and started state, when the user disables it, the collector management module can first stop the collector and then disable it.
[0137] The collector's startup can also be controlled by the collector management module. As an implementation, a collector can be started when the following three conditions are met: the collector is enabled, the operation and maintenance platform has issued information about the resources supported by the collector, and an inspection plan has been configured for the collector. Once all three conditions are met, the collector management module starts the collector and assigns it an inspection task. A collector can be stopped when it is disabled, restarted through the collector management module's maintenance interface, or stopped.
[0138] The collector management module can manage the process of collector uninstallation as follows: Figure 6 As shown, users can uninstall the collector through the collector management module. Uninstalling the collector involves deleting the collector resource package from the resource directory of the collector management module. If the collector is in the started state during the uninstallation, the collector management module can first stop the collector and then perform the uninstallation. The collector management module can also provide feedback to the user on the results of the collector uninstallation.
[0139] Collector upgrade means to repair the defects of the collector. After the collector is upgraded, the user can reinstall the collector with the same ID. At this time, it can be considered that the collector has been upgraded. The process of collector management module to manage the collector upgrade can be as follows: Figure 7 As shown. The specific operation of the collector management module is to uninstall the old version of the collector and install the new version of the collector. Specifically, the user can upload the collector resource package through the operation and maintenance center. The operation and maintenance center will feedback the resource package upload result and the verification result after verifying the resource package to the user, and then the user can issue an instruction to install the collector resource package. After the operation and maintenance center completes the installation of the collector, the operation and maintenance center can copy the resource package to the specified directory of the collector management module (collector framework), and then the collector management module will perform the installation action. When the collector management module determines that a collector with the same identifier already exists, it can determine whether the collector is in the startup state. If the collector is not in the startup state, the collector management module can uninstall the collector and install a new collector resource package after receiving the uninstall result of the collector.
[0140] If the collector is already started, the collector management module can first stop the collector, then uninstall it after receiving a stop result, and then install a new collector resource package after receiving the uninstall result. The collector management module can also provide feedback on the collector installation results to the operation and maintenance center and the user.
[0141] The interface interaction between the collector management module and the collector can also include interfaces such as heartbeat, service addressing, resource change, inspection task execution, and inspection result reporting. The following examples illustrate these interactions and interface requirements.
[0142] The process of the collector management module to manage the heartbeat of the collector can be as follows: Figure 8 As shown, after the collector management module creates an instance of the collector and starts the collector, the collector can send heartbeats to the collector management module at regular intervals. When the collector sends a heartbeat to the collector management module, it can include the process ID of the collector. For example, the time interval can be 10s; the collector management module can determine whether it has received the heartbeat sent by the collector. For example, if the collector management module has not received the heartbeat sent by the collector for three times, it can be considered that there is an abnormality in the collector and the collector can be forced to restart, that is, the collector is stopped first and then started.
[0143] The process of the collector management module to address the collector service can be as follows: Figure 9 As shown, in one embodiment, the collector can collect indicator information of the IoT devices to be collected through other components. For example, the collector can collect indicator information of the actively registered IoT devices to be collected through DAC (Device Access Construction). The actively registered IoT devices to be collected may include IoT devices to be collected whose access protocols are the national standard and eHome protocol. The collector can also query video clips of the videos taken by the IoT devices to be collected through SAC (Storage Access Construction), etc., which are not specifically limited here.
[0144] Therefore, in order to communicate with these components, it is necessary to obtain the service addresses of these components. The collector can query component information through the service addressing interface provided by the collector management module to obtain the service addresses of these components. The collector management module can perform service addressing operations on the core service, and the core service can send the addressing results to the collector management module. The collector management module can send the addressing results to the collector, and then the collector can obtain the address of the relevant component and communicate with it.
[0145] The collector management module controls the collector to obtain inspection tasks. Figure 10As shown, the inspection task is a collection task. The collector management module generates the corresponding inspection task based on the resource information and inspection plan issued by the operation and maintenance platform. The collector obtains new inspection tasks and executes them in a loop through the collector management module. The inspection task information contains one or more resource information that needs to be collected. The resource information may include the resource number, connection information, resource type, and other information of the IoT device to be collected. The connection information may include the IP, port, user name, password, etc. of the IoT device to be collected. When the collector obtains the inspection task, if the task acquisition fails, the waiting time interval can be increased. For example, the acquisition time interval can be increased in multiples of 5s, that is, after the first acquisition fails, it is acquired again after 5s, and after the second acquisition fails, it is acquired again after 10s, and each time increases by 5s. When it reaches 60s, it starts again from 5s until the task is successfully acquired.
[0146] The collector management module controls the process of the collector to change resources as follows: Figure 11 As shown, if the operation and maintenance platform deletes the specified resources or modifies the connection information, it needs to notify the collector of this information so that the collector can release the relevant resources in time. Therefore, when the resources of the operation and maintenance platform change, the operation and maintenance platform can send the resource change information to the collector management module. The collector management module can call the resource change interface provided by the collector to notify the resource change, including deletion or modification. For newly added resources, they are updated when the collector obtains the plan from the framework, and there is no need to update through resource change notification. The collector can send the change results to the collector management module through the resource change interface, and the collector management module can then feed back the change results to the operation and maintenance platform.
[0147] The collector management module controls the collector to report the inspection results as follows: Figure 12 As shown, the collection results are the results collected by the collector, specifically the indicator information of the IoT devices to be collected. The collection results are collected by the collector based on its collection capabilities, or they can be indicator information actively reported by the IoT devices to be collected. The collector can send the collection results to the collector management module, which then sends the results to the message queue.
[0148] It can be seen that in this embodiment, the operation and maintenance platform can send the resource information and inspection plan information of the IoT devices to be collected that are connected to the operation and maintenance platform to the collector management module. The collector management module can obtain the resource information and inspection plan information of the IoT devices to be collected, and determine the collector corresponding to the inspection plan according to the correspondence between the resource information of the IoT devices to be collected and the inspection plan, generate the inspection task corresponding to the collector, and send the inspection task and the resource information of the IoT devices to be collected to the collector. The collector can obtain the resource information and inspection task of the IoT devices to be collected, and based on the communication connection with the IoT devices to be collected, obtain the indicator information corresponding to the indicator to be collected indicated by the inspection task of the IoT devices to be collected, and report the indicator information to the collector management module, so that the collector management module can report the indicator information to the operation and maintenance platform.
[0149] Because each collector is an independent collector derived from the process-based model of the corresponding collector, each collector is independent of each other and does not affect each other. Therefore, when managing the collectors through the collector management module, when adding new IoT devices to be collected or adding new indicator information of IoT devices to be collected, it is only necessary to add a new collector or modify the corresponding collector without affecting other collectors. This achieves binary reuse and does not cause intrusive modifications to the existing operation and maintenance system, ensuring the continued stability of the static structure of the operation and maintenance system. This enables stable and timely perception of the operating status of heterogeneous IoT devices to be collected, from different manufacturers, with different access protocols, and different resource types, throughout the entire information system.
[0150] At the same time, the development and operation states of the collector are expanded. Through development, packaging, and debugging, new IoT device perception collectors to be collected can be quickly released, achieving static and dynamic stability of the operation and maintenance system, and dynamic expansion during operation. There is no need to interrupt and restart the operation and maintenance system, and all-weather uninterrupted perception is achieved.
[0151] As one implementation of an embodiment of the present invention, the collector management module 130 may include a collector management service and a collector access service, wherein the collector access service is connected to the collector. In one implementation, the collector management service may include a resource operation interface 131, an inspection plan operation interface 132, and a management interface, and the collector access service may include a task acquisition interface.
[0152] The collector management service can be used to manage the collector access service through the management interface, and to manage the collector 110 through the collector access service. Specifically, the collector management service can obtain resource information and inspection plan information of the IoT devices to be collected, and then, based on the correspondence between the resource information and the collector, send the resource information and inspection plan information of the IoT devices to be collected to the corresponding collector access service.
[0153] The operation and maintenance platform can send IoT device resource information and inspection plan information to the collector management service. The collector management service can pre-record the resource information corresponding to the IoT devices to be collected by each collector, as well as the collector access service to which each collector is connected. Based on the correspondence between resource information and collectors, the collector management service can then send the resource information and inspection plan information of the IoT devices to be collected to the corresponding collector access service.
[0154] For example, the Collector Management Service records that the resource information corresponding to the IoT devices to be collected by Collector 1 is a thermal imaging device cluster, the access protocol is Protocol B, the target indicator to be collected is temperature difference, and the Collector Access Service to which the Collector is connected is Access Service M. If the Collector Management Service obtains the resource information of the thermal imaging device cluster, Protocol B, and temperature difference, it can send the resource information and inspection plan information of the IoT devices to be collected to Collector Access Service M.
[0155] The collector access service described above can be used to determine the collector corresponding to the inspection plan based on the correspondence between resource information and the inspection plan, generate inspection tasks corresponding to the collector, and distribute the inspection tasks and resource information to the collector. For example, inspection tasks can be distributed to collector 110 via the task acquisition interface. The collector access service can also obtain indicator information corresponding to the indicators to be collected indicated by the inspection tasks collected by collector 110 and report this indicator information to the operation and maintenance platform 120.
[0156] In order to support the collection of large-scale resource data, the collector management module 130 can adopt a distributed design concept to provide two services: collector management service and collector access service. In one embodiment, each part of the services in the collector management module can be Figure 13 The connection is made in the manner shown, wherein the collector management service is responsible for the management of the collector access service and the unified scheduling of global inspection plans and resources. That is, the collector management service can obtain the resource information and inspection plan information of the IoT devices to be collected, and then send the resource information and inspection plan information of the IoT devices to be collected to the corresponding collector access service based on the correspondence between the resource information and the collector, so as to uniformly schedule the inspection plan, collector resources, etc.
[0157] The collector access service is responsible for the access and management of the collector, and can redistribute the indicator information of the IoT devices to be collected by the collector. The default distribution method supports MQ (Message Queue) and distributed message queue Kafka, and supports distributed deployment. The collector is responsible for performing specific inspection tasks. The collectors may include: A private protocol collector, B private protocol collector, video continuity detection collector, cascade device status collector, video quality diagnosis collector, ISAPI (Internet Server Application Programming Interface) collector, ONVIF (Open Network Video Interface Forum) protocol collector, etc. The names of the above collectors are only exemplary names and do not mean that the corresponding collector only has the elements indicated by the name. For example, for the cascade device status collector, its corresponding resource type can be cascade device, the access protocol can be protocol N, and the indicator information can be status information. It does not mean that the collector only has two elements: resource type and indicator information.
[0158] In one embodiment, the collector management service stores resource information and inspection plan information in a DB database, and the collector access service can obtain the resource information and inspection plan information from the DB database. In one embodiment, the collector access service can store the indicator information collected by the collector in the object storage service MINIO, and then the collector management service can obtain the indicator information from MINIO. For example, after the collector access service obtains the video quality diagnostic image of the IoT device to be collected through the video quality diagnostic collector, the collector access service can store the video quality diagnostic image in the object storage service MINIO, and the collector management service can obtain the video quality diagnostic image from the object storage service MINIO.
[0159] Due to the access performance limit of each collector access service, when the access exceeds the access performance of a single collector access service, the collector access service needs to be expanded. For example, each collector access service can support the access of 10,000 collectors at most. Then, when the access exceeds 10,000 collectors, the collector access service can be expanded. In one embodiment, the service deployment of the collector management module can be as follows: Figure 14As shown, the collector management service can manage multiple collector access services through change notifications and heartbeat detection. Each collector access service can be responsible for the access and management of the corresponding multiple collectors, including controlling the collector consumption tasks, i.e. executing inspection tasks, and obtaining the inspection results reported by the collector, i.e. indicator information.
[0160] As an implementation method of an embodiment of the present invention, the collector management service can provide self-monitoring and scheduling management functions, monitor and manage the collector access service and the collector's execution status information, and thus regularly monitor the collector access service and the collector's execution status information.
[0161] Specifically, the collector access service can also be used to obtain the execution status information of the collector for the inspection task and send the inspection task execution status information to the collector management service. Correspondingly, the collector management service can also be used to obtain the inspection task execution status information and dispatch the inspection task to other collectors when the execution status information indicates that the collector has an abnormality.
[0162] In addition to obtaining the indicator information collected by the collector, the collector access service can also obtain the execution status information of the collector for the inspection task. The execution status information may include whether the inspection task has started, the stage of the inspection task execution, whether it has been completed, and other related information, which are not specifically limited here. The collector access service can send the execution status information to the collector management service, and then the collector management service can determine whether the corresponding collector has an abnormality based on the execution status information. Of course, the collector management service can also obtain the status information of the collector access service to determine whether the collector access service has an abnormality. When a collector access service is abnormal or a collector is abnormal, the relevant inspection tasks can be dispatched in time to the collectors corresponding to other collector access services to continue execution, ensuring high availability of the function.
[0163] For example, if the execution status information of a certain collector for an inspection task indicates that the collector has not executed the inspection task for a long time, or the inspection task has remained in the same state for a long time, the collector can be considered to have an abnormality, and the collector management service can adjust the inspection task to another collector that can execute the inspection task. The other collector that can execute the inspection task is a collector whose resource type, access protocol, and collection capability match the resource type, access protocol, and indicator information corresponding to the inspection task.
[0164] In one embodiment, the collector management service can provide external interface services and web services to display the status of the inspection system operation and manage the manual operations of the collector. For example, the structural diagram of the collector management service can be as follows: Figure 15As shown. The collector management service can be divided into five functional modules: plan management, resource management, monitoring management, scheduling management, and collector management. Plan management can include periodic planning, one-time planning, resource-based planning, enable and disable management, etc.; resource management can include full synchronization, incremental processing, adaptation management, etc.; monitoring management can include access service monitoring, collector monitoring, task monitoring, server monitoring, etc.; scheduling management can include filter management, scheduling strategy management, change management, etc.; collector management can include start and stop management, etc. The collector management service can also include some basic functions, mainly service authentication function for authentication during interaction between services; data encryption and decryption function for sensitive data processing; log management that complies with component specifications; event management for asynchronous message processing between functional modules; and integrated management function when integrated with operation management.
[0165] The collector access service is responsible for managing local collectors to enable the start, stop, disable, enable, and patrol task assignment of the collectors. It is also responsible for uniformly reporting and forwarding the indicator information collected by the collectors and monitoring runtime data. The collector access service and the collector are highly unified and stable in physical structure, so they can be designed to provide weak references to the outside world. The collector access service can provide a management interface to the collector management service, but does not provide an interface to the outside world. The collector management service can manage the collector access service through the management interface. The collector access service can form the smallest unit that can execute specific business logic with the collector, and improve the stability of operation based on database sharing.
[0166] The Collector Access Service manages the lifecycle of collectors. Physically, business functionality can be expanded by simply adding a new collector to the Collector Directory managed by the Collector Access Service. After the Collector Management Service completes resource allocation and plan establishment, the Collector Access Service maintains its existing plans and resource inspection logic even in the event of a Collector Management Service outage or other anomalies. The Collector Access Service also supports the expansion of existing inspection capabilities. This expansion can be achieved by simply upgrading the corresponding collector and adding it to the Collector Directory managed by the Collector Access Service.
[0167] In one embodiment, the architecture of the collector access service can be as follows: Figure 16As shown, the collector management service PMS (Probe management service) controls the collector access service PAS (Probe access service, collector access service) through the collector management, operation management, resource, plan management and other interfaces. It can be composed of collector management, task management, runtime data management, and server monitoring. The collector management part is mainly responsible for the collector's scanning, configuration, start, stop, enable, disable and other operations. The task management part is mainly responsible for the dispatch of the collector's inspection tasks, which is used to solve the acquisition of resources, the construction of inspection plans, the production of inspection tasks, the dispatch of inspection tasks, and the statistics and reporting of inspection results. Among them, the collector is still based on Figure 13 Taking the same collector as an example, inspection results can be stored in MQ, Kafka, and other media. Runtime data management primarily manages the collector's heartbeat data, the execution of inspection tasks in the inspection plan, and the collector's access service operation data. Heartbeat data ensures effective monitoring of the collector's status within the process. The collector's access service operation data, which assembles collector heartbeat data and server information, allows the PMS to perceive the capabilities and environment of the current collector's access service, enabling load balancing and failover.
[0168] The collector management module is used to manage the collector life cycle. When the collector access service is started, it can scan the collector directory, perform compliance verification on the collector, parse the collector model file, and is responsible for the start and stop of the collector and other operational functions.
[0169] In one embodiment, the scanning process of the collector directory can be as follows: Figure 17 As shown, the scanning process mainly includes scanning the collector directory and verifying the collector directory specifications. PAS can scan the collector through the steps of 1. scanning the collector directory, 2. verifying the collector directory standardization, 3. parsing the model file, and 4. caching the instance object. Then, PAS can put the cached collector instance into the warehouse (5. Warehousing), that is, store it in the DB. After the DB storage is successful, a success message can be returned. PMS can send 6. Get the collector instance instruction to PAS. After receiving the instruction, PAS can return the collector instance related data to PMS. At this time, the returned data is successful.
[0170] For example, when scanning the collector directory, the directory of the collector package can be defined in the fixed directory of the collector access service component: "paf root directory\resource\probes". Each folder under the probes file is a collector by default. Taking into account the support of single-machine multi-instance scenarios, the collector access service uses the collector's folder name as the id of this collector by default. When verifying the collector directory specification, you can scan the directory structure of each folder under probes according to the collector directory specification, and adapt to the window and linux directory structure. For example, the verification content may include: script: must include the collector's start and stop scripts, which are bat scripts under window and sh scripts under Linux; META-INF: must include the collector's model file probe.xml, and probe.xml needs to comply with the model specification; language: must have a multi-language description file translate.properties. If the above directory structure is not met, it is an invalid collector.
[0171] The status of the collector can be defined as: enabled, valid, invalid, configured, and disabled, where the enabled state corresponds to a collector that needs to be started; the invalid state corresponds to a failure to parse the collector service catalog specification or model description file; the configured state corresponds to a collector that complies with the catalog specification and requires startup parameters in the model file description; the disabled state corresponds to a valid collector that does not need to be started. After disabling, the inspection plan of the associated resource type will no longer be executed.
[0172] In one embodiment, the process started by the collector can be as follows Figure 18 As shown, the activation of the collector is not specifically responsible for the startup logic, but only changes the collector status. By verifying the collector status, only the collector in the disabled state will execute the activation logic. Therefore, the collectors in the following states will not be enabled: the collector whose collector status is enabled, the collector whose collector status is configured, and the collector whose collector status is invalid. The activation of the collector is executed when the inspection plan information is issued, or when the user manually operates the collector management page. In one embodiment, the specific execution is that PAS calls the collector script execution, including PMS sending 1. activation instruction to PAS, PAS executing step 2. verifying the collector status, step 3. updating the collector instance, and executing step 4. updating the database, and returning the activation success message to PMS. Furthermore, PAS can publish a startup event to the event management service to call the listening callback, and the event management service can return the activation callback result to PAS, and then PAS can call the collector script to perform related operations.
[0173] As an implementation method, when the collector is enabled, PAS can call the startup script of the collector and pass the command line parameters to the collector as startup parameters. The startup parameters include encrypted information encrypted by base64. The original text of the encrypted information may include: context generally defaults to / paf-pas; https indicates whether https is enabled; port is the websocket communication port between the collector and the collector management module; service service is pas; ip is the IP address of pas.
[0174] Similarly, disabling a collector does not specifically disable the logic; it only changes the collector status. By verifying the collector status, only enabled collectors will execute the disabling logic. The disabling process is similar to the enabling process, except that the script executed is a stop script, such as stop.sh or stop.bat.
[0175] In one embodiment, while a collector is inspecting IoT devices, the collector access service can maintain the collector's heartbeat status. The PAS can cyclically monitor the collector's heartbeat status, report the heartbeat, and return the monitoring results. The PMS can also cyclically monitor the PAS heartbeat, assemble static operational data, and obtain static operational data information by obtaining the PAS heartbeat.
[0176] For example, the process of the collector access service to keep the collector alive by heartbeat can be as follows: Figure 19 As shown, the heartbeat keep-alive period can be designed to be 15 seconds, and after being described in the configuration file, it also supports reconfiguration during the collector operation period. The collector access service manages the collector status based on the keep-alive message of the collector heartbeat, and at the same time provides the collector operation information to the outside world. The keep-alive report content of the collector may include: collector ID, that is, the first-level directory of the current collector; process PID; current execution efficiency, the unit can be per hour, as a reference for execution efficiency. PAS can monitor the heartbeat status of the collector. Specifically, the collector can report the heartbeat periodically, PAS can cyclically obtain the heartbeat reported by the collector, and can also return the result to the collector, where the result can be a successful reception message, etc. Similarly, PMS can cyclically obtain the PAS heartbeat, PAS can assemble static operation data, and return information to PMS, where the static operation data includes the heartbeat of PAS.
[0177] Considering that when collecting indicator information of the IoT devices to be collected, multiple collectors collecting the same IoT devices to be collected at the same time may cause the number of collector connections of the IoT devices to be collected to exceed the upper limit. In one embodiment, the inspection task of a certain indicator to be collected of the same resource type can be assigned to only one collector.
[0178] If the collector access service is down, and the collector access service does not respond after the collector sends a heartbeat message, that is, no result is returned, multiple attempts can be made. For example, if there is still no response after 5 consecutive heartbeats, the collector can automatically exit, that is, disconnect from the collector access service. Among them, when parsing the heartbeat return result, the collector can automatically exit according to the illegal heartbeat. The implementation of automatic exit can ensure that when the collector management service performs a failover, the collector in the collector access service failure environment will not continue to work, resulting in the outside world being unable to perceive it, and resource competition leading to inaccurate inspection results.
[0179] In addition, when the collector access service is running, the collector access service can also perform data monitoring. In one embodiment, the flow chart of data monitoring can be as follows: Figure 20 As shown, the operational data component is responsible for assembling collector operational data and collecting environmental information. This facilitates scheduling by the collector management service, enabling the following functions: The collector management service perceives changes in the hardware environment under the collector access service, enabling load balancing; and perceives changes in the collector capability set under the collector access service, enabling resource allocation and failover.
[0180] The runtime data management of the collector access service is implemented through two internal classes: ProbeLifeMonitor and ProbeHeartService. ProbeHeartService is responsible for receiving collector heartbeat data; ProbeLifeMonitor maintains the collector status. Meanwhile, the collector process monitoring module is responsible for executing specific startup scripts and process shutdown operations, monitoring collector status changes, and automatically starting up pending collectors after a restart.
[0181] As an implementation method, ProbeLifeMonitor performs step 1. Obtaining heartbeat data, that is, it can obtain heartbeat data from ProbeHeartService, ProbeHeartService can return the heartbeat data of the collector, and ProbeLifeMonitor can perform step 2. Data verification, that is, performing data verification on the heartbeat data. ProbeLifeMonitor can send a collector status update instruction to ProbeHeartService, and then ProbeHeartService obtains the heartbeat data reported by the collector, verifies the heartbeat packet, parses and stores the heartbeat message. Then, the result can be returned to the collector to update the collector status, and the collector can verify the result and execute the status update. Among them, the heartbeat packet includes heartbeat data, and parsing the heartbeat packet can obtain the heartbeat message.
[0182] In one embodiment, the collector access service can manage the inspection tasks. The management of the inspection tasks means that each collector access service obtains the resource information and inspection plan information issued by the task acquisition interface, and uniformly schedules and generates the corresponding inspection tasks. The flow chart of the collector access service generating the inspection tasks can be as follows: Figure 21 As shown in the figure, the PMS can send plan change and resource change information to the PAS. The PAS can then call back the planned resources. After a successful callback, it can periodically generate a task queue. Upon receiving a task request from a collector, it assigns a task queue based on the collector ID, returns a task list to the collector, and calculates the inspection results reported by the collector to generate statistical results. The PAS can also report results to MQ / KAFKA. If the inspection results include images, the result images can be stored in the object storage service MINIO.
[0183] In one embodiment, the collector access service can manage the received resources. The flow chart of the collector access service managing the received resources can be as follows: Figure 22 As shown, resource information mainly refers to the attribute information required for inspection, which can include the resource type of the IoT device to be collected, the access protocol, and the indicators to be collected. The design adopts a simple factory pattern to increase the scalability and stability of the program. The DB acquisition method can be implemented, and http, ws and other methods can also be extended. The specific inspection resource logic under the DB method can include the following steps: obtain the inspection plan information allocated to this PAS in the plan resource allocation table, use the obtained inspection plan information to query the specific plan details, and use the obtained plan information to obtain the resources in the allocation table to associate specific resource information. The resource management part can use the ResourceFactory and ResourceService classes inside the PAS to implement the above resource processing flow.
[0184] ResourceFactory can send initialization instructions to ResourceService. After initialization, ResourceService can register with ResourceFactory. After obtaining the registered instance, ResourceFactory can send resource acquisition instructions to ResourceService. Then, ResourceService can query the DB for resource information. DB can return resource information to ResourceService, and ResourceService can send resource information to ResourceFactory.
[0185] In one embodiment, the collector access service can convert resource information into the input items required by the collector for the indicator to be collected according to the specified indicator to be collected. The following operations are required to convert a resource information into a specific task: obtain resource information. Obtain the input items required for the indicator to be collected and filter the required input items from the resource information. Obtain the configuration items of the inspection plan information for the indicator to be collected. The flow chart of the collector access service managing the received inspection tasks can be as follows: Figure 23 As shown, inspection plans can be categorized into the following types: periodic type-based plans, periodic resource-based plans, and one-time plans. The scheduled task service transforms an original plan into an instance plan with tasks, progress, and periods. It also monitors specific resource changes and distributes and schedules them through the collector management service. The collector access service also provides interfaces for initializing, destroying, executing one-time plans, and retrieving tasks.
[0186] The plan construction process mainly includes the following steps: obtaining inspection plan information; calling the task management part to build the inspection task and obtain the task list; building a task queue with progress; building the reset cycle of the periodic plan; or building a one-time plan queue without progress. Among them, the DefaultManagerService class load plan distribution is to distribute plan information and obtain registered instances. The Scheduler class is responsible for specific scheduling management, building the plan cycle, internally maintaining the resource queue, and building tasks. TaskProducer is responsible for queueing according to the planned frequency and waiting for the collector to pull tasks. Specifically, TaskProducer can build a task queue and generate tasks. The planned task management part is responsible for managing the life cycle of the planned task service, responsible for specific task allocation, and managing allocation strategies.
[0187] In one embodiment, after the collector inspects the results, the collector access service can report the indicator information of the IoT device to be collected obtained by the collector inspection. The process of the collector access service reporting the inspection results can be as follows: Figure 24 As shown in the figure, after the collector reports the inspection results to the collector access service PAS, the collector access service can compile the results and forward them uniformly. For example, the collector access service can report through a message middleware that supports ACTIVI MQ / KAFKA. For example, the collector access service can forward the results to ACTIVI MQ / KAFKA, and ACTIVIMQ / KAFKA can return a push success message to PAS. PAS can also store the result images in MINIO, an object storage service. MINIO can return a storage success message to PAS, which in turn can return a storage success message to the collector.
[0188] When the collector is connected to the service forwarding, it can also count the number of successful and failed tasks executed in the last hour. The format of the inspection results reported by the collector can be shown in the following table:
[0189]
[0190] For example, the naming convention for message queues could be: Results reported to message queues use the topic format. Result sets are categorized by resource type and capability identifier. Different business applications can consume the results by simply listening to the relevant topics. The unified naming convention for message queues used to collect results is: "paf.paf-pas.topic." as the default prefix, followed by the resource type identifier, "_," and the indicator's capability identifier. For example, the queue for collecting basic monitoring point information is: paf.paf-pas.topic.camera_baseInfo. The Kafka naming convention could be: data pushed to Kafka uses the same topic, with the fixed name "hik.hosp.ham.indictor.v2."
[0191] To monitor the execution status of collectors, the collector access service in the collector management module can also obtain information about the execution status of inspection tasks by the collectors. This information can include the number of tasks currently executed, the number of tasks to be executed, and the collector's execution efficiency. For example, the collector access service can periodically obtain execution status information for each collector, with an interval of 30 seconds being appropriate, though this is not a specific limit.
[0192] In one embodiment, the collector access service can determine the current total number of tasks, number of successful tasks, number of failed tasks, task execution progress and average rate of task execution of the collector based on the execution status information obtained by the collector, wherein the calculation methods can be respectively: total number of collector tasks: number of tasks obtained by the collector in the current batch; number of successful tasks: number of successful execution results of the current batch of tasks; number of failed tasks: number of failed execution results of the current batch of tasks; task execution progress: (number of successful execution results of the current batch of tasks + number of failed execution results of the current batch of tasks) / total number of collector tasks; average rate of task execution: (number of successful execution results of the current batch of tasks + number of failed execution results of the current batch of tasks) / (last task execution completion time - task arrival time).
[0193] As can be seen, in this embodiment, the collector management service can manage the collector access service and manage the collector through the collector access service. The collector access service can issue inspection tasks to the collector, obtain the collector's execution status information for the inspection tasks, and obtain the indicator information corresponding to the indicators to be collected indicated by the inspection tasks collected by the collector, and report the indicator information to the operation and maintenance platform. This allows the execution status of the collector to be monitored. In addition, during the life cycle of the collector, the collector access service can also manage the collector, generate inspection tasks and report the obtained indicator information, manage inspection tasks and resources, and monitor the data of the collector access service.
[0194] As an implementation method of the embodiment of the present invention, the collector access service can establish a long connection with the collector.
[0195] In the solution provided by the embodiments of the present invention, the collector maintains a connection with the task acquisition interface of the collector access service in the collector management module. However, when the collector frequently performs inspection tasks, this connection method may not meet the requirements for timely response. Frequent calls, such as using HTTP requests to control the collector, can also lead to high resource consumption. Therefore, a persistent connection can be established between the collector access service and the collector.
[0196] In one embodiment, the collector and the collector access service still use the http protocol request, and at the same time establish a long connection between the collector access service and the collector. For example, the long connection establishment process can be as follows: Figure 25 As shown, the collector, as the client, actively initiates a websocket connection request. Websocket is a TCP (Transmission Control Protocol) long-connection communication mode similar to Socket. After the long connection is established, the collector and the collector access service simultaneously maintain a long-connection protocol. The collector can send heartbeat detection information to the collector access service. For example, a heartbeat can be sent every 15 seconds in a cycle to keep the heartbeat alive. The collector can also obtain inspection tasks, and the collector access service can send tasks to the collector, thereby maintaining a two-way communication process. The collector can actively pull tasks from the collector access service, and the collector access service can also send tasks to the collector.
[0197] As can be seen, in this embodiment, the collector access service can establish a persistent connection with the collector. This allows the collector to proactively request tasks from the collector access service, while the collector access service can also issue tasks to the collector. This saves time on frequent connection establishment, thereby conserving system resources and improving inspection performance.
[0198] As one implementation of an embodiment of the present invention, the collector may include a description file, a configuration file, a script file, and at least one executable program. The description file is used to describe at least the collector's identifier, the resource type corresponding to the collector, and the metrics to be collected from IoT devices that the collector can collect. The configuration file is used to describe the collector's configuration parameters. The script file is used to maintain the operation of the collector.
[0199] In the solution provided by the embodiment of the present invention, the collector includes one or more executable programs for collecting specific data. The collector may also include an identifier, a description file, a configuration file, a script file, and a multi-language file. For example, a block diagram of a collector may be as follows: Figure 26 As shown, it includes collector program A, collector program B, collector description file, multi-language translation file, collector configuration file, update log file, program verification file, description verification file, resource package description file, script file, etc. The directory structure of the collector can be as follows Figure 27 The meanings of each directory and file in the collector are shown in the following table:
[0200]
[0201]
[0202] For example, the collector description file can be an XML file. The collector description file can define the collector's identifier, collector version, resource type corresponding to the collector, and the indicators to be collected from IoT devices that the collector can collect. The collector's identifier can be centrally managed by the collector management module, and the identifier of each collector in the entire system is unique. The resource type is consistent with the type defined by the collector management module, and the indicators to be collected from IoT devices that the collector can collect can be centrally managed by the collector management module. The collector description file can be named probe.xml and stored in the $(root) / META-INF directory, where $(root) identifies the root directory of the collector.
[0203] For example, multilingual translation files can be stored in the language identification directory corresponding to the language directory, and are fixedly named translate.properties. The content of this file is saved in the form of key=value. All characters involved in the collector that need to be displayed on the interface can be described in this file. Each collector supports Chinese and English by default, that is, the collector's output species must include Chinese and English translation files. In specific usage scenarios, the indicators to be collected of the IoT devices to be collected that the collector can collect can be expressed as collector capabilities:
[0204] probe.collector_id.name: indicates the name of the collector;
[0205] probe.collector_id.describe: indicates the description of the collector;
[0206] Specific capability.name: indicates the name of the collector capability;
[0207] Specific capability.Specific indicator.name: indicates the indicator name of the collector;
[0208] Resource type code.name: indicates the resource type name supported by the collector;
[0209] Specific protocol.name: indicates the name of the collector's collection protocol;
[0210] Specific capability.Configuration indicator.name: indicates the name of the collector capability configuration item;
[0211] Specific capability.Configuration indicator.describe: indicates the description of the collector capability configuration item;
[0212] Collector ID.config.Configuration indicator.name: indicates the name of the collector configuration item in the configuration file;
[0213] Collector ID.config.Configuration indicator.describe: indicates the description of the collector configuration item in the configuration file.
[0214] For another example, the update log file can be stored in each language representation directory of the language directory, and is used to update the log content of the collector described in different languages. The update content includes the following: new features; optimization and improvement; bug fixes; abolished features; legacy issues; and other notes. The program checksum file is used to save the MD5 value of the collector executable program in the bin directory, and is used to verify whether the file has been modified during installation and operation. The file name is program_checksum.xml and is stored in the META-INF directory. The description checksum file is used to save the MD5 values of all description files in the META-INF directory, and is used to verify whether the description file has been modified during installation and operation. The file name is file_checksum.xml and is stored in the META-INF directory. The collector resource package description file can be: under the design of a unified software technical architecture, the collector exists in the form of a resource package, and the collector resource package description file is a description file that conforms to the description specification of the resource package.
[0215] The collector configuration file is a file that describes collector configuration items, such as ports and collection parameters. Using the descriptions in this configuration file, you can modify various collector configuration items on the collector management service to change collector behavior. For example, the key in the configuration file identifies the configuration item and is unique among all collector configuration items; type is the type of the configuration item, which can include int, float, and string; default indicates the default value of the configuration item; readonly indicates whether the configuration item is read-only. True indicates read-only and is only displayed on the collector management service; false indicates that the configuration item is modifiable and can be modified through the collector configuration on the collector management service. The reboot field indicates whether a collector restart is required after configuring this configuration item. If a restart is required, the collector management module restarts the collector after modifying the configuration item. If a restart is not required, the collector management module sends a configuration change notification to the collector after the configuration item is modified.
[0216] In one embodiment, the collector management service can be used to configure the collector through a configuration file. Configuring the collector can include configuring the collector's parameters and configuring the collector's operation. Some collectors need to dynamically adjust their parameters during operation, such as the port the collector needs to monitor or some tuning parameters. The process of configuring the collector's parameters can be as follows: Figure 28 As shown, users can modify the configuration file. The collector management service dynamically generates a configuration page based on the parameter configuration description in the collector. After the user modifies and saves the parameters, the collector management service can save the configuration information, write the modified configuration information to the collector's configuration file, and notify the collector of the parameter change. The collector reloads the configuration file and applies the modified configuration information. The collector management service can also provide feedback to the user on the configuration change results.
[0217] The user can modify the configuration items of each collector in the collector management service to change the behavior of the collector during operation. The process of configuring the operation of the collector can be as follows: Figure 29As shown, the user can obtain the configurable items of the collector from the PMS by obtaining the user management page. The PMS can obtain the configurable items of the collector from the cached collector model and return the configurable items to the user management page. Then, the user can send a configuration request to the PMS through the user management page. The PMS sends the configuration request to the PAS. The PAS can obtain the collector instance from the cache and check the collector status. If the collector is running, the PAS can stop the collector, update the configuration information, and then restart the collector to complete the modification of the collector's configuration items. The PAS can send an update instruction to the DB database. After updating the relevant data of the collector, the DB can send an update success message to the PAS. The PAS can send a configuration success message to the PMS. Then, the PMS can send a configuration success message to the user management page.
[0218] The user management page of the collector can include the configuration page of the collector. The specific configurable content is described by the collector in the configuration file. When the collector management service is loaded, it is displayed in a dynamic form based on the configuration information. The configuration items supported by the collector management service can be shown in the following table:
[0219]
[0220] The collector can be run based on script files, executing executable programs to obtain indicator information corresponding to the target IoT device's metrics. The collector's script files are used to install, uninstall, start, and stop the collector. For example, the collector's script files can be located in the $(root) / script directory, where $(root) represents the collector's root directory. The collector's script files are named install.bat, uninstall.bat, start.bat, and stop.bat in Windows, and install.sh, uninstall.sh, start.sh, and stop.sh in Linux.
[0221] In one embodiment, the process of calling the installation script to install the collector can be as follows: Figure 30 As shown, the installation agent can execute tasks that need to be completed before the installation script (install.bat / install.sh) is started. For example, if you need to configure a firewall policy in Linux, you need to write the corresponding firewall configuration code in the install.sh script. The installation and uninstallation scripts are simultaneously executed by the installation and deployment agent (agent) in the core service. When installing the collector, the installation agent can decompress the collector resource package and then call the installation script to execute the installation task to install the collector.
[0222] Similarly, the start and stop process of the collector based on the script file can be as follows Figure 31 As shown in the figure, the startup script (start.bat / start.sh) and stop script (stop.bat / stop.sh) are started and stopped by the collector management service. After calling the collector's startup script, if the script needs to start the collector, the collector management service can keep the collector in the running state and send heartbeats to the collector management service in a loop. For example, a heartbeat can be sent every 10 seconds. When the collector needs to be stopped, the collector management service can call the stop script (stop.bat / stop.sh) to stop the collector.
[0223] As can be seen, in this embodiment, the collector includes a description file, a configuration file, a script file, and at least one executable program. The description file can be used to describe at least the collector's identifier, the resource type corresponding to the collector, and the target indicators of the IoT devices that the collector can collect. The configuration file can be used to describe the collector's configuration parameters, and the script file can be used to maintain the operation of the collector. The collector management service can be used to configure the collector through the configuration file. Specifically, the collector can be used to run based on the script file and obtain indicator information corresponding to the target indicators of the IoT devices by executing the executable program.
[0224] As one implementation of an embodiment of the present invention, the collector and collector management module can be isolated through process isolation and run as multiple independent processes. The collector includes collection code that directly interacts with the IoT devices to be collected. Based on the access protocols, resource types, and metrics to be collected of the IoT devices to be collected, a preset collector model can be constructed to generate the corresponding collector. In other words, the collector is derived by independently analyzing the frequently changing parts of the collection components.
[0225] Collectors are independent of each other and do not affect each other. The collector management module is a component that manages each independent collector throughout the entire life cycle of the collector. In one embodiment, the collector and the collector management module are isolated through process isolation, and the collector and the collector management module are run through multiple independent processes. Different collectors can also be isolated, so that the developed collectors can be managed in a unified manner, thereby improving the stability of the entire system.
[0226] As can be seen, in this embodiment, the collector and collector management module are isolated through process isolation, running as multiple independent processes. This allows for the isolation of heterogeneous IoT devices to be collected from multiple vendors and protocols. If a problem occurs with a vendor's protocol or device, the anomaly will not spread, while other IoT devices to be collected will be able to detect it normally. This allows for unified management of developed collectors, improving the stability of the entire system.
[0227] As one implementation of an embodiment of the present invention, the collector is developed based on a pre-set collector development library, which encapsulates general development logic corresponding to each collector function. During collector development, the basic principles include distinguishing different collectors based on access protocol, resource type, and metrics to be collected. The metrics to be collected corresponding to the collector management module represent different categories of metric collection items, such as status capability, recording continuity capability, and video quality capability, which are not specifically limited here.
[0228] When a new protocol IoT device is connected, a new collector can be developed for access. When an existing protocol IoT device is connected, a new collector can be developed for access if new indicators are to be collected. The flow chart for developing a collector based on the above basic principles can be as follows: Figure 32 As shown, the new capabilities in the collector management module represent different categories of indicator collection items. The process of developing a collector based on basic principles may include:
[0229] Step 1: When a new device is connected, analyze the device characteristics and access indicators;
[0230] When a new device is connected, the resource type of the newly added IoT device to be collected, the access protocol to the operation and maintenance platform, and the indicators to be collected can be obtained.
[0231] Step 2: Determine whether the existing protocol is capable of access. If so, update the device model list supported by the collector to complete the new device access.
[0232] Determine whether the access protocol for the newly added IoT device to be collected to the operation and maintenance platform is a new protocol. If it is not a new protocol, it means that there may be an existing collector that can perform inspections on the newly added IoT device to be collected. Therefore, it is possible to continue to determine whether the existing collector with the same access protocol as the newly added IoT device to be collected can collect the indicators to be collected corresponding to the resource type of the newly added IoT device to be collected. If the indicators to be collected corresponding to the resource type can be collected, a corresponding relationship between the existing collector and the newly added IoT device to be collected can be established. In one embodiment, the device model of the newly added IoT device to be collected can be added to the device model list of the existing collector.
[0233] For example, the access protocol of the newly added IoT device to be collected to the operation and maintenance platform is protocol P, the resource type is camera, and the indicator to be collected is image brightness. Protocol P is not a new protocol, so it can be determined whether there is an existing collector whose corresponding access protocol is also protocol P that can collect the image brightness captured by the camera. If collector Q can collect the image brightness captured by the camera, the device model of the newly added IoT device to be collected can be connected to the device model list of collector Q to establish a corresponding relationship between the existing collector and the newly added IoT device to be collected.
[0234] Step 3: If not, determine whether it is a new protocol access. If so, develop the corresponding protocol collector to access the device. The device access is completed.
[0235] Step 4: If not, determine whether it is a new capability access. If so, develop a collector for this capability to access the device. The device access is complete.
[0236] If the existing collector cannot collect the indicators to be collected corresponding to the resource type of the newly added IoT device to be collected, or if the access protocol of the newly added IoT device to be collected is a new protocol, it means that the existing collectors are unable to inspect the newly added IoT device to be collected. Then a new collector can be built based on the preset collector model, and a corresponding relationship between the new collector and the newly added IoT device to be collected can be established, where the preset collector model includes the access protocol, resource type and indicators to be collected of the newly added IoT device to be collected.
[0237] For example, the access protocol of the newly added IoT device to be collected to the operation and maintenance platform is protocol P, the resource type is camera, the indicator to be collected is image brightness, protocol P is a new protocol, or protocol P is not a new protocol, but the corresponding access protocol is also protocol P. There is no existing collector that can collect the brightness of the image taken by the camera. In this case, a new collector can be constructed based on the preset collector model, where the preset collector model includes protocol P, camera and image brightness.
[0238] Based on the above basic principles of collector development, the basic principles of collector design can be obtained as follows: Multi-process: that is, the collector management module and collector, as well as different collectors, are isolated through process isolation to improve the stability of the entire system. Model description: that is, by describing the collector, unified management and scalability in development and operation states can be achieved. Therefore, developing the collector based on a preset collector development library that encapsulates the general development logic corresponding to each function of the collector is a stable and efficient development method. It can avoid different developers arbitrarily developing or modifying the collector code, which affects the stability of the original code structure, making the entire inspection system gradually unstable, and affecting the perception quality of the IoT devices to be collected.
[0239] In one embodiment, the preset collector development library is the core dependency library of the collector SDK (Software Development Kit). The preset collector development library can encapsulate the development logic of functions such as heartbeat, obtaining inspection tasks, reporting inspection results, and service query interfaces. The SDK can support both Java and C++ languages. Taking Java collector development as an example, collector development can include the following steps:
[0240] The first step is to develop paf-probe-example, a SpringBoot project that uses Maven for dependency management and relies on paf-probe-core in Pom.xml.
[0241] The second step is to enter the program entry point PafProbeApplication.java. You need to add @Import(ProbeConfig.class) to the class to introduce the core configuration class of the collector. The two beans Pas and Probe can be injected and used in the custom collector. Other beans are not recommended.
[0242] The third step is to introduce ProbeConfig.class, which provides the common collector capabilities of sending heartbeats, including pulling inspection tasks and reporting results. Special collector services require the implementation of TaskProcessor and inject it based on configuration. Note that the name of this bean should be consistent with the corresponding capabilities of the current collector.
[0243] Step 4: After completing business development, you can debug in the IDE.
[0244] Step 5: Encapsulate the collector model file, such as META-INF / probe.xml.
[0245] The sixth step is packaging. Use Maven's package target to package and decompress to obtain the collector resource package.
[0246] As can be seen, in this embodiment, a collector can be developed based on a pre-set collector development library, which encapsulates the common development logic corresponding to each collector function. By standardizing collector development, providing a standard interface and development method, and enabling open development of collectors, this standardizes the integrated semantics of perception and collection of IoT devices to be collected, ensuring non-invasive development and the static stability of the operation and maintenance system, helping developers quickly complete the expansion of new IoT devices and new indicators, and enabling the operation and maintenance system to quickly cover the vast and diverse number of IoT devices to be collected.
[0247] As an implementation method of an embodiment of the present invention, in addition to periodic patrols, the inspection method can also include the Internet of Things devices actively reporting indicator information and alarm messages, and when the collector collects indicator information corresponding to the indicators to be collected from the Internet of Things devices to be collected, the collector can adopt different collection methods according to the different access protocols accessed by the Internet of Things devices.
[0248] For example, if the access protocol is SDK protocol, the collector can directly connect to the IoT device to collect indicator information. The process of IoT devices actively reporting indicator information based on SDK protocol can be as follows: Figure 33 As shown, the process of reporting indicator information may include:
[0249] Step 1: The collector establishes a long connection with the IoT device through the SDK protocol;
[0250] Step 2: Some IoT devices can use the SDK protocol to deploy alarms and subscribe to status;
[0251] Step 3: After the alarm is deployed or the status is subscribed successfully, the IoT device can return an ok message, i.e., an operation success message, to the collector. If the IoT device status changes or an alarm is generated, it will actively send a message notification to the collector through the SDK protocol, that is, it can send real-time status and alarm notifications to the collector;
[0252] Step 4: After receiving the message, the collector assembles the indicator information and other reporting messages, that is, assembles the status reporting message;
[0253] Step 5: The collector calls the status reporting interface of the collector access service to report the status, that is, report indicator information changes and alarm information.
[0254] For another example, the access protocol is an active registration protocol, including national standards, ehome, etc. At this time, the IoT device is generally registered to only one address. The collector can collect indicator information by calling the collector management module and its related driver interface. The process of IoT devices actively reporting indicator information based on the active registration protocol can be as follows: Figure 34 As shown, since IoT devices can generally only be registered in one access component, the device access component can take over this function. Therefore, active protocol IoT devices are more likely to monitor device status events or alarm events of IoT devices and complete timely maintenance of active reporting messages. The process of reporting indicator information may include:
[0255] Step 1: The collector management module provides the component addressing capability. When the collector addresses the event service, it can call the collector access service to obtain the component interface. The collector access service can address the core service and return data.
[0256] The collector can send a request to obtain the time service address to the collector access service. The collector access service sends an addressing time service request to the core service. The core service then returns the event service address to the collector access service. The collector access service returns the event service address to the collector.
[0257] Step 2: After successful addressing, the collector can initiate a subscription to device status events and alarm events to the event service; that is, send a device time subscription instruction to the event service.
[0258] Step 3: The event service pushes events to MQ based on the event content published by the subscription and device management modules;
[0259] Step 4: The collector monitors MQ message changes and can consume device status change events or alarm events. It then assembles a status message and calls the collector access service status reporting interface to report the status, allowing the collector access service to consume device events and process the collection results. After the collector access service obtains the reported status, it can also return an ok message to the collector to inform it that the information was successfully received.
[0260] It can be seen that in this embodiment, according to the different communication protocols accessed by the IoT devices to be collected, the collector can adopt different collection methods to collect the indicators to be collected of the IoT devices to be collected. The IoT devices to be collected can also actively report indicator information and alarm messages. Therefore, in a weak network environment, the device reporting mechanism is adopted to reduce the number of polling times and alleviate the environmental network pressure.
[0261] An embodiment of the present invention further provides an inspection method for an Internet of Things device. The following introduces an inspection method for an Internet of Things device provided by an embodiment of the present invention.
[0262] like Figure 35 As shown, a patrol inspection method for IoT devices is applied to a collector in a patrol inspection system for IoT devices. The system also includes an operation and maintenance platform. The method includes:
[0263] S3501, receiving the corresponding inspection plan;
[0264] Among them, the inspection plan is an inspection plan for the IoT devices to be collected, which is formulated and issued by the operation and maintenance platform based on the resource type of the IoT devices to be collected, the access protocol of the IoT devices to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected. The inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource type of the IoT devices that the collector can collect, the access protocol of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect.
[0265] S3502: Acquire, according to the received inspection plan, indicator information corresponding to the indicator to be collected of the IoT device based on the communication connection with the IoT device to be collected;
[0266] The communication connection is established based on the access protocol of the IoT device to be collected.
[0267] S3503: Report the indicator information to the operation and maintenance platform.
[0268] It can be seen that in the inspection method for IoT devices provided by the embodiment of the present invention, the collector can receive the corresponding inspection plan, and according to the received inspection plan, based on the communication connection with the IoT device to be collected, obtain the indicator information corresponding to the indicators to be collected of the IoT device to be collected, and then report the indicator information to the operation and maintenance platform. Since the inspection plan corresponds to the collection capability of the collector, the collection capability of the collector is determined based on the resource type of the IoT device that the collector can collect, the access protocol of the IoT device that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT device that the collector can collect, the collector can obtain the indicator information corresponding to the indicators to be collected of the IoT device to be collected according to the inspection plan based on the communication connection established by the access protocol of the IoT device to be collected, without having to be deployed on the host of the IoT device, and thus without having to occupy the host resources of the IoT device, thereby performing IoT device inspections without relying on the host resources of the IoT device, thereby improving security and reducing resource waste.
[0269] As an implementation method of the embodiment of the present invention, the above system may further include a collector management module;
[0270] The step of obtaining the indicator information corresponding to the indicator to be collected of the IoT device to be collected based on the communication connection with the IoT device to be collected according to the received inspection plan may include:
[0271] Obtain resource information and inspection tasks of the IoT devices to be collected sent by the collector management module;
[0272] Among them, the resource information is the resource information of the Internet of Things devices to be collected connected to the operation and maintenance platform obtained by the collector management module from the operation and maintenance platform. The resource information includes the resource type of the Internet of Things devices to be collected, the access protocol of the Internet of Things devices to be collected to access the operation and maintenance platform, and the indicators to be collected of the Internet of Things devices to be collected. The inspection task is the inspection task corresponding to the collector determined by the collector management module according to the correspondence between the resource information of the Internet of Things devices to be collected and the inspection plan.
[0273] Based on the communication connection with the IoT device to be collected, obtain the indicator information corresponding to the indicator to be collected indicated by the inspection task;
[0274] Accordingly, the step of reporting the indicator information to the operation and maintenance platform may include:
[0275] Report the indicator information to the collector management module, so that the collector management module reports the indicator information to the operation and maintenance platform.
[0276] As an implementation method of an embodiment of the present invention, the collector management module may include a collector management service and a collector access service, and the collector access service may be connected to the collector;
[0277] The above step of obtaining the resource information and inspection tasks of the IoT devices to be collected sent by the collector management module may include:
[0278] Obtain resource information and inspection tasks of the IoT devices to be collected sent by the collector access service;
[0279] Among them, the inspection task is the inspection task corresponding to the collector determined by the collector access service according to the correspondence between the resource information of the Internet of Things device to be collected and the inspection plan. The resource information and inspection task of the Internet of Things device to be collected are sent to the corresponding collector access service by the collector management service according to the correspondence between the resource information and the collector.
[0280] Accordingly, the step of reporting the indicator information to the collector management module may include:
[0281] Report the indicator information to the collector access service, so that the collector access service reports the indicator information to the operation and maintenance platform.
[0282] As an implementation of an embodiment of the present invention, the above method may further include:
[0283] Report the execution status information of the inspection task to the collector access service, so that the collector access service sends the execution status information of the inspection task to the collector management service, so that the collector management service dispatches the inspection task to other collectors when the execution status information indicates that an abnormality has occurred in the collector.
[0284] As an implementation method of an embodiment of the present invention, the construction method of the above collector may include:
[0285] Obtain the resource type of the newly added IoT device to be collected, the access protocol to the operation and maintenance platform, and the indicators to be collected;
[0286] Determine whether the access protocol for the newly added IoT device to be collected to access the operation and maintenance platform is a new protocol;
[0287] If it is not a new protocol, determine whether an existing collector with the same access protocol as the access protocol of the newly added IoT device to be collected can collect the indicators to be collected corresponding to the resource type;
[0288] If the indicators to be collected corresponding to the resource type can be collected, a corresponding relationship between the existing collector and the newly added IoT device to be collected is established;
[0289] If the corresponding indicators to be collected for the resource type cannot be collected, or,
[0290] If it is a new protocol, a new collector is constructed based on the preset collector model, and a corresponding relationship between the new collector and the newly added IoT devices to be collected is established.
[0291] The preset collector model includes the access protocol, resource type and indicators to be collected of the newly added IoT devices to be collected.
[0292] An embodiment of the present invention further provides an inspection device for an Internet of Things device. The following introduces an inspection device for an Internet of Things device provided by an embodiment of the present invention.
[0293] like Figure 36 As shown, an inspection device for an Internet of Things device is applied to a collector in an inspection system for an Internet of Things device. The system also includes an operation and maintenance platform. The device includes:
[0294] Inspection plan receiving module 3601, used to receive the corresponding inspection plan;
[0295] Among them, the inspection plan is an inspection plan for the IoT devices to be collected, which is formulated and issued by the operation and maintenance platform based on the resource type of the IoT devices to be collected, the access protocol of the IoT devices to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected. The inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource type of the IoT devices that the collector can collect, the access protocol of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect.
[0296] The indicator information acquisition module 3602 is configured to acquire the indicator information corresponding to the indicator to be collected of the IoT device in accordance with the received inspection plan and based on the communication connection with the IoT device to be collected;
[0297] The communication connection is established based on the access protocol of the IoT device to be collected.
[0298] The indicator information reporting module 3603 is used to report the indicator information to the operation and maintenance platform.
[0299] It can be seen that in the inspection device for IoT devices provided by the embodiment of the present invention, the collector can receive the corresponding inspection plan, and according to the received inspection plan, based on the communication connection with the IoT device to be collected, obtain the indicator information corresponding to the indicators to be collected of the IoT device to be collected, and then report the indicator information to the operation and maintenance platform. Since the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource type of the IoT device that the collector can collect, the access protocol of the IoT device that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT device that the collector can collect, the collector can obtain the indicator information corresponding to the indicators to be collected of the IoT device to be collected according to the inspection plan based on the communication connection established by the access protocol of the IoT device to be collected, without having to be deployed on the host of the IoT device, and thus without having to occupy the host resources of the IoT device, thereby performing IoT device inspections without relying on the host resources of the IoT device, thereby improving security and reducing resource waste.
[0300] As an implementation method of the embodiment of the present invention, the above system may further include a collector management module;
[0301] The indicator information acquisition module 3602 may include:
[0302] An inspection task acquisition unit, configured to acquire the resource information and inspection tasks of the IoT devices to be collected sent by the collector management module;
[0303] Among them, the resource information is the resource information of the Internet of Things devices to be collected connected to the operation and maintenance platform obtained by the collector management module from the operation and maintenance platform. The resource information includes the resource type of the Internet of Things devices to be collected, the access protocol of the Internet of Things devices to be collected to access the operation and maintenance platform, and the indicators to be collected of the Internet of Things devices to be collected. The inspection task is the inspection task corresponding to the collector determined by the collector management module according to the correspondence between the resource information of the Internet of Things devices to be collected and the inspection plan.
[0304] The inspection task execution unit is used to obtain indicator information corresponding to the indicator to be collected indicated by the inspection task based on the communication connection with the Internet of Things device to be collected.
[0305] The indicator information reporting module 3603 may include:
[0306] The indicator information reporting unit is used to report the indicator information to the collector management module, so that the collector management module reports the indicator information to the operation and maintenance platform.
[0307] As an implementation method of an embodiment of the present invention, the collector management module may include a collector management service and a collector access service, and the collector access service is connected to the collector;
[0308] The inspection task execution unit may include:
[0309] The inspection task receiving subunit is used to obtain the resource information and inspection tasks of the IoT devices to be collected sent by the collector access service;
[0310] Among them, the inspection task is the inspection task corresponding to the collector determined by the collector access service according to the correspondence between the resource information of the Internet of Things device to be collected and the inspection plan. The resource information and inspection task of the Internet of Things device to be collected are sent to the corresponding collector access service by the collector management service according to the correspondence between the resource information and the collector.
[0311] The above indicator information reporting units include:
[0312] The indicator information sending subunit is used to send the indicator information to the collector access service, so that the collector access service reports the indicator information to the operation and maintenance platform.
[0313] As an implementation manner of the embodiment of the present invention, the above-mentioned device may further include:
[0314] A status information reporting module is used to report the execution status information of the inspection task to the collector access service, so that the collector access service sends the execution status information of the inspection task to the collector management service, so that the collector management service dispatches the inspection task to other collectors when the execution status information indicates that an abnormality has occurred in the collector.
[0315] As an implementation method of an embodiment of the present invention, the construction method of the collector may include:
[0316] Obtain the resource type of the newly added IoT device to be collected, the access protocol to the operation and maintenance platform, and the indicators to be collected;
[0317] Determine whether the access protocol for the newly added IoT device to be collected to access the operation and maintenance platform is a new protocol;
[0318] If it is not a new protocol, determine whether an existing collector with the same access protocol as the access protocol of the newly added IoT device to be collected can collect the indicators to be collected corresponding to the resource type;
[0319] If the indicators to be collected corresponding to the resource type can be collected, a corresponding relationship between the existing collector and the newly added IoT device to be collected is established;
[0320] If the corresponding indicators to be collected for the resource type cannot be collected, or,
[0321] If it is a new protocol, a new collector is constructed based on a preset collector model, and a corresponding relationship between the new collector and the newly added IoT devices to be collected is established, wherein the preset collector model includes the access protocol, resource type and indicators to be collected of the newly added IoT devices to be collected.
[0322] In another embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0323] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute the method steps described in any one of the above embodiments.
[0324] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), etc.
[0325] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0326] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, the method, apparatus, computer-readable storage medium, and computer program product embodiments are generally similar to the system embodiments, so their descriptions are relatively simplified. For related portions, reference can be made to the descriptions of the system embodiments.
[0327] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A patrol inspection system for Internet of Things devices, characterized in that: The system includes a collector and an operation and maintenance platform, wherein: The operation and maintenance platform is used to formulate an inspection plan for the IoT devices to be collected based on the resource type of the IoT devices to be collected, the access protocol of the IoT devices to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected, and issue the inspection plan; The collector is configured to receive a corresponding inspection plan; wherein the inspection plan corresponds to the collection capability of the collector, and the collection capability of the collector is determined based on the resource types of the IoT devices that the collector can collect, the access protocols of the IoT devices that the collector can collect to the operation and maintenance platform, and the indicators to be collected of the IoT devices that the collector can collect; The collector is further configured to obtain, in accordance with the received inspection plan and based on a communication connection with the IoT device to be collected, indicator information corresponding to the indicator to be collected of the IoT device to be collected, and report the indicator information to the operation and maintenance platform, wherein the communication connection is established based on an access protocol of the IoT device to be collected; The collector is constructed in the following manner: constructing a triplet including the access protocol, resource type and indicators to be collected according to the access protocol, resource type and indicators to be collected of the IoT device to be collected, obtaining a collector model, and constructing a collector based on the collector model.
2. The system according to claim 1, wherein: The system also includes a collector management module; The operation and maintenance platform is configured to send resource information and inspection plan information of the IoT devices to be collected, connected to the operation and maintenance platform, to the collector management module; wherein the resource information of the IoT devices to be collected includes the resource type of the IoT devices to be collected, the access protocol for the IoT devices to be collected to the operation and maintenance platform, and the indicators to be collected of the IoT devices to be collected; The collector management module is used to obtain the resource information of the IoT devices to be collected and the inspection plan information, determine the collector corresponding to the inspection plan according to the correspondence between the resource information of the IoT devices to be collected and the inspection plan, generate the inspection task corresponding to the collector, and send the inspection task and the resource information of the IoT devices to be collected to the collector; The collector is specifically configured to obtain resource information of the IoT device to be collected and the inspection task, and based on a communication connection with the IoT device to be collected, obtain indicator information corresponding to the indicator to be collected indicated by the inspection task of the IoT device to be collected, and report the indicator information to the collector management module; The collector management module is further used to report the indicator information to the operation and maintenance platform.
3. The system according to claim 2, characterized in that The collector management module includes a collector management service and a collector access service; the collector access service is connected to the collector; The collector management service is used to obtain the resource information of the IoT device to be collected and the inspection plan information, and send the resource information of the IoT device and the inspection plan information to the corresponding collector access service according to the corresponding relationship between the resource information and the collector; The collector access service is used to determine the collector corresponding to the inspection plan according to the correspondence between the resource information and the inspection plan, generate the inspection task corresponding to the collector, and send the inspection task and the resource information to the collector; The collector access service is further used to obtain indicator information corresponding to the to-be-collected indicator indicated by the inspection task collected by the collector, and report the indicator information to the operation and maintenance platform.
4. The system according to claim 3, characterized in that The collector access service is further used to obtain the execution status information of the inspection task by the collector and send the execution status information of the inspection task to the collector management service; The collector management service is further configured to obtain execution status information of the inspection task, and dispatch the inspection task to other collectors when the execution status information indicates that an abnormality has occurred in the collector.
5. The system according to any one of claims 1 to 4, characterized in that The collector is constructed in the following manner: Obtain the resource type of the newly added IoT device to be collected, the access protocol to the operation and maintenance platform, and the indicators to be collected; Determine whether the access protocol for the newly added IoT device to be collected to access the operation and maintenance platform is a new protocol; If it is not a new protocol, determine whether an existing collector with the same access protocol as the access protocol of the newly added IoT device to be collected can collect the indicators to be collected corresponding to the resource type; If the indicators to be collected corresponding to the resource type can be collected, a corresponding relationship between the existing collector and the newly added IoT device to be collected is established; If the corresponding indicators to be collected for the resource type cannot be collected, or, If it is a new protocol, a new collector is constructed based on a preset collector model, and a corresponding relationship between the new collector and the newly added IoT devices to be collected is established, wherein the preset collector model includes the access protocol, resource type and indicators to be collected of the newly added IoT devices to be collected.
6. A method for inspecting Internet of Things devices, characterized in that: The method is applied to a collector in an inspection system of an Internet of Things device, and the method includes: Receive a corresponding inspection plan, wherein the inspection plan is an inspection plan for the IoT device to be collected, formulated and issued by the operation and maintenance platform based on the resource type of the IoT device to be collected, the access protocol for the IoT device to be collected to access the operation and maintenance platform, and the indicators to be collected of the IoT device to be collected, and the inspection plan corresponds to the collection capability of the collector, which is determined based on the resource type of the IoT device that the collector can collect, the access protocol for the IoT device that the collector can collect to access the operation and maintenance platform, and the indicators to be collected of the IoT device that the collector can collect; According to the received inspection plan, based on a communication connection with the IoT device to be collected, obtaining indicator information corresponding to the indicator to be collected of the IoT device to be collected, wherein the communication connection is established based on an access protocol of the IoT device to be collected; Reporting the indicator information to the operation and maintenance platform; The collector is constructed in the following manner: constructing a triplet including the access protocol, resource type and indicators to be collected according to the access protocol, resource type and indicators to be collected of the IoT device to be collected, obtaining a collector model, and constructing a collector based on the collector model.
7. The method according to claim 6, characterized in that The system also includes a collector management module; The step of acquiring the indicator information corresponding to the indicator to be collected of the IoT device to be collected according to the received inspection plan and based on the communication connection with the IoT device to be collected includes: Obtain resource information and inspection tasks of the IoT devices to be collected sent by the collector management module, wherein the resource information is resource information of the IoT devices to be collected connected to the operation and maintenance platform obtained by the collector management module from the operation and maintenance platform, and the resource information includes resource types of the IoT devices to be collected, access protocols for the IoT devices to be collected to access the operation and maintenance platform, and indicators to be collected of the IoT devices to be collected; the inspection tasks are inspection tasks corresponding to the collectors determined by the collector management module according to the correspondence between the resource information of the IoT devices to be collected and the inspection plan; Based on the communication connection with the IoT device to be collected, obtain the indicator information corresponding to the indicator to be collected indicated by the inspection task; The step of reporting the indicator information to the operation and maintenance platform includes: Report the indicator information to the collector management module, so that the collector management module reports the indicator information to the operation and maintenance platform.
8. The method according to claim 7, characterized in that The collector management module includes a collector management service and a collector access service; the collector access service is connected to the collector; The step of obtaining the resource information and inspection tasks of the IoT devices to be collected sent by the collector management module includes: Obtain the resource information and inspection task of the IoT device to be collected sent by the collector access service, wherein the inspection task is the inspection task corresponding to the collector determined by the collector access service according to the correspondence between the resource information of the IoT device to be collected and the inspection plan, and the resource information and inspection task of the IoT device to be collected are sent to the corresponding collector access service by the collector management service according to the correspondence between the resource information and the collector; The step of reporting the indicator information to the collector management module includes: Report the indicator information to the collector access service, so that the collector access service reports the indicator information to the operation and maintenance platform.
9. The method according to claim 8, characterized in that The method further comprises: Report the execution status information of the inspection task to the collector access service, so that the collector access service sends the execution status information of the inspection task to the collector management service, so that the collector management service dispatches the inspection task to other collectors when the execution status information indicates that an abnormality has occurred in the collector.
10. The method according to any one of claims 6 to 9, characterized in that The collector is constructed in the following manner: Obtain the resource type of the newly added IoT device to be collected, the access protocol to the operation and maintenance platform, and the indicators to be collected; Determine whether the access protocol for the newly added IoT device to be collected to access the operation and maintenance platform is a new protocol; If it is not a new protocol, determine whether an existing collector with the same access protocol as the access protocol of the newly added IoT device to be collected can collect the indicators to be collected corresponding to the resource type; If the indicators to be collected corresponding to the resource type can be collected, a corresponding relationship between the existing collector and the newly added IoT device to be collected is established; If the corresponding indicators to be collected for the resource type cannot be collected, or, If it is a new protocol, a new collector is constructed based on a preset collector model, and a corresponding relationship between the new collector and the newly added IoT devices to be collected is established, wherein the preset collector model includes the access protocol, resource type and indicators to be collected of the newly added IoT devices to be collected.
Citation Information
Patent Citations
Gateway system of things of internet and implementation method thereof
CN106790605A
Operation-maintenance automatic inspection method for fine granularity control and system thereof
CN107195013A