A data monitoring method, device, server, and storage medium

By sending a long polling request to the monitored device and obtaining and processing multiple monitoring data, the problem of excessive hardware resource consumption caused by frequent data transmission by the monitored device is solved, and more efficient device processing performance is achieved.

CN114064404BActive Publication Date: 2025-05-30CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111335274.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-11
Publication Date
2025-05-30
Estimated Expiration
2041-11-11

AI Technical Summary

Technical Problem

The monitored device needs to send data to the monitoring device every time it acquires monitoring data, which causes the monitoring device and the monitored device to consume a large amount of hardware resources, affecting the processing performance of the device.

Method used

By sending a long polling request to the monitored device, multiple monitoring data and their priorities are obtained, processing order is determined, and data is added to the target queue, and responses are sent to the monitoring device in a unified manner.

Benefits of technology

It reduces the hardware resource consumption of monitoring equipment and monitored equipment, improves the processing performance of equipment, and improves the effectiveness of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064404B_ABST
    Figure CN114064404B_ABST
Patent Text Reader

Abstract

The present invention provides a data monitoring method, device, server and storage medium, relating to the field of communication technologies, and solving the technical problem that each time a monitored device obtains monitoring data, it needs to send the monitoring data to a monitoring device, resulting in a large amount of hardware resources being consumed by the monitoring device and the monitored device, and affecting the processing performance of the devices. The method includes: receiving a long polling request sent by the monitoring device, where the long polling request is used to request to obtain the monitoring data of the monitored device; obtaining a plurality of monitoring data of the monitored device and the priorities of the plurality of monitoring data; determining the processing order of the plurality of monitoring data according to the priorities of the plurality of monitoring data, and adding the plurality of monitoring data to a target queue in accordance with the processing order of the plurality of monitoring data; and sending a long polling response to the monitoring device, where the long polling response includes the target queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a data monitoring method, apparatus, server, and storage medium. Background Art

[0002] Currently, a monitored device can actively send its monitored data to a monitoring device so that the monitoring device can perform corresponding processing on the monitored data.

[0003] However, in the above method, the monitored device needs to send the monitored data to the monitoring device every time the monitored data is obtained, which may cause a large amount of hardware resources to be consumed by the monitoring device and the monitored device, affecting the processing performance of the devices. Summary of the Invention

[0004] The present invention provides a data monitoring method, apparatus, server, and storage medium, which solve the technical problem that the monitored device needs to send monitored data to the monitoring device every time the monitored data is obtained, resulting in a large amount of hardware resources being consumed by the monitoring device and the monitored device, affecting the processing performance of the devices.

[0005] In a first aspect, the present invention provides a data monitoring method, including: receiving a long polling request sent by a monitoring device, where the long polling request is used to request to obtain monitored data of the monitored device; obtaining a plurality of monitored data of the monitored device and priorities of the plurality of monitored data; determining a processing order of the plurality of monitored data according to the priorities of the plurality of monitored data, and adding the plurality of monitored data to a target queue according to the processing order of the plurality of monitored data; and sending a long polling response to the monitoring device, where the long polling response includes the target queue.

[0006] In a second aspect, the present invention provides a data monitoring method, including: sending a long polling request to a monitored device, where the long polling request is used to request to obtain monitored data of the monitored device; receiving a long polling response sent by the monitored device, where the long polling response includes a target queue, the target queue includes a plurality of monitored data obtained by the monitored device, and the target queue is used to represent a processing order of the plurality of monitored data, and the processing order is determined by the monitored device according to the priorities of the plurality of monitored data; and processing the plurality of monitored data according to the processing order.

[0007] In a third aspect, the present invention provides a data monitoring device, comprising: a receiving module, an obtaining module, a determining module, a processing module and a sending module; the receiving module is configured to receive a long polling request sent by a monitoring device, the long polling request being used to request to obtain monitoring data of a monitored device; the obtaining module is configured to obtain a plurality of monitoring data of the monitored device and priorities of the plurality of monitoring data; the determining module is configured to determine a processing order of the plurality of monitoring data according to the priorities of the plurality of monitoring data; the processing module is configured to add the plurality of monitoring data to a target queue according to the processing order of the plurality of monitoring data; the sending module is configured to send a long polling response to the monitoring device, the long polling response including the target queue.

[0008] In a fourth aspect, the present invention provides a data monitoring device, comprising: a sending module, a receiving module and a processing module; the sending module is configured to send a long polling request to a monitored device, the long polling request being used to request to obtain monitoring data of the monitored device; the receiving module is configured to receive a long polling response sent by the monitored device, the long polling response including a target queue, the target queue including a plurality of monitoring data obtained by the monitored device, the target queue being used to represent a processing order of the plurality of monitoring data, the processing order being determined by the monitored device according to the priorities of the plurality of monitoring data; the processing module is configured to process the plurality of monitoring data according to the processing order.

