A gateway monitoring and gateway status diagnosis method and related device
By acquiring and managing the process-related data of the data acquisition gateway, the problem that ordinary users have difficulty understanding the gateway state is solved, and the readability and ease of use of the gateway state is realized.
Patent Information
- Application Number
- CN202211281561.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-10-19
AI Technical Summary
Ordinary users or low-level technicians find it difficult to understand the status of the data acquisition gateway through logs, resulting in the inability to detect and locate gateway exceptions in time.
By obtaining the life cycle data, resource usage data and log data related to the data acquisition process and platform communication process of the data acquisition gateway, it is managed and displayed to determine the gateway status.
It improves the readability and ease of use of the data acquisition gateway state, allowing ordinary users or low-level technicians to easily understand the gateway state and promptly detect and locate abnormalities.
Smart Images

Figure CN115580552B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a gateway supervision, gateway status diagnosis method and related devices. Background Art
[0002] The data collection gateway has the ability to collect data from southbound devices and report the collected data to cloud devices in the north. By monitoring the status of the data collection gateway, it is possible to promptly discover whether there are data collection anomalies during the deployment and operation of the data collection gateway, and based on the abnormal status of the data collection gateway, the anomaly can be located.
[0003] Currently, the status of the data acquisition gateway can be determined by viewing the logs of the system and device where the data acquisition gateway is located. However, for ordinary users or some low-level technicians, the readability and usability of the logs are poor, resulting in ordinary users or low-level technicians being unable to know the status of the data acquisition gateway. Summary of the invention
[0004] In view of this, the present application provides a gateway supervision, gateway status diagnosis method and related devices to solve the above technical problems, and its technical solution is as follows:
[0005] A gateway supervision method, comprising:
[0006] Acquire lifecycle data, resource usage data, and first log data related to the data acquisition process of the data acquisition gateway, and manage the acquired data, wherein the data acquisition process refers to the process by which the data acquisition gateway collects data from the southbound device, and the first log data includes log data related to the state change of the data acquisition process and log data related to the collected data;
[0007] Obtain life cycle data, resource usage data, and second log data related to the platform communication process of the data collection gateway, and manage the obtained data, wherein the platform communication process refers to the process in which the data collection gateway reports the data collected from the southbound device to the northbound, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data;
[0008] Among them, the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the status of the data acquisition gateway.
[0009] Optionally, obtaining life cycle data, resource usage data, and first log data related to the data collection process of the data collection gateway includes:
[0010] When the start / stop switch of the data collection process is turned on, obtaining life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway;
[0011] Obtain life cycle data, resource usage data, and second log data related to the platform communication process of the data acquisition gateway, including:
[0012] When the start / stop switch of the platform communication process is turned on, life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway are obtained.
[0013] Optionally, obtaining life cycle data, resource usage data, and first log data related to the data collection process of the data collection gateway, and obtaining life cycle data, resource usage data, and second log data related to the platform communication process of the data collection gateway include:
[0014] In response to the instruction to turn on the start / stop switch of the monitoring daemon process, the life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway are obtained, and the life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway are obtained, wherein the monitoring daemon process is used to perform health protection on the data acquisition process and the platform communication process, and restart the abnormally interrupted process when the data acquisition process and / or the platform communication process are abnormally interrupted.
[0015] Optionally, also include:
[0016] Obtain summary information of the data collection process, platform communication process and monitoring daemon process, wherein the summary information of a process includes one or more of the following information: life cycle data related to the process, resource usage data, message queue telemetry transmission MQTT connection and heartbeat data indicating whether the process is running normally, version information of the process and running time of the process; life cycle data related to a process includes one or more of the following data: process status, process status change time, process ID, process exit code and exit message; resource usage data related to a process includes one or more of the following data: CPU usage data, memory usage data and disk usage data of the process;
[0017] Obtain resource usage data of the server where the data collection gateway is located;
[0018] The acquired summary information and resource usage data of the server where the data acquisition gateway is located are displayed on the front-end page.
[0019] Optionally, also include:
[0020] During the operation of the monitoring daemon process, determine the trend curve of the capacity of the database corresponding to the data acquisition gateway over time;
[0021] In response to the instruction to enter the details page of the monitoring daemon, the trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time is displayed on the front-end page.
[0022] Optionally, the target log data includes multiple log data, and each of the multiple log data consists of data generation time, data level and data title;
[0023] Multiple log data are displayed in order from recent to oldest.
[0024] The target log data is the first log data or the second log data.
[0025] A gateway monitoring device comprises: a process management unit;
[0026] The process management unit includes a data acquisition process management unit and a platform communication process management unit;
[0027] A data collection process management unit, used to obtain life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway, and manage the obtained data, wherein the data collection process refers to the process of the data collection gateway collecting data from the southbound device, and the first log data includes log data related to the state change of the data collection process and log data related to the collected data;
[0028] The platform communication process management unit is used to obtain life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, and manage the obtained data, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data;
[0029] Among them, the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the status of the data acquisition gateway.
[0030] A gateway status diagnosis method, comprising:
[0031] Obtain life cycle data, resource usage data, and first log data related to a data collection process of a data collection gateway, wherein the data collection process refers to a process in which the data collection gateway collects data from southbound devices, and the first log data includes log data related to a state change of the data collection process and log data related to the collected data;
[0032] Obtain life cycle data, resource usage data, and second log data related to the platform communication process of the data acquisition gateway, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound direction, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reporting data;
[0033] The state of the data collection gateway is determined based on the life cycle data, resource usage data and first log data related to the data collection process, and the life cycle data, resource usage data and second log data related to the platform communication process.
[0034] A gateway status diagnosis device, comprising:
[0035] A first data acquisition unit is used to acquire life cycle data, resource usage data and first log data related to a data acquisition process of a data acquisition gateway, wherein the data acquisition process refers to a process in which the data acquisition gateway collects data from southbound devices, and the first log data includes log data related to a state change of the data acquisition process and log data related to the collected data;
[0036] A second data acquisition unit is used to acquire life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data;
[0037] The gateway status diagnosis unit is used to determine the status of the data acquisition gateway based on the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process.
[0038] A gateway monitoring system, comprising: a gateway monitoring device and a data collection gateway;
[0039] The data collection gateway is used to collect data from southbound devices through the data collection process, and report the data collected from the southbound devices to the cloud devices through the platform communication process;
[0040] The gateway monitoring device is used to implement any of the above-mentioned gateway monitoring methods during the process of data collection and reporting by the data collection gateway.
[0041] Through the above technical solutions, it can be known that the gateway supervision method provided by the present application can obtain the life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway, and manage the obtained data, and can obtain the life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, and manage the obtained data. The life cycle data, resource usage data and first log data related to the data acquisition process obtained by the present application, as well as the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the state of the data acquisition gateway. Since the data obtained by the present application is more readable and easy to use, the state of the data acquisition gateway can be easily determined based on the data obtained by the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0043] Figure 1 A schematic diagram of a flow chart of a gateway monitoring method provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of a front-end page containing summary information of the process and resource usage data of the server where the data collection gateway is located;
[0045] Figure 3 A schematic diagram of the structure of a gateway monitoring device provided in an embodiment of the present application;
[0046] Figure 4 A schematic diagram of the structure of the gateway monitoring system provided in the embodiment of the present application;
[0047] Figure 5 A schematic diagram of a flow chart of a gateway status diagnosis method provided in an embodiment of the present application;
[0048] Figure 6 A schematic diagram of the structure of a gateway status diagnosis device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The present application provides a gateway supervision method, which will be described in detail through the following embodiments.
[0051] See also Figure 1 , shows a schematic diagram of the process of the gateway supervision method provided in an embodiment of the present application, and the gateway supervision method may include:
[0052] Step S101, obtain life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway, and manage the obtained data; and obtain life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, and manage the obtained data.
[0053] Among them, the data collection process refers to the process in which the data collection gateway collects data from the southbound device. The first log data includes log data related to the state change of the data collection process and log data related to the collected data. The platform communication process refers to the process in which the data collection gateway reports the data collected from the southbound device to the northbound. The second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data. The life cycle data, resource usage data and first log data related to the data collection process, as well as the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the state of the data collection gateway.
[0054] In this embodiment, the status of the process includes but is not limited to the following statuses: running, stopped (eg, abnormally stopped), closed, and started.
[0055] Specifically, the data acquisition gateway can collect data from the southbound device in the southbound direction, and can upload the collected data to the cloud device in the northbound direction. Here, the data acquisition gateway collects data in the southbound direction through the data acquisition process, and uploads data to the cloud device in the northbound direction through the platform communication process. Therefore, by supervising the data related to the data acquisition process and the platform communication process, the gateway status can be determined based on the supervised data. Optionally, the gateway status can be, for example: ready state, restart state, abnormal state, etc.
[0056] The "supervision" in the above-mentioned "regulation" specifically refers to: monitoring the data related to the data collection process and the platform communication process to obtain the data related to the data collection process and the platform communication process; the "management" specifically refers to: managing the data related to the acquired data collection process and the platform communication process.
[0057] In an optional embodiment, the data related to the data collection process supervised in this step includes at least the following data: life cycle data related to the data collection process, resource usage data and first log data.
[0058] The life cycle data here refers to data reflecting the life cycle of the data collection process. Optionally, the life cycle data related to the data collection process includes one or more of the following data: the state of the data collection process, the change time of the process state, the process identifier, the process exit code and exit message. The exit code of the process refers to the identification code that characterizes the exit of the data collection process, and the exit message refers to a message that describes the exit of the data collection process in words. For example, if the data collection process exits normally, the exit code is 1, and the exit message is "the data collection process exits normally". If the data collection process exits abnormally, the exit code (also called error code) is 0, and the exit message is "the data collection process exits abnormally".
[0059] Of course, the above exit codes and exit messages are only examples. In actual applications, the exit situation may include a variety of situations (for example, there are more than 10 exit situations that can be implemented currently), and this embodiment does not make specific limitations.
[0060] Optionally, when the life cycle data related to the data collection process includes the change time of the process status, each life cycle data can be displayed in order from recent to ancient change time; optionally, the life cycle data related to the data collection process can also be stored in a list format for user viewing.
[0061] The resource usage data related to the above-mentioned data collection process refers to data reflecting the resources occupied by the data collection process. Optionally, the resource usage data related to the data collection process includes one or more of the following data: CPU usage data, memory usage data and disk usage data of the data collection process.
[0062] The first log data includes log data related to the state change of the data collection process and log data related to the collected data. Specifically, each time the state of the data collection process changes, a related log data is generated, and each time the data collection process collects data, a log data related to the collected data can also be generated, that is, the first log data includes multiple log data.
[0063] Optionally, each of the multiple log data included in the first log data consists of data generation time, data level and data title. Here, the data level of a log data reflects the alarm level of the log data, wherein the data level of the log data generated when the data collection process is abnormal is higher than the data level of the log data generated when the data collection process is normal, and the data level of the log data generated when the collected data is abnormal is higher than the data level of the log data generated when the data is collected normally; the data title of a log data is a brief introduction to the log data.
[0064] Optionally, when the first log data includes multiple log data, each log data can be displayed in order from recent to oldest data generation time; optionally, the first log data related to the data collection process can also be stored in a list format for user viewing.
[0065] Similar to the data related to the data collection process, in another optional embodiment, the data related to the platform communication process supervised in this step includes at least the following data: life cycle data, resource usage data and second log data related to the platform communication process.
[0066] The life cycle data here refers to data reflecting the life cycle of the platform communication process. Optionally, the life cycle data related to the platform communication process includes one or more of the following data: the status of the platform communication process, the change time of the process status, the process identifier, the process exit code and exit message. The exit code of the process refers to the identifier code representing the exit status of the platform communication process, and the exit message refers to a message that describes the exit status of the platform communication process in words.
[0067] In actual applications, the exit situations of the platform communication may include multiple situations (for example, there are more than 10 exit situations that can be realized currently), which are not specifically limited in this embodiment.
[0068] Optionally, when the lifecycle data related to the platform communication process includes the change time of the process status, each lifecycle data can be displayed in order of change time from recent to ancient; optionally, the lifecycle data related to the platform communication process can also be stored in a list format for user viewing.
[0069] The resource usage data related to the above-mentioned platform communication process refers to data reflecting the resources occupied by the platform communication process. Optionally, the resource usage data related to the platform communication process includes one or more of the following data: CPU usage data, memory usage data and disk usage data of the platform communication process.
[0070] The second log data includes log data related to the status change of the platform communication process and log data related to the northbound reporting data. Specifically, each time the status of the platform communication process changes, a related log data is generated, and each time the platform communication process reports data, a log data related to the reported data can also be generated, that is, the second log data includes multiple log data.
[0071] Optionally, each of the multiple log data included in the second log data consists of data generation time, data level and data title. For the introduction of data level and data title, please refer to the introduction in the first log data above, which will not be repeated here.
[0072] Optionally, when the second log data includes multiple log data, each log data can be displayed in order from recent to ancient data generation time; optionally, the second log data related to the platform communication process can also be stored in a list format for user viewing.
[0073] It should be noted that the specific data included in the lifecycle data, log data (i.e., the first log data and the second log data) and resource usage data related to the above two processes are only examples. In addition, other specific data may be included, and this application does not make specific limitations on this.
[0074] In summary, the gateway supervision method provided by the present application can obtain the life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway, and manage the obtained data, and can obtain the life cycle data, resource usage data and second log data related to the platform communication process of the data collection gateway, and manage the obtained data. The life cycle data, resource usage data and first log data related to the data collection process obtained by the present application, as well as the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the status of the data collection gateway. Since the data obtained by the present application is more readable and easy to use, the status of the data collection gateway can be easily determined based on the data obtained by the present application.
[0075] In one embodiment of the present application, considering that in some scenarios it may not be necessary to supervise the process-related data of gateway data collection (i.e., collecting data from southbound devices) and data uploading (i.e., reporting data to cloud devices), for this purpose, this embodiment can set start-stop switches for the data collection process and the platform communication process respectively, so that the user can turn on or off the start-stop switch corresponding to the data collection process and / or the platform communication process according to actual needs, so as to obtain the data related to the corresponding process when it is turned on, and no longer obtain the data related to the corresponding process when it is turned off.
[0076] That is, optionally, the process of "obtaining life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway" in step S101 may include: when the start / stop switch of the data acquisition process is turned on, obtaining the life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway; correspondingly, the process of "obtaining life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway" in step S101 may include: when the start / stop switch of the platform communication process is turned on, obtaining the life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway.
[0077] This embodiment can supervise the data related to the corresponding process only when the data collection process and / or the platform communication process is started, which meets the diverse needs of users and is more user-friendly.
[0078] In another embodiment of the present application, the present embodiment further includes a monitoring daemon process for health protection of the data collection process and the platform communication process, the monitoring daemon process refers to the process required for the operation of the gateway monitoring device, which can be run as a Windows service and automatically started when the operating system is turned on. The gateway monitoring device (which can be regarded as a dashboard of the Internet of Things IOT product on the edge side) refers to a device that executes the gateway monitoring method provided in the embodiment of the present application.
[0079] The above-mentioned “health protection” includes: when the data collection process and / or platform communication process is abnormally interrupted, the abnormally interrupted process will be restarted.
[0080] Optionally, the present embodiment may set a start / stop switch for the monitoring daemon process. Only when the user turns on the start / stop switch corresponding to the monitoring daemon process can the monitoring daemon process (i.e., the gateway monitoring device) run, and the present embodiment may obtain data related to the data acquisition process and the platform communication process, that is, the process of step S101 "obtaining life cycle data, resource usage data, and first log data related to the data acquisition process of the data acquisition gateway" and "obtaining life cycle data, resource usage data, and second log data related to the platform communication process of the data acquisition gateway" may include: responding to the instruction to turn on the start / stop switch of the monitoring daemon process, obtaining the life cycle data, resource usage data, and first log data related to the data acquisition process of the data acquisition gateway, and obtaining the life cycle data, resource usage data, and second log data related to the platform communication process of the data acquisition gateway.
[0081] That is, this embodiment monitors the data related to the data collection process and the platform communication process only when the gateway monitoring device is started and running.
[0082] In another embodiment of the present application, the gateway supervision method provided in this embodiment further includes the following steps S102 based on the above embodiments.
[0083] Step S102, obtain summary information of the data acquisition process, platform communication process and monitoring daemon process, and obtain resource usage data of the server where the data acquisition gateway is located, and display the obtained summary information and resource usage data of the server where the data acquisition gateway is located on the front-end page.
[0084] Among them, the summary information of a process includes one or more of the following information: life cycle data related to the process, resource usage data, message queue telemetry transmission MQTT connection and heartbeat data indicating whether the process is running normally, version information of the data acquisition gateway and the running time of the process (preferably, the running time refers to the effective running time); the life cycle data related to a process includes one or more of the following data: process status, process status change time, process identifier, process exit code and exit message; the resource usage data related to a process includes one or more of the following data: CPU usage data, memory usage data and disk usage data of the process.
[0085] Of course, the above summary information is only an example, and other information may also be included, such as the most recent startup time.
[0086] Optionally, in this embodiment, "displaying the acquired summary information on the front-end page" includes: displaying the summary information of the data acquisition process, the platform communication process and the monitoring daemon process acquired at the current moment on the front-end interface respectively.
[0087] Optionally, if the resource usage data of the server where the data acquisition gateway is located is CPU usage data or memory usage data, then the present embodiment of "displaying the resource usage data of the server where the data acquisition gateway is located on the front-end page" includes: during the operation of the monitoring daemon process, a trend curve of the resource usage data of the server where the data acquisition gateway is located changing over time is displayed on the front-end page.
[0088] Take the resource usage data of the server where the data collection gateway is located, including system CPU usage data, memory usage data, and disk usage data, as an example. Figure 2 The diagram shown is a front-end page containing summary information of the process and resource usage data of the server where the data acquisition gateway is located.
[0089] Figure 2It shows the system CPU usage data (i.e., the CPU usage data of the server where the data collection gateway is located) and system memory usage data (i.e., the memory usage data of the server where the data collection gateway is located) from 10:40 to 10:45, as well as the disk usage of the server at the current time (10:45).
[0090] at the same time, Figure 2 The summary information of the data acquisition process, platform communication process and monitoring daemon process is shown. Taking the data acquisition process as an example, "Running" means that the data acquisition process is in the running state at the current moment, "11 minutes and 53 seconds" means that the data acquisition process has currently run for 11 minutes and 53 seconds, "V1.3.1185 process" indicates the version information of the data acquisition process, that is, the version information of the gateway monitoring device, "CPU: 0.00%" indicates that the CPU usage data of the data acquisition process at the current moment is 0.00%, "Memory: 0.09%" indicates that the memory usage data of the data acquisition process at the current moment is 0.09%, "14.0M" indicates that the disk usage data of the data acquisition process at the current moment is 14.0M, "MQTT connected heartbeat normal" is the MQTT connection and heartbeat data, which indicates that the data acquisition process is running normally, and "Last start: 2020-12-03 10:36:58" indicates that the data acquisition process was last started at 10:36:58 on December 3, 2020.
[0091] Optional, such as Figure 2 As shown, this embodiment also provides a "Details" entrance for the data collection process, platform communication process, and monitoring daemon process. The user can enter the front-end page of the corresponding process by clicking "Details". This embodiment can display data related to the corresponding process on the front-end page of the corresponding process, such as the life cycle data, resource usage data, and log data obtained in step S101. Here, the page of resource usage data related to the corresponding process displayed on the front-end page is the same as Figure 2 Similarly, this embodiment will not be described again.
[0092] It is worth noting that the front-end page of the monitoring daemon process will also display the trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time. That is, the gateway supervision method provided in this embodiment can also determine the trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time during the operation of the monitoring daemon process, and respond to the instruction to enter the details page of the monitoring daemon process to display the trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time on the front-end page (i.e., the details page).
[0093] Optionally, in this embodiment, each of the front-end pages mentioned above is compiled by the react-based front-end and called a static resource, and supervises the monitoring daemon process. Since the static front-end page compiled by react technology is a prior art, it will not be described in detail in this patent.
[0094] In summary, this embodiment can display the summary information of each process and the resource usage data of the server where the data acquisition gateway is located on the front-end interface, so that users can quickly determine whether the data acquisition gateway is in an abnormal state based on the summary information of each process and the resource usage data of the server where the data acquisition gateway is located, and can quickly diagnose the abnormal location of the data acquisition gateway. For example, if the summary information of the data acquisition process displays "MQTT not connected, heartbeat abnormal", it can be judged that the data acquisition process of the data acquisition gateway is abnormal, that is, the current data acquisition gateway cannot collect data normally due to the abnormal data acquisition process.
[0095] At the same time, by entering the details page of each process, you can see the data related to each process. Based on this data, you can also quickly diagnose the abnormal location of the data acquisition gateway. For example, if the memory usage data of the data acquisition process is greater than the memory threshold of normal data collection, it can be determined that the current data acquisition gateway cannot collect data normally due to insufficient memory.
[0096] The present application also provides a gateway monitoring device. Figure 3 , shows a schematic diagram of the structure of the gateway monitoring device provided in an embodiment of the present application, such as Figure 3 As shown, the gateway monitoring device may include: a process management unit 301 , and the process management unit 301 may include a data collection process management unit 3011 and a platform communication process management unit 3012 .
[0097] The data collection process management unit 3011 is used to obtain life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway, and manage the obtained data, wherein the data collection process refers to the process of the data collection gateway collecting data from the southbound device, and the first log data includes log data related to the state change of the data collection process and log data related to the collected data;
[0098] The platform communication process management unit 3012 is used to obtain life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, and manage the obtained data, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data;
[0099] Among them, the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the status of the data acquisition gateway.
[0100] The working principle of the gateway monitoring device provided in the embodiment of the present application is the same as the working principle of the gateway monitoring method described above. For details, please refer to the introduction in the aforementioned gateway monitoring method, which will not be repeated here.
[0101] Corresponding to the aforementioned gateway monitoring method and device, the present application also provides a gateway monitoring system, such as Figure 4 As shown, the gateway supervision system includes a gateway supervision device 41 and a data collection gateway 42 .
[0102] Specifically, the data collection gateway 42 is used to collect data from the southbound device through the data collection process, and report the data collected from the southbound device to the cloud device through the platform communication process;
[0103] The gateway monitoring device 41 is used to implement the gateway monitoring method in the above embodiment during the process of the data collection gateway collecting and reporting data.
[0104] More specifically, the gateway monitoring device 41 includes at least a data acquisition process management module 411 and a platform communication process management module 412, wherein the data acquisition process management module 411 can be used to obtain life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway, and manage the acquired data, and the platform communication process management module 412 can be used to obtain life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, and manage the acquired data.
[0105] Optionally, the data acquisition process management module 411 includes a start / stop switch for the data acquisition process, and the start / stop management of the data acquisition process can be implemented through the start / stop switch; optionally, the platform communication process management module 412 may include a start / stop switch for the platform communication process, and the start / stop management of the platform communication process can be implemented through the start / stop switch.
[0106] Optionally, the gateway monitoring device provided by the present application may also include a monitoring daemon management module 413 .
[0107] Optionally, the monitoring daemon process management module 413 can be used to obtain life cycle data, resource usage data and third log data related to the monitoring daemon process of the gateway monitoring device, and obtain system parameter data. Among them, the life cycle data and resource usage data related to the monitoring daemon process are similar to the life cycle data and resource usage data related to the aforementioned data collection process, and the details can be referred to the aforementioned introduction, which will not be repeated here.
[0108] The third log data is similar to the aforementioned first log data and second log data. The only difference is that the third log data only includes log data related to the status changes of the monitoring daemon process. Therefore, the third log data can also refer to the introduction in the aforementioned first log data and second log data, which will not be repeated here.
[0109] The above-mentioned system parameter data refers to attribute data related to the operation of the gateway monitoring device 41. For example, the system parameter data may be: data describing the operating environment of the data acquisition process and / or the platform communication process and / or the monitoring daemon process, the IP address (Internet Protocol Address) of the data acquisition gateway, the status of the overall link, the retention time of the first log data and / or the second log data and / or the third log data, the retention time of the process-related data obtained in this application, etc.
[0110] Optionally, the monitoring daemon process management module 413 includes a start / stop switch for the monitoring daemon process, and the start / stop switch can be used to implement the start / stop management of the monitoring daemon process. When the start / stop switch is turned on, the gateway monitoring device 41 can operate, that is, it can monitor the data related to the data collection process and the platform communication process; when the start / stop switch is turned off, the gateway monitoring device 41 cannot monitor the data related to the data collection process and the platform communication process.
[0111] Optionally, the monitoring daemon management module 413 can also graphically display the trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time. Specifically, the monitoring daemon management module 413 can be used to determine the trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time during the operation of the monitoring daemon, and respond to the instruction to enter the details page of the monitoring daemon to display the trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time on the front-end page.
[0112] Optionally, the gateway monitoring device provided in the present application may also include a data visualization module 414 (this application may also be referred to as a Dashboard module), which can be used to obtain summary information of the data acquisition process, platform communication process and monitoring daemon process, and obtain resource usage data of the server where the data acquisition gateway is located, as well as display the obtained summary information and resource usage data of the server where the data acquisition gateway is located on the front-end page.
[0113] Optionally, the data visualization module 414 may also provide detailed information about the data collection process, the platform communication process, and the monitoring daemon process.
[0114] In summary, the functional implementation of the above-mentioned data visualization module 414, data acquisition process management module 411, platform communication process management module 412 and monitoring daemon process management module 413 is summarized as shown in Table 1 below.
[0115] Table 1 Functional modules and function descriptions included in the gateway monitoring device
[0116]
[0117]
[0118]
[0119] As introduced above, the function of the gateway monitoring device 41 provided in this application is to manage the process life cycle, manage related service processes and programs, and provide detailed settings for various situations including the first startup of the northbound service, manual stop, northbound restart, manual start, system upgrade, and exit, and management of the CPU, memory, and disk monitoring of the process running; as well as various detailed settings for the creation and startup of the south-bound local system, connection of the local system driver, manual restart, manual shutdown, manual start, system upgrade, and process exit, and management of the CPU, memory, and disk monitoring of the process running.
[0120] Optionally, after the gateway monitoring device 41 is installed, the present application can support the client to access the above-mentioned web front-end interface through a browser.
[0121] It should be noted that, in the above-mentioned gateway supervision system, the gateway supervision device 41 is a device independent of the data collection gateway 42. Optionally, in the present application, the gateway supervision device 41 can also be set in the data collection gateway 42.
[0122] Through the above-mentioned gateway monitoring system, especially the gateway monitoring device 41, the present application can rescue the operation and maintenance personnel of the data acquisition gateway 42 from the complex and tedious log analysis tasks. The gateway monitoring device 41 can intuitively and concisely reflect the current operating status and error conditions of the data acquisition gateway, and help the operation and maintenance personnel to achieve timely diagnosis when deploying the data acquisition gateway and ordinary users to use the data acquisition gateway, thereby providing a strong guarantee for the safe and stable operation of data acquisition.
[0123] At the same time, this application also lowers the technical capability threshold requirements for operation and maintenance personnel. They do not need to have high technical literacy to complete log analysis and problem location, saving talent training costs and manpower investment costs.
[0124] Based on the gateway monitoring method, device and system introduced above, in order to more intuitively determine the gateway status, the present application also provides a gateway status diagnosis method and device.
[0125] First, the gateway status diagnosis method provided by the present application is described in detail through the following embodiments. Figure 5 , is a flow chart of a gateway status diagnosis method provided in an embodiment of the present application, and the gateway status diagnosis method may include:
[0126] Step S501, obtaining life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway, and obtaining life cycle data, resource usage data and second log data related to the platform communication process of the data collection gateway.
[0127] Among them, the data collection process refers to the process in which the data collection gateway collects data from the southbound device. The first log data includes log data related to the state change of the data collection process and log data related to the collected data. The platform communication process refers to the process in which the data collection gateway reports the data collected from the southbound device to the northbound. The second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data.
[0128] The process of this step corresponds to the introduction in the aforementioned gateway supervision method, device and system. For details, please refer to the previous introduction and will not be repeated here.
[0129] Step S502: Determine the state of the data collection gateway according to the life cycle data, resource usage data and first log data related to the data collection process, and the life cycle data, resource usage data and second log data related to the platform communication process.
[0130] The gateway status diagnosis method provided in the present application can obtain data related to the data acquisition process and the platform communication process, and can determine the status of the data acquisition gateway based on the acquired data, so that the user does not need to determine the gateway status by himself, saving the user's time and providing a better user experience.
[0131] This application also provides a gateway status diagnosis device, see Figure 6 , shows a schematic diagram of the structure of the gateway status diagnosis device provided in an embodiment of the present application, such as Figure 6 As shown, the gateway status diagnosis device may include: a first data acquisition unit 601 , a second data acquisition unit 602 and a gateway status diagnosis unit 603 .
[0132] The first data acquisition unit 601 is used to obtain life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway, wherein the data acquisition process refers to the process by which the data acquisition gateway collects data from the southbound device, and the first log data includes log data related to the state change of the data acquisition process and log data related to the collected data.
[0133] The second data acquisition unit 602 is used to obtain life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound direction, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data.
[0134] The gateway status diagnosis unit 603 is used to determine the status of the data acquisition gateway based on the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process.
[0135] The working principle of the gateway status diagnosis device provided in the embodiment of the present application is the same as the working principle of the gateway status diagnosis method described above. For details, please refer to the introduction of the aforementioned gateway status diagnosis method, which will not be repeated here.
[0136] Finally, it should be noted that, in this article, relational terms such as and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0137] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0138] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A gateway supervision method, characterized in that: include: Acquire life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway, and manage the acquired data, wherein the data acquisition process refers to the process of the data acquisition gateway collecting data from the southbound device, and the first log data includes log data related to the state change of the data acquisition process and log data related to the collected data; Acquire life cycle data, resource usage data, and second log data related to the platform communication process of the data acquisition gateway, and manage the acquired data, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data; Among them, the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the status of the data acquisition gateway.
2. The gateway supervision method according to claim 1, characterized in that: The step of obtaining life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway includes: When the start / stop switch of the data collection process is turned on, obtaining life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway; The obtaining of life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway includes: When the start / stop switch of the platform communication process is turned on, life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway are obtained.
3. The gateway supervision method according to claim 2, characterized in that: The step of obtaining life cycle data, resource usage data, and first log data related to the data collection process of the data collection gateway, and the step of obtaining life cycle data, resource usage data, and second log data related to the platform communication process of the data collection gateway include: In response to the instruction to turn on the start / stop switch of the monitoring daemon process, the life cycle data, resource usage data and first log data related to the data acquisition process of the data acquisition gateway are obtained, and the life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway are obtained, wherein the monitoring daemon process is used to perform health protection on the data acquisition process and the platform communication process, and restart the abnormally interrupted process when the data acquisition process and / or the platform communication process are abnormally interrupted.
4. The gateway supervision method according to claim 3, characterized in that: Also includes: Obtain summary information of the data collection process, the platform communication process and the monitoring daemon process, wherein the summary information of a process includes one or more of the following information: life cycle data related to the process, resource usage data, message queue telemetry transmission MQTT connection and heartbeat data indicating whether the process is running normally, version information of the process and running time of the process; life cycle data related to a process includes one or more of the following data: process status, process status change time, process identifier, process exit code and exit message; resource usage data related to a process includes one or more of the following data: CPU usage data, memory usage data and disk usage data of the process; Obtain resource usage data of the server where the data acquisition gateway is located; The acquired summary information and resource usage data of the server where the data acquisition gateway is located are displayed on the front-end page.
5. The gateway supervision method according to claim 4, characterized in that: Also includes: During the operation of the monitoring daemon process, determining a trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time; In response to an instruction to enter the details page of the monitoring daemon process, a trend curve of the capacity of the database corresponding to the data acquisition gateway changing over time is displayed on the front-end page.
6. The gateway monitoring method according to claim 1, characterized in that: The target log data includes a plurality of log data, each of which consists of a data generation time, a data level and a data title; The multiple log data are displayed in order from recent to oldest. The target log data is the first log data or the second log data.
7. A gateway monitoring device, characterized in that: include: Process management unit; The process management unit includes a data acquisition process management unit and a platform communication process management unit; The data collection process management unit is used to obtain life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway, and manage the obtained data, wherein the data collection process refers to the process of the data collection gateway collecting data from the southbound device, and the first log data includes log data related to the state change of the data collection process and log data related to the collected data; The platform communication process management unit is used to obtain life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, and manage the obtained data, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data; Among them, the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process are used to determine the status of the data acquisition gateway.
8. A gateway status diagnosis method, characterized in that: include: Acquire life cycle data, resource usage data and first log data related to the data collection process of the data collection gateway, wherein the data collection process refers to the process by which the data collection gateway collects data from southbound devices, and the first log data includes log data related to the state change of the data collection process and log data related to the collected data; Acquire life cycle data, resource usage data, and second log data related to the platform communication process of the data acquisition gateway, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound direction, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reporting data; The state of the data acquisition gateway is determined based on the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process.
9. A gateway status diagnostic device, characterized in that: include: A first data acquisition unit is used to acquire life cycle data, resource usage data and first log data related to a data acquisition process of a data acquisition gateway, wherein the data acquisition process refers to a process in which the data acquisition gateway collects data from southbound devices, and the first log data includes log data related to a state change of the data acquisition process and log data related to the collected data; A second data acquisition unit is used to acquire life cycle data, resource usage data and second log data related to the platform communication process of the data acquisition gateway, wherein the platform communication process refers to the process in which the data acquisition gateway reports the data collected from the southbound device to the northbound, and the second log data includes log data related to the state change of the platform communication process and log data related to the northbound reported data; The gateway status diagnosis unit is used to determine the status of the data acquisition gateway based on the life cycle data, resource usage data and first log data related to the data acquisition process, and the life cycle data, resource usage data and second log data related to the platform communication process.
10. A gateway monitoring system, characterized in that: include: Gateway monitoring equipment and data collection gateway; The data acquisition gateway is used to collect data from the southbound device through the data acquisition process, and report the data collected from the southbound device to the cloud device through the platform communication process; The gateway monitoring device is used to implement the gateway monitoring method according to any one of claims 1 to 6 during the process of the data collection gateway collecting and reporting data.
Citation Information
Patent Citations
Media gateway detection method and device and readable storage medium
CN110798460A
Business process monitoring method and device of edge intelligent gateway and storage medium
CN111090562A