Equipment online monitoring method and device, electronic equipment and medium

By using a circular array to record the heartbeat information of the device in the device management system, the problem of difficulty in monitoring the equipment online status is solved, real-time monitoring and processing is realized, and system stability and reliability are improved.

CN119728501AActive Publication Date: 2025-03-28CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411754505.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-28
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Due to the huge number of equipment, it is difficult to monitor the online status of the equipment in real time, resulting in difficulty in management and maintenance, and it is impossible to respond to equipment failures in a timely manner.

Method used

The loop array is used to record the heartbeat information of the device, update the current element of the loop array every second, and update the value of the loop array element according to the current number of heartbeats, and monitor the device status in real time.

Benefits of technology

Real-time monitoring and processing of device status is realized, the intelligence of device management is enhanced, and the stability and reliability of the system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728501A_ABST
    Figure CN119728501A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an equipment online monitoring method and device, electronic equipment and a medium, and the method comprises the steps: obtaining the heartbeat number and the value of a cyclic array element in the heartbeat information sending process of equipment, and recognizing the state and the historical state of the equipment according to the information. And then, determining a target equipment state updating strategy according to the identified state information and the heartbeat cycle. And finally, executing the processing strategies to ensure that the state of the equipment can accurately reflect the actual state of the equipment. According to the embodiment of the invention, the operation process of equipment state monitoring is simplified, and more efficient and reliable monitoring experience is provided for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment online monitoring, and in particular to an equipment online monitoring method, device, electronic equipment and medium. Background Art

[0002] With the development of science and technology, the application scope of computer technology is expanding day by day, and more and more devices are connected to the Internet and interact with other devices or systems. However, due to the huge number of devices, they may be disconnected due to various faults during operation, making it difficult to manage and unable to dynamically monitor the online status of devices, which brings inconvenience and trouble to users. Summary of the invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a method, apparatus, electronic device and medium for online monitoring of equipment that overcome the above problems or at least partially solve the above problems.

[0004] In order to solve the above problems, an embodiment of the present invention discloses a method for online monitoring of equipment, comprising:

[0005] Configure loop array;

[0006] Updating the current element of the loop array once per second, and determining the current number of heartbeats received from the device;

[0007] If the current number of heartbeats is greater than 0, obtain the original value of the current element and the original value of the previous element of the current element; take the sum of the current number of heartbeats, the original value of the current element and the original value of the previous element of the current element as the current value of the current element; set the value in the previous element to 0; and obtain the original value of the Nth element after the current element; take the difference between the original value of the Nth element after the current element and the current number of heartbeats as the current value of the Nth element after the current element; N is the heartbeat period;

[0008] If the current number of heartbeats is 0, the sum of the original value of the current element and the original value of the previous element of the current element is used as the current value of the current element; and the value in the previous element is set to 0.

[0009] Optionally, the method further comprises:

[0010] Determine the number of current online devices according to the current value of the current element of the loop array;

[0011] According to the current number of online devices, draw an online device trend graph.

[0012] Optionally, the size of the loop array is larger than the heartbeat period.

[0013] Optionally, the method further comprises:

[0014] After configuring the loop array, each element of the loop array is initialized to 0.

[0015] Correspondingly, an embodiment of the present invention further discloses an online monitoring device for equipment, comprising:

[0016] Circular array configuration module, used to configure the circular array;

[0017] A current heartbeat number update module is used to update the current element of the circular array once per second, and to determine the current heartbeat number of the heartbeat information sent by the device once received;

[0018] The first element update module is used to obtain the original value of the current element and the original value of the previous element of the current element if the current number of heartbeats is greater than 0; take the sum of the current number of heartbeats, the original value of the current element and the original value of the previous element of the current element as the current value of the current element; set the value in the previous element to 0; and obtain the original value of the Nth element after the current element; take the difference between the original value of the Nth element after the current element and the current number of heartbeats as the current value of the Nth element after the current element; N is the heartbeat period;