[0009] In a fifth aspect, the present invention provides a server, comprising: a processor and a memory configured to store processor-executable instructions; wherein, the processor is configured to execute the instructions to implement any optional data monitoring method in the first aspect above, or to implement any optional data monitoring method in the second aspect above.

[0010] In a sixth aspect, the present invention provides a computer-readable storage medium, on which instructions are stored, and when the instructions in the computer-readable storage medium are executed by a server, the server is enabled to execute any optional data monitoring method in the first aspect above, or to execute any optional data monitoring method in the second aspect above.

[0011] The data monitoring method, device, server, and storage medium provided by the present invention are such that the monitoring device can send a long polling request to the monitored device; after receiving the long polling request, the monitored device can obtain multiple monitoring data of the monitored device and the priorities of the multiple monitoring data; then the monitoring device determines the processing order of the multiple monitoring data according to the priorities of the multiple monitored devices, adds the multiple monitoring data to the target queue in accordance with the processing order of the multiple monitoring data, and sends a long polling response including the target queue to the monitoring device. In the embodiments of the present invention, the monitored device does not need to send the monitoring data to the monitoring device every time the monitoring data is obtained, but can uniformly send the multiple monitoring data to the monitoring device after obtaining the multiple monitoring data, which can reduce the consumption of hardware resources by the monitoring device and the monitored device and improve the processing performance of the device.

[0012] Further, the monitoring device can receive the long polling response, which includes the target queue. The target queue includes the multiple monitoring data and can represent the processing order of the multiple monitoring data. In this way, the monitoring device can process the multiple monitoring data according to the processing order, which can improve the effectiveness of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art.

[0014] Figure 1 It is a schematic diagram of the network architecture of the data monitoring system provided by the embodiments of the present invention;

[0015] Figure 2 It is a schematic diagram of the hardware of a server provided by the embodiments of the present invention;

[0016] Figure 3 It is a schematic flowchart of a data monitoring method provided by the embodiments of the present invention;

[0017] Figure 4 It is a schematic diagram of the internal structure of a monitored device provided by the embodiments of the present invention;

[0018] Figure 5 It is a schematic flowchart of another data monitoring method provided by the embodiments of the present invention;

[0019] Figure 6 It is a schematic flowchart of another data monitoring method provided by the embodiments of the present invention;

[0020] Figure 7 It is a schematic flowchart of another data monitoring method provided by the embodiments of the present invention;

[0021] Figure 8 Schematic flowchart of another data monitoring method provided by an embodiment of the present invention;

[0022] Figure 9 Schematic structural diagram of a data monitoring device provided by an embodiment of the present invention;

[0023] Figure 10 Schematic structural diagram of another data monitoring device provided by an embodiment of the present invention;

[0024] Figure 11 Schematic structural diagram of another data monitoring device provided by an embodiment of the present invention;

[0025] Figure 12 Schematic structural diagram of another data monitoring device provided by an embodiment of the present invention. Detailed implementation manners

[0026] The data monitoring method, device, server, and storage medium provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0027] In the description of this application, the terms "first" and "second" in the specification and drawings are used to distinguish different objects, rather than to describe a specific order of the objects.

[0028] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes other steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.

[0029] It should be noted that in the embodiments of the present invention, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present invention should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.

[0030] As used in this application, "and / or" includes any one of the two methods or the use of both methods simultaneously.

[0031] In the description of this application, unless otherwise specified, the meaning of "a plurality of" refers to two or more.

[0032] Based on the description in the background art, in the prior art, each time the monitored device obtains monitoring data, it needs to send the monitoring data to the monitoring device. This may cause the monitoring device and the monitored device to consume a large amount of hardware resources and affect the processing performance of the devices. Based on this, the embodiments of the present invention provide a data monitoring method, device, server, and storage medium. The monitored device does not need to send the monitoring data to the monitoring device each time it obtains the monitoring data. Instead, it can send the multiple monitoring data to the monitoring device uniformly after obtaining multiple monitoring data, which can reduce the consumption of hardware resources by the monitoring device and the monitored device and improve the processing performance of the devices. Moreover, the monitoring device can receive the long-polling response sent by the monitored device, which includes a target queue. Since this target queue can represent the processing order of the multiple monitoring data it contains, the monitoring device can process the multiple monitoring data according to this processing order, which can improve the effectiveness of data processing.

[0033] The data monitoring method, device, server, and storage medium provided by the embodiments of the present invention can be applied to a data monitoring system. As Figure 1 shown, the data monitoring system includes a monitoring device 101 and a monitored device 102. Usually, in practical applications, the connections between the above-mentioned various devices or service functions can be wireless connections. For the convenience of intuitively representing the connection relationships between the devices, Figure 1 solid lines are used for illustration in

