Real-time monitoring method, device, computer equipment and storage medium
By analyzing the connection request and authentication parameters of IoT devices, the available status values of the protocol are collected in real time, solving the problem that the existing technology cannot monitor the protocol conversion status of IoT devices, real-time monitoring of the protocol conversion status of IoT devices is realized, and improving the System stability and reliability.
Patent Information
- Application Number
- CN202411166186.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-23
AI Technical Summary
Existing monitoring technologies cannot monitor the protocol conversion status of each IoT device in real time, especially in the core service of protocol access conversion using plug-in design, and cannot effectively monitor the protocol conversion status of each IoT device.
By detecting the connection request of the IoT device, analyzing the authentication parameters and sending a query request to obtain the available status values of the IoT access protocol, collecting and recording these status values in real time, thereby realizing monitoring of the status of the IoT device protocol conversion.
Real-time monitoring of the protocol conversion status of IoT devices is realized, protocol availability and performance problems can be discovered in a timely manner, and system reliability and stability are improved.
Smart Images

Figure CN118694694B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a real-time monitoring method, device, computer equipment and storage medium. Background Art
[0002] The monitoring and alarm system of the IoT platform is a key component that can monitor the system status in real time, generate valuable indicators and alarm information, and send alarm notifications by collecting, analyzing and processing data. Although modern system monitoring technology has comprehensive monitoring capabilities from Infrastructure as a Service (IaaS) to Platform as a Service (PaaS) and Software as a Service (SaaS), relying solely on monitoring data at these levels is not enough to determine whether the business is truly running normally, especially for the protocol access conversion core service that adopts a plug-in design. Since each protocol parser runs as an independent plug-in on the same service, the current monitoring technology cannot monitor the protocol conversion status of each IoT device. Summary of the invention
[0003] The embodiments of the present invention provide a real-time monitoring method, apparatus, computer equipment and storage medium, aiming to solve the problem that the protocol conversion status of each IoT device cannot be monitored at present.
[0004] In a first aspect, an embodiment of the present invention provides a real-time monitoring method, the method comprising:
[0005] If a connection request from an IoT device to the IoT platform is detected, the connection request is parsed to obtain authentication parameters of the IoT device, and a query request is sent to the IoT platform according to the authentication parameters so that the IoT platform returns an available status value of the IoT access protocol used by the IoT device;
[0006] The available status value is collected and recorded in real time.
[0007] In a second aspect, an embodiment of the present invention further provides a real-time monitoring device, the device comprising:
[0008] A first parsing unit is configured to, if a connection request of an IoT device to connect to an IoT platform is detected, parse the connection request to obtain authentication parameters of the IoT device, and send a query request to the IoT platform according to the authentication parameters so that the IoT platform returns an available status value of an IoT access protocol used by the IoT device;
[0009] The first collection unit is used to collect and record the available status value in real time.
[0010] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor connected to the memory, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0011] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.
[0012] The present invention provides a real-time monitoring method, device, computer equipment and storage medium. When a connection request of an Internet of Things device to connect to an Internet of Things platform is detected, the connection request can be parsed to obtain the authentication parameters of the Internet of Things device, and then a query request is sent to the Internet of Things platform according to the authentication parameters. The Internet of Things platform returns the available status value of the Internet of Things access protocol used by the Internet of Things platform according to the query request, and then the available status value is collected and recorded. Then, the status of the Internet of Things access protocol can be monitored in real time through the available status value, so as to realize the monitoring of the protocol conversion status of the Internet of Things device. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0014] Figure 1 is a flow chart of a real-time monitoring method provided by an embodiment of the present invention;
[0015] Figure 2 is a block diagram of a real-time monitoring method provided by an embodiment of the present invention;
[0016] Figure 3 is a schematic block diagram of a real-time monitoring device provided by an embodiment of the present invention;
[0017] Figure 4 It is a schematic block diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, operations, elements, components and / or groups thereof.
[0020] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in the specification of the present invention and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0021] See also Figure 1 , Figure 1 The flowchart of the real-time monitoring method provided by the embodiment of the present invention is shown in FIG. The real-time monitoring method of the embodiment of the present invention can be applied to a computer device to collect and obtain the available state value of the Internet of Things access protocol of the Internet of Things device accessing the Internet of Things platform, and monitor the Internet of Things access protocol through the available state value. Figure 1 As shown, the method includes steps S100-S110.
[0022] S100, if a connection request of an IoT device to connect to an IoT platform is detected, the connection request is parsed to obtain authentication parameters of the IoT device, and a query request is sent to the IoT platform according to the authentication parameters so that the IoT platform returns an available status value of the IoT access protocol used by the IoT device.
[0023] In the embodiment of the present invention, the IoT device can access the IoT platform by sending a connection request to the IoT platform to connect with the IoT platform. The IoT platform needs to determine the corresponding IoT access protocol according to the specific type of the IoT device. The IoT access protocol may include MQTT protocol, TCP protocol, TLink protocol, HTTP protocol, LWM2M protocol and other IoT access protocols based on IPv4 and IPv6. At the same time, the authentication parameters of the IoT device can also be collected and obtained, including but not limited to parameters such as device ID, device name and device key.
[0024] Then, a query request can be sent to the IoT platform according to the authentication parameters, so that the IoT platform can return an available status value. The available status value can include success and failure or yes and no, which is used to indicate whether the IoT access protocol is available or unavailable at the current moment. In addition to collecting the available status value, the real-time status of the IoT access protocol can also be collected. The real-time status includes the protocol name, response time, connectivity status, success rate, protocol parsing status, and resource occupancy. Connectivity status refers to whether the protocol can successfully establish a connection with the IoT platform. Response time refers to the time difference between sending a protocol request and receiving a response. Success rate refers to the ratio of the number of successful protocol requests to the total number of requests within a period of time. Resource occupancy refers to the system resources (such as CPU, memory, network bandwidth, etc.) occupied by the protocol service during operation. Protocol parsing status refers to whether the protocol parser can correctly parse data packets for communications based on a specific protocol, and whether the parsed data conforms to the expected format.
[0025] The above steps can be configured as a protocol status collector, such as Figure 2 As shown, when an IoT device is connected to the IoT platform, on the one hand, the IoT platform processes the connection request of the IoT device normally, and on the other hand, the configured protocol status collector confirms the IoT access protocol used by the IoT device and the authentication parameters of the IoT device, and sends a query request to the IoT platform based on the authentication parameters and the IoT access protocol to collect the available status value of the IoT access protocol in real time.
[0026] In some embodiments, such as this embodiment, step S100 may include the following steps:
[0027] Confirm the protocol type of the IoT access protocol for the IoT device to access the IoT platform;
[0028] The query request is sent to the Internet of Things platform according to the protocol type and the authentication parameters.
[0029] In an embodiment of the present invention, the Internet of Things access protocol generally includes the MQTT protocol, the TCP protocol, the TLink protocol, the HTTP protocol and the LWM2M protocol. Different query methods may be used for different protocols. The protocol type of the Internet of Things access protocol may be confirmed first, and then the query method may be confirmed according to the specific protocol type. Finally, a query request may be sent to the Internet of Things platform through the corresponding query method.
[0030] For example, for the MQTT protocol, a query request can be sent to the IoT platform based on the device ID, device name, device key, and protocol name of the MQTT protocol of the IoT device, and a timeout can be set. If the available status value is not returned within the timeout, the status of the IoT access protocol at that moment can be set to timeout or unavailable. For the MQTT protocol, the available status value returned by the IoT platform is usually true or false, true means available, and false means unavailable.
[0031] For the TCP protocol, the authentication parameters of the IoT device can be binary encoded, and then a query request can be sent to the IoT platform, and the available status value can be confirmed based on the returned result. For the TCP protocol, if the IoT platform returns the corresponding matching value within the timeout period, it indicates that the TCP protocol is available. If no matching value is returned within the timeout period, it indicates that the TCP protocol is unavailable.
[0032] For the HTTP protocol, a query request can be sent through the HTTP standard API interface, and the code value or other content of the HTTP response can be matched. If the response code and content of the query request meet expectations, the HTTP protocol is considered to be available at that moment.
[0033] For the LWM2M protocol, a query request can be initiated through the IMEI value of the IoT device based on the UDP application layer protocol. If the IoT platform responds to the query request as expected, the LWM2M protocol is available at that moment.
[0034] S110, collecting and recording the available status value in real time.
[0035] In an embodiment of the present invention, after receiving the query request, the physical network platform returns the corresponding available status value according to the status of the Internet of Things access protocol. Then, the available status value returned by the Internet of Things platform is collected and recorded in real time. Real-time collection means that the process of connecting the Internet of Things device to the Internet of Things platform through the Internet of Things access protocol is a continuous process, and the available status value of the Internet of Things access protocol at each moment can be collected, so that the Internet of Things access protocol can be monitored in real time. It can be understood that the query request sent in step S100 is also sent in real time, starting from the time the Internet of Things device accesses the Internet of Things platform to the time when the Internet of Things device disconnects from the Internet of Things platform.
[0036] In some embodiments, such as this embodiment, the real-time monitoring method further includes the following steps:
[0037] Collect and record the protocol state timing value of the Internet of Things access protocol;
[0038] All the collected protocol status timing values are matched with all the available status values and displayed visually.
[0039] In the embodiment of the present invention, the protocol state timing value matches the available state value one by one, that is, at a certain moment, there is a corresponding available state value, and the available state value can be available or unavailable. For example, for the moment of 13:00, the available state value of the Internet of Things access protocol can be available, and for the moment of 13:01, the available state value of the Internet of Things access protocol can be unavailable. It can be understood that the above is only an example, and the collected protocol state timing value and available state value depend on the collection interval, for example, once every several seconds or minutes, or once every second.
[0040] All protocol status timing values and available status values collected up to the current moment are matched one by one, and a visual chart is generated for display. For example, a binary chart can be generated with time on the horizontal axis and 1 or 0 on the vertical axis, 1 for available and 0 for unavailable. As time goes by, the content of the binary chart will increase with the collected content, so that the status of a certain IoT access protocol at every moment can be intuitively understood through the visual chart.
[0041] In some embodiments, such as this embodiment, the real-time monitoring method further includes the following steps:
[0042] Send an acquisition request to the Internet of Things platform to obtain the real-time status of the Internet of Things access protocol.
[0043] In the embodiment of the present invention, the real-time status includes the protocol name, response time, connectivity status, success rate, protocol parsing status and resource occupancy. Connectivity status refers to whether the protocol can successfully establish a connection with the Internet of Things platform, response time refers to the time difference between the sending of a protocol request and the receiving of a response, success rate refers to the ratio of the number of successful protocol requests to the total number of requests within a period of time, resource occupancy refers to the system resources (such as CPU, memory, network bandwidth, etc.) occupied by the protocol service during operation, and protocol parsing status refers to whether the protocol parser can correctly parse the data message for communication based on a specific protocol, and whether the parsed data conforms to the expected format. The real-time status of each Internet of Things access protocol can be obtained from the Internet of Things platform, so that users can understand the success rate, resource occupancy and other information of the Internet of Things access protocol in addition to the available status value of the Internet of Things access protocol.
[0044] In some embodiments, such as this embodiment, the real-time monitoring method further includes the following steps:
[0045] If the available status value returned by the Internet of Things platform is not received within a preset time range, the available status value of the Internet of Things access protocol is recorded as unavailable.
[0046] In an embodiment of the present invention, the preset time range is the timeout time. When the available status value returned by the Internet of Things platform is not received within the timeout time, the status of the Internet of Things access protocol at this time is recorded as unavailable, or it can also be directly recorded as timeout, so that the user can understand the status of the Internet of Things access protocol in more detail.
[0047] In some embodiments, such as this embodiment, the real-time monitoring method further includes the following steps:
[0048] If the available state value is the first state value, the state of the Internet of Things access protocol is recorded as available;
[0049] If the available status value is the second status value, the status of the Internet of Things access protocol is recorded as unavailable.
[0050] In the embodiment of the present invention, the available status value may include a first status value and a second status value, the first status value may be true, available, or a specific response value, the second status value may be false, unavailable, or empty, and the second status value being empty indicates that the available status value returned by the physical network platform has not been received. The first status value and the second status value can accurately indicate the available status of the Internet of Things access protocol at a certain moment.
[0051] Figure 3 is a schematic block diagram of a real-time monitoring device 200 provided in an embodiment of the present invention. Figure 3 As shown, corresponding to the above real-time monitoring method, the present invention also provides a real-time monitoring device 200. The real-time monitoring device 200 includes a unit for executing the above real-time monitoring method. Figure 3 The real-time monitoring device 200 includes a first parsing unit 201 and a first collecting unit 202 .
[0052] Wherein, if a connection request of an IoT device to connect to an IoT platform is detected, the first parsing unit 201 is used to parse the connection request to obtain authentication parameters of the IoT device, and send a query request to the IoT platform according to the authentication parameters so that the IoT platform returns an available status value of the IoT access protocol used by the IoT device;
[0053] The first collecting unit 202 is used for collecting and recording the available status value in real time.
[0054] In some embodiments, such as this embodiment, the first parsing unit 201 further includes a first confirmation unit and a second collection unit.
[0055] The first confirmation unit is used to confirm the protocol type of the Internet of Things access protocol for the Internet of Things device to access the Internet of Things platform;
[0056] The second collection unit is used to send the query request to the Internet of Things platform according to the protocol type and the authentication parameter.
[0057] In some embodiments, such as the present embodiment, the real-time monitoring device 200 further includes a third acquisition unit and a first visualization unit.
[0058] Wherein, the third acquisition unit is used to collect and record the protocol state timing value of the Internet of Things access protocol;
[0059] The first visualization unit is used to match all the collected protocol status timing values with all the available status values and perform visual display.
[0060] In some embodiments, such as this embodiment, the real-time monitoring device 200 further includes a first sending unit.
[0061] The first sending unit is used to send an acquisition request to the Internet of Things platform to obtain the real-time status of the Internet of Things access protocol.
[0062] In some embodiments, such as this embodiment, the real-time monitoring device 200 further includes a first marking unit.
[0063] The first marking unit is used to record the available status value of the Internet of Things access protocol as unavailable if the available status value returned by the Internet of Things platform is not received within a preset time range.
[0064] In some embodiments, such as the present embodiment, the real-time monitoring device 200 further includes a second marking unit and a third marking unit.
[0065] The second marking unit is used to mark the state of the Internet of Things access protocol as available if the available state value is the first state value;
[0066] The third marking unit is used to mark the state of the Internet of Things access protocol as unavailable if the available state value is a second state value.
[0067] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned real-time monitoring device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0068] The above-mentioned real-time monitoring device can be implemented in the form of a computer program. The computer program can be Figure 4 Runs on the computer device shown.
[0069] See also Figure 4 The computer device 300 includes a processor 302 , a memory and a network interface 305 connected via a system bus 301 , wherein the memory may include a non-volatile storage medium 303 and an internal memory 304 .
[0070] The non-volatile storage medium 303 can store an operating system 3031 and a computer program 3032. When the computer program 3032 is executed, the processor 302 can execute a real-time monitoring method.
[0071] The processor 302 is used to provide computing and control capabilities to support the operation of the entire computer device 300 .
[0072] The internal memory 304 provides an environment for the operation of the computer program 3032 in the non-volatile storage medium 303. When the computer program 3032 is executed by the processor 302, the processor 302 can execute a real-time monitoring method.
[0073] The network interface 305 is used to communicate with other devices. Those skilled in the art will appreciate that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 300 to which the solution of the present application is applied. The specific computer device 300 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0074] It should be understood that in the embodiment of the present application, the processor 302 may be a central processing unit (CPU), and the processor 302 may also be other general-purpose processors, digital signal processors (FSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0075] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0076] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, any embodiment of the above-mentioned real-time monitoring method is implemented.
[0077] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0078] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0079] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0080] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device to execute all or part of the steps of the method described in each embodiment of the present invention.
[0082] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0083] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
[0084] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A real-time monitoring method, characterized in that: The method comprises: If a connection request from an IoT device to the IoT platform is detected, the connection request is parsed to obtain authentication parameters of the IoT device, and a query request is sent to the IoT platform according to the authentication parameters so that the IoT platform returns an available status value of the IoT access protocol used by the IoT device; Collecting and recording the available status value in real time; Sending an acquisition request to the Internet of Things platform to obtain the real-time status of the Internet of Things access protocol, wherein the real-time status includes the protocol name, response time, connectivity status, success rate, protocol parsing status, and resource occupancy; If the available status value returned by the Internet of Things platform is not received within a preset time range, the available status value of the Internet of Things access protocol is recorded as unavailable; If the available state value is the first state value, the state of the Internet of Things access protocol is recorded as available; If the available status value is the second status value, the status of the Internet of Things access protocol is recorded as unavailable.
2. The method according to claim 1, characterized in that The step of sending a query request to the Internet of Things platform according to the authentication parameters includes: Confirm the protocol type of the IoT access protocol for the IoT device to access the IoT platform; The query request is sent to the Internet of Things platform according to the protocol type and the authentication parameters.
3. The method according to claim 1, characterized in that The method further comprises: Collect and record the protocol state timing value of the Internet of Things access protocol.
4. The method according to claim 3, characterized in that The method further comprises: All the collected protocol status timing values are matched with all the available status values and displayed visually.
5. A real-time monitoring device, characterized in that: The device comprises: A first parsing unit is configured to, if a connection request of an IoT device to connect to an IoT platform is detected, parse the connection request to obtain authentication parameters of the IoT device, and send a query request to the IoT platform according to the authentication parameters so that the IoT platform returns an available status value of an IoT access protocol used by the IoT device; A first collection unit, used for collecting and recording the available state value in real time; A first sending unit, configured to send an acquisition request to the Internet of Things platform to acquire the real-time status of the Internet of Things access protocol, wherein the real-time status includes a protocol name, a response time, a connectivity status, a success rate, a protocol parsing status, and resource occupancy; A first marking unit, configured to mark the available status value of the Internet of Things access protocol as unavailable if the available status value returned by the Internet of Things platform is not received within a preset time range; A second marking unit, configured to mark the state of the Internet of Things access protocol as available if the available state value is a first state value; The third marking unit is used to mark the state of the Internet of Things access protocol as unavailable if the available state value is a second state value.
6. A computer device, characterized in that: The computer device comprises a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 can be implemented.
Citation Information
Patent Citations
Device for accessing an underground or overground civil engineering infrastructure having a multi-protocol communication module, and system for managing a fleet of access devices
CN112789381A
Internet of Things connection state monitoring method and device, electronic equipment and medium
CN114900452A
Internet of Things cloud side communication method and system
CN115002148A
Interaction method, processor and device for Internet platform and Internet of Things equipment
CN116055524A
Intelligent remote monitoring method for fire-fighting
US20220035818A1