[0019] The second element updating module is used to take the sum of the original value of the current element and the original value of the previous element of the current element as the current value of the current element if the current number of heartbeats is 0; and set the value in the previous element to 0.

[0020] Optionally, the device further comprises:

[0021] A quantity determination module, used to determine the current number of online devices according to the current value of the current element of the circular array;

[0022] The trend graph drawing module is used to draw an online device trend graph according to the current number of online devices.

[0023] Optionally, the size of the loop array is larger than the heartbeat period.

[0024] Optionally, the device further comprises:

[0025] The initialization module is used to initialize each element of the circular array to 0 after configuring the circular array.

[0026] The embodiments of the present invention include the following advantages:

[0027] In an embodiment of the present invention, a circular array is first configured to record the heartbeat information sent by the device; then, the current element of the circular array is updated once per second, and the current number of heartbeats of the heartbeat information sent by the device is determined; then, according to the current number of heartbeats, the elements of the circular array are correspondingly updated and processed. In this way, the embodiment of the present invention can comprehensively, quickly and accurately record and process the heartbeat information of the device, enhance the intelligence of device management, ensure that the system can respond to the state changes of the device in a timely manner, and thus improve the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a flowchart of a method for online monitoring of equipment provided by an embodiment of the present invention;

[0029] Figure 2 is a flowchart of another method for online monitoring of equipment provided by an embodiment of the present invention;

[0030] Figure 3 It is a flowchart of specific steps of a method for online monitoring of equipment provided by an embodiment of the present invention;

[0031] Figure 4 It is a structural block diagram of an equipment online monitoring device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] With the development of science and technology, the application scope of computer technology is expanding day by day, and more and more devices are connected to the Internet and interact with other devices or systems. This trend of interconnection has greatly improved the intelligence and convenience of devices, allowing users to manage and use various devices more efficiently. However, with the increasing number of devices connected to the Internet, the management and maintenance of devices are also facing unprecedented challenges.

[0034] Due to the huge number of devices, they may be offline due to various faults during operation, making them difficult to manage. These faults may include hardware failures, software errors, network connection problems, etc., which may cause the device to fail to work properly or interact effectively with other devices or systems. In addition, the diversity and complexity of devices also increase the difficulty of management and maintenance, making users often feel at a loss when facing device failures. The inability to monitor the number of online devices in a timely and effective manner is a current problem.

[0035] In the prior art of this field, there are two methods for counting online devices:

[0036] Algorithm A: Using the heartbeat reporting method, each device needs to maintain a record (device id, whether it is online, the latest heartbeat time, and the heartbeat cycle). When the heartbeat arrives, the heartbeat time needs to be updated, and whether it is online is set to "yes". At the same time, a scheduled task needs to be used to traverse all device information in the table once every heartbeat cycle, and calculate whether the current time-the latest heartbeat time is greater than the heartbeat cycle. If it is greater, set whether it is online to "no", and then count the number of online devices based on the above data for drawing trend charts.

[0037] Algorithm B: Instead of actively reporting, it sends an online request message to each device, determines whether the device is online based on the returned status or whether there is a response, and uses a variable as a counter to count the number of online devices for drawing a trend chart.

[0038] Algorithm A is similar to the algorithm in the present invention, both rely on heartbeat reporting, but need to use the database to persist device information, and need to traverse the database once every heartbeat cycle. If the trend chart is updated frequently, the IO consumption will be very high. Algorithm B uses an active request method. Although it does not need to use a database, if the trend chart is updated frequently, the system needs to frequently send requests to each device, and the system performance will face relatively large problems.

[0039] One of the core concepts of the embodiment of the present invention is that only a circular array is needed to count the number of devices online at the current time in real time, quickly draw a trend chart of the number of devices online, and is insensitive to the update frequency of the trend chart. Since the main purpose of real-time monitoring is to dynamically monitor the trend of the number of devices online in real time through a trend chart, the real-time requirement is high, so the method in the embodiment of the present invention is more suitable for real-time statistics scenarios. In the embodiment of the present invention, the design and use of the circular array greatly simplifies the monitoring process of the online status of the device. By updating the current element of the circular array once per second and determining the current number of heartbeats received from the heartbeat information sent by the device, the system can obtain the status information of the device in real time and perform corresponding processing and decision-making based on this information. This real-time update mechanism ensures that the system can reflect the online status of the device in a timely manner, thereby improving the accuracy and reliability of monitoring.