[0034] Among them, the monitoring device 101 is used to send a long-polling request to the monitored device 102. In the embodiments of the present invention, the monitoring device 101 is further used to receive the long-polling response sent by the monitored device 102. The long-polling response includes a target queue, which is used to represent the processing order of multiple monitoring data obtained by the monitored device 102, and the monitoring device 101 can process the multiple monitoring data according to this processing order.

[0035] The monitored device 102 is used to receive the long-polling request sent by the monitoring device 101. In the embodiments of the present invention, the monitored device 102 is further used to obtain multiple monitoring data of the monitored device 102 and the priorities of the multiple monitoring data, determine the processing order of the multiple monitoring data according to the priorities of the multiple monitoring data, and add the multiple monitoring data to the above-mentioned target queue according to the processing order of the multiple monitoring data.

[0036] It should be noted that Figure 1 the one monitoring device and one monitored device shown in

[0037] Exemplarily, the monitored device that executes the data monitoring method provided by the embodiments of the present invention may be a server. Figure 2 It is a schematic hardware structure diagram of a server provided by the embodiments of the present invention. As Figure 2 shown, the server 20 includes a processor 201, a memory 202, a network interface 203, etc.

[0038] Among them, the processor 201 is the core component of the server 20. The processor 201 is used to run the operating system of the server 20 and the application programs (including system application programs and third-party application programs) on the server 20 to implement the data monitoring method of the server 20.

[0039] In the embodiments of the present invention, the processor 201 may be a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof, which can implement or execute various exemplary logic blocks, modules, and circuits described in connection with the content disclosed in the embodiments of the present invention; the processor may also be a combination that implements computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0040] Optionally, the processor 201 of the server 20 includes one or more CPUs, and the CPU is a single-CPU or a multi-CPU.

[0041] The memory 202 includes, but is not limited to, a random access memory (RAM), a read only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, or an optical memory, etc. The code of the operating system is stored in the memory 202.

[0042] Optionally, the processor 201 implements the data monitoring method in the embodiments of the present invention by reading the instructions stored in the memory 202, or the processor 201 implements the data monitoring method provided in the embodiments of the present invention by the instructions stored internally. In the case where the processor 201 implements the data monitoring method provided in the embodiments of the present invention by reading the execution stored in the memory, the memory stores the instructions for implementing the data monitoring method provided in the embodiments of the present invention.

[0043] The network interface 203 is a wired interface, such as a fiber distributed data interface (FDDI) or a gigabit ethernet (GE) interface. Alternatively, the network interface 203 is a wireless interface. The network interface 203 is used for the server 20 to communicate with other devices.

[0044] The memory 202 is used to store a plurality of monitoring data and the priorities of the plurality of monitoring data. At least one processor 201 further executes the method described in the embodiments of the present invention according to the plurality of monitoring data stored in the memory 202 and the priorities of the plurality of monitoring data. For more details on how the processor 201 implements the above functions, please refer to the descriptions in the following method embodiments.

[0045] Optionally, the server 20 further includes a bus, and the above-mentioned processor 201 and memory 202 are interconnected through the bus 204 or are interconnected in other ways.

[0046] Optionally, the server 20 further includes an input / output interface 205. The input / output interface 205 is used to connect to an input device and receive a long polling request input by the user through the input device. The input device includes but is not limited to a keyboard, a touch screen, a microphone, etc. The input / output interface 205 is also used to connect to an output device and output the long polling response of the processor 201. The output device includes but is not limited to a display, a printer, etc.

[0047] In the embodiments of the present invention, the hardware structure of the above-mentioned monitoring device is similar to Figure 2 the hardware structure of the shown server 20. For the description of the hardware structure of the monitoring device, reference can be made to the description of the hardware structure of the server 20, which will not be elaborated here.

[0048] The data monitoring method, device, server, and storage medium provided by the embodiments of the present invention are applied to an application scenario where a monitoring device monitors a monitored device (specifically, monitors the monitoring data of the monitored device). After the monitored device receives a long polling request sent by the monitoring device, it can obtain multiple monitoring data of the monitored device and the priorities of the multiple monitoring data; then the monitored device can determine the processing order of the multiple monitoring data according to the priorities of the multiple monitoring data, add the multiple monitoring data to a target queue in accordance with the processing order of the multiple monitoring data, and send a long polling response including the target queue to the monitoring device. In this way, after receiving the long polling response, the monitoring device can process the multiple monitoring data in accordance with the processing order of the multiple monitoring data characterized by the target queue.

[0049] Combined with the above Figure 1 shown data monitoring system, the data monitoring method provided by the embodiments of the present invention will be described in detail from the perspective of the interaction of each device in the data monitoring system to illustrate the process of the monitoring device obtaining the monitoring data of the monitored device.

[0050] As Figure 3 shown, the data monitoring method provided by the embodiments of the present invention may include S101 - S107.

[0051] S101. The monitoring device sends a long polling request to the monitored device.