[0040] Reference Figure 1 , shows a flow chart of the steps of a device online monitoring method provided by an embodiment of the present invention, and the method may specifically include the following steps:

[0041] Step 101, configure a loop array;

[0042] In the embodiment of the present invention, a circular array is first configured to record the heartbeat information sent by the device. The design of the circular array enables the system to efficiently store and process the status information of the device, thereby realizing real-time monitoring and management of the device status.

[0043] A circular array is a special data structure that allows an array to continue storing new data from the beginning of the array after reaching its maximum capacity, thus forming a loop. This data structure is very useful in processing application scenarios that require a fixed-size buffer, such as heartbeat information recording, data stream processing, cache management, etc.

[0044] The characteristics of a circular array are: The size of a circular array is fixed, and once created, its size does not change. When the array reaches its maximum capacity, new data overwrites old data, forming a loop. A circular array can store and access data efficiently because it does not require frequent memory allocation and release. A circular array is suitable for scenarios that require real-time monitoring and processing of data because it can continuously record the latest data.

[0045] In some examples, such as in smart home systems, various devices such as smart bulbs, smart sockets, smart door locks, etc. need to monitor their status in real time. By configuring a loop array, the system can efficiently record the heartbeat information of these devices to ensure that the status of each device can be obtained and processed in a timely manner. For example, when a smart bulb sends a heartbeat message, the system can determine whether the bulb is working properly based on the heartbeat information, and issue an alarm or perform automatic repairs in a timely manner when the bulb fails.

[0046] Step 102, updating the current element of the loop array once per second, and determining the current number of heartbeats of the heartbeat information sent by the device once received;

[0047] In the embodiment of the present invention, the current element of the loop array can be updated once per second, and the current number of heartbeats of the heartbeat information sent by the device is determined once. This step ensures that the system can obtain the status information of the device in a timely manner and perform corresponding processing and decision-making based on this information.

[0048] In some examples, the heartbeat information sent by the device can be obtained in a variety of ways, such as through network communication, sensor data collection, etc. Through these ways, the status of the device can be monitored in real time, and corresponding adjustments and optimizations can be made according to the status changes of the device.

[0049] In some examples, other technical means, such as machine learning and artificial intelligence, can also be combined to improve the processing efficiency and accuracy of heartbeat information. For example, the system can use a pre-trained model to analyze and predict heartbeat information, thereby identifying possible equipment failures or abnormal conditions in advance and taking corresponding preventive measures.

[0050] Step 103, if the current number of heartbeats is greater than 0, obtain the original value of the current element and the original value of the previous element of the current element; take the sum of the current number of heartbeats, the original value of the current element and the original value of the previous element of the current element as the current value of the current element; set the value in the previous element to 0; and obtain the original value of the Nth element after the current element; take the difference between the original value of the Nth element after the current element and the current number of heartbeats as the current value of the Nth element after the current element; N is the heartbeat period;

[0051] In this embodiment of the present invention, when the current number of heartbeats is greater than 0, the system performs the following operations:

[0052] Get the original value of the current element and the original value of the previous element: The system gets the original value of the current element and the original value of the previous element from the loop array. These values ​​are used to calculate the new value of the current element.

[0053] Calculate the new value of the current element: The system adds the current number of heartbeats, the original value of the current element, and the original value of the previous element to get the new value of the current element. This new value reflects the comprehensive information of the current device status and historical status.

[0054] Set the value of the previous element to 0: To ensure that the data in the loop array can correctly reflect the state changes of the device, the system will set the value of the previous element to 0. This can prevent the old data from affecting the new data.

[0055] Get the original value of the Nth element after the current element: The system will get the original value of the Nth element after the current element from the loop array. N is the heartbeat period, which indicates the interval time for the device to send heartbeat information.

[0056] Calculate the new value of the Nth element after the current element: The system uses the difference between the original value of the Nth element after the current element and the current number of heartbeats as the new value of the Nth element after the current element. This new value reflects the state change of the device within the heartbeat cycle.

[0057] Step 104: If the current number of heartbeats is 0, the sum of the original value of the current element and the original value of the previous element of the current element is used as the current value of the current element; and the value in the previous element is set to 0.

[0058] In the embodiment of the present invention, when it is detected that the current number of heartbeats is 0, a series of specific operations can be performed to update the element value in the circular array. This step is designed to ensure that when the device does not send heartbeat information, the device status can be continuously monitored and recorded by accumulation and reset.

[0059] Specifically, when the current heartbeat number is 0, the original value of the current element is added to the original value of the previous element, and this sum is used as the current value of the current element. The purpose of this operation is to retain and accumulate previous state information when the device does not send heartbeat information, thereby avoiding information loss.

[0060] At the same time, the value in the previous element can also be set to 0. The purpose of this operation is to clear the value of the previous element so that the heartbeat information can be recorded again in the next time period. In this way, it can ensure that the data of each time period is independent and complete, thereby improving the accuracy and reliability of data processing.

[0061] In some examples, other technical means, such as anomaly detection algorithms, can be combined to further optimize the processing effect of this step. For example, when the current number of heartbeats is 0, the anomaly detection mechanism can be automatically triggered to conduct a deeper analysis and judgment of the device status, thereby identifying potential problems or failures in advance.

[0062] In the embodiment of the present invention, the monitoring strategy can be dynamically adjusted according to the actual heartbeat cycle of the device and the design of the loop array, so as to better adapt to the needs of different devices and systems. By obtaining the number of heartbeats and the value of the loop array element in the process of the device sending heartbeat information, real-time monitoring, precise positioning and data processing of the device status are achieved, thereby improving the efficiency of the system and user experience, and helping users quickly solve the problem of device status monitoring.

[0063] Reference Figure 2 , shows a flowchart of another method for online monitoring of equipment provided by an embodiment of the present invention, the method may specifically include the following steps:

[0064] Step 201, configuring a circular array; the size of the circular array is greater than the heartbeat period;

[0065] The method of the embodiment of the present invention can be applied to a system integrated with one or more devices, and configuring the loop array is a key step in the system initialization process. The loop array is designed to store and manage the heartbeat information sent by the device at different time points, so that the system can monitor the status of the device in real time and perform corresponding processing.

[0066] In some instances, the size of the loop array is set to be larger than the heartbeat period. The heartbeat period is the time interval between heartbeat messages sent by the device, usually in seconds. By setting the size of the loop array larger than the heartbeat period, the system can ensure that there is enough space to store and process the heartbeat messages while the device is sending them.

[0067] For example, if the maximum heartbeat period among all devices in the system is 10 seconds, the size of the loop array can be set to 15 seconds or larger. In this way, even if the device fails to send heartbeat information on time at a certain point in time, the system still has enough buffer space to store the previous heartbeat information and continue to monitor the status of the device.

[0068] In some examples, assuming that the heartbeat cycle of the device is CYCLE (unit: second), the array is client[SIZE], and the array size SIZE must be greater than the maximum heartbeat cycle CYCLE of all devices.

[0069] In some examples, the size of the loop array can also be dynamically adjusted according to actual needs. For example, the system can automatically adjust the size of the loop array according to factors such as the number of devices, heartbeat frequency, and system processing power to ensure system performance and stability.

[0070] In some instances, the design of the circular array can also be combined with other technical means, such as data compression, data encryption, etc., to further optimize the efficiency of data storage and processing. For example, the system can compress the heartbeat information to reduce the storage space occupied; at the same time, the heartbeat information can also be encrypted to ensure the security and privacy of the data.

[0071] Step 202, after configuring the circular array, initializing each element of the circular array to 0;