[0052] Among them, the long polling request is used to request to obtain the monitoring data of the monitored device.

[0053] It should be understood that the monitoring device may send a long polling request to the monitored device once, or may send multiple long polling requests to the monitored device within a preset time period, and there may be a preset time interval between the current long polling request and the next long polling request among the multiple long polling requests.

[0054] In an implementation manner of the embodiments of the present invention, the long polling request may be a hypertext transfer protocol (HTTP) long polling request.

[0055] S102. The monitored device receives the long polling request sent by the monitoring device.

[0056] Combined with the description of the above embodiments, it should be understood that the long polling request is used to request to obtain the monitoring data of the monitored device.

[0057] It should be understood that after the monitored device receives the long polling request sent by the monitoring device, a connection relationship (which can also be understood as a communication relationship for data transmission) can be established between the monitoring device and the monitored device. This connection relationship can be continuously maintained until there is a data change in the monitored device (for example, when monitoring data is obtained), and a long polling response (specifically, the monitoring data included in the long polling response) can be sent to the monitoring device through this connection relationship.

[0058] S103. The monitored device obtains multiple pieces of monitoring data of the monitored device and the priorities of the multiple pieces of monitoring data.

[0059] It should be understood that the multiple pieces of monitoring data may include the performance data of the monitored device, such as the load of the monitored device and / or the power consumption of the monitored device; the multiple pieces of monitoring data may also include the service data stored in the monitored device, such as multimedia resources (including audio data and video data), etc.

[0060] S104. The monitored device determines the processing order of the multiple pieces of monitoring data according to the priorities of the multiple pieces of monitoring data, and adds the multiple pieces of monitoring data to the target queue in accordance with the processing order of the multiple pieces of monitoring data.

[0061] Specifically, the monitored device can determine to preferentially process the monitoring data with a higher priority, and determine to preferentially add the monitoring data with a higher priority to the target queue.

[0062] Exemplarily, assume that the above multiple pieces of monitoring data include first monitoring data and second monitoring data, and the priority of the first monitoring data is higher than the priority of the multiple pieces of monitoring data. Then the monitored device determines to preferentially process the first monitoring data and preferentially add the first monitoring data to the target queue.

[0063] In an implementation manner of the embodiment of the present invention, the priority of the multiple pieces of monitoring data obtained by the monitored device may specifically be the value of the priority of the multiple pieces of monitoring data. In the embodiment of the present invention, it can be defined that the higher the value of the priority, the higher the priority. For example, if the values of the priority are 0, 1, 2, it means that the priorities increase in sequence; or it can also be defined that the higher the value of the priority, the lower the priority. For example, when the values of the priority are 0, 1, 2, it means that the priorities decrease in sequence.

[0064] S105. The monitored device sends a long polling response to the monitoring device.

[0065] Wherein, the long polling response includes the target queue.

[0066] Combined with the description of the above embodiments, it should be understood that the target queue includes the above multiple pieces of monitoring data, and the target queue is used to represent the processing order of the multiple pieces of monitoring data.

[0067] As Figure 4 shown, the monitored device provided by the embodiment of the present invention may include an HTTP module and a target queue, and the target queue includes a plurality of monitoring data, such as first monitoring data and second monitoring data.

[0068] Specifically, the HTTP module may be used to receive the long polling request sent by the above-mentioned monitoring device. After adding the plurality of monitoring data to the target queue, the monitored device may send a long polling response to the monitoring device through the HTTP module, specifically, sending the target queue to the monitoring device through the HTTP module.

[0069] S106. The monitoring device receives the long polling response sent by the monitored device.

[0070] Wherein, the long polling response includes a target queue, the target queue includes a plurality of monitoring data obtained by the monitored device, and the target queue is used to represent the processing order of the plurality of monitoring data, and the processing order is determined by the monitored device according to the priorities of the plurality of monitoring data.

[0071] Combined with the description of the above embodiments, it should be understood that after the monitored device obtains the plurality of monitoring data and the priorities of the plurality of monitoring data, it can determine the processing order of the plurality of monitoring data, and add the plurality of monitoring data to the target queue based on the processing order, so that the target queue can represent the processing order of the plurality of monitoring data, and specifically can represent which monitoring data to process preferentially.

[0072] S107. The monitoring device processes the plurality of monitoring data according to the processing order of the plurality of monitoring data.

[0073] In the embodiment of the present invention, the monitoring device processes the plurality of monitoring data according to the processing order of the plurality of monitoring data, that is, preferentially processes the monitoring data with higher priorities.

[0074] In an implementation manner of the embodiment of the present invention, the monitoring device processing a piece of monitoring data can be understood as determining whether a certain piece of monitoring data (such as the load of the monitored device) is greater than or equal to a certain threshold (such as a load threshold). When the load is greater than or equal to the load threshold, the monitoring device may issue an alarm message, or determine to restart the monitored device, or notify relevant personnel to repair the problem, etc.