[0072] In the embodiment of the present invention, after configuring the circular array, the system will immediately initialize each element in the array. The purpose of this step is to ensure that all elements of the circular array are in a known initial state before starting to record heartbeat information, thereby avoiding data confusion or errors in subsequent processing.

[0073] In some cases, the system will set the value of each element in the loop array to 0. The purpose of this operation is to clear all the data in the array so that each element is initially null. In this way, the system can ensure that all elements are clean and there is no residual data when recording heartbeat information.

[0074] In some examples, the initialization operation may also include resetting the index of the loop array to ensure that the index of the array starts from 0. In this way, the system can access and update the elements in the array one by one in a predetermined order during subsequent processing.

[0075] In some examples, there is no terminal device online at the current time, and the array is initialized so that the value of each element of the array is 0. The current time modulo the array size is taken as the starting index of the array, and it is assumed that the initial index is 0.

[0076] In addition, the initialization operation can also be combined with other technical means, such as data verification and data backup, to further improve the reliability and security of the system. For example, the system can verify the elements in the array during the initialization process to ensure that the value of each element is 0; at the same time, the initialized array can also be backed up to prevent data loss or damage.

[0077] Through these operations, the system can initialize each element in the array immediately after configuring the loop array, thus laying a solid foundation for subsequent heartbeat information recording and device status monitoring.

[0078] Step 203, updating the current element of the loop array once per second, and determining the current number of heartbeats of the heartbeat information sent by the device once received;

[0079] In an embodiment of the present invention, the system can update the current element of the loop array once per second, and at the same time determine the current number of heartbeats received from the device within this second. This step is designed to ensure that the system can monitor the status of the device in real time and perform corresponding processing and decision-making based on this information.

[0080] In some examples, the system can update the current element of the loop array at a fixed time point every second. The update can be done by overwriting the value of the current element or adding the new heartbeat information to the current element. In this way, the system can record the heartbeat information sent by the device every second, thereby forming a continuous state record.

[0081] In some examples, the system can determine the current number of heartbeats received from the device at a fixed time point every second. The purpose of this operation is to count how many heartbeats the device has sent in the current second. In this way, the system can understand the active status of the device in real time and perform corresponding processing based on the changes in the number of heartbeats.

[0082] In some examples, when the array is updated every second, the array value at the current time is added to the array value of the previous second. That is, client[index] = client[index] + client[index-1]: the array value at the current time is added to the array value of the previous second. client[index-1] = 0: the array value of the previous second is cleared.

[0083] In some examples, the system can also combine other technical means, such as data filtering, data compression, etc., to optimize the processing efficiency of heartbeat information. For example, the system can filter the received heartbeat information to remove duplicate or invalid information; at the same time, the heartbeat information can also be compressed to reduce the storage space occupied.

[0084] In some examples, the system can also automatically adjust the size and update frequency of the loop array according to the changes in the number of heartbeats to ensure the performance and stability of the system. For example, when the number of heartbeats suddenly increases, the system can automatically increase the size of the loop array to accommodate more heartbeat information; at the same time, it can also increase the update frequency to ensure the accuracy of real-time monitoring.

[0085] Step 204, if the current number of heartbeats is greater than 0, obtain the original value of the current element and the original value of the previous element of the current element; take the sum of the current number of heartbeats, the original value of the current element and the original value of the previous element of the current element as the current value of the current element; set the value in the previous element to 0; and obtain the original value of the Nth element after the current element; take the difference between the original value of the Nth element after the current element and the current number of heartbeats as the current value of the Nth element after the current element; N is the heartbeat period;

[0086] In the embodiment of the present invention, when it is detected that the current number of heartbeats is greater than 0, the system will perform a series of specific operations to update the element values ​​in the loop array. This step is designed to ensure that when the device sends heartbeat information, the system can accurately record and process this information and maintain continuous monitoring of the device status.

[0087] In some examples, when the current heartbeat number is greater than 0, the system first obtains the original value of the current element and the original value of the previous element. Then, the system adds the current heartbeat number, the original value of the current element, and the original value of the previous element, and uses this sum as the current value of the current element. The purpose of this operation is to accurately record and accumulate heartbeat information when the device sends heartbeat information, thereby reflecting the real-time status of the device.

[0088] At the same time, the system will also set the value in the previous element to 0. The purpose of this operation is to clear the value of the previous element so that the heartbeat information can be recorded again in the next time period. In this way, the system can ensure that the data of each time period is independent and complete, thereby improving the accuracy and reliability of data processing.

[0089] In addition, the system will also obtain the original value of the Nth element after the current element, where N is the heartbeat period. Then, the system will use the difference between the original value of the Nth element after the current element and the current number of heartbeats as the current value of the Nth element after the current element. The purpose of this operation is to smooth the heartbeat information within the heartbeat period, thereby reducing the impact of data fluctuations on the system.

[0090] In some examples, the system can also combine other technical means, such as anomaly detection algorithms, data smoothing algorithms, etc., to further optimize the processing effect of this step. For example, when the current number of heartbeats is greater than 0, the system can automatically trigger the anomaly detection mechanism to conduct a deeper analysis and judgment of the device status, thereby identifying potential problems or failures in advance.

[0091] In some examples, each time a heartbeat message from a device is received, the corresponding position in the array is updated: client[index]++: the value of the element with index in the array client is increased by 1, indicating that the device is online at the current time. At the same time, client[index+CYCLE]--: the value of the element with index+CYCLE in the array client is reduced by 1, indicating that the device may be offline in CYCLE seconds.

[0092] Reference Figure 3 As shown, a flowchart of the specific steps of a method for online monitoring of equipment.

[0093] Assume that the heartbeat cycle of all devices is CYCLE seconds. Assume that the heartbeat cycle CYCLE is 2 seconds, the array size SIZE is 8, and the current time is the 1st second (index is 0). The array index will cycle between 0 and 7.

[0094] Specifically, the current time is the 1st second, index is 0; the 2nd second, index is 1; the 3rd second, index is 2, and so on.

[0095] When the index exceeds 7, it returns to 0 and continues the loop.

[0096] Assume that the initial value is 0, that is, there is no device online:

[0097] 1st second: Receive a heartbeat, client[0]++, client[2]--.

[0098] Then the values ​​of the array client are: 1, 0, -1, 0, 0, 0, 0

[0099] Update array: client[0]=client[0]+client[7], client[7]=0.

[0100] Current number of online devices: client[0]=1.

[0101] Second 2: Receive the heartbeat from another device, client[1]++, client[3]--.

[0102] Update array: client[1]=client[1]+client[0], client[0]=0.

[0103] Current number of online devices: client[1]=2.

[0104] In some instances, when the heartbeat cycles of different devices are different, for example, assuming that the heartbeat cycle CYCLE1 of device 1 is 2 seconds, the heartbeat cycle CYCLE2 of device 2 is 3 seconds, the array size SIZE is 8, and the current time is the 1st second (index is 0)

[0105] Second 1: Receive the heartbeat of device 1, client[0]++, client[2]--.

[0106] Update array: client[0]=client[0]+client[7], client[7]=0.

[0107] Current number of online devices: client[0]=1.

[0108] Second 2: Receive the heartbeat of device 2, client[1]++, client[4]--.

[0109] Update array: client[1]=client[1]+client[0], client[0]=0.

[0110] Current number of online devices: client[1]=2.

[0111] Step 205, if the current number of heartbeats is 0, the sum of the original value of the current element and the original value of the previous element of the current element is used as the current value of the current element; the value in the previous element is set to 0;

[0112] In the embodiment of the present invention, when it is detected that the current number of heartbeats is 0, the system will perform a series of specific operations to update the element value in the circular array. This step is designed to ensure that when the device does not send heartbeat information, the system can maintain continuous monitoring and recording of the device status by accumulation and reset.

[0113] In some examples, when the current heartbeat number is 0, the system adds the original value of the current element to the original value of the previous element and uses the sum as the current value of the current element. The purpose of this operation is to retain and accumulate previous state information when the device does not send heartbeat information, thereby avoiding information loss.