[0075] It should be understood that the above-mentioned monitoring device processing the plurality of monitoring data according to the processing order of the plurality of monitoring data can be understood as that there is a processing module (or unit) inside the monitoring device for processing the plurality of monitoring data. In an implementation manner of the embodiment of the present invention, in the above Figure 1At least one processing device (or server) can also be deployed in the shown data monitoring system to process the multiple monitoring data. Specifically, the monitoring device can send the target queue to the processing device so that the processing device can process the multiple monitoring data according to the processing order.

[0076] The technical solutions provided by the above embodiments can at least bring the following beneficial effects: As can be seen from S101 - S107, the monitoring device can send a long - polling request to the monitored device; after receiving the long - polling request, the monitored device can obtain multiple monitoring data of the monitored device and the priorities of the multiple monitoring data; then the monitoring device determines the processing order of the multiple monitoring data according to the priorities of the multiple monitored devices, adds the multiple monitoring data to the target queue according to the processing order of the multiple monitoring data, and sends a long - polling response including the target queue to the monitoring device. In the embodiments of the present invention, the monitored device does not need to send the monitoring data to the monitoring device every time it obtains the monitoring data, but can send the multiple monitoring data to the monitoring device uniformly after obtaining multiple monitoring data, which can reduce the consumption of hardware resources by the monitoring device and the monitored device and improve the processing performance of the device.

[0077] Furthermore, the monitoring device can receive the long - polling response, which includes the target queue. The target queue includes the multiple monitoring data and can represent the processing order of the multiple monitoring data. In this way, the monitoring device can process the multiple monitoring data according to the processing order, which can improve the effectiveness of data processing.

[0078] Combined Figure 3 with Figure 5 as shown, the data monitoring method provided by the embodiments of the present invention further includes S108.

[0079] S108. The monitored device determines whether the target queue includes high - priority monitoring data.

[0080] It should be understood that the priorities of the individual monitoring data included in the target queue (specifically, the above - mentioned multiple monitoring data) may be different. Specifically, it may include high - priority monitoring data or may not include high - priority monitoring data. If the target queue includes high - priority monitoring data, it means that the priority of one of the multiple monitoring data is high - priority.

[0081] Continuing as Figure 5 shown, the above - mentioned monitored device sending a long - polling response to the monitoring device can specifically include S1051.

[0082] S1051. When the target queue includes high - priority monitoring data, the monitored device sends a long - polling response to the monitoring device.

[0083] It can be understood that when a certain monitoring data included in the target queue (specifically, the multiple monitoring data) is high-priority monitoring data (or the priority of the monitoring data is high priority), it indicates that the monitoring data is emergency data (that is, the priority of the monitoring data is relatively high). When the monitoring data is emergency data, the monitored device can send a long-polling response to the monitoring device, specifically, send the target queue to the monitoring device, that is, the target queue including high-priority monitoring data can be a trigger condition for the monitored device to send the target queue.

[0084] Optionally, when the target queue does not include high-priority monitoring data, it indicates that each piece of monitoring data included in the target queue is not emergency data (or the priority of each piece of monitoring data is relatively low). In one case, the monitoring device can continue to obtain other monitoring data of the monitored device and add the other monitoring data to the target queue until the target queue includes high-priority monitoring data and then send the target queue to the monitoring device.

[0085] Combined with Figure 5 , as Figure 6 shown, the data monitoring method provided by the embodiment of the present invention further includes S109.

[0086] S109: When the target queue does not include high-priority monitoring data, the monitored device determines whether the remaining capacity of the target queue is less than or equal to the capacity threshold.

[0087] Combined with the description of the above embodiments, it should be understood that when the target queue does not include high-priority monitoring data, it indicates that each piece of monitoring data included in the target queue is not emergency data (or the priority of each piece of monitoring data is relatively low). At this time, the monitored device can determine whether the remaining capacity of the target queue is less than or equal to the capacity threshold to determine whether there is still sufficient remaining capacity in the target queue for other monitoring data to use.

[0088] Continuing as Figure 6 shown, the above-mentioned monitored device sending a long-polling response to the monitoring device can specifically further include S1052.

[0089] S1052: When the remaining capacity of the target queue is less than or equal to the capacity threshold, the monitored device sends a long-polling response to the monitoring device.

[0090] It can be understood that when the remaining capacity of the target queue is less than or equal to the capacity threshold, it indicates that there is not enough remaining capacity in the target queue for other monitoring data to use. At this time, the monitored device can send a long polling response to the monitoring device, specifically by sending the target queue to the monitoring device. That is, the remaining capacity of the target queue being less than or equal to the capacity threshold can also be a triggering condition for the monitored device to send the target queue.