[0114] At the same time, the system will also set the value in the previous element to 0. The purpose of this operation is to clear the value of the previous element so that the heartbeat information can be recorded again in the next time period. In this way, the system can ensure that the data of each time period is independent and complete, thereby improving the accuracy and reliability of data processing.

[0115] In some examples, the system can also combine other technical means, such as anomaly detection algorithms, to further optimize the processing effect of this step. For example, when the current number of heartbeats is 0, the system can automatically trigger the anomaly detection mechanism to conduct a deeper analysis and judgment of the device status, thereby identifying potential problems or failures in advance.

[0116] Reference Figure 3 As shown, a flowchart of the specific steps of a method for online monitoring of equipment.

[0117] Assume that the heartbeat cycle CYCLE is 2 seconds, the array size SIZE is 8, the first array is the 1st second (index is 0), when the time is the 3rd second, that is, the 3rd array, no heartbeat signal is received, then the number of heartbeats is 0. The specific calculation is as follows:

[0118] If the heartbeat is not received, client[2] does not need to increase by 1.

[0119] Update array: client[2]=client[2]+client[1], client[1]=0.

[0120] Then the current number of online devices: client[2]=1.

[0121] Step 206, determining the current number of online devices according to the current value of the current element of the loop array; and drawing an online device trend graph according to the current number of online devices.

[0122] In the embodiment of the present invention, the system determines the number of currently online devices according to the current value of the current element in the loop array. This step is designed to monitor the online status of the device in real time and generate a corresponding online device trend chart based on this information so that the user can intuitively understand the online status and trend changes of the device.

[0123] In some examples, the system extracts the current value of the current element from the loop array and uses it as the basis for the current number of online devices. The purpose of this operation is to accurately reflect the online status of the device at the current point in time. In this way, the system can update the number of online devices in real time and ensure the accuracy and real-time nature of the data.

[0124] At the same time, the system will draw an online device trend chart based on the current number of online devices. The purpose of this operation is to display the changing trend of the number of online devices in a graphical way, so as to help users understand the online status and trend changes of the devices more intuitively.

[0125] Online device trend graphs can be in various forms, such as line graphs, bar graphs, pie charts, etc. Through these graphs, users can clearly see the changing trend of the number of online devices, including the increase, decrease, and fluctuation of the number of devices. In addition, trend graphs can also display the number of online devices in different time periods, thereby helping users analyze the online patterns and trends of devices.

[0126] In some examples, the system can also combine other technical means, such as data analysis, prediction algorithms, etc., to further optimize the generation effect of trend graphs. For example, the system can use historical data to predict the number of online devices in the future and display the prediction results in the trend graph, thereby helping users to manage devices and allocate resources in advance.

[0127] In the embodiment of the present invention, the monitoring strategy can be dynamically adjusted according to the actual heartbeat cycle of the device and the design of the loop array, so as to better adapt to the needs of different devices and systems. By obtaining the number of heartbeats and the value of the loop array element in the process of the device sending heartbeat information, real-time monitoring, precise positioning and data processing of the device status are achieved, thereby improving the efficiency of the system and user experience, and helping users quickly solve the problem of device status monitoring.

[0128] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0129] Reference Figure 4 , shows a structural block diagram of an online monitoring device for equipment provided by an embodiment of the present invention, which may specifically include the following modules:

[0130] The circular array configuration module 301 is used to configure the circular array;

[0131] The current heartbeat number updating module 302 is used for updating the current element of the circular array once per second and determining the current heartbeat number of the heartbeat information sent by the device once received;

[0132] The first element updating module 303 is used to obtain the original value of the current element and the original value of the previous element of the current element if the current number of heartbeats is greater than 0; take the sum of the current number of heartbeats, the original value of the current element and the original value of the previous element of the current element as the current value of the current element; set the value in the previous element to 0; and obtain the original value of the Nth element after the current element; take the difference between the original value of the Nth element after the current element and the current number of heartbeats as the current value of the Nth element after the current element; N is the heartbeat period;

[0133] The second element updating module 304 is used to, if the current number of heartbeats is 0, take the sum of the original value of the current element and the original value of the previous element of the current element as the current value of the current element; and set the value in the previous element to 0.

[0134] In an embodiment of the present invention, the device further includes:

[0135] A quantity determination module, used to determine the current number of online devices according to the current value of the current element of the circular array;

[0136] The trend graph drawing module is used to draw an online device trend graph according to the current number of online devices.

[0137] In the embodiment of the present invention, the size of the cyclic array is larger than the heartbeat period.

[0138] In an embodiment of the present invention, the device further includes:

[0139] The initialization module is used to initialize each element of the circular array to 0 after configuring the circular array.

[0140] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0141] An embodiment of the present invention further provides an electronic device, including:

[0142] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned device online monitoring method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0143] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned device online monitoring method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0144] 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.

[0145] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0146] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0147] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0149] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0150] Finally, it should be noted that, in this article, relational terms such as first and second, etc. 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", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0151] The above is a detailed introduction to an online monitoring method, device, electronic device and medium for equipment provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for online monitoring of equipment, characterized in that: include: Configure loop array; Updating the current element of the loop array once per second, and determining the current number of heartbeats received from the device; If the current heartbeat number is greater than 0, obtain the original value of the current element and the original value of the previous element of the current element; The sum of the current number of heartbeats, the original value of the current element and the original value of the previous element of the current element is used as the current value of the current element; the value in the previous element is set to 0; and the original value of the Nth element after the current element is obtained; The difference between the original value of the Nth element after the current element and the current number of heartbeats is used as the current value of the Nth element after the current element; N is the heartbeat period; If the current number of heartbeats is 0, the sum of the original value of the current element and the original value of the previous element of the current element is used as the current value of the current element; Set the value in the previous element to 0.

2. The method according to claim 1, characterized in that Also includes: Determine the number of current online devices according to the current value of the current element of the loop array; According to the current number of online devices, draw an online device trend graph.

3. The method according to claim 1, characterized in that The size of the loop array is larger than the heartbeat period.

4. The method according to claim 1, characterized in that: Also includes: After configuring the loop array, each element of the loop array is initialized to 0.

5. An online monitoring device for equipment, characterized in that: The device comprises: Circular array configuration module, used to configure the circular array; A current heartbeat number update module is used to update the current element of the circular array once per second, and to determine the current heartbeat number of the heartbeat information sent by the device once received; The first element update module is used to obtain the original value of the current element and the original value of the previous element of the current element if the current number of heartbeats is greater than 0; take the sum of the current number of heartbeats, the original value of the current element and the original value of the previous element of the current element as the current value of the current element; set the value in the previous element to 0; and obtain the original value of the Nth element after the current element; take the difference between the original value of the Nth element after the current element and the current number of heartbeats as the current value of the Nth element after the current element; N is the heartbeat period; The second element updating module is used to take the sum of the original value of the current element and the original value of the previous element of the current element as the current value of the current element if the current number of heartbeats is 0; and set the value in the previous element to 0.

6. The device according to claim 5, characterized in that Also includes: A quantity determination module, used to determine the current number of online devices according to the current value of the current element of the circular array; The trend graph drawing module is used to draw an online device trend graph according to the current number of online devices.

7. The device according to claim 5, characterized in that The size of the loop array is larger than the heartbeat period.

8. The device according to claim 5, characterized in that Also includes: The initialization module is used to initialize each element of the circular array to 0 after configuring the circular array.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the device online monitoring method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device online monitoring method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and device for judging reliability of equipment signal

    CN111245946A

  • Heartbeat task execution method and device of equipment, electronic equipment and storage medium

    CN117785403A

  • Compression Mechanisms for Control Plane-Data Plane Processing Architectures

    US20090161547A1

  • Method and system for maintaining active user set based on time roulette and page heartbeat

    WO2017219740A1