[0091] Optionally, when the remaining capacity of the target queue is greater than the capacity threshold, it indicates that there is enough remaining capacity in the target queue for other monitoring data to use. In one case, the monitoring device can continue to obtain other monitoring data of the monitored device and add the other monitoring data to the target queue until the remaining capacity of the target queue is less than or equal to the capacity threshold, and then send the target queue to the monitoring device.

[0092] Combined with Figure 6 , as Figure 7 shown, the data monitoring method provided by the embodiment of the present invention further includes S110.

[0093] S110. When the remaining capacity of the target queue is greater than the capacity threshold, the monitored device determines whether the connection duration between the monitoring device and the monitored device is greater than or equal to the duration threshold.

[0094] Combined with the description of the above embodiments, it should be understood that when the remaining capacity of the target queue is greater than the capacity threshold, it indicates that there is enough remaining capacity in the target queue for other monitoring data to use. And the connection duration is used to represent the duration of the long polling connection established between the monitoring device and the monitored device, that is, the duration from when the monitoring device sends a long polling request (or the monitored device receives the long polling request) to the current moment.

[0095] Continuing as Figure 7 shown, the above-mentioned monitored device sending a long polling response to the monitoring device can specifically further include S1053.

[0096] S1053. When the connection duration between the monitoring device and the monitored device is greater than or equal to the duration threshold, the monitored device sends a long polling response to the monitoring device.

[0097] It can be understood that when the connection duration between the monitoring device and the monitored device is greater than or equal to the duration threshold, it indicates that the connection duration is relatively long. Specifically, the connection relationship between the monitoring device and the monitored device may be disconnected. At this time, the monitored device can send a long polling response to the monitoring device, specifically by sending the target queue to the monitoring device. That is, the connection duration between the monitoring device and the monitored device being greater than or equal to the duration threshold can also be a triggering condition for the monitored device to send the target queue.

[0098] Optionally, when the connection duration between the monitoring device and the device to be monitored is less than the duration threshold, it indicates that the connection duration is short, and the connection relationship between the monitoring device and the device to be monitored may not be disconnected temporarily. In one case, the monitoring device can continue to obtain other monitoring data of the device to be monitored and add the other monitoring data to the target queue until the connection duration between the monitoring device and the device to be monitored is greater than or equal to the duration threshold, and then send the target queue to the monitoring device.

[0099] Combined with Figure 3 , such as Figure 8 shown, in an alternative implementation, the data monitoring method provided by the embodiments of the present invention may further include S111-S112.

[0100] S111. The monitoring device determines whether the connection relationship between the monitoring device and the device to be monitored is disconnected.

[0101] It should be understood that whether the connection relationship between the monitoring device and the device to be monitored is disconnected is used to represent whether the monitoring device and the device to be monitored can transmit monitoring data. Specifically, when the connection relationship is disconnected, it indicates that the monitoring device and the device to be monitored cannot transmit monitoring data; otherwise, when the connection relationship is not disconnected, it indicates that the monitoring device and the device to be monitored can transmit monitoring data.

[0102] S112. When the connection relationship between the monitoring device and the device to be monitored is disconnected, the monitoring device sends an alarm message.

[0103] Combined with the description of the above embodiments, it should be understood that when the connection relationship is disconnected, it indicates that the monitoring device and the device to be monitored cannot transmit monitoring data. In the embodiments of the present invention, when the monitoring device and the device to be monitored cannot transmit monitoring data, the monitoring device can send an alarm message so that the device or relevant personnel can perform corresponding processing.

[0104] Optionally, when the connection relationship between the monitoring device and the device to be monitored is not disconnected, the monitoring device can determine whether it has received the monitoring data of the device to be monitored, and continue to wait for the monitoring data sent by the device to be monitored when it has not received the monitoring data, or enter the next connection (i.e., send a long polling request again).

[0105] Embodiments of the present invention can divide functional modules for monitoring devices and monitored devices according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiments of the present invention is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0106] In the case of dividing each functional module corresponding to each function, Figure 9 Fig. shows a possible structural schematic diagram of the data monitoring device (specifically the above-mentioned monitored device) involved in the above embodiment, as Figure 9 shown, the data monitoring device 30 may include: a receiving module 301, an obtaining module 302, a determining module 303, a processing module 304, and a sending module 305.

[0107] The receiving module 301 is configured to receive a long polling request sent by the monitoring device, and the long polling request is used to request to obtain the monitoring data of the monitored device.

[0108] The obtaining module 302 is configured to obtain a plurality of monitoring data of the monitored device and the priorities of the plurality of monitoring data.

[0109] The determining module 303 is configured to determine the processing order of the plurality of monitoring data according to the priorities of the plurality of monitoring data.

[0110] The processing module 304 is configured to add the plurality of monitoring data to the target queue according to the processing order of the plurality of monitoring data.

[0111] The sending module 305 is configured to send a long polling response to the monitoring device, and the long polling response includes the target queue.

[0112] Optionally, the determining module 303 is further configured to determine whether the target queue includes high-priority monitoring data.

[0113] The sending module 305 is specifically configured to send the long polling response to the monitoring device when the target queue includes high-priority monitoring data.

[0114] Optionally, the determining module 303 is further configured to determine whether the remaining capacity of the target queue is less than or equal to a capacity threshold when the target queue does not include high-priority monitoring data.

[0115] The sending module 305 is specifically further configured to send the long polling response to the monitoring device when the remaining capacity of the target queue is less than or equal to the capacity threshold.

[0116] Optionally, the determination module 303 is further configured to determine whether the connection duration between the monitoring device and the device to be monitored is greater than or equal to a duration threshold when the remaining capacity of the target queue is greater than the capacity threshold.

[0117] The sending module 305 is specifically further configured to send the long polling response to the monitoring device when the connection duration is greater than or equal to the duration threshold.

[0118] In the case of adopting an integrated unit, Figure 10 FIG. shows a possible structural schematic diagram of the data monitoring device (specifically the device to be monitored) involved in the above embodiment. As Figure 10 shown, the data monitoring device 40 may include: a processing module 401 and a communication module 402. The processing module 401 may be configured to control and manage the operations of the data monitoring device 40. The communication module 402 may be configured to support the communication of the data monitoring device 40 with other entities. Optionally, as Figure 10 shown, the data monitoring device 40 may further include a storage module 403 for storing the program code and data of the data monitoring device 40.

[0119] Among them, the processing module 401 may be a processor or a controller (for example, it may be the processor 201 as shown above Figure 2 shown). The communication module 402 may be a transceiver, a transceiver circuit, or a communication interface, etc. (for example, it may be the network interface 203 as shown above Figure 2 shown). The storage module 403 may be a memory (for example, it may be the memory 202 as shown above Figure 2 shown).

[0120] Among them, when the processing module 401 is a processor, the communication module 402 is a transceiver, and the storage module 403 is a memory, the processor, the transceiver, and the memory may be connected through a bus. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0121] In the case of dividing each functional module according to the corresponding functions, Figure 11 FIG. shows a possible structural schematic diagram of the data monitoring device (specifically the monitoring device) involved in the above embodiment, as Figure 11 shown, the data monitoring device 50 may include: a sending module 501, a receiving module 502, and a processing module 503.

[0122] A sending module 501, configured to send a long polling request to a device to be monitored, where the long polling request is used to request to obtain monitoring data of the device to be monitored.

[0123] A receiving module 502, configured to receive a long polling response sent by the device to be monitored, where the long polling response includes a target queue, the target queue includes a plurality of monitoring data obtained by the device to be monitored, the target queue is used to represent the processing order of the plurality of monitoring data, and the processing order is determined by the device to be monitored according to the priorities of the plurality of monitoring data.

[0124] A processing module 503, configured to process the plurality of monitoring data according to the processing order.

[0125] Optionally, the data monitoring device 50 further includes a determining module 504 and an alarming module 505.

[0126] The determining module 504 is configured to determine whether the connection relationship between the monitoring device and the device to be monitored is disconnected.

[0127] The alarming module 505 is configured to send an alarm message when the connection relationship is disconnected.

[0128] In the case of adopting an integrated unit, Figure 12 shows a possible structural schematic diagram of the data monitoring device (specifically the above-mentioned monitoring device) involved in the above embodiments. As Figure 12 shown, the data monitoring device 60 may include: a processing module 601 and a communication module 602. The processing module 601 may be configured to control and manage the operations of the data monitoring device 60. The communication module 602 may be configured to support the communication between the data monitoring device 60 and other entities. Optionally, as Figure 12 shown, the data monitoring device 60 may further include a storage module 603, configured to store program codes and data of the data monitoring device 60.

[0129] Among them, the processing module 601 may be a processor or a controller (for example, it may be the processor 201 as shown above Figure 2 shown). The communication module 602 may be a transceiver, a transceiver circuit or a communication interface, etc. (for example, it may be the network interface 203 as shown above Figure 2 shown). The storage module 603 may be a memory (for example, it may be the memory 202 as shown above Figure 2 shown).

[0130] Among them, when the processing module 601 is a processor, the communication module 602 is a transceiver, and the storage module 603 is a memory, the processor, the transceiver and the memory may be connected through a bus. The bus may be a PCI bus or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0131] It should be understood that in various embodiments of the present invention, the magnitudes of the serial numbers of the above processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0132] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.

[0133] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0135] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more media integrated therein. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.

[0136] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A data monitoring method, characterized in that, it is applied to the device to be monitored, and the method includes: Receiving a long polling request sent by a monitoring device, where the long polling request is used to request to obtain the monitoring data of the device to be monitored; Obtaining a plurality of monitoring data of the device to be monitored and the priorities of the plurality of monitoring data; Determining the processing order of the plurality of monitoring data according to the priorities of the plurality of monitoring data, and adding the plurality of monitoring data to a target queue in accordance with the processing order of the plurality of monitoring data; When the target queue includes high-priority monitoring data, sending a long polling response to the monitoring device, where the long polling response includes the target queue; Or, when the target queue does not include high-priority monitoring data and the remaining capacity of the target queue is less than or equal to a capacity threshold, sending the long polling response to the monitoring device; Or, when the remaining capacity of the target queue is greater than the capacity threshold and the connection duration between the monitoring device and the device to be monitored is greater than or equal to a duration threshold, sending the long polling response to the monitoring device.

2. A data monitoring method, characterized in that, it is applied to a monitoring device, and the method includes: Sending a long polling request to a device to be monitored, where the long polling request is used to request to obtain the monitoring data of the device to be monitored; Receiving the long polling response sent by the device to be monitored, where the long polling response includes a target queue, the target queue includes a plurality of monitoring data obtained by the device to be monitored, the target queue is used to represent the processing order of the plurality of monitoring data, the processing order is determined by the device to be monitored according to the priorities of the plurality of monitoring data, and the long polling response is sent by the device to be monitored to the monitoring device when the target queue includes high-priority monitoring data; or the long polling response is sent by the device to be monitored to the monitoring device when the target queue does not include high-priority monitoring data and the remaining capacity of the target queue is less than or equal to a capacity threshold; or the long polling response is sent by the device to be monitored to the monitoring device when the remaining capacity of the target queue is greater than the capacity threshold and the connection duration between the monitoring device and the device to be monitored is greater than or equal to a duration threshold; Processing the plurality of monitoring data in accordance with the processing order.

3. The data monitoring method according to claim 2, characterized in that, the method further includes: Determining whether the connection relationship between the monitoring device and the device to be monitored is disconnected; When the connection relationship is disconnected, sending an alarm message.

4. A data monitoring device, characterized in that, it includes: A receiving module, an obtaining module, a determining module, a processing module and a sending module; The receiving module is used to receive a long polling request sent by a monitoring device, where the long polling request is used to request to obtain the monitoring data of a device to be monitored; The obtaining module is used to obtain a plurality of monitoring data of the device to be monitored and the priorities of the plurality of monitoring data; The determining module is configured to determine the processing order of the multiple monitoring data according to the priorities of the multiple monitoring data; The processing module is configured to add the multiple monitoring data to a target queue according to the processing order of the multiple monitoring data; The sending module is configured to, when the target queue includes high-priority monitoring data, send a long polling response to the monitoring device, where the long polling response includes the target queue; Or the sending module is configured to, when the target queue does not include high-priority monitoring data and the remaining capacity of the target queue is less than or equal to a capacity threshold, send the long polling response to the monitoring device; Or the sending module is configured to, when the remaining capacity of the target queue is greater than the capacity threshold and the connection duration between the monitoring device and the monitored device is greater than or equal to a duration threshold, send the long polling response to the monitoring device.

5. A data monitoring device Characterized in that It includes: A sending module, a receiving module, and a processing module; The sending module is configured to send a long polling request to a monitored device, where the long polling request is used to request to obtain monitoring data of the monitored device; The receiving module is configured to receive a long polling response sent by the monitored device, where the long polling response includes a target queue, the target queue includes multiple monitoring data obtained by the monitored device, the target queue is used to represent the processing order of the multiple monitoring data, the processing order is determined by the monitored device according to the priorities of the multiple monitoring data, and the long polling response is sent by the monitored device to the monitoring device when the target queue includes high-priority monitoring data; or the long polling response is sent by the monitored device to the monitoring device when the target queue does not include high-priority monitoring data and the remaining capacity of the target queue is less than or equal to a capacity threshold; or the long polling response is sent by the monitored device to the monitoring device when the remaining capacity of the target queue is greater than the capacity threshold and the connection duration between the monitoring device and the monitored device is greater than or equal to a duration threshold; The processing module is configured to process the multiple monitoring data according to the processing order.

6. The data monitoring device according to claim 5 Characterized in that The data monitoring device further includes a determining module and an alarming module; The determining module is configured to determine whether the connection relationship between the monitoring device and the monitored device is disconnected; The alarming module is configured to send an alarm message when the connection relationship is disconnected.

7. A server Characterized in that The server includes: A processor; A memory configured to store executable instructions of the processor; Wherein, the processor is configured to execute the instructions to implement the data monitoring method as claimed in claim 1, or implement the data monitoring method as claimed in claim 2 or 3.

8. A computer-readable storage medium, on which instructions are stored Characterized in that When the instructions in the computer-readable storage medium are executed by the server, the server is enabled to execute the data monitoring method described in claim 1, or execute the data monitoring method described in claim 2 or 3.

Citation Information

Patent Citations

  • Method, device and system for monitoring SQLs

    CN106294075A

  • A method and apparatus for obtaining monitoring data

    CN109167830A